2
0

MakeWindows.bat 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. @echo off
  2. :: usage: "MakeWindows.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: "MakeWindows.bat x64 Release 2017" && pause && exit /b
  10. if "%CONFIG%" == "" echo ERROR: CONFIG is not set, example of usage: "MakeWindows.bat x64 Release 2017" && pause && exit /b
  11. if "%VSVER%" == "" echo ERROR: VS_VER is not set, example of usage: "MakeWindows.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. set "RENDERER_FLAGS="
  16. set "URHO3D_SRC_DIR=Urho3D/Source"
  17. del Urho3D\Urho3D_Windows\CMakeCache.txt 2>NUL
  18. cd %URHO3D_SRC_DIR%
  19. @echo on
  20. cmake -E make_directory ../Urho3D_Windows
  21. cmake -E chdir ../Urho3D_Windows cmake -G "%TARGET%" ../Urho3D_Windows -DURHO3D_OPENGL=1 -DURHO3D_PCH=0 -DURHO3D_LUA=0 -DURHO3D_ANGELSCRIPT=0 -VS=%VS_VER% ../../%URHO3D_SRC_DIR%/
  22. cd ../Urho3D_Windows
  23. cmake --build . --target Urho3D --config %CONFIG%
  24. cmake --build . --target PackageTool --config %CONFIG%
  25. cmake --build . --target AssetImporter --config %CONFIG%
  26. cd ../..
  27. :: msbuild Urho3D\Urho3D_Windows\MonoUrho.Windows\MonoUrho.Windows.vcxproj /p:Configuration=%CONFIG% /p:Platform=%PLATFORM%