-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathmake22.cmd
35 lines (32 loc) · 1.14 KB
/
make22.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@echo off
echo.
REM CD to the directory above the script location - which should be the main src path
rem cd "%~dp0"..
cd putty
echo Starting
if exist "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" (
SET "_VSPATHBASE=C:\Program Files\Microsoft Visual Studio\2022\Community"
)
if exist "C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\Tools\VsDevCmd.bat" (
SET "_VSPATHBASE=C:\Program Files\Microsoft Visual Studio\2022\Professional"
)
if exist "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" (
SET "_VSPATHBASE=C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
)
echo.
call "%_VSPATHBASE%\Common7\Tools\VsDevCmd.bat"
echo.
call "%_VSPATHBASE%\Common7\Tools\vsdevcmd\ext\vcvars.bat"
echo.
echo configuring...
cmake -G "Visual Studio 17 2022" -A Win32 .
IF %ERRORLEVEL% NEQ 0 (echo Error during configuration && exit /b %ERRORLEVEL% )
echo.
echo Building...
cmake --build . --config Release --target putty
IF %ERRORLEVEL% NEQ 0 (echo Error during building && exit /b %ERRORLEVEL% )
echo.
echo Renaming...
rename Release\putty.exe PuTTYNG.exe
echo Finished
echo.