Skip to content

Commit

Permalink
bugfix of releasetest.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
treefrogframework committed Oct 31, 2022
1 parent ddc43f9 commit f43ec93
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
36 changes: 35 additions & 1 deletion tools/test/releasetest/releasetest.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,41 @@ if "%QMAKE%" == "" (
exit /B 1
)

:: cmake options
devenv /? | find "Visual Studio 2022" >NUL
if not ERRORLEVEL 1 (
set VSVER=2022
if /i "%Platform%" == "x64" (
set CMAKEOPT=-G"Visual Studio 17 2022" -A x64
) else (
set CMAKEOPT=-G"Visual Studio 17 2022" -A Win32
)
goto :step1
)

devenv /? | find "Visual Studio 2019" >NUL
if not ERRORLEVEL 1 (
set VSVER=2019
if /i "%Platform%" == "x64" (
set CMAKEOPT=-G"Visual Studio 16 2019" -A x64
) else (
set CMAKEOPT=-G"Visual Studio 16 2019" -A Win32
)
goto :step1
)

devenv /? | find "Visual Studio 2017" >NUL
if not ERRORLEVEL 1 (
set VSVER=2017
if /i "%Platform%" == "x64" (
set CMAKEOPT=-G"Visual Studio 15 2017 Win64"
) else (
set CMAKEOPT=-G"Visual Studio 15 2017"
)
goto :step1
)

:step1
cd /D %BASEDIR%
rd /Q /S %APPNAME%
tspawn new %APPNAME%
Expand Down Expand Up @@ -97,7 +131,7 @@ cd /D %APPDIR%
if exist build rd /Q /S build
del /Q /F lib\*.*
cmake --version
cmake -S . -B build -DCMAKE_BUILD_TYPE=%1
cmake %CMAKEOPT% -S . -B build -DCMAKE_BUILD_TYPE=%1
if ERRORLEVEL 1 (
echo;
echo CMake Error!
Expand Down
2 changes: 1 addition & 1 deletion tools/tspawn/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ static void printSuccessMessage(const QString &model)
msg += "\n or\n\ncmake:\n";
msg += " Run `cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug` to generate Makefile for debug mode.\n";
msg += " Run `cmake -S . -B build -DCMAKE_BUILD_TYPE=Release` to generate Makefile for release mode.\n";
msg += " Run `cd build; make cmake` to regenerate Makefile.";
msg += " Run `cmake --build build --target cmake` to regenerate Makefile.";
}

putchar('\n');
Expand Down

0 comments on commit f43ec93

Please sign in to comment.