From cd1e6859261662d839a7fc2344befbd5588f52a0 Mon Sep 17 00:00:00 2001 From: noah-peeters Date: Tue, 15 Sep 2026 16:54:23 +0200 Subject: [PATCH] chore: remove Flatpak packaging Drop the Flatpak build entirely: manifest, desktop entry, metainfo, build script, CI job, release asset, docs and gitignore entries. The release job no longer needs the non-blocking condition that only existed for the Flatpak build, so it goes back to requiring all three native builds. Also fix the Linux desktop file name: Qt was told the app is "noah.peeters.chimpstackr", but the AppImage ships chimpstackr.desktop, so Wayland compositors could not match the window to its icon. Co-Authored-By: Claude Opus 5 --- .github/workflows/build.yml | 57 +------- .gitignore | 6 - README.md | 1 - docs/index.md | 1 - docs/packaging.md | 41 +----- ...io.github.noah_peeters.ChimpStackr.desktop | 12 -- ...thub.noah_peeters.ChimpStackr.metainfo.xml | 98 ------------- .../io.github.noah_peeters.ChimpStackr.yml | 133 ------------------ scripts/build_flatpak.sh | 76 ---------- src/run.py | 11 +- 10 files changed, 6 insertions(+), 430 deletions(-) delete mode 100644 packaging/flatpak/io.github.noah_peeters.ChimpStackr.desktop delete mode 100644 packaging/flatpak/io.github.noah_peeters.ChimpStackr.metainfo.xml delete mode 100644 packaging/flatpak/io.github.noah_peeters.ChimpStackr.yml delete mode 100755 scripts/build_flatpak.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d07cd56..ad91e01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -233,63 +233,12 @@ jobs: name: ChimpStackr-Linux path: dist/ChimpStackr-Linux-x86_64.AppImage - # ══════════════════════════════════════════════ - # Build Linux (Flatpak) - # ══════════════════════════════════════════════ - build-flatpak: - needs: test - runs-on: ubuntu-latest - container: - image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.10 - options: --privileged - steps: - - uses: actions/checkout@v7 - - - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 - with: - manifest-path: packaging/flatpak/io.github.noah_peeters.ChimpStackr.yml - bundle: ChimpStackr-Linux.flatpak - cache-key: flatpak-builder-${{ hashFiles('packaging/flatpak/*.yml') }} - - - name: Verify Flatpak build contents - run: | - echo "=== Checking installed files ===" - ls -la flatpak_app/files/bin/ - echo "=== Checking entry points ===" - cat flatpak_app/files/bin/chimpstackr - echo "=== Checking Python packages ===" - PYDIR=$(ls flatpak_app/files/lib/ | grep python) - echo "Python dir: $PYDIR" - ls flatpak_app/files/lib/$PYDIR/site-packages/ | head -30 - echo "=== Checking app source ===" - ls flatpak_app/files/lib/$PYDIR/site-packages/src/ - echo "=== Checking icons ===" - find flatpak_app/files/share/icons -name "*.png" -ls - echo "=== Checking desktop/metainfo ===" - ls flatpak_app/files/share/applications/ - ls flatpak_app/files/share/metainfo/ - echo "=== Build verified ===" - - - uses: actions/upload-artifact@v7 - with: - name: ChimpStackr-Flatpak - path: ChimpStackr-Linux.flatpak - # ══════════════════════════════════════════════ # Create GitHub Release (on tag push) # ══════════════════════════════════════════════ release: - # Wait for every build, but only *require* the native ones. A failed Flatpak - # build (e.g. EOL runtime) must not block cutting a release; the .flatpak - # asset is simply omitted (fail_on_unmatched_files defaults to false). - needs: [build-macos, build-windows, build-linux, build-flatpak] - if: >- - ${{ !cancelled() - && needs.build-macos.result == 'success' - && needs.build-windows.result == 'success' - && needs.build-linux.result == 'success' - && (startsWith(github.ref, 'refs/tags/v') - || (github.event_name == 'workflow_dispatch' && inputs.create_release)) }} + needs: [build-macos, build-windows, build-linux] + if: startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch' && inputs.create_release) runs-on: ubuntu-latest permissions: contents: write @@ -319,7 +268,6 @@ jobs: | Windows | `ChimpStackr-Windows.zip` — Extract and run `chimpstackr.exe` | | macOS | `ChimpStackr-macOS.dmg` — Open, drag to Applications | | Linux (AppImage) | `ChimpStackr-Linux-x86_64.AppImage` — `chmod +x` and run | - | Linux (Flatpak) | `ChimpStackr-Linux.flatpak` — `flatpak install ChimpStackr-Linux.flatpak` | ## What's New @@ -328,4 +276,3 @@ jobs: artifacts/ChimpStackr-macOS/ChimpStackr-macOS.dmg artifacts/ChimpStackr-Windows/ChimpStackr-Windows.zip artifacts/ChimpStackr-Linux/ChimpStackr-Linux-x86_64.AppImage - artifacts/ChimpStackr-Flatpak/ChimpStackr-Linux.flatpak diff --git a/.gitignore b/.gitignore index 50af9d8..de37896 100644 --- a/.gitignore +++ b/.gitignore @@ -16,12 +16,6 @@ appimage-build/ *.AppImage.zsync *.squashfs -# Flatpak build files -.flatpak-build/ -.flatpak-repo/ -*.flatpak - - # Distribution / packaging .Python build/ diff --git a/README.md b/README.md index d0d75e7..4370816 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ Pre-built packages are available on the [Releases](https://github.com/noah-peete | **Windows** | `ChimpStackr-Windows.zip` | Extract and run `chimpstackr.exe` | | **macOS** | `ChimpStackr-macOS.dmg` | Open DMG, drag to Applications | | **Linux (AppImage)** | `ChimpStackr-Linux-x86_64.AppImage` | `chmod +x` and run | -| **Linux (Flatpak)** | `ChimpStackr-Linux.flatpak` | `flatpak install ChimpStackr-Linux.flatpak` | ## CLI Usage diff --git a/docs/index.md b/docs/index.md index 3508805..793de4b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -32,7 +32,6 @@ Pre-built packages are on the [Releases](https://github.com/noah-peeters/ChimpSt | **Windows** | `ChimpStackr-Windows.zip` | Extract and run `chimpstackr.exe` | | **macOS** | `ChimpStackr-macOS.dmg` | Open DMG, drag to Applications | | **Linux (AppImage)** | `ChimpStackr-Linux-x86_64.AppImage` | `chmod +x` and run | -| **Linux (Flatpak)** | `ChimpStackr-Linux.flatpak` | `flatpak install ChimpStackr-Linux.flatpak` | ## CLI quickstart diff --git a/docs/packaging.md b/docs/packaging.md index 64cf2b1..f5e1913 100644 --- a/docs/packaging.md +++ b/docs/packaging.md @@ -17,7 +17,6 @@ ChimpStackr uses PyInstaller to create native packages for all platforms. Builds | macOS | `./scripts/build_macos.sh` | `dist/ChimpStackr-macOS.dmg` | | Windows | `.\scripts\build_windows.ps1` | `dist/ChimpStackr-Windows.zip` | | Linux (AppImage) | `./scripts/build_linux.sh` | `dist/ChimpStackr-Linux-x86_64.AppImage` | -| Linux (Flatpak) | `./scripts/build_flatpak.sh` | Flatpak install (local) | ## Prerequisites @@ -75,8 +74,7 @@ This runs: 2. **Build macOS** -- PyInstaller, optional code signing, DMG creation 3. **Build Windows** -- PyInstaller, ZIP archive 4. **Build Linux (AppImage)** -- PyInstaller, AppImage creation -5. **Build Linux (Flatpak)** -- flatpak-builder, `.flatpak` bundle -6. **Release** -- GitHub Release with all artifacts +5. **Release** -- GitHub Release with all artifacts ### GitHub Secrets (optional) @@ -116,43 +114,6 @@ The build script wraps the PyInstaller output in an AppImage: - Desktop entry and icons included for desktop integration - Works on most distros with glibc 2.31+ -### Linux Flatpak - -Flatpak packaging files are in `packaging/flatpak/`. The Flatpak build uses the KDE 6.10 runtime with the PySide BaseApp (provides PySide6 bindings linked against the runtime's Qt6). - -**App ID:** `io.github.noah_peeters.ChimpStackr` - -**Files:** - -| File | Purpose | -|---|---| -| `packaging/flatpak/io.github.noah_peeters.ChimpStackr.yml` | Flatpak manifest | -| `packaging/flatpak/io.github.noah_peeters.ChimpStackr.desktop` | Desktop entry | -| `packaging/flatpak/io.github.noah_peeters.ChimpStackr.metainfo.xml` | AppStream metadata for software centers | - -**Local build:** - -```bash -# Install prerequisites -sudo apt install flatpak flatpak-builder -flatpak install flathub org.kde.Platform//6.10 org.kde.Sdk//6.10 io.qt.PySide.BaseApp//6.10 - -# Build and install locally -./scripts/build_flatpak.sh - -# Run -flatpak run io.github.noah_peeters.ChimpStackr - -# Create a redistributable .flatpak bundle -./scripts/build_flatpak.sh --bundle -``` - -**Native dependencies** (built from source in the manifest): -- FFTW3 (float + double precision) -- required by pyFFTW -- LibRaw -- required by rawpy - -The CI workflow uses `flatpak/flatpak-github-actions` with the `ghcr.io/flathub-infra/flatpak-github-actions:kde-6.10` container image to build and produce a `.flatpak` bundle attached to each release. - ### Heavy dependencies These need special handling in the `.spec` file: diff --git a/packaging/flatpak/io.github.noah_peeters.ChimpStackr.desktop b/packaging/flatpak/io.github.noah_peeters.ChimpStackr.desktop deleted file mode 100644 index b4f4d7c..0000000 --- a/packaging/flatpak/io.github.noah_peeters.ChimpStackr.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=ChimpStackr -GenericName=Focus Stacking -Comment=Open-source focus stacking application -Exec=chimpstackr -Icon=io.github.noah_peeters.ChimpStackr -Terminal=false -Type=Application -Categories=Graphics;Photography; -StartupNotify=true -Keywords=focus;stacking;macro;photography;image;processing; -MimeType=image/jpeg;image/png;image/tiff; diff --git a/packaging/flatpak/io.github.noah_peeters.ChimpStackr.metainfo.xml b/packaging/flatpak/io.github.noah_peeters.ChimpStackr.metainfo.xml deleted file mode 100644 index 10e71c2..0000000 --- a/packaging/flatpak/io.github.noah_peeters.ChimpStackr.metainfo.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - io.github.noah_peeters.ChimpStackr - - ChimpStackr - Open-source focus stacking application - - CC0-1.0 - GPL-3.0-or-later - - - Noah Peeters - - - -

- ChimpStackr is a free, multi-platform focus stacking application. It combines - multiple photos taken at different focus distances into a single image where - everything is in sharp focus. -

-

Features include:

-
    -
  • Multiple stacking algorithms: Laplacian pyramid, weighted average, depth map, and exposure fusion (Mertens)
  • -
  • Automatic image alignment using ECC and DFT-based registration
  • -
  • RAW image support (CR2, NEF, ARW, DNG, and many more)
  • -
  • 16-bit and 32-bit (HDR) output
  • -
  • Side-by-side before/after comparison viewer
  • -
  • Optional GPU acceleration via CUDA
  • -
  • Command-line interface for batch processing
  • -
-
- - io.github.noah_peeters.ChimpStackr.desktop - - https://github.com/noah-peeters/ChimpStackr - https://github.com/noah-peeters/ChimpStackr/issues - https://github.com/noah-peeters/ChimpStackr - - - chimpstackr - chimpstackr-cli - - - - - - #8bc34a - #33691e - - - - - Focus stacked macro image with source images panel - https://raw.githubusercontent.com/noah-peeters/ChimpStackr/master/docs/screenshots/main.png - - - Processing a focus stack with progress indicator - https://raw.githubusercontent.com/noah-peeters/ChimpStackr/master/docs/screenshots/processing.png - - - - - - -

Four alignment modes: translation, euclidean, similarity and affine.

-
-
- - -

Flatpak packaging fixes and metainfo screenshots.

-
-
- - -

Flatpak packaging, EXIF auto-rotation, support for mixed image dimensions, 16-bit TIFF/PNG and EXR output.

-
-
- - -

GPU-accelerated stacking pipeline with CuPy, large CPU pipeline optimisations, Windows fixes.

-
-
- - -

Major update with multiple stacking algorithms, CLI support, modern UI, and cross-platform packaging.

-
-
-
- - - focus stacking - photography - macro - image processing - focus - stacking - -
diff --git a/packaging/flatpak/io.github.noah_peeters.ChimpStackr.yml b/packaging/flatpak/io.github.noah_peeters.ChimpStackr.yml deleted file mode 100644 index a4a9cfd..0000000 --- a/packaging/flatpak/io.github.noah_peeters.ChimpStackr.yml +++ /dev/null @@ -1,133 +0,0 @@ -app-id: io.github.noah_peeters.ChimpStackr -runtime: org.kde.Platform -runtime-version: '6.10' -sdk: org.kde.Sdk -base: io.qt.PySide.BaseApp -base-version: '6.10' -command: chimpstackr - -finish-args: - - --share=ipc - - --socket=fallback-x11 - - --socket=wayland - - --device=dri - - --filesystem=home - -cleanup-commands: - - /app/cleanup-BaseApp.sh - -cleanup: - - /include - - /lib/pkgconfig - - /lib/cmake - - /share/man - - '*.a' - - '*.la' - -modules: - # FFTW3 single-precision (required by pyFFTW) - - name: fftw3-float - buildsystem: autotools - config-opts: - - --enable-shared - - --disable-static - - --enable-threads - - --enable-float - sources: - - type: archive - url: https://www.fftw.org/fftw-3.3.10.tar.gz - sha256: 56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467 - - # FFTW3 double-precision (pyFFTW needs both float and double) - - name: fftw3-double - buildsystem: autotools - config-opts: - - --enable-shared - - --disable-static - - --enable-threads - sources: - - type: archive - url: https://www.fftw.org/fftw-3.3.10.tar.gz - sha256: 56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467 - - # LibRaw (required by rawpy) - - name: libraw - buildsystem: autotools - config-opts: - - --disable-static - - --enable-shared - sources: - - type: archive - url: https://www.libraw.org/data/LibRaw-0.21.3.tar.gz - sha256: dba34b7fc1143503942fa32ad9db43e94f714e62a4a856e91617f8f3e1e0aa5c - cleanup: - - /bin - - /share/doc - - # Python dependencies + ChimpStackr - - name: chimpstackr - buildsystem: simple - build-options: - build-args: - - --share=network - build-commands: - # Install Python dependencies from requirements.txt so the Flatpak honours - # the same version constraints as every other build. PySide6 is provided - # by the BaseApp, so drop that line. - - >- - grep -viE '^\s*(#|$)|pyside' requirements.txt > /tmp/requirements-flatpak.txt - && cat /tmp/requirements-flatpak.txt - && pip3 install --no-cache-dir --prefix=/app --no-build-isolation - -r /tmp/requirements-flatpak.txt - - # Install ChimpStackr source with auto-detected Python version - - | - PYVER=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") - SITE="/app/lib/python${PYVER}/site-packages" - mkdir -p "${SITE}/src" - cp -r src/* "${SITE}/src/" - mkdir -p "${SITE}/packaging" - cp -r packaging/icons "${SITE}/packaging/" - - # Create GUI entry point - - | - PYVER=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") - mkdir -p /app/bin - cat > /app/bin/chimpstackr << EOF - #!/usr/bin/env python3 - import sys - sys.path.insert(0, "/app/lib/python${PYVER}/site-packages") - from src.run import main - main() - EOF - chmod +x /app/bin/chimpstackr - - # Create CLI entry point - - | - PYVER=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") - cat > /app/bin/chimpstackr-cli << EOF - #!/usr/bin/env python3 - import sys - sys.path.insert(0, "/app/lib/python${PYVER}/site-packages") - from src.cli import main - main() - EOF - chmod +x /app/bin/chimpstackr-cli - - # Install desktop entry and metadata - - install -Dm644 packaging/flatpak/io.github.noah_peeters.ChimpStackr.desktop - /app/share/applications/io.github.noah_peeters.ChimpStackr.desktop - - install -Dm644 packaging/flatpak/io.github.noah_peeters.ChimpStackr.metainfo.xml - /app/share/metainfo/io.github.noah_peeters.ChimpStackr.metainfo.xml - - # Install icons - - install -Dm644 packaging/icons/icon_128x128.png - /app/share/icons/hicolor/128x128/apps/io.github.noah_peeters.ChimpStackr.png - - install -Dm644 packaging/icons/icon_256x256.png - /app/share/icons/hicolor/256x256/apps/io.github.noah_peeters.ChimpStackr.png - - install -Dm644 packaging/icons/icon_512x512.png - /app/share/icons/hicolor/512x512/apps/io.github.noah_peeters.ChimpStackr.png - - sources: - - type: dir - path: ../../ diff --git a/scripts/build_flatpak.sh b/scripts/build_flatpak.sh deleted file mode 100755 index 8960c08..0000000 --- a/scripts/build_flatpak.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash -# Build ChimpStackr as a Flatpak bundle. -# -# Usage: -# ./scripts/build_flatpak.sh # Build and install locally -# ./scripts/build_flatpak.sh --bundle # Also create a .flatpak bundle file -# -# Prerequisites: -# flatpak, flatpak-builder -# org.kde.Platform//6.9, org.kde.Sdk//6.9, io.qt.PySide.BaseApp//6.9 -# -# Install runtimes: -# flatpak install flathub org.kde.Platform//6.9 org.kde.Sdk//6.9 io.qt.PySide.BaseApp//6.9 -# -set -euo pipefail -cd "$(dirname "$0")/.." - -APP_ID="io.github.noah_peeters.ChimpStackr" -MANIFEST="packaging/flatpak/${APP_ID}.yml" -BUILD_DIR=".flatpak-build" -REPO_DIR=".flatpak-repo" -BUNDLE_FLAG="${1:-}" - -echo "=== ChimpStackr Flatpak Build ===" - -# ── Verify prerequisites ── -if ! command -v flatpak-builder &>/dev/null; then - echo "Error: flatpak-builder not found. Install it with:" - echo " sudo apt install flatpak-builder # Debian/Ubuntu" - echo " sudo dnf install flatpak-builder # Fedora" - exit 1 -fi - -if ! flatpak info org.kde.Sdk//6.9 &>/dev/null 2>&1; then - echo "Missing KDE SDK runtime. Installing..." - flatpak install -y flathub org.kde.Platform//6.9 org.kde.Sdk//6.9 -fi - -if ! flatpak info io.qt.PySide.BaseApp//6.9 &>/dev/null 2>&1; then - echo "Missing PySide BaseApp. Installing..." - flatpak install -y flathub io.qt.PySide.BaseApp//6.9 -fi - -# ── Clean previous build ── -rm -rf "$BUILD_DIR" - -# ── Build ── -echo "Building Flatpak..." -flatpak-builder --force-clean --repo="$REPO_DIR" "$BUILD_DIR" "$MANIFEST" - -# ── Install locally for testing ── -echo "Installing locally..." -flatpak --user remote-add --if-not-exists chimpstackr-local "$REPO_DIR" --no-gpg-verify -flatpak --user install -y --reinstall chimpstackr-local "$APP_ID" - -echo "" -echo "Installed! Run with:" -echo " flatpak run $APP_ID" -echo " flatpak run $APP_ID --cli --help # CLI mode" - -# ── Optionally create a redistributable bundle ── -if [ "$BUNDLE_FLAG" = "--bundle" ]; then - echo "" - echo "Creating Flatpak bundle..." - mkdir -p dist - flatpak build-bundle "$REPO_DIR" "dist/ChimpStackr-Linux.flatpak" "$APP_ID" - echo "Bundle created: dist/ChimpStackr-Linux.flatpak" - echo "" - echo "Users can install with:" - echo " flatpak install ChimpStackr-Linux.flatpak" -fi - -# ── Cleanup build artifacts (keep repo for local remote) ── -rm -rf "$BUILD_DIR" - -echo "=== Done ===" diff --git a/src/run.py b/src/run.py index dc7f736..f6e8c02 100644 --- a/src/run.py +++ b/src/run.py @@ -28,12 +28,8 @@ settings.globalVars["RootTempDir"] = ROOT_TEMP_DIRECTORY APP_ID = "noah.peeters.chimpstackr" -FLATPAK_ID = "io.github.noah_peeters.ChimpStackr" - - -def _is_flatpak(): - """Detect if running inside a Flatpak sandbox.""" - return os.path.isfile("/.flatpak-info") +# Basename of the .desktop entry shipped in the AppImage (chimpstackr.desktop) +DESKTOP_FILE_NAME = "chimpstackr" def _setup_platform_icon(): @@ -124,8 +120,7 @@ def _apply_app_icon(qApp, icon_path): # Linux/Wayland: set desktopFileName so compositors match the .desktop entry if sys.platform == "linux": - desktop_id = FLATPAK_ID if _is_flatpak() else APP_ID - qApp.setDesktopFileName(desktop_id) + qApp.setDesktopFileName(DESKTOP_FILE_NAME) def main():