docker.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash -ex
  2. cd /yuzu
  3. ccache -s
  4. # Dirty hack to trick unicorn makefile into believing we are in a MINGW system
  5. mv /bin/uname /bin/uname1 && echo -e '#!/bin/sh\necho MINGW64' >> /bin/uname
  6. chmod +x /bin/uname
  7. # Dirty hack to trick unicorn makefile into believing we have cmd
  8. echo '' >> /bin/cmd
  9. chmod +x /bin/cmd
  10. mkdir build || true && cd build
  11. cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE="$(pwd)/../CMakeModules/MinGWCross.cmake" -DUSE_CCACHE=ON -DYUZU_USE_BUNDLED_UNICORN=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DCMAKE_BUILD_TYPE=Release
  12. ninja
  13. # Clean up the dirty hacks
  14. rm /bin/uname && mv /bin/uname1 /bin/uname
  15. rm /bin/cmd
  16. ccache -s
  17. echo "Tests skipped"
  18. #ctest -VV -C Release
  19. echo 'Prepare binaries...'
  20. cd ..
  21. mkdir package
  22. QT_PLATFORM_DLL_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/'
  23. find build/ -name "yuzu*.exe" -exec cp {} 'package' \;
  24. # copy Qt plugins
  25. mkdir package/platforms
  26. cp "${QT_PLATFORM_DLL_PATH}/qwindows.dll" package/platforms/
  27. cp -rv "${QT_PLATFORM_DLL_PATH}/../mediaservice/" package/
  28. cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/
  29. rm -f package/mediaservice/*d.dll
  30. for i in package/*.exe; do
  31. # we need to process pdb here, however, cv2pdb
  32. # does not work here, so we just simply strip all the debug symbols
  33. x86_64-w64-mingw32-strip "${i}"
  34. done
  35. pip3 install pefile
  36. python3 .ci/scripts/windows/scan_dll.py package/*.exe "package/"
  37. python3 .ci/scripts/windows/scan_dll.py package/imageformats/*.dll "package/"