2024-05-14 18:33:05 +02:00
|
|
|
@echo off
|
2024-05-20 13:35:22 +02:00
|
|
|
call "third-party\common\win\premake\premake5.exe" --os=windows --file="premake5.lua" genproto
|
|
|
|
call "third-party\common\win\premake\premake5.exe" --os=windows --file="premake5.lua" vs2022
|
2024-05-14 18:33:05 +02:00
|
|
|
|
|
|
|
:: VS WHERE to get MSBUILD
|
|
|
|
set "vswhere_exe=third-party\common\win\vswhere\vswhere.exe"
|
|
|
|
if not exist "%vswhere_exe%" (
|
|
|
|
echo "vswhere.exe wasn't found"
|
|
|
|
goto :end_script_with_err
|
|
|
|
)
|
|
|
|
set "my_vs_path=%vs_static_path%"
|
|
|
|
if "%my_vs_path%"=="" (
|
|
|
|
for /f "tokens=* delims=" %%A in ('"%vswhere_exe%" -prerelease -latest -nocolor -nologo -property installationPath 2^>nul') do (
|
|
|
|
set "my_vs_path=%%~A\MSBuild\Current\Bin\MSBuild.exe"
|
|
|
|
)
|
|
|
|
)
|
2024-05-20 13:35:22 +02:00
|
|
|
goto :builder
|
2024-05-14 20:49:39 +02:00
|
|
|
|
|
|
|
:: exit with error
|
|
|
|
:end_script_with_err
|
|
|
|
popd
|
|
|
|
endlocal & (
|
|
|
|
exit /b 1
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2024-05-20 13:35:22 +02:00
|
|
|
:builder
|
|
|
|
|
2024-05-14 18:33:05 +02:00
|
|
|
:: -v:n make it so we can actually see what commands it runs
|
2024-05-20 13:35:22 +02:00
|
|
|
call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=debug /p:Platform=x64 -v:n
|
|
|
|
set /a _exit=%errorlevel%
|
|
|
|
if %_exit% equ 1 (
|
|
|
|
goto :end_script_with_err
|
|
|
|
)
|
|
|
|
|
|
|
|
call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=debug /p:Platform=Win32 -v:n
|
|
|
|
set /a _exit=%errorlevel%
|
|
|
|
if %_exit% equ 1 (
|
|
|
|
goto :end_script_with_err
|
|
|
|
)
|
|
|
|
|
|
|
|
call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=release /p:Platform=x64 -v:n
|
|
|
|
set /a _exit=%errorlevel%
|
|
|
|
if %_exit% equ 1 (
|
|
|
|
goto :end_script_with_err
|
|
|
|
)
|
|
|
|
|
|
|
|
call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=release /p:Platform=Win32 -v:n
|
2024-05-14 18:33:05 +02:00
|
|
|
set /a _exit=%errorlevel%
|
2024-05-20 13:35:22 +02:00
|
|
|
if %_exit% equ 1 (
|
2024-05-14 18:33:05 +02:00
|
|
|
goto :end_script_with_err
|
|
|
|
)
|