From 3822d277adb9dd9c09d974273375a1b55529a988 Mon Sep 17 00:00:00 2001 From: hunbernd Date: Mon, 31 Dec 2018 21:36:09 +0100 Subject: [PATCH] Allow passing custom CONFIG options to msys2 buildscript Use all cores --- build_scripts/Windows-msys2/build/build.bat | 4 ++-- build_scripts/Windows-msys2/build/env-base.bat | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build_scripts/Windows-msys2/build/build.bat b/build_scripts/Windows-msys2/build/build.bat index 70c3a7f8c..97d6e5853 100644 --- a/build_scripts/Windows-msys2/build/build.bat +++ b/build_scripts/Windows-msys2/build/build.bat @@ -48,7 +48,7 @@ echo. title Build - %SourceName%-%RsBuildConfig% [qmake] -set RS_QMAKE_CONFIG="CONFIG+=%RsBuildConfig%" +set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=%RsBuildConfig%" if "%ParamAutologin%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=rs_autologin" if "%ParamPlugins%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=retroshare_plugins" @@ -63,7 +63,7 @@ echo. title Build - %SourceName%-%RsBuildConfig% [make] -%EnvMSYS2Cmd% "make -j 4" +%EnvMSYS2Cmd% "make -j %NUMBER_OF_PROCESSORS%" :error popd diff --git a/build_scripts/Windows-msys2/build/env-base.bat b/build_scripts/Windows-msys2/build/env-base.bat index d83b04113..0140196ec 100644 --- a/build_scripts/Windows-msys2/build/env-base.bat +++ b/build_scripts/Windows-msys2/build/env-base.bat @@ -6,6 +6,7 @@ set ParamDebug=0 set ParamAutologin=0 set ParamPlugins=0 set ParamTor=0 +set RS_QMAKE_CONFIG= :parameter_loop if "%~1" NEQ "" ( @@ -24,6 +25,8 @@ if "%~1" NEQ "" ( set ParamPlugins=1 ) else if "%%~a"=="tor" ( set ParamTor=1 + ) else if "%%~a"=="CONFIG+" ( + set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% %1 ) else ( echo. echo Unknown parameter %1