mirror of
https://github.com/storytold/wordcraft.git
synced 2026-12-02 10:47:02 -06:00
Batch 2A review fixes on top of 4279762e:
- One launcher (packaging/linux/nightly-launcher.sh) serves the app-owned
nightly tar, the deb/rpm wrapper, the AppImage AppRun, the Arch handoff and
the Flatpak bundle. It passes an already-supplied --launch-profile (and
--version/-V) straight through, so the ArtCraft Launcher's own profile root is
honoured instead of being wrapped into file names, and it resolves its own
folder (also when a shell finds it through PATH) rather than a relative path.
- The profile moves to ${XDG_DATA_HOME:-$HOME/.local/share}/wordcraft-nightly,
which persists inside the Flatpak sandbox; the sandbox home does not, so
preferences, recovery and autosaves were lost on every exit.
- package.sh's nightly tar step uses the tar's real member paths (no usr/), so
the tar format no longer aborts and the Flatpak bundle can be built from it.
- The app-owned tar uses the standard layout: `wordcraft` is the launcher and
`wordcraft-bin` the GUI (was wordcraft.real). The archive allowlist and its
tests follow, and nightly-build.yml's exact member check accepts the OFL-*.txt
licences CRAFT_FONTS_DIR adds.
- Windows: the print helper runs before prepare_launch(), so File > Print works
in a Nightly build instead of hitting the launch-profile refusal.
- sign.ps1 keeps the stable signing step's random create-new temp folder; only
the Nightly additions remain.
- Drop our dormant nightly-dispatch.yml, as in the other apps.
- profile_root: a test pins the Flatpak's own data folder as an accepted profile.
Tests: new packaging/linux/nightly-package-test.sh renders package.sh's nightly
tar with stub binaries and runs the extracted launcher (plain, the Launcher
form, --version, XDG_DATA_HOME, a PATH lookup from another directory, and the
AppImage and flat layouts); nightly-arch-tar-test.sh covers the Launcher form
and the data-home profile.
- Fix a compile error in the flavour's own window body: the unclean-session notice flag
(an Arc) was moved into the window closure and then read after run_native, so
cargo check failed with E0382. The window body now takes its own clone, as the exit
hook already did; found by the first capped cargo check in this pass.
34 lines
1.7 KiB
Bash
Executable File
34 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# App-owned GUI-only nightly tar: no FUSE/AppImage, CLI, association or install hooks.
|
|
set -euo pipefail
|
|
ARCH=
|
|
while [[ $# -gt 0 ]]; do
|
|
case "$1" in
|
|
--arch) [[ $# -ge 2 ]] || { echo 'missing --arch value' >&2; exit 2; }; ARCH="$2"; shift 2 ;;
|
|
-h|--help) echo 'Usage: nightly.sh --arch x86_64'; exit 0 ;;
|
|
*) echo "unsupported nightly argument: $1" >&2; exit 2 ;;
|
|
esac
|
|
done
|
|
[[ "$ARCH" == x86_64 && "$(uname -s)" == Linux ]] || { echo 'only native Linux x86_64 nightly packaging is supported' >&2; exit 2; }
|
|
# shellcheck source=../nightly-common.sh
|
|
. "$(dirname "${BASH_SOURCE[0]}")/../nightly-common.sh"
|
|
nightly_init linux "$ARCH" x86_64-unknown-linux-gnu
|
|
OUTPUT="$DIST/wordcraft-$VERSION-linux-x86_64-nightly.tar.gz"
|
|
[[ ! -e "$OUTPUT" && ! -L "$OUTPUT" ]] || nightly_die 'refusing to replace an existing nightly archive'
|
|
nightly_build_gui
|
|
STAGE="$NIGHTLY_WORK/stage"
|
|
mkdir -p "$STAGE"
|
|
# An unpacked GUI tar is isolated too: `wordcraft` is the channel's launcher and `wordcraft-bin`
|
|
# is the GUI it starts beside it. Redirecting XDG_* instead is refused by the build's root
|
|
# validator.
|
|
cp "$NIGHTLY_GUI" "$STAGE/wordcraft-bin"
|
|
chmod 755 "$STAGE/wordcraft-bin"
|
|
install -m 755 "$ROOT/packaging/linux/nightly-launcher.sh" "$STAGE/wordcraft"
|
|
NIGHTLY_ICON="$ROOT/assets/app-icon/wordcraft-nightly.png"
|
|
[[ -f "$NIGHTLY_ICON" ]] || NIGHTLY_ICON="$ROOT/assets/app-icon/wordcraft-1024.png"
|
|
cp "$NIGHTLY_ICON" "$STAGE/wordcraft-nightly.png"
|
|
nightly_copy_notices "$STAGE"
|
|
# The private mktemp cwd is the helper authority root, not a CLI path parent.
|
|
(cd "$NIGHTLY_WORK" && python3 "$ROOT/packaging/nightly-archive.py" linux stage archive.tar.gz)
|
|
nightly_publish_archive "$NIGHTLY_WORK/archive.tar.gz" "$OUTPUT"
|