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_PLATFORM_DLL_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/'
  15. else
  16. #fallback to qt
  17. QT_PLATFORM_DLL_PATH='/usr/x86_64-w64-mingw32/lib/qt/plugins/platforms/'
  18. fi
  19. find build/ -name "yuzu*.exe" -exec cp {} 'package' \;
  20. # copy Qt plugins
  21. mkdir package/platforms
  22. cp "${QT_PLATFORM_DLL_PATH}/qwindows.dll" package/platforms/
  23. cp -rv "${QT_PLATFORM_DLL_PATH}/../mediaservice/" package/
  24. cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/
  25. rm -f package/mediaservice/*d.dll
  26. for i in package/*.exe; do
  27. # we need to process pdb here, however, cv2pdb
  28. # does not work here, so we just simply strip all the debug symbols
  29. x86_64-w64-mingw32-strip "${i}"
  30. done
  31. pip3 install pefile
  32. python3 .ci/scripts/windows/scan_dll.py package/*.exe "package/"
  33. python3 .ci/scripts/windows/scan_dll.py 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/ ';'