diff options
author | Anton Fedchin <anightik@gmail.com> | 2017-10-24 14:28:00 +0300 |
---|---|---|
committer | Anton Fedchin <anightik@gmail.com> | 2017-11-02 09:56:33 +0300 |
commit | 7e7b5bb0629cccc9ee055b6d59c30f5b66c3abec (patch) | |
tree | f8909b5d0e17508a6b1e0eaebbb0923d57e9a7d5 /tools/buildsteps/windows | |
parent | 5837475de1f8a4cc0b444362dc4c01a5d05d84e3 (diff) |
[win10] build binary addons for uwp
Diffstat (limited to 'tools/buildsteps/windows')
-rw-r--r-- | tools/buildsteps/windows/arm-uwp/make-addons.bat | 2 | ||||
-rw-r--r-- | tools/buildsteps/windows/make-addons.bat | 19 | ||||
-rw-r--r-- | tools/buildsteps/windows/win32-uwp/make-addons.bat | 16 | ||||
-rw-r--r-- | tools/buildsteps/windows/x64-uwp/make-addons.bat | 2 |
4 files changed, 24 insertions, 15 deletions
diff --git a/tools/buildsteps/windows/arm-uwp/make-addons.bat b/tools/buildsteps/windows/arm-uwp/make-addons.bat index d19927825b..939538b6bd 100644 --- a/tools/buildsteps/windows/arm-uwp/make-addons.bat +++ b/tools/buildsteps/windows/arm-uwp/make-addons.bat @@ -4,5 +4,5 @@ rem set Visual C++ build environment call "%VS140COMNTOOLS%..\..\VC\bin\amd64_arm\vcvarsamd64_arm.bat" store 10.0.14393.0 || call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" arm store 10.0.14393.0 PUSHD %~dp0\.. -CALL make-addons.bat %* +CALL make-addons.bat win10 %* POPD diff --git a/tools/buildsteps/windows/make-addons.bat b/tools/buildsteps/windows/make-addons.bat index cc1e128b42..922b2e4f8e 100644 --- a/tools/buildsteps/windows/make-addons.bat +++ b/tools/buildsteps/windows/make-addons.bat @@ -8,6 +8,7 @@ SET install=false SET clean=false SET package=false SET addon= +SET store= SETLOCAL EnableDelayedExpansion FOR %%b IN (%*) DO ( @@ -17,9 +18,11 @@ FOR %%b IN (%*) DO ( SET clean=true ) ELSE ( IF %%b == package ( SET package=true + ) ELSE ( IF %%b == win10 ( + SET store=store ) ELSE ( SET addon=!addon! %%b - ))) + )))) ) SETLOCAL DisableDelayedExpansion @@ -30,7 +33,7 @@ POPD rem setup some paths that we need later SET CUR_PATH=%CD% SET BASE_PATH=%WORKDIR%\cmake -SET SCRIPTS_PATH=%BASE_PATH%\scripts\windows +SET SCRIPTS_PATH=%BASE_PATH%\scripts\windows%store% SET ADDONS_PATH=%BASE_PATH%\addons SET ADDON_DEPENDS_PATH=%ADDONS_PATH%\output SET ADDONS_BUILD_PATH=%ADDONS_PATH%\build @@ -92,6 +95,10 @@ IF "%addon%" NEQ "" ( SETLOCAL DisableDelayedExpansion ) +IF "%store%" NEQ "" ( +SET STORE_ARGS=-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=%UCRTVersion% +) + rem execute cmake to generate makefiles processable by nmake cmake "%ADDONS_PATH%" -G "NMake Makefiles" ^ -DCMAKE_BUILD_TYPE=Release ^ @@ -102,7 +109,9 @@ cmake "%ADDONS_PATH%" -G "NMake Makefiles" ^ -DBUILD_DIR=%ADDONS_BUILD_PATH% ^ -DADDON_DEPENDS_PATH=%ADDON_DEPENDS_PATH% ^ -DPACKAGE_ZIP=ON ^ + %STORE_ARGS% ^ -DADDONS_TO_BUILD="%ADDONS_TO_BUILD%" + IF ERRORLEVEL 1 ( ECHO cmake error level: %ERRORLEVEL% > %ERRORFILE% GOTO ERROR @@ -111,7 +120,7 @@ IF ERRORLEVEL 1 ( rem get the list of addons that can actually be built SET ADDONS_TO_MAKE= SETLOCAL EnableDelayedExpansion -FOR /f "delims=" %%i IN ('nmake supported_addons') DO ( +FOR /f "delims=" %%i IN ('cmake --build . --target supported_addons') DO ( SET line="%%i" SET addons=!line:ALL_ADDONS_BUILDING=! IF NOT "!addons!" == "!line!" ( @@ -123,8 +132,8 @@ SETLOCAL DisableDelayedExpansion rem loop over all addons to build FOR %%a IN (%ADDONS_TO_MAKE%) DO ( ECHO Building %%a... - rem execute nmake to build the addons - nmake %%a + rem execute cmake to build the addons + cmake --build . --target %%a IF ERRORLEVEL 1 ( ECHO nmake %%a error level: %ERRORLEVEL% > %ERRORFILE% ECHO %%a >> %ADDONS_FAILURE_FILE% diff --git a/tools/buildsteps/windows/win32-uwp/make-addons.bat b/tools/buildsteps/windows/win32-uwp/make-addons.bat index 937f7f76e1..68f080ed4a 100644 --- a/tools/buildsteps/windows/win32-uwp/make-addons.bat +++ b/tools/buildsteps/windows/win32-uwp/make-addons.bat @@ -1,8 +1,8 @@ -@ECHO OFF - -rem set Visual C++ build environment -call "%VS140COMNTOOLS%..\..\VC\bin\amd64_x86\vcvarsamd64_x86.bat" store 10.0.14393.0 || call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 store 10.0.14393.0 - -PUSHD %~dp0\.. -CALL make-addons.bat %* -POPD +@ECHO OFF
+
+rem set Visual C++ build environment
+call "%VS140COMNTOOLS%..\..\VC\bin\amd64_x86\vcvarsamd64_x86.bat" store 10.0.14393.0 || call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 store 10.0.14393.0
+
+PUSHD %~dp0\..
+CALL make-addons.bat win10 %*
+POPD
diff --git a/tools/buildsteps/windows/x64-uwp/make-addons.bat b/tools/buildsteps/windows/x64-uwp/make-addons.bat index fca4771f64..9c2758f9db 100644 --- a/tools/buildsteps/windows/x64-uwp/make-addons.bat +++ b/tools/buildsteps/windows/x64-uwp/make-addons.bat @@ -4,5 +4,5 @@ rem set Visual C++ build environment call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" amd64 store 10.0.14393.0 PUSHD %~dp0\.. -CALL make-addons.bat %* +CALL make-addons.bat win10 %* POPD |