summaryrefslogtreecommitdiff
path: root/.ci/scripts/linux/docker.sh
diff options
context:
space:
mode:
Diffstat (limited to '.ci/scripts/linux/docker.sh')
-rwxr-xr-x.ci/scripts/linux/docker.sh39
1 files changed, 37 insertions, 2 deletions
diff --git a/.ci/scripts/linux/docker.sh b/.ci/scripts/linux/docker.sh
index e0c018cfd..39b1f77d7 100755
--- a/.ci/scripts/linux/docker.sh
+++ b/.ci/scripts/linux/docker.sh
@@ -1,14 +1,49 @@
1#!/bin/bash -ex 1#!/bin/bash -ex
2 2
3# Exit on error, rather than continuing with the rest of the script.
4set -e
5
3cd /yuzu 6cd /yuzu
4 7
5ccache -s 8ccache -s
6 9
7mkdir build || true && cd build 10mkdir build || true && cd build
8cmake .. -G Ninja -DDISPLAY_VERSION=$1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON 11cmake .. -DDISPLAY_VERSION=$1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_INSTALL_PREFIX="/usr"
9 12
10ninja 13make -j$(nproc)
11 14
12ccache -s 15ccache -s
13 16
14ctest -VV -C Release 17ctest -VV -C Release
18
19make install DESTDIR=AppDir
20rm -vf AppDir/usr/bin/yuzu-cmd AppDir/usr/bin/yuzu-tester
21
22# Download tools needed to build an AppImage
23wget -nc https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
24wget -nc https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
25wget -nc https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-x86_64
26wget -nc https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-x86_64.so
27# Set executable bit
28chmod 755 \
29 AppRun-patched-x86_64 \
30 exec-x86_64.so \
31 linuxdeploy-x86_64.AppImage \
32 linuxdeploy-plugin-qt-x86_64.AppImage
33
34# Workaround for https://github.com/AppImage/AppImageKit/issues/828
35export APPIMAGE_EXTRACT_AND_RUN=1
36
37mkdir -p AppDir/usr/optional
38mkdir -p AppDir/usr/optional/libstdc++
39mkdir -p AppDir/usr/optional/libgcc_s
40
41# Deploy yuzu's needed dependencies
42./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt
43
44# Workaround for building yuzu with GCC 10 but also trying to distribute it to Ubuntu 18.04 et al.
45# See https://github.com/darealshinji/AppImageKit-checkrt
46cp exec-x86_64.so AppDir/usr/optional/exec.so
47cp AppRun-patched-x86_64 AppDir/AppRun
48cp --dereference /usr/lib/x86_64-linux-gnu/libstdc++.so.6 AppDir/usr/optional/libstdc++/libstdc++.so.6
49cp --dereference /lib/x86_64-linux-gnu/libgcc_s.so.1 AppDir/usr/optional/libgcc_s/libgcc_s.so.1