diff options
Diffstat (limited to '.ci/scripts/windows/docker.sh')
| -rw-r--r-- | .ci/scripts/windows/docker.sh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/.ci/scripts/windows/docker.sh b/.ci/scripts/windows/docker.sh new file mode 100644 index 000000000..f7093363b --- /dev/null +++ b/.ci/scripts/windows/docker.sh | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | #!/bin/bash -ex | ||
| 2 | |||
| 3 | cd /yuzu | ||
| 4 | |||
| 5 | ccache -s | ||
| 6 | |||
| 7 | # Dirty hack to trick unicorn makefile into believing we are in a MINGW system | ||
| 8 | mv /bin/uname /bin/uname1 && echo -e '#!/bin/sh\necho MINGW64' >> /bin/uname | ||
| 9 | chmod +x /bin/uname | ||
| 10 | |||
| 11 | # Dirty hack to trick unicorn makefile into believing we have cmd | ||
| 12 | echo '' >> /bin/cmd | ||
| 13 | chmod +x /bin/cmd | ||
| 14 | |||
| 15 | mkdir build || true && cd build | ||
| 16 | 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 | ||
| 17 | ninja | ||
| 18 | |||
| 19 | # Clean up the dirty hacks | ||
| 20 | rm /bin/uname && mv /bin/uname1 /bin/uname | ||
| 21 | rm /bin/cmd | ||
| 22 | |||
| 23 | ccache -s | ||
| 24 | |||
| 25 | echo "Tests skipped" | ||
| 26 | #ctest -VV -C Release | ||
| 27 | |||
| 28 | echo 'Prepare binaries...' | ||
| 29 | cd .. | ||
| 30 | mkdir package | ||
| 31 | |||
| 32 | QT_PLATFORM_DLL_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/' | ||
| 33 | find build/ -name "yuzu*.exe" -exec cp {} 'package' \; | ||
| 34 | |||
| 35 | # copy Qt plugins | ||
| 36 | mkdir package/platforms | ||
| 37 | cp "${QT_PLATFORM_DLL_PATH}/qwindows.dll" package/platforms/ | ||
| 38 | cp -rv "${QT_PLATFORM_DLL_PATH}/../mediaservice/" package/ | ||
| 39 | cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/ | ||
| 40 | rm -f package/mediaservice/*d.dll | ||
| 41 | |||
| 42 | for i in package/*.exe; do | ||
| 43 | # we need to process pdb here, however, cv2pdb | ||
| 44 | # does not work here, so we just simply strip all the debug symbols | ||
| 45 | x86_64-w64-mingw32-strip "${i}" | ||
| 46 | done | ||
| 47 | |||
| 48 | pip3 install pefile | ||
| 49 | python3 .ci/scripts/windows/scan_dll.py package/*.exe "package/" | ||
| 50 | python3 .ci/scripts/windows/scan_dll.py package/imageformats/*.dll "package/" | ||