beffroi-tools/docs/releases.md

72 lines
3.1 KiB
Markdown

# Cross builds and portable releases
Run these commands from the repository root. Cross needs Docker or Podman;
`Cross.toml` selects Windows GNU x64 and Linux GNU x64 images. Jenkins does not
run release builds or publish releases.
```sh
cross build --locked -p pptx-reporter --release --target x86_64-pc-windows-gnu
cross build --locked -p pptx-reporter --release --target x86_64-unknown-linux-gnu
python3 scripts/package-portable.py --target x86_64-pc-windows-gnu --fetch-ffprobe
python3 scripts/package-portable.py --target x86_64-unknown-linux-gnu --fetch-ffprobe
```
The packager reads `target/<target>/release/` and produces a Windows ZIP or Linux
`.tar.gz` in `dist/`, plus a SHA-256 checksum. Each includes GUI and CLI binaries,
FFprobe, licenses/provenance and quick-start instructions. Existing archives
are protected; use `--output DIR` for a new test build.
## FFprobe
`scripts/fetch_ffprobe.py` downloads BtbN FFmpeg 9.0 release-branch, non-shared
LGPL builds. It verifies GitHub's archive SHA-256, executable format and x86-64
architecture, then tests `ffprobe -version` on a matching host. Foreign binaries
are inspected without execution. Verified binaries/notices are cached in
ignored `downloads/ffprobe/`; no FFprobe binary is committed.
The default upstream `latest` tag moves. Pin repeatable builds with
`--ffprobe-release TAG --ffprobe-sha256 HASH`. Provenance records release/asset
IDs, download URL and digest. Cached files are checked on reuse, but online
metadata verification still requires GitHub access.
For offline packaging or another provider:
```sh
python3 scripts/package-portable.py --target x86_64-pc-windows-gnu \
--ffprobe /path/to/ffprobe.exe --ffprobe-licenses /path/to/notices
```
Review upstream platform requirements and distribution notices for the selected
build. Test Windows launch, drag/drop, file dialogs, scaling, Unicode paths and
opening reports on a Windows machine; cross-compilation alone cannot verify them.
## Release automation
Root `Cargo.toml` → `workspace.package.version` is authoritative. The reporter
inherits it; its manifest contains cargo-binstall metadata. `rust-release.toml`
configures targets and the canonical Gitea URL for
[`rust_realease`](https://proxy.dandaedre.com/gitea/idle-org/rust_realease):
```sh
rust_realease . --package pptx-reporter --dry-run
rust_realease . --package pptx-reporter --compile-only
```
Publication needs a clean checkout and a matching explicitly created/pushed
version tag. The existing local `v0.1.0` marks the original trial, not subsequent
changes; do not move it implicitly. `rust_realease` currently packages Cargo
binaries only: use the portable packager for bundles containing FFprobe.
Upstream hook support is tracked separately.
## Application artwork
Artwork and fonts live in `crates/pptx-reporter/assets/`. Builds embed the PNG
window icon and the ICO Windows resource without image conversion tools.
To regenerate derivatives with ImageMagick from that directory:
```sh
magick rust-report.png -resize 256x256 -background none -gravity center \
-extent 256x256 rust-report-icon.png
magick rust-report-icon.png -define icon:auto-resize=256,128,64,48,32,24,16 rust-report.ico
```