docker.sh 1.9 KB

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