MakeUWP.bat 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. @echo off
  2. :: usage: "MakeUWP.bat x64|x86 Release|Debug 2015|2017"
  3. :: x64 or x86
  4. set "PLATFORM=%~1"
  5. :: Release or Debug
  6. set "CONFIG=%~2"
  7. :: 2015 or 2017
  8. set "VSVER=%~3%"
  9. if "%PLATFORM%" == "" echo ERROR: PLATFORM is not set, example of usage: "MakeUWP.bat x64 Release 2017" && pause && exit /b
  10. if "%CONFIG%" == "" echo ERROR: CONFIG is not set, example of usage: "MakeUWP.bat x64 Release 2017" && pause && exit /b
  11. if "%VSVER%" == "" echo ERROR: VS_VER is not set, example of usage: "MakeUWP.bat x64 Release 2017" && pause && exit /b
  12. if "%VSVER%" == "2015" set "VS_VER=14"
  13. if "%VSVER%" == "2017" set "VS_VER=15"
  14. if "%PLATFORM%" == "x64" (set "TARGET=Visual Studio %VS_VER% Win64") else (set "TARGET=Visual Studio %VS_VER%")
  15. if "%CONFIG%" == "Debug" set "LIB_PREFIX=_d"
  16. del Urho3D\Urho3D_UWP\CMakeCache.txt 2>NUL
  17. cd Urho3D/Source
  18. cmake -E make_directory ../Urho3D_UWP
  19. cmake -E chdir ../Urho3D_UWP cmake -G "%TARGET%" ../Urho3D_UWP -DURHO3D_D3D11=1 -DUWP=1 -DURHO3D_NEON=0 -DURHO3D_WIN32_CONSOLE=0 -DURHO3D_NETWORK=1 -DURHO3D_FILEWATCHER=0 -DURHO3D_PROFILING=0 -DURHO3D_THREADING=0 -DURHO3D_PCH=0 -DURHO3D_LUA=0 -DURHO3D_WEBP=0 -DURHO3D_ANGELSCRIPT=0 -VS=%VSVER% ../../Urho3D/Source/
  20. cd ../Urho3D_UWP
  21. xcopy MonoUrho.UWP\SdlStub\SDL include\Urho3D\ThirdParty\SDL\* /Y
  22. cmake --build . --target Urho3D --config %CONFIG%
  23. copy lib/Urho3D%LIB_PREFIX%.lib lib/Urho3D%LIB_PREFIX%_%PLATFORM%.lib /Y
  24. cd ../../
  25. :: msbuild Urho3D\Urho3D_UWP\MonoUrho.UWP\MonoUrho.UWP.vcxproj /p:Configuration=%CONFIG% /p:Platform=%PLATFORM%