docker.sh 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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_CRASH_DUMPS=ON \
  16. -DYUZU_USE_BUNDLED_SDL2=OFF \
  17. -DYUZU_USE_EXTERNAL_SDL2=OFF \
  18. -DYUZU_TESTS=OFF \
  19. -GNinja
  20. ninja yuzu yuzu-cmd
  21. ccache -sv
  22. echo "Tests skipped"
  23. #ctest -VV -C Release
  24. echo 'Prepare binaries...'
  25. cd ..
  26. mkdir package
  27. if [ -d "/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/" ]; then
  28. QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins'
  29. else
  30. #fallback to qt
  31. QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt/plugins'
  32. fi
  33. find build/ -name "yuzu*.exe" -exec cp {} 'package' \;
  34. # copy Qt plugins
  35. mkdir package/platforms
  36. cp -v "${QT_PLUGINS_PATH}/platforms/qwindows.dll" package/platforms/
  37. cp -rv "${QT_PLUGINS_PATH}/mediaservice/" package/
  38. cp -rv "${QT_PLUGINS_PATH}/imageformats/" package/
  39. cp -rv "${QT_PLUGINS_PATH}/styles/" package/
  40. rm -f package/mediaservice/*d.dll
  41. for i in package/*.exe; do
  42. # we need to process pdb here, however, cv2pdb
  43. # does not work here, so we just simply strip all the debug symbols
  44. x86_64-w64-mingw32-strip "${i}"
  45. done
  46. pip3 install pefile
  47. python3 .ci/scripts/windows/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
  48. # copy FFmpeg libraries
  49. EXTERNALS_PATH="$(pwd)/build/externals"
  50. FFMPEG_DLL_PATH="$(find "${EXTERNALS_PATH}" -maxdepth 1 -type d | grep 'ffmpeg-')/bin"
  51. find ${FFMPEG_DLL_PATH} -type f -regex ".*\.dll" -exec cp -nv {} package/ ';'
  52. # copy libraries from yuzu.exe path
  53. find "$(pwd)/build/bin/" -type f -regex ".*\.dll" -exec cp -v {} package/ ';'