build-godot-ubuntu-32.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. set -e
  3. if [ -z $1 ]; then
  4. echo "Usage: $0 <mono version"
  5. exit 1
  6. fi
  7. MONO_VERSION=$1
  8. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
  9. sudo apt-get install -y apt-transport-https
  10. echo "deb https://download.mono-project.com/repo/ubuntu trusty/snapshots/${MONO_VERSION} main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
  11. if [ ! -e /etc/apt/sources.list.d/ubuntu-toolchain-r-test-trusty.list ]; then
  12. sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
  13. fi
  14. sudo apt-get update -qq
  15. sudo apt-get -y upgrade
  16. sudo apt-get install -y gcc-8 g++-8 libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxinerama-dev git scons mono-complete msbuild
  17. sudo apt-get remove -y yasm
  18. export BUILD_NAME=official
  19. export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes gdnative_wrapper=yes debug_symbols=no"
  20. export SCONS="scons -j8 verbose=no warnings=no progress=no"
  21. export CC="gcc-8"
  22. export CXX="g++-8"
  23. export TERM=xterm
  24. export MONO64_PREFIX=/usr/
  25. export MONO32_PREFIX=/usr/
  26. rm -rf godot
  27. git clone https://github.com/godotengine/godot.git
  28. cd godot
  29. git config --global user.email "you@example.com"
  30. git config --global user.name "Your Name"
  31. git checkout -b 3.0 origin/3.0
  32. git branch --set-upstream-to=origin/3.0 3.0
  33. git reset --hard
  34. git pull
  35. cp ../mono-glue/* modules/mono/glue
  36. $SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS tools=yes target=release_debug use_static_cpp=yes
  37. $SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS tools=no target=release_debug use_static_cpp=yes
  38. $SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS tools=no target=release use_static_cpp=yes
  39. $SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS tools=yes target=release_debug use_static_cpp=yes module_mono_enabled=yes mono_static=yes
  40. $SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS tools=no target=release_debug use_static_cpp=yes module_mono_enabled=yes mono_static=yes
  41. $SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS tools=no target=release use_static_cpp=yes module_mono_enabled=yes mono_static=yes