From 748af4435327f9d5d472e6572de801e4bfe4c715 Mon Sep 17 00:00:00 2001 From: Detanup01 <91248446+Detanup01@users.noreply.github.com> Date: Mon, 20 May 2024 13:35:22 +0200 Subject: [PATCH] manual script for premake --- build_linux_premake.sh | 21 +++++++----------- build_win_premake.bat | 49 +++++++++++++++++++++--------------------- 2 files changed, 33 insertions(+), 37 deletions(-) diff --git a/build_linux_premake.sh b/build_linux_premake.sh index c3a5bada..6a706f58 100644 --- a/build_linux_premake.sh +++ b/build_linux_premake.sh @@ -1,24 +1,19 @@ #!/usr/bin/env bash -# doto make a check here - -curl -L "https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz" --ssl-no-revoke --output premake.tar.gz -tar -xf premake.tar.gz - -chmod +777 premake5 # do we really need this? -./premake5 --os=linux generateproto +chmod +777 third-party/common/win/premake/premake5 +./third-party/common/win/premake/premake5 --os=linux genproto # target other than clang? -./premake5 --os=linux --cc=clang gmake +./third-party/common/win/premake/premake5 --os=linux --cc=clang gmake2 # going into build dir -cd GBE_Build +cd build/project/gmake2/linux # you can select individual or all # make config=debug_x32 -make config=debug_x32 && make config=debug_x64 -make config=release_x32 && make config=release_x64 -make config=experimentaldebug_x32 && make config=experimentaldebug_x64 -make config=experimentalrelease_x32 && make config=experimentalrelease_x64 +make config=debug_x32 +make config=debug_x64 +make config=release_x32 +make config=release_x64 cd .. \ No newline at end of file diff --git a/build_win_premake.bat b/build_win_premake.bat index a1f77b94..2447a38e 100644 --- a/build_win_premake.bat +++ b/build_win_premake.bat @@ -1,12 +1,6 @@ @echo off -if exist "premake/premake5.exe" ( - goto :premakerun -) -curl.exe -L "https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip" --ssl-no-revoke --output premake.zip -call "third-party/deps/win/7za/7za.exe" x -y premake.zip -opremake -aoa -:premakerun -call "premake/premake5.exe" --os=windows --file="premake5.lua" generateproto -call "premake/premake5.exe" --os=windows --file="premake5.lua" vs2022 +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 :: VS WHERE to get MSBUILD set "vswhere_exe=third-party\common\win\vswhere\vswhere.exe" @@ -20,15 +14,7 @@ if "%my_vs_path%"=="" ( set "my_vs_path=%%~A\MSBuild\Current\Bin\MSBuild.exe" ) ) -:: Set configuration and platform here :) - -:: manual config for all remove later -call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=debug /p:Platform=x64 -v:n -call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=debug /p:Platform=Win32 -v:n -call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=release /p:Platform=x64 -v:n -call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=release /p:Platform=Win32 -v:n - -exit /b +goto :builder :: exit with error :end_script_with_err @@ -38,14 +24,29 @@ endlocal & ( ) +:builder + :: -v:n make it so we can actually see what commands it runs -call %my_vs_path% build\project\vs2022\win\GBE.sln /p:Configuration=debuug /p:Platform=x64 -v:n -::call %my_vs_path% build\project\vs2022\win\GBE.sln +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 0 ( - echo Please do change_dos_stub and sign it. (or you can move into premake to do it for you) - ::call :change_dos_stub - ::call "%signer_tool%" -) else ( +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 +set /a _exit=%errorlevel% +if %_exit% equ 1 ( goto :end_script_with_err ) \ No newline at end of file