From 7449b1f1a909978149711c58cfcf00e77cf2c46d Mon Sep 17 00:00:00 2001 From: Vasily Date: Sat, 29 Dec 2018 00:58:26 +0100 Subject: [PATCH] Disable packaging and building installer by default The average dev doesn't need to test out the zipping and installer building utility. Having them package on every build is a waste of time. --- build_windows.cmd | 16 +++++++++++++--- docs/building_for_windows.md | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/build_windows.cmd b/build_windows.cmd index 87afac4..2a44535 100644 --- a/build_windows.cmd +++ b/build_windows.cmd @@ -1,6 +1,10 @@ @echo off REM Echo off to avoid spam. +SET exit_code_success=0 +SET exit_code_failure_build_apps=1 +SET exit_code_failure_build_locations=2 + REM Used for echos. SET top_level_activity=MASTER @@ -19,15 +23,21 @@ SET project_dir=%folder_path% ECHO %top_level_activity%: Calling build script. CALL %project_dir%\build_scripts\win\build.cmd -IF ERRORLEVEL 1 EXIT /B 1 +IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% ECHO %top_level_activity%: Calling deployment script. CALL %project_dir%\build_scripts\win\deploy.cmd -IF ERRORLEVEL 1 EXIT /B 1 +IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% +REM The average dev doesn't need to package and zip it, just build it and test. +IF NOT DEFINED BUILD_PACKAGE ( + ECHO %top_level_activity%: BUILD_PACKAGE not set. Not building installer and portable zip versions. + ECHO %top_level_activity%: MASTER DONE. + EXIT /B %exit_code_success% +) ECHO %top_level_activity%: Calling packaging script. CALL %project_dir%\build_scripts\win\package.cmd -IF ERRORLEVEL 1 EXIT /B 1 +IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% CD %original_dir% diff --git a/docs/building_for_windows.md b/docs/building_for_windows.md index 09db855..c3a64cf 100644 --- a/docs/building_for_windows.md +++ b/docs/building_for_windows.md @@ -57,6 +57,7 @@ Additionally, these optional environment variables are supported. | -------------------- | ------------- | | `BUILD_DEBUG` | If set, a debug version will be built. The packaging script will not run with this var set. | | `BUILD_VSPROJ` | If set, Visual Studio project files will be built. | +| `BUILD_PACKAGE` | If set, the script will create a zipped portable version and installer `.exe`. Unset by default since only the build server really needs to create zips and installer versions. | Remember that there's a difference between an unset variable and a variable set to an empty string. `SET BUILD_DEBUG=""` does not unset the variable. You need to write `SET BUILD_DEBUG=`.