MakeSharpReality.bat 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. @echo off
  2. :: usage: "MakeSharpReality.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. set "LIB_PREFIX=_d"
  10. if "%PLATFORM%" == "" echo ERROR: PLATFORM is not set, example of usage: "MakeSharpReality.bat x64 Release 2017" && pause && exit /b
  11. if "%CONFIG%" == "" echo ERROR: CONFIG is not set, example of usage: "MakeSharpReality.bat x64 Release 2017" && pause && exit /b
  12. if "%VSVER%" == "" echo ERROR: VS_VER is not set, example of usage: "MakeSharpReality.bat x64 Release 2017" && pause && exit /b
  13. if "%CONFIG%" == "Release" set "LIB_PREFIX="
  14. if "%VSVER%" == "2015" set "VS_VER=14"
  15. if "%VSVER%" == "2017" set "VS_VER=15"
  16. if "%PLATFORM%" == "x64" (set "TARGET=Visual Studio %VS_VER% Win64") else (set "TARGET=Visual Studio %VS_VER%")
  17. del Urho3D\Urho3D_SharpReality\CMakeCache.txt 2>NUL
  18. del /S /Q Urho3D\Urho3D_SharpReality\CMakeFiles
  19. cd Urho3D/Source
  20. cmake -E make_directory ../Urho3D_SharpReality
  21. cmake -E chdir ../Urho3D_SharpReality cmake -G "%TARGET%" ../Urho3D_SharpReality -DURHO3D_D3D11=1 -DUWP=1 -DUWP_HOLO=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_ANGELSCRIPT=0 -VS=%VS_VER% ../../Urho3D/Source/
  22. cd ..
  23. xcopy Urho3D_UWP\MonoUrho.UWP\SdlStub\SDL Urho3D_SharpReality\include\Urho3D\ThirdParty\SDL\* /Y
  24. cd Urho3D_SharpReality
  25. cmake --build . --target Urho3D --config %CONFIG%
  26. copy lib\Urho3D%LIB_PREFIX%.lib lib\Urho3D%LIB_PREFIX%_%PLATFORM%.lib /Y
  27. cd ../..
  28. :: msbuild Urho3D\Urho3D_SharpReality\UrhoSharp.SharpReality\UrhoSharp.SharpReality.vcxproj /p:Configuration=%CONFIG% /p:Platform=%PLATFORM%