From 36358ccea0ba3774c2afd8d2c45a58033c7906e1 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 6 Apr 2025 01:12:14 -0400 Subject: [PATCH 1/6] gnome moment --- .github/workflows/main.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index de6c1c0..b1c9991 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,12 +13,8 @@ jobs: include: - ARCH: x86_64 RUNS_ON: ubuntu-24.04 - - ARCH: i686 - RUNS_ON: ubuntu-24.04 - ARCH: aarch64 RUNS_ON: ubuntu-24.04-arm - - ARCH: armhf - RUNS_ON: ubuntu-24.04-arm name: AppImage ${{ matrix.ARCH }} runs-on: ${{ matrix.RUNS_ON }} From f227e341b7cabc13af770e801254518d69ce2624 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 6 Apr 2025 01:14:42 -0400 Subject: [PATCH 2/6] gnome moment2 --- ci/build-appimages.sh | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/ci/build-appimages.sh b/ci/build-appimages.sh index 654f88e..3df73fb 100755 --- a/ci/build-appimages.sh +++ b/ci/build-appimages.sh @@ -29,10 +29,6 @@ pushd "$BUILD_DIR" export ARCH=${ARCH:-"$(uname -m)"} -if [ "$ARCH" == "i386" ] && [ "$DOCKER" == "" ]; then - EXTRA_CMAKE_ARGS=("-DCMAKE_TOOLCHAIN_FILE=$REPO_ROOT/cmake/toolchains/i386-linux-gnu.cmake") -fi - cmake "$REPO_ROOT" \ -DBUILD_QT_UI=ON \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -43,7 +39,7 @@ cmake "$REPO_ROOT" \ make -j"$(nproc)" # set up the AppDirs initially -for appdir in {appimageupdatetool,AppImageUpdate,validate}.AppDir; do +for appdir in {appimageupdatetool,validate}.AppDir; do make install DESTDIR="$appdir" mkdir -p "$appdir"/resources cp -v "$REPO_ROOT"/resources/*.xpm "$appdir"/resources/ @@ -61,8 +57,6 @@ fi # remove unnecessary binaries from AppDirs -rm AppImageUpdate.AppDir/usr/bin/appimageupdatetool -rm AppImageUpdate.AppDir/usr/bin/validate rm appimageupdatetool.AppDir/usr/bin/AppImageUpdate rm appimageupdatetool.AppDir/usr/bin/validate rm appimageupdatetool.AppDir/usr/lib/*/libappimageupdate-qt*.so* @@ -71,8 +65,8 @@ rm validate.AppDir/usr/lib/*/libappimageupdate*.so* # remove other unnecessary data -find {appimageupdatetool,AppImageUpdate,validate}.AppDir -type f -iname '*.a' -delete -rm -rf {appimageupdatetool,AppImageUpdate}.AppDir/usr/include +find {appimageupdatetool,validate}.AppDir -type f -iname '*.a' -delete +rm -rf appimageupdatetool.AppDir/usr/include # get linuxdeploy and its qt plugin @@ -89,26 +83,20 @@ patch_appimage() { } patch_appimage linuxdeploy*.AppImage -for app in appimageupdatetool AppImageUpdate validate; do +for app in appimageupdatetool validate; do find "$app".AppDir/ export UPD_INFO="gh-releases-zsync|pkgforge-dev|AppImageUpdate|continuous|$app-*$ARCH.AppImage.zsync" - # note that we need to overwrite this in every iteration, otherwise the value will leak into the following iterationso - extra_flags=() - if [ "$app" == "AppImageUpdate" ]; then - extra_flags=("--plugin" "qt"); - fi - # overwrite AppImage filename to get static filenames # see https://github.com/AppImage/AppImageUpdate/issues/89 export OUTPUT="$app"-"$ARCH".AppImage # bundle application - ./linuxdeploy-"$CMAKE_ARCH".AppImage --appdir "$app".AppDir --output appimage "${extra_flags[@]}" -d "$REPO_ROOT"/resources/"$app".desktop -i "$REPO_ROOT"/resources/appimage.png --plugin checkrt + ./linuxdeploy-"$CMAKE_ARCH".AppImage --appdir "$app".AppDir --output appimage -d "$REPO_ROOT"/resources/"$app".desktop -i "$REPO_ROOT"/resources/appimage.png --plugin checkrt done # move AppImages to old cwd -mv {appimageupdatetool,AppImageUpdate,validate}*.AppImage* "$OLD_CWD"/ +mv {appimageupdatetool,validate}*.AppImage* "$OLD_CWD"/ popd From df1f81f06b3d946619e503bc11d1f8f255cc9873 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 6 Apr 2025 01:21:36 -0400 Subject: [PATCH 3/6] build smaller --- ci/build-appimages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build-appimages.sh b/ci/build-appimages.sh index 3df73fb..779f638 100755 --- a/ci/build-appimages.sh +++ b/ci/build-appimages.sh @@ -32,7 +32,7 @@ export ARCH=${ARCH:-"$(uname -m)"} cmake "$REPO_ROOT" \ -DBUILD_QT_UI=ON \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ "${EXTRA_CMAKE_ARGS[@]}" # next step is to build the binaries From a8885203c322bf1d60ea8b766c0c2232a0fef7ff Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 6 Apr 2025 01:29:24 -0400 Subject: [PATCH 4/6] remove ancient method --- ci/build-appimages.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ci/build-appimages.sh b/ci/build-appimages.sh index 779f638..96ff223 100755 --- a/ci/build-appimages.sh +++ b/ci/build-appimages.sh @@ -4,6 +4,8 @@ set -x set -e set -o pipefail +export APPIMAGE_EXTRACT_AND_RUN=1 + # use RAM disk if possible if [ "$CI" == "" ] && [ -d /dev/shm ]; then TEMP_BASE=/dev/shm @@ -75,14 +77,6 @@ wget https://github.com/TheAssassin/linuxdeploy-plugin-qt/releases/download/cont wget https://github.com/darealshinji/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt.sh chmod +x linuxdeploy*.AppImage linuxdeploy-plugin-checkrt.sh -patch_appimage() { - while [[ "$1" != "" ]]; do - dd if=/dev/zero of="$1" conv=notrunc bs=1 count=3 seek=8 - shift - done -} -patch_appimage linuxdeploy*.AppImage - for app in appimageupdatetool validate; do find "$app".AppDir/ From 042248587281c67e67c2306d42bb258fa42791b1 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 6 Apr 2025 02:00:22 -0400 Subject: [PATCH 5/6] turn POSIX --- ci/build-appimages.sh | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/ci/build-appimages.sh b/ci/build-appimages.sh index 96ff223..5dc39fe 100755 --- a/ci/build-appimages.sh +++ b/ci/build-appimages.sh @@ -1,17 +1,11 @@ -#! /bin/bash +#!/bin/bash -set -x -set -e -set -o pipefail +set -ex export APPIMAGE_EXTRACT_AND_RUN=1 # use RAM disk if possible -if [ "$CI" == "" ] && [ -d /dev/shm ]; then - TEMP_BASE=/dev/shm -else - TEMP_BASE=/tmp -fi +TEMP_BASE=/tmp BUILD_DIR="$(mktemp -d -p "$TEMP_BASE" AppImageUpdate-build-XXXXXX)" @@ -27,21 +21,20 @@ trap cleanup EXIT REPO_ROOT="$(readlink -f "$(dirname "$(dirname "$0")")")" OLD_CWD="$(readlink -f .)" -pushd "$BUILD_DIR" +cd "$BUILD_DIR" export ARCH=${ARCH:-"$(uname -m)"} cmake "$REPO_ROOT" \ -DBUILD_QT_UI=ON \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=MinSizeRel \ - "${EXTRA_CMAKE_ARGS[@]}" + -DCMAKE_BUILD_TYPE=MinSizeRel # next step is to build the binaries make -j"$(nproc)" # set up the AppDirs initially -for appdir in {appimageupdatetool,validate}.AppDir; do +for appdir in appimageupdatetool.AppDir validate.AppDir; do make install DESTDIR="$appdir" mkdir -p "$appdir"/resources cp -v "$REPO_ROOT"/resources/*.xpm "$appdir"/resources/ @@ -78,19 +71,19 @@ wget https://github.com/darealshinji/linuxdeploy-plugin-checkrt/releases/downloa chmod +x linuxdeploy*.AppImage linuxdeploy-plugin-checkrt.sh for app in appimageupdatetool validate; do - find "$app".AppDir/ - - export UPD_INFO="gh-releases-zsync|pkgforge-dev|AppImageUpdate|continuous|$app-*$ARCH.AppImage.zsync" - - # overwrite AppImage filename to get static filenames - # see https://github.com/AppImage/AppImageUpdate/issues/89 - export OUTPUT="$app"-"$ARCH".AppImage - - # bundle application - ./linuxdeploy-"$CMAKE_ARCH".AppImage --appdir "$app".AppDir --output appimage -d "$REPO_ROOT"/resources/"$app".desktop -i "$REPO_ROOT"/resources/appimage.png --plugin checkrt + find "$app".AppDir/ + export UPD_INFO="gh-releases-zsync|pkgforge-dev|AppImageUpdate|continuous|$app-*$ARCH.AppImage.zsync" + + # overwrite AppImage filename to get static filenames + # see https://github.com/AppImage/AppImageUpdate/issues/89 + export OUTPUT="$app"-"$ARCH".AppImage + + # bundle application + ./linuxdeploy-"$CMAKE_ARCH".AppImage --appdir "$app".AppDir --output appimage -d "$REPO_ROOT"/resources/"$app".desktop -i "$REPO_ROOT"/resources/appimage.png --plugin checkrt done # move AppImages to old cwd -mv {appimageupdatetool,validate}*.AppImage* "$OLD_CWD"/ +mv appimageupdatetool*.AppImage* "$OLD_CWD"/ +mv validate*.AppImage* "$OLD_CWD"/ popd From 544259b117a13f5079db662e24336950e750c555 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sun, 6 Apr 2025 02:05:34 -0400 Subject: [PATCH 6/6] oops --- ci/build-appimages.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/build-appimages.sh b/ci/build-appimages.sh index 5dc39fe..7a16d88 100755 --- a/ci/build-appimages.sh +++ b/ci/build-appimages.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -ex @@ -86,4 +86,4 @@ done mv appimageupdatetool*.AppImage* "$OLD_CWD"/ mv validate*.AppImage* "$OLD_CWD"/ -popd +cd -