before_install.sh 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/sh
  2. # steps to upgrade MXE dependencies:
  3. # 1) Use Debian/Ubuntu system or install one (virtual machines will work too)
  4. # 2) update following script to include any new dependencies
  5. # You can also run it to upgrade existing ones, but don't expect much
  6. # MXE repository only provides ancient versions for the sake of "stability"
  7. # https://github.com/vcmi/vcmi-deps-mxe/blob/master/mirror-mxe.sh
  8. # 3) make release in vcmi-deps-mxe repository using resulting tar archive
  9. # 4) update paths to tar archive in this script
  10. # Install nsis for installer creation
  11. sudo add-apt-repository 'deb http://security.ubuntu.com/ubuntu bionic-security main'
  12. sudo apt-get install -qq nsis ninja-build libssl1.0.0
  13. # MXE repository was too slow for Travis far too often
  14. wget -nv https://github.com/vcmi/vcmi-deps-mxe/releases/download/2021-02-20/mxe-i686-w64-mingw32.shared-2021-01-22.tar
  15. tar -xvf mxe-i686-w64-mingw32.shared-2021-01-22.tar
  16. sudo dpkg -i mxe-*.deb
  17. sudo apt-get install -f --yes
  18. if false; then
  19. # Add MXE repository and key
  20. echo "deb http://pkg.mxe.cc/repos/apt/debian wheezy main" \
  21. | sudo tee /etc/apt/sources.list.d/mxeapt.list
  22. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB
  23. # Install needed packages
  24. sudo apt-get update -qq
  25. sudo apt-get install -q --yes \
  26. mxe-$MXE_TARGET-gcc \
  27. mxe-$MXE_TARGET-boost \
  28. mxe-$MXE_TARGET-zlib \
  29. mxe-$MXE_TARGET-sdl2 \
  30. mxe-$MXE_TARGET-sdl2-gfx \
  31. mxe-$MXE_TARGET-sdl2-image \
  32. mxe-$MXE_TARGET-sdl2-mixer \
  33. mxe-$MXE_TARGET-sdl2-ttf \
  34. mxe-$MXE_TARGET-ffmpeg \
  35. mxe-$MXE_TARGET-qt \
  36. mxe-$MXE_TARGET-qtbase \
  37. mxe-$MXE_TARGET-intel-tbb \
  38. mxe-i686-w64-mingw32.static-luajit
  39. fi # Disable
  40. # alias for CMake
  41. CMAKE_LOCATION=$(which cmake)
  42. sudo mv $CMAKE_LOCATION $CMAKE_LOCATION.orig
  43. sudo ln -s /usr/lib/mxe/usr/bin/$MXE_TARGET-cmake $CMAKE_LOCATION