docker.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/bin/bash -ex
  2. set -e
  3. #cd /yuzu
  4. ccache -s
  5. mkdir -p "$HOME/.conan/"
  6. cp -rv /home/yuzu/.conan/profiles/ "$HOME/.conan/"
  7. cp -rv /home/yuzu/.conan/settings.yml "$HOME/.conan/"
  8. mkdir -p build && cd build
  9. export LDFLAGS="-fuse-ld=lld"
  10. # -femulated-tls required due to an incompatibility between GCC and Clang
  11. # TODO(lat9nq): If this is widespread, we probably need to add this to CMakeLists where appropriate
  12. export CFLAGS="-femulated-tls"
  13. export CXXFLAGS="${CFLAGS}"
  14. cmake .. \
  15. -DCMAKE_BUILD_TYPE=Release \
  16. -DCMAKE_TOOLCHAIN_FILE="${PWD}/../CMakeModules/MinGWClangCross.cmake" \
  17. -DDISPLAY_VERSION="$1" \
  18. -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
  19. -DENABLE_QT_TRANSLATION=ON \
  20. -DUSE_CCACHE=ON \
  21. -DYUZU_USE_BUNDLED_SDL2=OFF \
  22. -DYUZU_USE_EXTERNAL_SDL2=OFF \
  23. -GNinja
  24. ninja yuzu yuzu-cmd
  25. ccache -s
  26. echo "Tests skipped"
  27. #ctest -VV -C Release
  28. echo 'Prepare binaries...'
  29. cd ..
  30. mkdir package
  31. if [ -d "/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/" ]; then
  32. QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins'
  33. else
  34. #fallback to qt
  35. QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt/plugins'
  36. fi
  37. find build/ -name "yuzu*.exe" -exec cp {} 'package' \;
  38. # copy Qt plugins
  39. mkdir package/platforms
  40. cp -v "${QT_PLUGINS_PATH}/platforms/qwindows.dll" package/platforms/
  41. cp -rv "${QT_PLUGINS_PATH}/mediaservice/" package/
  42. cp -rv "${QT_PLUGINS_PATH}/imageformats/" package/
  43. cp -rv "${QT_PLUGINS_PATH}/styles/" package/
  44. rm -f package/mediaservice/*d.dll
  45. for i in package/*.exe; do
  46. # we need to process pdb here, however, cv2pdb
  47. # does not work here, so we just simply strip all the debug symbols
  48. x86_64-w64-mingw32-strip "${i}"
  49. done
  50. pip3 install pefile
  51. python3 .ci/scripts/windows/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
  52. # copy FFmpeg libraries
  53. EXTERNALS_PATH="$(pwd)/build/externals"
  54. FFMPEG_DLL_PATH="$(find "${EXTERNALS_PATH}" -maxdepth 1 -type d | grep 'ffmpeg-')/bin"
  55. find ${FFMPEG_DLL_PATH} -type f -regex ".*\.dll" -exec cp -v {} package/ ';'
  56. # copy libraries from yuzu.exe path
  57. find "$(pwd)/build/bin/" -type f -regex ".*\.dll" -exec cp -v {} package/ ';'