docker.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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/"
  34. python3 .ci/scripts/windows/scan_dll.py package/imageformats/*.dll "package/"
  35. # copy FFmpeg libraries
  36. EXTERNALS_PATH="$(pwd)/build/externals"
  37. FFMPEG_DLL_PATH="$(find ${EXTERNALS_PATH} -maxdepth 1 -type d | grep ffmpeg)/bin"
  38. find ${FFMPEG_DLL_PATH} -type f -regex ".*\.dll" -exec cp -v {} package/ ';'
  39. # copy libraries from yuzu.exe path
  40. find "$(pwd)/build/bin/" -type f -regex ".*\.dll" -exec cp -v {} package/ ';'