diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index d30b977..6812ccd 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -179,6 +179,9 @@ jobs: if: always() && needs.check-version.outputs.should_build == 'true' runs-on: ${{ matrix.os }} timeout-minutes: 120 + env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/.cpm-cache + strategy: fail-fast: false matrix: @@ -187,28 +190,23 @@ jobs: os: ubuntu-latest artifact_name: "Artifacts_x86_64" script_suffix: "" - build_arg: "" + arch_arg: "" - name: "Citron Build (Optimized x86_64)" os: ubuntu-latest artifact_name: "Artifacts_v3" script_suffix: "_v3" - build_arg: "v3" + arch_arg: "--arch v3" - name: "Citron Build (aarch64)" os: ubuntu-24.04-arm artifact_name: "Artifacts_aarch64" script_suffix: "" - build_arg: "" - - container: ghcr.io/pkgforge-dev/archlinux:latest + arch_arg: "" steps: - - name: Install Git - run: pacman -Syu --noconfirm --needed git - - - name: Checkout Workflow Scripts + - name: Checkout CI Scripts uses: actions/checkout@v4 - - name: Clone Citron Source Code + - name: Clone Citron Source shell: bash run: | CLONE_REPO="${{ needs.check-version.outputs.head_repo }}" @@ -216,10 +214,9 @@ jobs: EXPECTED_HASH="${{ needs.check-version.outputs.new_hash_full }}" if [ -z "$CLONE_REPO" ] || [[ "$CLONE_REPO" != *"/"* ]]; then CLONE_REPO="${{ env.UPSTREAM_REPO }}"; fi if [ -z "$BRANCH_NAME" ]; then BRANCH_NAME="main"; fi - echo "Cloning from $CLONE_REPO (branch: $BRANCH_NAME)..." - git clone --recurse-submodules --shallow-submodules --depth 1 -b "$BRANCH_NAME" "https://github.com/${CLONE_REPO}.git" emulator - cd emulator + git clone --depth 1 -b "$BRANCH_NAME" "https://github.com/${CLONE_REPO}.git" citron + cd citron ACTUAL_HASH=$(git rev-parse HEAD) echo "Checked out ${CLONE_REPO}@${BRANCH_NAME}: ${ACTUAL_HASH}" if [ -n "$EXPECTED_HASH" ] && [ "$ACTUAL_HASH" != "$EXPECTED_HASH" ]; then @@ -227,51 +224,54 @@ jobs: exit 1 fi - - name: Prepare Build Environment - run: | - mv get-dependencies.sh emulator/ - mv build-citron.sh emulator/ - mv package-citron.sh emulator/ - - - name: Add Git Safe Directory - working-directory: ./emulator + - name: Set Git Safe Directory + working-directory: ./citron run: git config --global --add safe.directory "$PWD" - - name: Install dependencies - working-directory: ./emulator - run: chmod +x ./get-dependencies.sh && ./get-dependencies.sh + - name: Cache CPM Sources + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.cpm-cache + key: cpm-linux-${{ runner.os }}-${{ matrix.os }}-${{ hashFiles('citron/CMakeModules/dependencies.cmake') }} + restore-keys: | + cpm-linux-${{ runner.os }}-${{ matrix.os }}- - - name: Build Citron from source - working-directory: ./emulator + - name: Setup Build Environment + working-directory: ./citron + run: | + chmod +x ./build-citron-linux.sh + ./build-citron-linux.sh setup + + - name: Compute Version + id: version + working-directory: ./citron + run: | + GIT_SHA="$(git rev-parse --short HEAD)" + PR_NUMBER="${{ needs.check-version.outputs.pr_number }}" + if [ -n "$PR_NUMBER" ]; then + echo "app_version=PR-${PR_NUMBER}-${GIT_SHA}" >> $GITHUB_OUTPUT + else + echo "app_version=${GIT_SHA}" >> $GITHUB_OUTPUT + fi + echo "sha=${GIT_SHA}" >> $GITHUB_OUTPUT + + - name: Build Citron + working-directory: ./citron + env: + APP_VERSION: ${{ steps.version.outputs.app_version }} + ARCH_SUFFIX: ${{ matrix.script_suffix }} + DEVEL: "true" run: | NPROC_VAL=$(nproc --all) JOBS_VAL=$((NPROC_VAL > 4 ? 4 : NPROC_VAL)) - chmod +x ./build-citron.sh - JOBS=${JOBS_VAL} DEVEL=true ./build-citron.sh ${{ matrix.build_arg }} - - - name: Package AppImage with Correct Name - working-directory: ./emulator - run: | - GIT_SHA=$(git rev-parse --short HEAD) - PR_NUMBER="${{ needs.check-version.outputs.pr_number }}" - BRANCH_NAME="${{ needs.check-version.outputs.branch_name }}" - SAFE_BRANCH=$(printf '%s' "$BRANCH_NAME" | tr '/ ' '--' | tr -cd 'A-Za-z0-9._-') - if [ -n "$PR_NUMBER" ]; then - export APP_VERSION="PR-${PR_NUMBER}-${GIT_SHA}" - else - export APP_VERSION="${SAFE_BRANCH:-main}-${GIT_SHA}" - fi - export VERSION="${APP_VERSION}" - export ARCH_SUFFIX="${{ matrix.script_suffix }}" - export DEVEL="true" - chmod +x ./package-citron.sh - ./package-citron.sh + JOBS=${JOBS_VAL} ./build-citron-linux.sh use --pgo none --lto full ${{ matrix.arch_arg }} - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifact_name }} - path: emulator/dist/ + path: citron/build/use-nopgo/AppImage/ + comment-end: name: Comment End @@ -301,7 +301,7 @@ jobs: gh api -X DELETE "repos/${UPSTREAM}/issues/comments/${DUPLICATE_ID}" >/dev/null 2>&1 || true fi done - + if [ -n "$COMMENT_ID" ]; then LOG_URL="https://github.com/${REPO}/actions/runs/${RUN_ID}" COMMIT_LINK="[\`${HASH_SHORT}\`](https://github.com/${HEAD_REPO}/commit/${HASH_FULL})" diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 9f1c57e..0000000 --- a/PKGBUILD +++ /dev/null @@ -1,69 +0,0 @@ -# Maintainer: Collecting - -# The '-git' suffix signifies this is a bleeding-edge build from the git repo -pkgname=citron-git -pkgver=0.1.r0.g1a2b3c4 # This will be replaced by the pkgver() function -pkgrel=1 -pkgdesc="A Nintendo Switch emulator" -arch=('x86_64' 'aarch64') -url="https://citron-emu.org/" -license=('GPL2') - -# Dependencies needed to run the emulator -depends=( - 'boost-libs' 'enet' 'fmt' 'ffmpeg' 'gamemode' 'glslang' 'hicolor-icon-theme' - 'libdecor' 'libxkbcommon-x11' 'mbedtls2' 'nlohmann-json' 'qt6-base' - 'qt6-multimedia' 'sdl2' 'vulkan-icd-loader' -) - -# Dependencies needed only to build the emulator from source -makedepends=( - 'boost' 'catch2' 'cmake' 'git' 'ninja' 'nasm' 'qt6-tools' 'vulkan-headers' -) - -# This points to the source code repository -source=("git+https://git.citron-emu.org/citron/emulator.git") -sha256sums=('SKIP') - -# This function automatically generates a version string based on the latest git commit -pkgver() { - cd "$pkgname" - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' -} - -# This function runs before the build and is used to apply patches -prepare() { - cd "$pkgname" - # Apply compatibility patches for newer Boost versions - find . -type f \( -name '*.cpp' -o -name '*.h' \) | xargs sed -i 's/\bboost::asio::io_service\b/boost::asio::io_context/g' - find . -type f \( -name '*.cpp' -o -name '*.h' \) | xargs sed -i 's/\bboost::asio::io_service::strand\b/boost::asio::strand/g' - find . -type f \( -name '*.cpp' -o -name '*.h' \) | xargs sed -i 's|#include *|#include |g' - find . -type f \( -name '*.cpp' -o -name '*.h' \) | xargs sed -i 's/\bboost::process::async_pipe\b/boost::process::v1::async_pipe/g' -} - -# This function contains the build commands -build() { - cd "$pkgname" - # makepkg sets CFLAGS and CXXFLAGS, so we don't need to specify arch flags - cmake -B build -S . -GNinja \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCITRON_USE_BUNDLED_VCPKG=OFF \ - -DCITRON_USE_BUNDLED_QT=OFF \ - -DUSE_SYSTEM_QT=ON \ - -DCITRON_USE_BUNDLED_FFMPEG=OFF \ - -DCITRON_USE_BUNDLED_SDL2=OFF \ - -DCITRON_TESTS=OFF \ - -DCITRON_CHECK_SUBMODULES=OFF \ - -DCITRON_ENABLE_LTO=ON \ - -DCITRON_USE_QT_MULTIMEDIA=ON \ - -DENABLE_QT_TRANSLATION=ON - - ninja -C build -} - -# This function installs the built files into a temporary directory -package() { - cd "$pkgname" - DESTDIR="$pkgdir/" ninja -C build install -} diff --git a/README.md b/README.md index 25182e2..612d7c7 100644 --- a/README.md +++ b/README.md @@ -1,78 +1,53 @@ -# πŸ‹ The Official Citron-CI +# πŸ‹ Citron Neo PR Builds -[![GitHub Downloads](https://img.shields.io/github/downloads/citron-neo/CI/total?logo=github&label=GitHub%20Downloads)](https://github.com/citron-neo/CI/releases/latest) -[![Build Citron (Android)](https://github.com/citron-neo/CI/actions/workflows/build-android.yml/badge.svg)](https://github.com/citron-neo/CI/actions/workflows/build-android.yml) -[![Build Citron (Windows)](https://github.com/citron-neo/CI/actions/workflows/build-windows.yml/badge.svg)](https://github.com/citron-neo/CI/actions/workflows/build-windows.yml) -[![Build Citron (Linux)](https://github.com/citron-neo/CI/actions/workflows/build-linux.yml/badge.svg)](https://github.com/citron-neo/CI/actions/workflows/build-linux.yml) -[![Build Citron (macOS)](https://github.com/citron-neo/CI/actions/workflows/build-macos.yml/badge.svg)](https://github.com/citron-neo/CI/actions/workflows/build-macos.yml) - -## Star History - - - - - - Star History Chart - - +[![Build Citron Neo (Android)](https://github.com/citron-neo/CI/actions/workflows/build-android.yml/badge.svg)](https://github.com/citron-neo/CI/actions/workflows/build-android.yml) [![Build Citron Neo (Windows)](https://github.com/citron-neo/CI/actions/workflows/build-windows.yml/badge.svg)](https://github.com/citron-neo/CI/actions/workflows/build-windows.yml) [![Build Citron Neo (Linux)](https://github.com/citron-neo/CI/actions/workflows/build-linux.yml/badge.svg)](https://github.com/citron-neo/CI/actions/workflows/build-linux.yml) [![Build Citron Neo (macOS)](https://github.com/citron-neo/CI/actions/workflows/build-macos.yml/badge.svg)](https://github.com/citron-neo/CI/actions/workflows/build-macos.yml) --- -This repository makes Nightly builds for **x86_64** (Standard), **x86_64_v3** (CPU's that are from 2013+) & **aarch64** on Linux, and also Windows, Android & macOS builds! These builds are all produced @ 12 AM UTC every single day. +This repository builds **on-demand test artifacts for open pull requests** against the Citron Neo emulator β€” it does **not** produce the project's Nightly or Stable releases. For those, see [citron-neo/CI](https://github.com/citron-neo/CI). + +Each platform workflow (Windows, Linux, Android, macOS) is triggered manually via `workflow_dispatch`, taking a target branch, a PR number, and a head repo as input. This lets a reviewer or contributor build a specific PR's branch β€” from any fork β€” without waiting for it to merge. + +Once a build is requested, this repository: + +- Builds the requested commit for the chosen platform. +- Posts (or updates) a single results comment on the corresponding pull request in [citron-neo/emulator](https://github.com/citron-neo/emulator), with a table tracking each platform's status (`Pending` β†’ `Building...` β†’ `Success`/`Failed`) and a direct download link to the artifact, powered by [nightly.link](https://nightly.link). +- Skips rebuilding a commit that's already been built successfully for that platform, to avoid duplicate work on repeated dispatches. Would you like to submit a compatibility report for the emulator? You can do so here: -* [Submit Compatibility Report](https://github.com/CollectingW/Citron-Compatability) +- [Submit Compatibility Report](https://github.com/citron-neo/Citron-Compatability) --- Direct links for other information you may need can also be found below: -* [Latest Commits Can Be Found Here](https://github.com/citron-neo/emulator/commits/main) - -* [Latest Android Nightly Release](https://github.com/citron-neo/CI/releases/tag/nightly-android) - -* [Latest Linux Nightly Release](https://github.com/citron-neo/CI/releases/tag/nightly-linux) - -* [Latest Windows Nightly Release](https://github.com/citron-neo/CI/releases/tag/nightly-windows) - -* [Latest macOS Nightly Release](https://github.com/citron-neo/CI/releases/tag/nightly-macos) +- [Latest Commits Can Be Found Here](https://github.com/citron-neo/emulator/commits/main) +- [citron-neo/CI β€” Nightly & Stable Releases](https://github.com/citron-neo/CI) +- [citron-neo/emulator β€” Open Pull Requests](https://github.com/citron-neo/emulator/pulls) --- # READ THIS IF YOU HAVE ISSUES -If you are on wayland (specially GNOME wayland) and get freezes or crashes, you are likely affected by this issue that affects all Qt6 apps: https://github.com/citron-neo/CI/issues/50 +If you are on wayland (specially GNOME wayland) and get freezes or crashes, you are likely affected by this issue that affects all Qt6 apps: [citron-neo/CI#50](https://github.com/citron-neo/CI/pull/50) To fix it simply set the env variable `QT_QPA_PLATFORM=xcb` -**Also, are you looking for AppImages of other emulators? Check:** [AnyLinux-AppImages](https://pkgforge-dev.github.io/Anylinux-AppImages/) - ----- - -AppImage made using [sharun](https://github.com/VHSgunzo/sharun), which makes it extremely easy to turn any binary into a portable package without using containers or similar tricks. - -**These AppImages bundle everything and should work on any Linux distro, even on musl based ones.** - -It is possible that the AppImages may fail to work with appimagelauncher, we recommend these alternatives instead: - -* [AM](https://github.com/ivan-hc/AM) `am -i citron` or `appman -i citron` - -* [dbin](https://github.com/xplshn/dbin) `dbin install citron.appimage` - -* [soar](https://github.com/pkgforge/soar) `soar install citron` - -These AppImages works without fuse2 as it can use fuse3 instead, it can also work without fuse at all thanks to the [uruntime](https://github.com/VHSgunzo/uruntime) - -
- raison d'Γͺtre - Inspiration Image - -
- -**The following information above and the creation of the AppImages Citron currently creates & distributes derives from Pkgforges previous work. You can find their repository here: https://github.com/pkgforge-dev/Citron-AppImage** +**Also, are you looking for AppImages of other emulators? Check:** [AnyLinux-AppImages](https://pkgforge-dev.github.io/Anylinux-AppImages/) --- -Thank-you for being apart of & using Citron, we value all members of the community whom help shape the emulator into what it is today! -- The Citron Team +Linux AppImage builds are made using [sharun](https://github.com/VHSgunzo/sharun), which makes it extremely easy to turn any binary into a portable package without using containers or similar tricks. + +**These AppImages bundle everything and should work on any Linux distro, even on musl based ones.** + +A `tar.zst` portable archive of the same build is also produced alongside the AppImage, for users who prefer an install-free tarball over the AppImage format. + +These AppImages work without fuse2 as they can use fuse3 instead; they can also work without fuse at all thanks to the [uruntime](https://github.com/VHSgunzo/uruntime). + +--- + +Thank-you for being a part of & using Citron Neo, we value all members of the community whom help shape the emulator into what it is today! + +- The Citron Neo Team diff --git a/build-citron.sh b/build-citron.sh deleted file mode 100644 index 2ccbe94..0000000 --- a/build-citron.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/sh -set -ex - -# --- Architecture and Compiler Flag Setup --- -ARCH="${ARCH:-$(uname -m)}" - -if [ "$1" = 'v3' ] && [ "$ARCH" = 'x86_64' ]; then - ARCH_FLAGS="-march=x86-64-v3 -O3 -USuccess -UNone -fuse-ld=lld" -elif [ "$ARCH" = 'x86_64' ]; then - ARCH_FLAGS="-march=x86-64 -mtune=generic -O3 -USuccess -UNone -fuse-ld=lld" -else - ARCH_FLAGS="-march=armv8-a -mtune=generic -O3 -USuccess -UNone -fuse-ld=lld" -fi - -# --- Source Code Checkout and Versioning --- -if [ -d ".git" ]; then - echo "Already in a git repository, using current directory." -else - git clone --recurse-submodules --shallow-submodules --depth 1 "https://github.com/citron-neo/emulator.git" ./citron - cd ./citron -fi - -if [ "$DEVEL" = 'true' ]; then - CITRON_TAG="$(git rev-parse --short HEAD)" - VERSION="$CITRON_TAG" -else - CITRON_TAG=$(git describe --tags) - git checkout "$CITRON_TAG" - VERSION="$(echo "$CITRON_TAG" | awk -F'-' '{print $1}')" -fi - -# --- Apply Necessary Source Code Patches for Compatibility --- -find . -type f \( -name '*.cpp' -o -name '*.h' \) | xargs sed -i 's/\bboost::asio::io_service\b/boost::asio::io_context/g' -find . -type f \( -name '*.cpp' -o -name '*.h' \) | xargs sed -i 's/\bboost::asio::io_service::strand\b/boost::asio::strand/g' -find . -type f \( -name '*.cpp' -o -name '*.h' \) | xargs sed -i 's|#include *|#include |g' -find . -type f \( -name '*.cpp' -o -name '*.h' \) | xargs sed -i 's/\bboost::process::async_pipe\b/boost::process::v1::async_pipe/g' -sed -i '/sse2neon/d' ./src/video_core/CMakeLists.txt -sed -i 's/cmake_minimum_required(VERSION 2.8)/cmake_minimum_required(VERSION 3.5)/' externals/xbyak/CMakeLists.txt - -# --- Find Qt6 Private Headers --- -HEADER_PATH=$(pacman -Ql qt6-base | grep 'qpa/qplatformnativeinterface.h$' | awk '{print $2}') -if [ -z "$HEADER_PATH" ]; then - echo "ERROR: Could not find qplatformnativeinterface.h path." >&2 - exit 1 -fi -QT_PRIVATE_INCLUDE_DIR=$(dirname "$(dirname "$HEADER_PATH")") -CXX_FLAGS_EXTRA="-I${QT_PRIVATE_INCLUDE_DIR}" - -# --- Build Process --- -JOBS=$(nproc --all) - -mkdir build && cd build - -# Configure the build using CMake -cmake .. -GNinja \ - -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ - -DCITRON_USE_BUNDLED_VCPKG=OFF \ - -DCITRON_USE_BUNDLED_QT=OFF \ - -DUSE_SYSTEM_QT=ON \ - -DENABLE_QT6=ON \ - -DCITRON_USE_BUNDLED_FFMPEG=OFF \ - -DCITRON_USE_BUNDLED_SDL2=ON \ - -DCITRON_USE_EXTERNAL_SDL2=OFF \ - -DCITRON_TESTS=OFF \ - -DCITRON_CHECK_SUBMODULES=OFF \ - -DCITRON_USE_LLVM_DEMANGLE=OFF \ - -DCITRON_ENABLE_LTO=ON \ - -DCITRON_USE_QT_MULTIMEDIA=ON \ - -DCITRON_USE_QT_WEB_ENGINE=OFF \ - -DENABLE_QT_TRANSLATION=ON \ - -DUSE_DISCORD_PRESENCE=ON \ - -DENABLE_WEB_SERVICE=ON \ - -DENABLE_OPENSSL=ON \ - -DBUNDLE_SPEEX=ON \ - -DCITRON_USE_FASTER_LD=OFF \ - -DCITRON_USE_EXTERNAL_Vulkan_HEADERS=ON \ - -DCITRON_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES=ON \ - -DCITRON_USE_AUTO_UPDATER=ON \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_CXX_FLAGS="$ARCH_FLAGS -Wno-error -w ${CXX_FLAGS_EXTRA}" \ - -DCMAKE_C_FLAGS="$ARCH_FLAGS" \ - -DCMAKE_SYSTEM_PROCESSOR="$(uname -m)" \ - -DCITRON_BUILD_TYPE=Release \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - -# Compile and install the project -ninja -j${JOBS} -sudo ninja install - -# --- Output Version Info --- -echo "$VERSION" >~/version diff --git a/get-dependencies.sh b/get-dependencies.sh deleted file mode 100644 index cc7e383..0000000 --- a/get-dependencies.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -set -ex -ARCH="$(uname -m)" - -pacman -Syu --noconfirm --needed \ - base-devel \ - boost \ - boost-libs \ - catch2 \ - clang \ - cmake \ - curl \ - enet \ - fmt \ - ffmpeg \ - gamemode \ - gcc \ - git \ - glslang \ - glu \ - hidapi \ - libdecor \ - libvpx \ - libxi \ - libxkbcommon-x11 \ - libxss \ - lld \ - llvm \ - mbedtls2 \ - mesa \ - nasm \ - ninja \ - nlohmann-json \ - numactl \ - openal \ - pulseaudio \ - pulseaudio-alsa \ - qt6-base \ - qt6-networkauth \ - qt6-multimedia \ - qt6-tools \ - qt6-wayland \ - qt6-translations \ - sdl2 \ - unzip \ - vulkan-headers \ - vulkan-mesa-layers \ - wget \ - xcb-util-cursor \ - xcb-util-image \ - xcb-util-renderutil \ - xcb-util-wm \ - xorg-server-xvfb \ - zip \ - zsync diff --git a/package-citron.sh b/package-citron.sh deleted file mode 100644 index e8588f8..0000000 --- a/package-citron.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh -set -ex -ARCH="${ARCH:-$(uname -m)}" - -# The VERSION is now passed as an environment variable from the workflow -if [ -z "$APP_VERSION" ]; then - echo "Error: APP_VERSION environment variable is not set." - exit 1 -fi - -# Construct unique names for the AppImage and tarball based on the build matrix. -OUTNAME_BASE="citron_nightly-${APP_VERSION}-linux-${ARCH}${ARCH_SUFFIX}" -export OUTNAME_APPIMAGE="${OUTNAME_BASE}.AppImage" -export OUTNAME_TAR="${OUTNAME_BASE}.tar.zst" - -URUNTIME="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/uruntime2appimage.sh" -SHARUN="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/quick-sharun.sh" - -export DESKTOP=/usr/share/applications/org.citron_emu.citron.desktop -export ICON=/usr/share/icons/hicolor/scalable/apps/org.citron_emu.citron.svg -export DEPLOY_OPENGL=1 -export DEPLOY_VULKAN=1 -export DEPLOY_PIPEWIRE=1 - -wget --retry-connrefused --tries=30 "$SHARUN" -O ./quick-sharun -chmod +x ./quick-sharun - -./quick-sharun /usr/bin/citron* /usr/lib/libgamemode.so* /usr/lib/libpulse.so* - -echo "Copying Qt translation files..." - -mkdir -p ./AppDir/usr/share/qt6 - -cp -r /usr/share/qt6/translations ./AppDir/usr/share/qt6/ - -if [ "$DEVEL" = 'true' ]; then - sed -i 's|Name=citron|Name=citron nightly|' ./AppDir/*.desktop -fi - -echo 'SHARUN_ALLOW_SYS_VK_ICD=1' > ./AppDir/.env - - -echo "Creating tar.zst archive..." - -(cd AppDir && tar -c --zstd -f ../"$OUTNAME_TAR" usr) -echo "Successfully created $OUTNAME_TAR" - - -wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime2appimage -chmod +x ./uruntime2appimage - -# Run the AppImage creation tool and capture its output to a variable. -BUILD_OUTPUT=$(./uruntime2appimage) - -# Print the captured output to the logs for debugging purposes. -echo "$BUILD_OUTPUT" - -# Automatically find the AppImage path from the output, strip any ANSI color codes, -# and then use basename to get just the filename. -SOURCE_APPIMAGE=$(basename "$(echo "$BUILD_OUTPUT" | grep "All done! AppImage at:" | awk '{print $NF}' | sed 's/\x1b\[[0-9;]*m//g')") - -echo "Discovered source AppImage: ${SOURCE_APPIMAGE}" -echo "Renaming to final suffixed name: ${OUTNAME_APPIMAGE}..." - -# Now, use the dynamically discovered and cleaned filename for the move operations. -mv -v "${SOURCE_APPIMAGE}" "${OUTNAME_APPIMAGE}" -mv -v "${SOURCE_APPIMAGE}.zsync" "${OUTNAME_APPIMAGE}.zsync" - -mkdir -p ./dist - -mv -v ./*.AppImage* ./dist -mv -v ./*.tar.zst ./dist