mirror of
https://github.com/alex47exe/gse_fork.git
synced 2026-02-04 05:41:18 +01:00
add option to avoid regenerating build files
This commit is contained in:
@@ -4,6 +4,7 @@ function help_page () {
|
||||
echo "./$(basename "$0") [switches]"
|
||||
echo "switches:"
|
||||
echo " --deps: rebuild third-party dependencies"
|
||||
echo " --nogen: don't regenerate build files"
|
||||
echo " --help: show this page"
|
||||
}
|
||||
|
||||
@@ -12,10 +13,13 @@ build_threads="$(( $(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 0) * 70 / 100
|
||||
[[ $build_threads -lt 2 ]] && build_threads=2
|
||||
|
||||
BUILD_DEPS=0
|
||||
GEN_PROJECT=1
|
||||
for (( i=1; i<=$#; ++i )); do
|
||||
arg="${!i}"
|
||||
if [[ "$arg" = "--deps" ]]; then
|
||||
BUILD_DEPS=1
|
||||
elif [[ "$arg" = "--nogen" ]]; then
|
||||
GEN_PROJECT=0
|
||||
elif [[ "$arg" = "--help" ]]; then
|
||||
help_page
|
||||
exit 0
|
||||
@@ -40,9 +44,11 @@ if [[ $BUILD_DEPS = 1 ]]; then
|
||||
}
|
||||
fi
|
||||
|
||||
"$premake_exe" --genproto --os=linux gmake2 || {
|
||||
exit 1;
|
||||
}
|
||||
if [[ $GEN_PROJECT = 1 ]]; then
|
||||
"$premake_exe" --genproto --os=linux gmake2 || {
|
||||
exit 1;
|
||||
}
|
||||
fi
|
||||
|
||||
pushd ./"build/project/gmake2/linux"
|
||||
|
||||
|
||||
@@ -12,12 +12,15 @@ if defined NUMBER_OF_PROCESSORS (
|
||||
)
|
||||
|
||||
set /a "BUILD_DEPS=0"
|
||||
set /a "GEN_PROJECT=1"
|
||||
|
||||
:args_loop
|
||||
if "%~1" equ "" (
|
||||
goto :args_loop_end
|
||||
) else if "%~1" equ "--deps" (
|
||||
set /a "BUILD_DEPS=1"
|
||||
) else if "%~1" equ "--nogen" (
|
||||
set /a "GEN_PROJECT=0"
|
||||
) else if "%~1" equ "--help" (
|
||||
goto :help_page
|
||||
) else (
|
||||
@@ -63,9 +66,13 @@ set /a "BUILD_DEPS=0"
|
||||
)
|
||||
|
||||
:: create .sln
|
||||
if %GEN_PROJECT% equ 0 (
|
||||
goto :gen_project_end
|
||||
)
|
||||
call "%PREMAKE_EXE%" --file="premake5.lua" --genproto --dosstub --winrsrc --winsign --os=windows vs2022 || (
|
||||
goto :end_script_with_err
|
||||
)
|
||||
:gen_project_end
|
||||
|
||||
:: check .sln
|
||||
set "SLN_FILE=build\project\vs2022\win\gbe.sln"
|
||||
@@ -108,5 +115,6 @@ set /a "BUILD_DEPS=0"
|
||||
echo:"%~nx0" [switches]
|
||||
echo:switches:
|
||||
echo: --deps: rebuild third-party dependencies
|
||||
echo: --nogen: don't regenerate build files
|
||||
echo: --help: show this page
|
||||
goto :end_script
|
||||
|
||||
Reference in New Issue
Block a user