docker.sh 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/bash -ex
  2. set -e
  3. #cd /yuzu
  4. ccache -sv
  5. mkdir -p "$HOME/.conan/profiles"
  6. wget -nc "https://github.com/yuzu-emu/build-environments/raw/master/linux-mingw/default" -O "$HOME/.conan/profiles/default"
  7. wget -nc "https://github.com/yuzu-emu/build-environments/raw/master/linux-mingw/settings.yml" -O "$HOME/.conan/settings.yml"
  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 CXXFLAGS="-femulated-tls"
  13. cmake .. \
  14. -DCMAKE_BUILD_TYPE=Release \
  15. -DCMAKE_TOOLCHAIN_FILE="${PWD}/../CMakeModules/MinGWClangCross.cmake" \
  16. -DDISPLAY_VERSION="$1" \
  17. -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
  18. -DENABLE_QT_TRANSLATION=ON \
  19. -DUSE_CCACHE=ON \
  20. -DYUZU_USE_BUNDLED_SDL2=OFF \
  21. -DYUZU_USE_EXTERNAL_SDL2=OFF \
  22. -GNinja
  23. ninja yuzu yuzu-cmd
  24. ccache -sv
  25. echo "Tests skipped"
  26. #ctest -VV -C Release
  27. echo 'Prepare binaries...'
  28. cd ..
  29. mkdir package
  30. if [ -d "/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/" ]; then
  31. QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins'
  32. else
  33. #fallback to qt
  34. QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt/plugins'
  35. fi
  36. find build/ -name "yuzu*.exe" -exec cp {} 'package' \;
  37. # copy Qt plugins
  38. mkdir package/platforms
  39. cp -v "${QT_PLUGINS_PATH}/platforms/qwindows.dll" package/platforms/
  40. cp -rv "${QT_PLUGINS_PATH}/mediaservice/" package/
  41. cp -rv "${QT_PLUGINS_PATH}/imageformats/" package/
  42. cp -rv "${QT_PLUGINS_PATH}/styles/" package/
  43. rm -f package/mediaservice/*d.dll
  44. for i in package/*.exe; do
  45. # we need to process pdb here, however, cv2pdb
  46. # does not work here, so we just simply strip all the debug symbols
  47. x86_64-w64-mingw32-strip "${i}"
  48. done
  49. pip3 install pefile
  50. python3 .ci/scripts/windows/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
  51. # copy FFmpeg libraries
  52. EXTERNALS_PATH="$(pwd)/build/externals"
  53. FFMPEG_DLL_PATH="$(find "${EXTERNALS_PATH}" -maxdepth 1 -type d | grep 'ffmpeg-')/bin"
  54. find ${FFMPEG_DLL_PATH} -type f -regex ".*\.dll" -exec cp -v {} package/ ';'
  55. # copy libraries from yuzu.exe path
  56. find "$(pwd)/build/bin/" -type f -regex ".*\.dll" -exec cp -v {} package/ ';'