docker.sh 1.6 KB

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