build-godot-uwp.bat 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. set PATH=C:\Python36\Scripts\;C:\Python36\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\ v1.0\;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSH-Win64;C:\Program Files\Git\cmd;
  2. choco list --local-only | findstr mono
  3. IF %ERRORLEVEL% EQU 0 GOTO BUILD
  4. net user Administrator /active:yes
  5. choco install -y git python curl 7zip
  6. choco install -y visualstudio2017buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.UniversalBuildTools --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --add Microsoft.VisualStudio.Component.Windows10SDK.16299.UWP.Native --passive"
  7. python -m pip install --upgrade pip
  8. pip install -U setuptools
  9. pip install -U wheel
  10. pip install scons pywin32
  11. net user Administrator /active:no
  12. :BUILD
  13. rd /s /q godot
  14. git clone https://github.com/godotengine/godot.git
  15. cd godot
  16. git config --global user.email "you@example.com"
  17. git config --global user.name "Your Name"
  18. git checkout -b 3.0 origin/3.0
  19. git branch --set-upstream-to=origin/3.0 3.0
  20. git reset --hard
  21. git pull
  22. cd ..
  23. set BUILD_NAME=official
  24. set SCONS=call scons -j8 verbose=no warnings=no progress=no
  25. set OPTIONS=builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes gdnative_wrapper=yes debug_symbols=no
  26. set TERM=xterm
  27. rd /s /q binaries
  28. md binaries
  29. curl -O -L https://github.com/GodotBuilder/godot-builds/releases/download/_tools/angle.7z
  30. 7z x -aoa angle.7z
  31. set ANGLE_SRC_PATH=%cd%\angle
  32. cd godot
  33. git clean -fx
  34. rmdir /s /q bin
  35. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64 uwp 10.0.16299.0
  36. %SCONS% platform=uwp %OPTIONS% tools=no target=release_debug
  37. %SCONS% platform=uwp %OPTIONS% tools=no target=release
  38. md ..\binaries\uwp_amd64
  39. copy bin\*.* ..\binaries\uwp_amd64
  40. git clean -fx
  41. rmdir /s /q bin
  42. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64_x86 uwp 10.0.16299.0
  43. %SCONS% platform=uwp %OPTIONS% tools=no target=release_debug
  44. %SCONS% platform=uwp %OPTIONS% tools=no target=release
  45. md ..\binaries\uwp_x86
  46. copy bin\*.* ..\binaries\uwp_x86
  47. git clean -fx
  48. rmdir /s /q bin
  49. call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm uwp 10.0.16299.0
  50. %SCONS% platform=uwp %OPTIONS% tools=no target=release_debug
  51. %SCONS% platform=uwp %OPTIONS% tools=no target=release
  52. md ..\binaries\uwp_arm
  53. copy bin\*.* ..\binaries\uwp_arm