From 3ff721b31aca31933a1be8d57079510bc644b793 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 14 May 2026 18:21:28 +0000 Subject: [PATCH] refactor: move packaging/appimage into desktopApp module The AppImage build inputs (AppRun, .desktop entry, icon, and the CI-fetched linuxdeploy binary) are consumed only by desktopApp's createReleaseAppImage task. Co-locating them under desktopApp/packaging/appimage/ removes the `../` path escape from the build script and keeps all desktop packaging assets inside the module. https://claude.ai/code/session_0137ULcfJkASmfmffFBdW8ac --- .github/workflows/create-release.yml | 6 +++--- .gitignore | 6 +++--- BUILDING.md | 4 ++-- desktopApp/build.gradle.kts | 9 +++++---- {packaging => desktopApp/packaging}/appimage/AppRun | 0 .../packaging}/appimage/amethyst.desktop | 0 .../packaging}/appimage/amethyst.png | Bin 7 files changed, 13 insertions(+), 12 deletions(-) rename {packaging => desktopApp/packaging}/appimage/AppRun (100%) rename {packaging => desktopApp/packaging}/appimage/amethyst.desktop (100%) rename {packaging => desktopApp/packaging}/appimage/amethyst.png (100%) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index e5ce7edcdf..843aba8f34 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -88,13 +88,13 @@ jobs: if: matrix.family == 'linux-portable' run: | set -euo pipefail - curl -fsSL --retry 3 "$LINUXDEPLOY_URL" -o packaging/appimage/linuxdeploy-x86_64.AppImage - actual=$(sha256sum packaging/appimage/linuxdeploy-x86_64.AppImage | awk '{print $1}') + curl -fsSL --retry 3 "$LINUXDEPLOY_URL" -o desktopApp/packaging/appimage/linuxdeploy-x86_64.AppImage + actual=$(sha256sum desktopApp/packaging/appimage/linuxdeploy-x86_64.AppImage | awk '{print $1}') if [[ "$actual" != "$LINUXDEPLOY_SHA256" ]]; then echo "::error::linuxdeploy SHA256 mismatch. Expected $LINUXDEPLOY_SHA256, got $actual" exit 1 fi - chmod +x packaging/appimage/linuxdeploy-x86_64.AppImage + chmod +x desktopApp/packaging/appimage/linuxdeploy-x86_64.AppImage - name: Build desktop artifacts uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 diff --git a/.gitignore b/.gitignore index 5e5bcfd89f..63cf8a9eec 100644 --- a/.gitignore +++ b/.gitignore @@ -167,9 +167,9 @@ desktopApp/src/jvmMain/appResources/macos/ desktopApp/src/jvmMain/appResources/windows/ # CI-fetched AppImage tooling (downloaded by create-release workflow; not committed) -packaging/appimage/linuxdeploy-x86_64.AppImage -packaging/appimage/linuxdeploy-extracted/ -packaging/appimage/squashfs-root/ +desktopApp/packaging/appimage/linuxdeploy-x86_64.AppImage +desktopApp/packaging/appimage/linuxdeploy-extracted/ +desktopApp/packaging/appimage/squashfs-root/ # Git worktrees .worktrees/ diff --git a/BUILDING.md b/BUILDING.md index 611db4f12c..f4b6ed6c29 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -42,9 +42,9 @@ sudo dnf install -y rpm-build Install linuxdeploy locally (CI fetches its own — SHA-verified): ```bash -curl -fsSL -o packaging/appimage/linuxdeploy-x86_64.AppImage \ +curl -fsSL -o desktopApp/packaging/appimage/linuxdeploy-x86_64.AppImage \ https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage -chmod +x packaging/appimage/linuxdeploy-x86_64.AppImage +chmod +x desktopApp/packaging/appimage/linuxdeploy-x86_64.AppImage ``` --- diff --git a/desktopApp/build.gradle.kts b/desktopApp/build.gradle.kts index c9797b90d8..786f5a0fcd 100644 --- a/desktopApp/build.gradle.kts +++ b/desktopApp/build.gradle.kts @@ -173,13 +173,14 @@ tasks.withType().configureEach { // Instead: wrap `createReleaseDistributable` output with `linuxdeploy` (which // auto-bundles libraries, handles rpath, and calls appimagetool internally). // -// Build inputs live in packaging/appimage/: +// Build inputs live in desktopApp/packaging/appimage/: // - AppRun shell launcher (sets LD_LIBRARY_PATH including bundled VLC) // - amethyst.desktop XDG desktop entry // - amethyst.png 512x512 icon // -// linuxdeploy binary is fetched by CI (SHA-verified) into packaging/appimage/ -// as linuxdeploy-x86_64.AppImage. BUILDING.md documents local-dev fetch. +// linuxdeploy binary is fetched by CI (SHA-verified) into +// desktopApp/packaging/appimage/ as linuxdeploy-x86_64.AppImage. +// BUILDING.md documents local-dev fetch. val createReleaseAppImage by tasks.registering(Exec::class) { group = "compose desktop" description = "Bundle createReleaseDistributable output into a Linux AppImage via linuxdeploy." @@ -188,7 +189,7 @@ val createReleaseAppImage by tasks.registering(Exec::class) { val distDir = layout.buildDirectory.dir("compose/binaries/main-release/app/Amethyst") val appDir = layout.buildDirectory.dir("appimage/Amethyst.AppDir") val outFile = layout.buildDirectory.file("appimage/Amethyst-$appVersion-x86_64.AppImage") - val toolRoot = layout.projectDirectory.dir("../packaging/appimage") + val toolRoot = layout.projectDirectory.dir("packaging/appimage") val linuxdeployTool = toolRoot.file("linuxdeploy-x86_64.AppImage") inputs.dir(distDir) diff --git a/packaging/appimage/AppRun b/desktopApp/packaging/appimage/AppRun similarity index 100% rename from packaging/appimage/AppRun rename to desktopApp/packaging/appimage/AppRun diff --git a/packaging/appimage/amethyst.desktop b/desktopApp/packaging/appimage/amethyst.desktop similarity index 100% rename from packaging/appimage/amethyst.desktop rename to desktopApp/packaging/appimage/amethyst.desktop diff --git a/packaging/appimage/amethyst.png b/desktopApp/packaging/appimage/amethyst.png similarity index 100% rename from packaging/appimage/amethyst.png rename to desktopApp/packaging/appimage/amethyst.png