From 9d41c9df7a8d4488d6f0a05fb5d513abf10fa8fb Mon Sep 17 00:00:00 2001 From: skylartaylor Date: Wed, 25 Nov 2026 17:14:36 +0100 Subject: [PATCH] Re-render the launcher from #363's pass-through template Re-rendered from craft-common-actions #363's new head (5ee7780), which passes the Launcher's own profile line through: --launch-profile) exec "$target" "$@" ;; The ArtCraft Launcher starts the entry point with its own profile pair and per-install root, so that line now reaches the GUI unchanged; a version query still answers with one plain --version and every other argument still gets the template's fixed profile root. The tar tests pin the pass-through and keep the wrapped cases (a --profile-root that does not open the arguments, the `=` spelling, --help), and every suite is rerun. --- packaging/linux/nightly-launch-test.sh | 12 +++++++++--- packaging/linux/nightly-launch.sh | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packaging/linux/nightly-launch-test.sh b/packaging/linux/nightly-launch-test.sh index b2dad5567..9eb9b27f1 100755 --- a/packaging/linux/nightly-launch-test.sh +++ b/packaging/linux/nightly-launch-test.sh @@ -61,10 +61,14 @@ expect "$flat/deckcraft" "$(tar_argv; printf '<%s>\n' 'deck with spaces.pptx' '- # Both version spellings reach the GUI as one plain `--version`. expect "$flat/deckcraft" "$(printf '<%s>\n' --launch-profile nightly-v1 --profile-root "$tar_profile" --version)" --version expect "$flat/deckcraft" "$(printf '<%s>\n' --launch-profile nightly-v1 --profile-root "$tar_profile" --version)" -V -# Every other argument is a file argument, including one that looks like a query or a profile. +# The ArtCraft Launcher starts the entry point with its own profile pair; the template hands that +# line to the GUI unchanged. +launcher_line=(--launch-profile nightly-v1 --profile-root "$work/launcher root" -- deck.pptx) +expect "$flat/deckcraft" "$(printf '<%s>\n' "${launcher_line[@]}")" "${launcher_line[@]}" +# Anything else is a file argument with the template's own profile, including a query the template +# does not answer (`--help`) and a profile line that does not open the arguments. expect "$flat/deckcraft" "$(tar_argv; printf '<%s>\n' --help)" --help -expect "$flat/deckcraft" "$(tar_argv; printf '<%s>\n' --launch-profile nightly-v1 --profile-root "$work/launcher" -- deck.pptx)" \ - --launch-profile nightly-v1 --profile-root "$work/launcher" -- deck.pptx +expect "$flat/deckcraft" "$(tar_argv; printf '<%s>\n' --profile-root "$work/launcher" --)" --profile-root "$work/launcher" -- test ! -e "$tar_profile" # The launcher resolves its own folder physically and starts only the GUI beside it. linked="$work/linked/bin" @@ -133,6 +137,8 @@ fi grep -Fq '# Nightly launcher generated by craft-common-actions scripts/nightly-launcher.sh.in.' "$launcher" # shellcheck disable=SC2016 grep -Fq 'target="$dir/deckcraft-bin"' "$launcher" +# shellcheck disable=SC2016 +grep -Fq ' --launch-profile) exec "$target" "$@" ;;' "$launcher" grep -Fq "}/$identity\"" "$launcher" echo "PASS: the nightly tar's template launcher and the distro launcher start the GUI with their profile" diff --git a/packaging/linux/nightly-launch.sh b/packaging/linux/nightly-launch.sh index 821415ad1..c3ad31046 100755 --- a/packaging/linux/nightly-launch.sh +++ b/packaging/linux/nightly-launch.sh @@ -9,6 +9,8 @@ readonly target profile_root="${XDG_DATA_HOME:-$HOME/.local/share}/ai.storyteller.deckcraft.nightly" readonly profile_root case "${1-}" in + # The ArtCraft Launcher passes its own profile and per-install root; the app validates the pair. + --launch-profile) exec "$target" "$@" ;; --version | -V) exec "$target" --launch-profile nightly-v1 --profile-root "$profile_root" --version ;; esac exec "$target" --launch-profile nightly-v1 --profile-root "$profile_root" -- "$@"