docker.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/bin/bash -ex
  2. # SPDX-FileCopyrightText: 2019 yuzu Emulator Project
  3. # SPDX-License-Identifier: GPL-2.0-or-later
  4. set -e
  5. #cd /yuzu
  6. ccache -sv
  7. mkdir -p build && cd build
  8. cmake .. \
  9. -DCMAKE_BUILD_TYPE=Release \
  10. -DCMAKE_TOOLCHAIN_FILE="${PWD}/../CMakeModules/MinGWCross.cmake" \
  11. -DDISPLAY_VERSION="$1" \
  12. -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
  13. -DENABLE_QT_TRANSLATION=ON \
  14. -DUSE_CCACHE=ON \
  15. -DYUZU_USE_BUNDLED_SDL2=OFF \
  16. -DYUZU_USE_EXTERNAL_SDL2=OFF \
  17. -DYUZU_TESTS=OFF \
  18. -GNinja
  19. ninja yuzu yuzu-cmd
  20. ccache -sv
  21. echo "Tests skipped"
  22. #ctest -VV -C Release
  23. echo 'Prepare binaries...'
  24. cd ..
  25. mkdir package
  26. if [ -d "/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/" ]; then
  27. QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins'
  28. else
  29. #fallback to qt
  30. QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt/plugins'
  31. fi
  32. find build/ -name "yuzu*.exe" -exec cp {} 'package' \;
  33. # copy Qt plugins
  34. mkdir package/platforms
  35. cp -v "${QT_PLUGINS_PATH}/platforms/qwindows.dll" package/platforms/
  36. cp -rv "${QT_PLUGINS_PATH}/mediaservice/" package/
  37. cp -rv "${QT_PLUGINS_PATH}/imageformats/" package/
  38. cp -rv "${QT_PLUGINS_PATH}/styles/" package/
  39. rm -f package/mediaservice/*d.dll
  40. for i in package/*.exe; do
  41. # we need to process pdb here, however, cv2pdb
  42. # does not work here, so we just simply strip all the debug symbols
  43. x86_64-w64-mingw32-strip "${i}"
  44. done
  45. python3 .ci/scripts/windows/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
  46. # copy FFmpeg libraries
  47. EXTERNALS_PATH="$(pwd)/build/externals"
  48. FFMPEG_DLL_PATH="$(find "${EXTERNALS_PATH}" -maxdepth 1 -type d | grep 'ffmpeg-')/bin"
  49. find ${FFMPEG_DLL_PATH} -type f -regex ".*\.dll" -exec cp -nv {} package/ ';'
  50. # copy libraries from yuzu.exe path
  51. find "$(pwd)/build/bin/" -type f -regex ".*\.dll" -exec cp -v {} package/ ';'