From 30bf654d2f7fc5f622de59592dacb8f9d6c7b666 Mon Sep 17 00:00:00 2001 From: TGP17 <86961834+TGP17@users.noreply.github.com> Date: Fri, 28 Apr 2023 17:50:13 +0000 Subject: [PATCH] Add Citra AppImage builds (#6404) * Create install_dependencies.sh * Create build.sh * Update ci.yml Add AppImage Builds * Delete unneeded line * Remove unneeded command Removed unneeded chmod a+x for a deleted file * Change cp command to mv Reduces AppImage file size by about 20mb * Update Install dependencies for Ninja builds * Change to Ninja build system Additionally adds the correct Build flags to make all Languages appear again and should make compatibility ratings appear again. Also removes unneeded empty folder. * add missing platformthemes This restores all previously missing Icons and Citra uses now the systems default filepicker. * Git make Executable * Remove unnecessary make scripts executable command * Change build to Debian 11 and use Docker * Change workflow for AppImage Docker builds * Change description of Command to the correct one * Fix themeing after switch to Debian 11 * Only upload .AppImage * Include AppImage in releases * Update upload.sh * Move to rev name --------- Co-authored-by: MT19048 <86961834+MT19048@users.noreply.github.com> --- .ci/linux-appimage/build.sh | 3 +++ .ci/linux-appimage/docker.sh | 28 ++++++++++++++++++++++++++++ .ci/linux-appimage/upload.sh | 5 +++++ .github/workflows/ci.yml | 4 ++-- 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100755 .ci/linux-appimage/build.sh create mode 100755 .ci/linux-appimage/docker.sh create mode 100755 .ci/linux-appimage/upload.sh diff --git a/.ci/linux-appimage/build.sh b/.ci/linux-appimage/build.sh new file mode 100755 index 000000000..2d921a253 --- /dev/null +++ b/.ci/linux-appimage/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash -ex +mkdir -p "$HOME/.ccache" +docker run -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache citraemu/build-environments:linux-appimage /bin/bash -ex /citra/.ci/linux/docker.sh diff --git a/.ci/linux-appimage/docker.sh b/.ci/linux-appimage/docker.sh new file mode 100755 index 000000000..c3576cd33 --- /dev/null +++ b/.ci/linux-appimage/docker.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +#Building Citra +mkdir build +cd build +cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_FFMPEG_VIDEO_DUMPER=ON +ninja + +ctest -VV -C Release + +#Building AppDir +DESTDIR="./AppDir" ninja install +mv ./AppDir/usr/local/bin ./AppDir/usr +mv ./AppDir/usr/local/share ./AppDir/usr +rm -rf ./AppDir/usr/local + +#Circumvent missing LibFuse in Docker, by extracting the AppImage +export APPIMAGE_EXTRACT_AND_RUN=1 + +#Copy External Libraries +mkdir -p ./AppDir/usr/plugins/platformthemes +mkdir -p ./AppDir/usr/plugins/styles +cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/libqt5ct.so ./AppDir/usr/plugins/platformthemes +cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/libqgtk3.so ./AppDir/usr/plugins/platformthemes +cp /usr/lib/x86_64-linux-gnu/qt5/plugins/styles/libqt5ct-style.so ./AppDir/usr/plugins/styles + +#Build AppImage +/linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage diff --git a/.ci/linux-appimage/upload.sh b/.ci/linux-appimage/upload.sh new file mode 100755 index 000000000..eee699b1c --- /dev/null +++ b/.ci/linux-appimage/upload.sh @@ -0,0 +1,5 @@ +#!/bin/bash -ex + +. .ci/common/pre-upload.sh +REV_NAME="citra-linux-${GITDATE}-${GITREV}" +mv build/Citra*.AppImage "${GITHUB_WORKSPACE}"/artifacts/${REV_NAME}.AppImage diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6e5545aa..206586f85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: ["linux-fresh", "linux-frozen", "linux-mingw"] + image: ["linux-appimage", "linux-fresh", "linux-frozen", "linux-mingw"] container: image: citraemu/build-environments:${{ matrix.image }} options: -u 1001 @@ -234,4 +234,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - asset_paths: '["./**/*.tar.*","./**/*.7z","./**/*.zip","./**/*.apk","./**/*.aab"]' + asset_paths: '["./**/*.tar.*","./**/*.AppImage","./**/*.7z","./**/*.zip","./**/*.apk","./**/*.aab"]'