Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
66ab9f0
Align Pets runtime documentation
OliverZhaohaibin Aug 13, 2026
505de61
Modernize Debian packaging guide
OliverZhaohaibin Aug 13, 2026
a4ed559
Document AppImage packaging flow
OliverZhaohaibin Aug 13, 2026
995f7d4
Add Flatpak build status
OliverZhaohaibin Aug 13, 2026
9d385e3
Clarify Flatpak release and build contract
OliverZhaohaibin Aug 13, 2026
41e27b8
Define requirements document lifecycle
OliverZhaohaibin Aug 13, 2026
16405d1
Mark pets clustering requirements historical
OliverZhaohaibin Aug 13, 2026
c1fb089
Align agent guide with Pets and desktop runtime
OliverZhaohaibin Aug 13, 2026
34b2e0a
Align architecture with desktop runtime and lazy recognition
OliverZhaohaibin Aug 13, 2026
88d9cec
Refresh development guide
OliverZhaohaibin Aug 13, 2026
5ae8d3b
Refresh unreleased changelog contracts
OliverZhaohaibin Aug 13, 2026
dff5383
Clarify model runtime trust boundary
OliverZhaohaibin Aug 13, 2026
ab2ad0f
Align English README release status
OliverZhaohaibin Aug 13, 2026
83f8fef
Align Chinese README release status
OliverZhaohaibin Aug 13, 2026
95a5683
Align German README
OliverZhaohaibin Aug 13, 2026
b605814
Add documentation link checker
OliverZhaohaibin Aug 13, 2026
3236174
Add README localization parity check
OliverZhaohaibin Aug 13, 2026
be94e14
Run documentation contracts in CI
OliverZhaohaibin Aug 13, 2026
8d00ff2
Remove stale scan hotspot snapshot
OliverZhaohaibin Aug 13, 2026
bafc411
Restore scan optimization requirement
OliverZhaohaibin Aug 13, 2026
a286b80
Define current scan optimization rebaseline
OliverZhaohaibin Aug 13, 2026
e48622c
Replace docs contract tests
OliverZhaohaibin Aug 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
422 changes: 225 additions & 197 deletions AGENT.md

Large diffs are not rendered by default.

352 changes: 71 additions & 281 deletions README.md

Large diffs are not rendered by default.

743 changes: 101 additions & 642 deletions docs/CHANGELOG.md

Large diffs are not rendered by default.

872 changes: 254 additions & 618 deletions docs/architecture.md

Large diffs are not rendered by default.

1,323 changes: 128 additions & 1,195 deletions docs/development.md

Large diffs are not rendered by default.

137 changes: 137 additions & 0 deletions docs/misc/BUILD_APPIMAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Building an AppImage for Linux

This guide documents the current AppImage wrapper in
`scripts/build_appimage.sh`. The AppImage stage consumes an existing Nuitka
standalone directory; it does not compile iPhotron itself.

## Prerequisites

- Linux
- a successful standalone Nuitka build
- `appimagetool` in `PATH`, or an explicit `--appimagetool PATH`
- a PNG application icon

Build the standalone application first:

```bash
bash scripts/build_nuitka_fast.sh
```

The default standalone directory is:

```text
dist/entrypoint.dist/
```

## Required Standalone Payload

Before creating the AppImage, `scripts/build_appimage.sh` validates that the
standalone bundle contains:

- an executable named `entrypoint.bin`, `entrypoint`, `main.bin`, or `main`;
- at least one compiled Qt shader (`*.qsb`);
- `maps/tiles/`;
- a native OsmAnd render helper under `maps/tiles/extension/bin/`;
- Qt's XCB platform plugin (`platforms/libqxcb.so`).

The script intentionally fails instead of producing an AppImage that advertises
an incomplete Linux runtime.

If the release advertises offline People/Pets recognition, populate and verify
the model staging input before the Nuitka step. `src/extension/models/` is a
build-staging location and is not guaranteed to exist in a fresh source clone.

## Build Command

Resolve the project version from `pyproject.toml`:

```bash
VERSION="$(python - <<'PY'
import tomllib
from pathlib import Path
print(tomllib.loads(Path('pyproject.toml').read_text())['project']['version'])
PY
)"
```

Then run:

```bash
scripts/build_appimage.sh \
--standalone-dir dist/entrypoint.dist \
--icon path/to/iphoto.png \
--output "dist/iPhotron-${VERSION}-x86_64.AppImage"
```

Use `--appimagetool /absolute/path/to/appimagetool` if it is not in `PATH`.
The environment variable `APPIMAGETOOL` is also supported.

For a non-default Python executable used by the build-manifest step:

```bash
PYTHON_BIN=/path/to/python3 scripts/build_appimage.sh ...
```

## AppDir Layout

The wrapper creates a temporary sibling directory named `iPhotron.AppDir`:

```text
iPhotron.AppDir/
├── AppRun
├── iphoto.desktop
├── iphoto.png
└── usr/
└── bin/
└── ... complete Nuitka standalone bundle ...
```

`AppRun` and the desktop file come from `packaging/appimage/`.

The script refuses to overwrite an existing `iPhotron.AppDir`. Remove or archive
an old staging directory before rebuilding.

## Output And Build Manifest

The requested AppImage is written exactly to `--output`. A companion build
manifest is generated next to it:

```text
<output>.build-manifest.json
```

The manifest records the AppImage artifact, build driver, architecture, native
Maps runtime, map assets, and i18n resources.

## Verification

Make the artifact executable if required and launch it on a clean Linux target:

```bash
chmod +x "dist/iPhotron-${VERSION}-x86_64.AppImage"
"dist/iPhotron-${VERSION}-x86_64.AppImage"
```

At minimum verify:

1. first window and Gallery become usable without startup crashes;
2. Gallery -> Detail opens stills and videos;
3. Qt XCB startup works on the supported X11/XWayland environment;
4. offline Maps loads when advertised;
5. People & Pets recognition does not initialize merely because the app starts;
6. opening the recognition feature activates the enabled recognition runtime;
7. an offline-recognition release can initialize with model auto-downloads
disabled;
8. translations and QSB-backed rendering assets load from the packaged bundle.

## Troubleshooting

| Symptom | Cause | Fix |
| --- | --- | --- |
| `appimagetool not found` | tool is not installed/in `PATH` | install it or pass `--appimagetool PATH` |
| entrypoint validation fails | wrong `--standalone-dir` or failed Nuitka build | point to `dist/entrypoint.dist` from a successful build |
| QSB validation fails | shader data was omitted by Nuitka | rebuild with the current `scripts/build_nuitka_fast.sh` |
| Maps validation fails | standalone Maps payload incomplete | restore `src/maps/tiles` staging and rebuild Nuitka |
| XCB validation fails | Qt platform plugins were stripped | rebuild with the current PySide6/Nuitka plugin options |
| script refuses `iPhotron.AppDir` | previous staging directory exists | remove/archive it before rerunning |
| People/Pets unavailable offline | optional AI runtime/models were not staged before Nuitka | rebuild with the required optional dependencies and verified models |
Loading
Loading