docker.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash -ex
  2. cd /yuzu
  3. ccache -s
  4. mkdir build || true && cd build
  5. cmake .. -G Ninja -DDISPLAY_VERSION=$1 -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MinGWCross.cmake" -DUSE_CCACHE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON
  6. ninja
  7. ccache -s
  8. echo "Tests skipped"
  9. #ctest -VV -C Release
  10. echo 'Prepare binaries...'
  11. cd ..
  12. mkdir package
  13. if [ -d "/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/" ]; then
  14. QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins'
  15. else
  16. #fallback to qt
  17. QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt/plugins'
  18. fi
  19. find build/ -name "yuzu*.exe" -exec cp {} 'package' \;
  20. # copy Qt plugins
  21. mkdir package/platforms
  22. cp -v "${QT_PLUGINS_PATH}/platforms/qwindows.dll" package/platforms/
  23. cp -rv "${QT_PLUGINS_PATH}/mediaservice/" package/
  24. cp -rv "${QT_PLUGINS_PATH}/imageformats/" package/
  25. cp -rv "${QT_PLUGINS_PATH}/styles/" package/
  26. rm -f package/mediaservice/*d.dll
  27. for i in package/*.exe; do
  28. # we need to process pdb here, however, cv2pdb
  29. # does not work here, so we just simply strip all the debug symbols
  30. x86_64-w64-mingw32-strip "${i}"
  31. done
  32. pip3 install pefile
  33. python3 .ci/scripts/windows/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
  34. # copy FFmpeg libraries
  35. EXTERNALS_PATH="$(pwd)/build/externals"
  36. FFMPEG_DLL_PATH="$(find "${EXTERNALS_PATH}" -maxdepth 1 -type d | grep 'ffmpeg-')/bin"
  37. find ${FFMPEG_DLL_PATH} -type f -regex ".*\.dll" -exec cp -v {} package/ ';'
  38. # copy libraries from yuzu.exe path
  39. find "$(pwd)/build/bin/" -type f -regex ".*\.dll" -exec cp -v {} package/ ';'