From 04849d14929a01c8ae2b3e438dba180f92e0fc73 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Fri, 6 Mar 2026 19:16:32 +0000 Subject: [PATCH] Fix AppImage build issues: version parsing, CMake expansion, and conditional desktop ID Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com> --- .github/workflows/appimage.yml | 6 +++++- data/CMakeLists.txt | 9 ++++++--- data/gsmartcontrol.appdata.in.xml | 2 +- packaging/appimage/build-appimage.sh | 8 ++++++-- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 90be388..d43a5dc 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -26,12 +26,16 @@ jobs: run: sudo apt-get install libgtkmm-3.0-dev gettext wget file - name: Download linuxdeploy + # Note: Using 'continuous' release for latest version. For reproducible builds, + # pin to a specific release tag and verify SHA256 checksum. run: | wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage chmod +x linuxdeploy-x86_64.AppImage sudo mv linuxdeploy-x86_64.AppImage /usr/local/bin/linuxdeploy - name: Download appimagetool + # Note: Using 'continuous' release for latest version. For reproducible builds, + # pin to a specific release tag and verify SHA256 checksum. run: | wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage chmod +x appimagetool-x86_64.AppImage @@ -107,7 +111,7 @@ jobs: id: version shell: bash run: | - VERSION=$(grep "CMAKE_PROJECT_VERSION" version.txt | cut -d'=' -f2 | tr -d ' ') + VERSION=$(sed -n 's/.*CMAKE_PROJECT_VERSION[[:space:]]*"\([^"]*\)".*/\1/p' version.txt) echo "VERSION=$VERSION" >> $GITHUB_OUTPUT echo "Version: $VERSION" diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index cab588f..5596b5d 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -6,12 +6,15 @@ # Generate files -configure_file("gsmartcontrol.appdata.in.xml" "gsmartcontrol.appdata.xml" ESCAPE_QUOTES @ONLY) if (APP_BUILD_APPIMAGE) - set(APPIMAGE_EXEC_LINE "Exec=\"@CMAKE_INSTALL_FULL_BINDIR@/gsmartcontrol\"") + set(APPIMAGE_DESKTOP_ID "dev.shaduri.gsmartcontrol") + set(APPIMAGE_EXEC_LINE "Exec=\"${CMAKE_INSTALL_FULL_BINDIR}/gsmartcontrol\"") + configure_file("gsmartcontrol.appdata.in.xml" "gsmartcontrol.appdata.xml" ESCAPE_QUOTES @ONLY) configure_file("gsmartcontrol.in.desktop" "dev.shaduri.gsmartcontrol.desktop" ESCAPE_QUOTES @ONLY) else() - set(APPIMAGE_EXEC_LINE "Exec=\"@CMAKE_INSTALL_FULL_BINDIR@/gsmartcontrol-root\"") + set(APPIMAGE_DESKTOP_ID "gsmartcontrol") + set(APPIMAGE_EXEC_LINE "Exec=\"${CMAKE_INSTALL_FULL_BINDIR}/gsmartcontrol-root\"") + configure_file("gsmartcontrol.appdata.in.xml" "gsmartcontrol.appdata.xml" ESCAPE_QUOTES @ONLY) configure_file("gsmartcontrol.in.desktop" "gsmartcontrol.desktop" ESCAPE_QUOTES @ONLY) endif() configure_file("gsmartcontrol-root.in.sh" "gsmartcontrol-root.sh" ESCAPE_QUOTES @ONLY) diff --git a/data/gsmartcontrol.appdata.in.xml b/data/gsmartcontrol.appdata.in.xml index 9988cce..c411ab1 100644 --- a/data/gsmartcontrol.appdata.in.xml +++ b/data/gsmartcontrol.appdata.in.xml @@ -14,7 +14,7 @@ on it.
-