summaryrefslogtreecommitdiff
path: root/.ci/scripts/windows/docker.sh
diff options
context:
space:
mode:
Diffstat (limited to '.ci/scripts/windows/docker.sh')
-rw-r--r--.ci/scripts/windows/docker.sh50
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
3cd /yuzu
4
5ccache -s
6
7# Dirty hack to trick unicorn makefile into believing we are in a MINGW system
8mv /bin/uname /bin/uname1 && echo -e '#!/bin/sh\necho MINGW64' >> /bin/uname
9chmod +x /bin/uname
10
11# Dirty hack to trick unicorn makefile into believing we have cmd
12echo '' >> /bin/cmd
13chmod +x /bin/cmd
14
15mkdir build || true && cd build
16cmake .. -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
17ninja
18
19# Clean up the dirty hacks
20rm /bin/uname && mv /bin/uname1 /bin/uname
21rm /bin/cmd
22
23ccache -s
24
25echo "Tests skipped"
26#ctest -VV -C Release
27
28echo 'Prepare binaries...'
29cd ..
30mkdir package
31
32QT_PLATFORM_DLL_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/'
33find build/ -name "yuzu*.exe" -exec cp {} 'package' \;
34
35# copy Qt plugins
36mkdir package/platforms
37cp "${QT_PLATFORM_DLL_PATH}/qwindows.dll" package/platforms/
38cp -rv "${QT_PLATFORM_DLL_PATH}/../mediaservice/" package/
39cp -rv "${QT_PLATFORM_DLL_PATH}/../imageformats/" package/
40rm -f package/mediaservice/*d.dll
41
42for 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}"
46done
47
48pip3 install pefile
49python3 .ci/scripts/windows/scan_dll.py package/*.exe "package/"
50python3 .ci/scripts/windows/scan_dll.py package/imageformats/*.dll "package/"