From 67af74cf70f369bf91343c7d13a1cf475724b8fa Mon Sep 17 00:00:00 2001 From: skylartaylor Date: Wed, 25 Nov 2026 17:02:50 +0100 Subject: [PATCH] Re-render the launcher from craft-common-actions #363's Launcher pass-through --- packaging/linux/nightly-launch-tests.py | 8 +++++++- packaging/linux/nightly-tar-launch.sh | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packaging/linux/nightly-launch-tests.py b/packaging/linux/nightly-launch-tests.py index 2e09de8b57..002f9d1299 100755 --- a/packaging/linux/nightly-launch-tests.py +++ b/packaging/linux/nightly-launch-tests.py @@ -17,7 +17,7 @@ LAUNCHER = HERE / "nightly-launch.sh" # The plain tar's entrypoint is craft-common-actions' template rendered for this app; these are its bytes. TAR_LAUNCHER = HERE / "nightly-tar-launch.sh" TAR_PROFILE = "ai.storyteller.vectorcraft.nightly" -TAR_LAUNCHER_SHA256 = "c9046d6336057485b3c1346ba489fac957d02cfff8899f6b2cb501b5d780c1a9" +TAR_LAUNCHER_SHA256 = "bf00f60a1644c1fd0ce440f4c992cd009f812e539c729a4b63638b1b8aed0c01" RECORDER = """#!/bin/sh printf 'config=<%s>\n' "${VECTORCRAFT_CONFIG_DIR:-}" @@ -225,6 +225,12 @@ class TarLauncher(unittest.TestCase): ["config=<>", "<--launch-profile>", "", "<--profile-root>", f"<{root}>", "<--version>"]) + def test_a_launcher_profile_argv_passes_through_unchanged(self): + launcher = self.place() + argv = ["--launch-profile", "nightly-v1", "--profile-root", str(self.root / "launcher root"), "--", "drawing.svg"] + self.assertEqual(self.lines(launcher, *argv, env=self.env), + ["config=<>", *[f"<{arg}>" for arg in argv]]) + def test_a_missing_gui_fails_rather_than_starting_another_binary(self): launcher = self.place() (self.root / "tar/vectorcraft-bin").unlink() diff --git a/packaging/linux/nightly-tar-launch.sh b/packaging/linux/nightly-tar-launch.sh index a6df0a820b..e5a20bb019 100755 --- a/packaging/linux/nightly-tar-launch.sh +++ b/packaging/linux/nightly-tar-launch.sh @@ -9,6 +9,8 @@ readonly target profile_root="${XDG_DATA_HOME:-$HOME/.local/share}/ai.storyteller.vectorcraft.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" -- "$@"