chore: add AppImage release packaging

This commit is contained in:
dev 2026-03-04 14:59:01 +00:00
parent 331e65d948
commit af7656145e
5 changed files with 87 additions and 17 deletions

View file

@ -52,8 +52,6 @@ uv run scanslicer --backend x11
### Run with Python directly
The package directory now matches the published name:
```bash
python -m scanslicer
```
@ -110,8 +108,6 @@ Environment variable overrides:
- `SCANSLICER_FEEDBACK_PATH`
- `SCANSLICER_STATUS_LOG_PATH`
Legacy override names are still accepted for backward compatibility.
## Docker Compose
The repo includes a GUI-oriented compose setup for Linux desktop use:
@ -133,21 +129,21 @@ Detailed instructions: `docs/appimage.md`.
## Documentation
- `docs/README.md` - documentation index
- `docs/user-guide.md` - end-user operation guide
- `docs/architecture.md` - code architecture and execution flow
- `docs/parameters.md` - full detection parameter reference
- `docs/autotune.md` - auto-tune and feedback internals
- `docs/README.md` - documentation index
- `docs/user-guide.md` - end-user operation guide
- `docs/architecture.md` - code architecture and execution flow
- `docs/parameters.md` - full detection parameter reference
- `docs/autotune.md` - auto-tune and feedback internals
- `docs/runtime-config.md` - backend/environment and persistence paths
- `docs/appimage.md` - AppImage packaging details
- `docs/development.md` - contributor-focused architecture/workflow notes
- `docs/appimage.md` - AppImage packaging details
- `docs/development.md` - contributor-focused architecture/workflow notes
## Repository Layout
```text
scanslicer/ Application source (UI, controllers, canvas, detection)
packaging/appimage/ AppImage recipe and build scripts
Dockerfile Runtime image
docker-compose.yml GUI container runtime wiring
pyproject.toml Python package metadata and dependencies
scanslicer/ - Application source (UI, controllers, canvas, detection)
packaging/appimage/ - AppImage recipe and build scripts
Dockerfile - Runtime image
docker-compose.yml - GUI container runtime wiring
pyproject.toml - Python package metadata and dependencies
```

44
THIRD_PARTY_NOTICES Normal file
View file

@ -0,0 +1,44 @@
ScanSlicer AppImage Third-Party Notices
======================================
This AppImage bundles ScanSlicer together with third-party software.
Those components remain under their own licenses.
The Python package set is resolved from the committed `uv.lock` file at
build time. The versions listed below reflect the versions pinned in this
repository at the time this notice was generated.
Python packages bundled by the AppImage build:
- PySide6 6.10.2
License metadata: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
- PySide6-Addons 6.10.2
Distributed as part of the PySide6 runtime stack. See the PySide6 and Qt
license materials bundled with the wheel metadata for the exact terms.
- PySide6-Essentials 6.10.2
Distributed as part of the PySide6 runtime stack. See the PySide6 and Qt
license materials bundled with the wheel metadata for the exact terms.
- shiboken6 6.10.2
License metadata: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
- numpy 2.4.2 (Python 3.11+) or 2.2.6 (Python < 3.11)
License metadata (installed Python 3.11 build): BSD-3-Clause AND 0BSD AND
MIT AND Zlib AND CC0-1.0
- Pillow 12.1.1
License metadata: MIT-CMU
- opencv-python 4.13.0.92
This package is installed from PyPI according to `uv.lock`. Consult the
package's bundled metadata and license files in the installed wheel for the
exact terms that apply to the shipped build.
System packages bundled by the AppImage:
- The AppImage also includes selected Ubuntu Noble runtime libraries and the
CPython runtime as listed in `packaging/appimage/AppImageBuilder.yml`.
Those components remain under their respective upstream and distribution
licenses.
Release hygiene:
- Keep this file aligned with `uv.lock` when dependency versions change.
- Publish the corresponding source code for the exact AppImage build you ship.
- Include the project `LICENSE` file alongside this notice.

View file

@ -8,6 +8,8 @@ ScanSlicer includes a full AppImage packaging workflow under `packaging/appimage
- `packaging/appimage/build-appimage.sh`: local build script
- `packaging/appimage/build-appimage-docker.sh`: containerized build wrapper
- `packaging/appimage/Dockerfile`: AppImage build environment
- `LICENSE`: project GPLv3 license bundled with AppImage releases
- `THIRD_PARTY_NOTICES`: bundled dependency notice file for AppImage releases
- desktop entry file in `packaging/appimage/`
- application icon file in `packaging/appimage/`
@ -42,6 +44,9 @@ Prerequisite:
- Docker
The Docker build image pins a specific `appimage-builder` version so release
builds use a stable packaging toolchain.
Command:
```bash
@ -68,6 +73,7 @@ Optional environment variables:
- Removes bundled Qt system libs to prefer PySide wheel Qt runtime
- Installs Python dependencies and project wheel into AppDir `/usr`
- Injects desktop entry and icon assets during `after_bundle`
- Copies `LICENSE` and `THIRD_PARTY_NOTICES` into `usr/share/doc/scanslicer/`
Runtime environment variables set in AppDir include:
@ -84,3 +90,20 @@ Expected output artifact location:
- `appimage/dist/ScanSlicer-<version>-x86_64.AppImage`
Intermediate build files are kept under `appimage/build/`.
## Release Checklist
Before publishing an AppImage:
1. Build from a committed state that has a matching source tag or commit you
will publish.
2. Verify `uv.lock` is committed so the bundled Python dependency set is
reproducible from source.
3. Confirm the AppImage contains `usr/share/doc/scanslicer/LICENSE` and
`usr/share/doc/scanslicer/THIRD_PARTY_NOTICES`.
4. Publish the AppImage together with the corresponding source code for that
exact release.
5. Review `THIRD_PARTY_NOTICES` whenever dependency versions change, especially
the PySide6 / Qt runtime stack.
6. If you change the pinned `appimage-builder` version, rerun a full AppImage
smoke test before publishing.

View file

@ -66,11 +66,14 @@ AppDir:
exit 1
fi
mkdir -p "${APPDIR_PATH}/usr/share/applications"
mkdir -p "${APPDIR_PATH}/usr/share/doc/scanslicer"
mkdir -p "${APPDIR_PATH}/usr/share/icons"
mkdir -p "${APPDIR_PATH}/usr/share/pixmaps"
mkdir -p "${APPDIR_PATH}/icons"
mkdir -p "${APPDIR_PATH}/pixmaps"
cp "${SCANSLICER_ROOT}/packaging/appimage/scanslicer.desktop" "${APPDIR_PATH}/usr/share/applications/scanslicer.desktop"
cp "${SCANSLICER_ROOT}/LICENSE" "${APPDIR_PATH}/usr/share/doc/scanslicer/LICENSE"
cp "${SCANSLICER_ROOT}/THIRD_PARTY_NOTICES" "${APPDIR_PATH}/usr/share/doc/scanslicer/THIRD_PARTY_NOTICES"
cp "${SCANSLICER_ROOT}/packaging/appimage/scanslicer.svg" "${APPDIR_PATH}/usr/share/icons/scanslicer.svg"
cp "${SCANSLICER_ROOT}/packaging/appimage/scanslicer.svg" "${APPDIR_PATH}/usr/share/pixmaps/scanslicer.svg"
rsvg-convert -w 256 -h 256 "${SCANSLICER_ROOT}/packaging/appimage/scanslicer.svg" > "${APPDIR_PATH}/usr/share/icons/scanslicer.png"
@ -80,6 +83,8 @@ AppDir:
cp "${APPDIR_PATH}/usr/share/icons/scanslicer.png" "${APPDIR_PATH}/.DirIcon"
test -f "${APPDIR_PATH}/usr/share/icons/scanslicer.png"
test -f "${APPDIR_PATH}/usr/share/pixmaps/scanslicer.png"
test -f "${APPDIR_PATH}/usr/share/doc/scanslicer/LICENSE"
test -f "${APPDIR_PATH}/usr/share/doc/scanslicer/THIRD_PARTY_NOTICES"
test -f "${APPDIR_PATH}/icons/scanslicer.png"
test -f "${APPDIR_PATH}/pixmaps/scanslicer.png"
test -f "${APPDIR_PATH}/.DirIcon"

View file

@ -2,6 +2,8 @@ FROM ubuntu:24.04
COPY --from=ghcr.io/astral-sh/uv:0.10.2 /uv /uvx /usr/local/bin/
ARG APPIMAGE_BUILDER_VERSION=1.1.0
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
@ -29,6 +31,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN python3 -m pip install --no-cache-dir --break-system-packages \
"packaging<21" \
appimage-builder
"appimage-builder==${APPIMAGE_BUILDER_VERSION}"
WORKDIR /work