mirror of
https://github.com/storytold/gridcraft.git
synced 2026-12-02 02:33:55 -06:00
Dylan's ports keep the nightly identities but start the GUI directly, and a nightly build
refuses to start without --launch-profile nightly-v1 --profile-root <dir>. Ship the launcher
every Linux nightly format needs, so an installed, extracted or sandboxed nightly never runs
against the stable profile (his remaining re-review items close with it).
- deb/rpm: usr/bin/gridcraft-nightly is a launcher; the GUI moves to
usr/lib/gridcraft-nightly/gridcraft, which nfpm.yaml carries with mode 0755. A stable stage
has no such file, so the three-line entry is dropped and the rendered stable nfpm.yaml stays
byte-identical to his head.
- AppImage: AppRun is a script, not the usr/bin/gridcraft symlink, and usr/bin/gridcraft-nightly
is installed beside it; the desktop Exec/TryExec name the launcher.
- Arch handoff: nightly-arch-launch.sh passes the profile tokens instead of relocating the four
XDG folders (the profile holds settings, logs, the control token and the session record).
- Flatpak: bin/gridcraft-nightly is installed and is the manifest's command: and the desktop
entry's Exec/TryExec. profile_root now accepts that package's own id
(ai.storyteller.gridcraft.nightly) and still refuses the stable id and every other one.
- plain tarballs: bin/gridcraft-nightly in package.sh's tree and gridcraft-nightly in the flat
nightly.sh archive, which nightly-archive.py now requires.
The profile root is ${XDG_DATA_HOME:-$HOME/.local/share}/gridcraft-nightly/profile in every
format; it sits beside, never inside, the stable rows.
Also from the re-review: the nightly metainfo no longer lists mediatypes and names the launcher
as its binary, the nightly desktop file and metainfo are validated now that the tools are
present, and nightly-common.sh passes GRIDCRAFT_VERSION on the build command as well as
inheriting it and checks the exact identity the binary prints (with the output in the message).
packaging/linux/nightly-linux-launch-tests.py runs the launcher in both moved-tree layouts and
stages deb, tar and AppImage with stub nfpm/appimagetool/strip, so the wrappers are tested
without cargo; nightly-arch-tar-test.sh asserts the launcher argv.
Builds on dylanmtaylor's co-installable Linux packages (#4733, @dylanmtaylor).
skylartaylor <skylartaylor@users.noreply.github.com>
33 lines
1.7 KiB
Bash
Executable File
33 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/gridcraft-$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"
|
|
cp "$NIGHTLY_GUI" "$STAGE/gridcraft"
|
|
chmod 755 "$STAGE/gridcraft"
|
|
# An unpacked archive is isolated too: the GUI refuses to start without a launch profile, so the
|
|
# launcher beside it is how a user starts it.
|
|
cp "$ROOT/packaging/linux/nightly-launch.sh" "$STAGE/gridcraft-nightly"
|
|
chmod 755 "$STAGE/gridcraft-nightly"
|
|
# The nightly channel's own icon (deeper field); the archive member name stays as the helper requires.
|
|
cp "$ROOT/assets/app-icon/gridcraft-nightly.png" "$STAGE/gridcraft-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"
|