docker.sh 1.5 KB

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