diff options
| author | user <user@clank> | 2026-08-12 20:46:39 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-12 20:46:39 +0200 |
| commit | 045ed6a48a4f65abdafe8222e548b758fb6626a0 (patch) | |
| tree | 71d9c770fb02bf2383155f6eda00d78c91cbfd1f /packaging | |
| parent | sl0p: double-click a tab to rename it (diff) | |
| download | sl0ppi-045ed6a48a4f65abdafe8222e548b758fb6626a0.tar.gz sl0ppi-045ed6a48a4f65abdafe8222e548b758fb6626a0.tar.xz sl0ppi-045ed6a48a4f65abdafe8222e548b758fb6626a0.zip | |
build: ship sl0pstatus, and install every plugin the package carries
Phase 3: `make package` now produces a tarball that provably works on a machine
with no node, npm, bun or rust.
Two bugs the clean-room test found, neither visible until a session actually
started:
- the default layout builds its status bar out of zjstatus, which we were not
shipping at all (vendored as sl0pstatus/ in the preceding commits)
- install.sh installed a hardcoded plugin list, so zjstatus.wasm would not
have reached the config dir even once staged
Also: layouts/*.kdl still pointed at ~/.config/zellij, missed by the rename pass
because that pass only rewrote config.kdl.
Verified end to end, from the tarball, in a throwaway HOME with node/npm/bun/
cargo shadowed by stubs that fail loudly if invoked:
sl0ppij --version -> sl0ppij 0.45.0+sl0p1
pi --version -> 0.84.1 (on the bundled bun)
pir --help -> ok
sl0ppij -s realtest -> session starts under a pty, config "Well defined",
fork pane titles render, both wasm plugins load,
no errors beyond the first-run permission cache
Artifact: sl0ppi-0.1.0-x86_64-linux.tar.gz, 83M, + .sha256.
Diffstat (limited to 'packaging')
| -rwxr-xr-x | packaging/install.sh | 12 | ||||
| -rwxr-xr-x | packaging/stage.sh | 7 |
2 files changed, 17 insertions, 2 deletions
diff --git a/packaging/install.sh b/packaging/install.sh index 967da5c..07650a3 100755 --- a/packaging/install.sh +++ b/packaging/install.sh @@ -101,8 +101,14 @@ done for f in "$SHARE/sl0ppij/themes/"*.kdl; do install_config_file "$f" "$CONFIG_DIR/themes/$(basename "$f")" done -# plugins are build outputs, not user files: always overwrite -run install -m644 "$SHARE/sl0ppij/plugins/pane-finder.wasm" "$CONFIG_DIR/plugins/pane-finder.wasm" +# plugins are build outputs, not user files: always overwrite. Install whatever +# the package contains rather than a hardcoded list -- the shipped layout needs +# zjstatus.wasm as well as pane-finder.wasm, and a missing one only shows up as +# a runtime "failed to load plugin from disk" once a session starts. +for f in "$SHARE/sl0ppij/plugins/"*.wasm; do + [ -e "$f" ] || { warn "package contains no plugins"; break; } + run install -m644 "$f" "$CONFIG_DIR/plugins/$(basename "$f")" +done # --- pi extensions --------------------------------------------------------- run mkdir -p "$PI_EXT_DIR" @@ -128,3 +134,5 @@ if command -v zellij >/dev/null 2>&1; then fi say "start with: sl0ppij" +echo " On the very first launch the status bar plugin asks for permissions" +echo " (\"... Allow? (y/n)\") -- press y once and it is remembered." diff --git a/packaging/stage.sh b/packaging/stage.sh index 737d448..e280344 100755 --- a/packaging/stage.sh +++ b/packaging/stage.sh @@ -40,10 +40,16 @@ need "$FORK_BIN" build install -m755 "$FORK_BIN" "$STAGE/bin/$BIN_NAME" # --- wasm plugins ---------------------------------------------------------- +# Both are load-bearing for the shipped config: config.kdl binds pane-finder, +# and layouts/default.kdl replaces the stock tab-bar+status-bar with zjstatus. PANE_FINDER="$ROOT/sl0ppij/target/wasm32-wasip1/release/zj-pane-finder.wasm" need "$PANE_FINDER" plugins install -m644 "$PANE_FINDER" "$STAGE/share/sl0ppij/plugins/pane-finder.wasm" +ZJSTATUS="$ROOT/sl0pstatus/target/wasm32-wasip1/release/zjstatus.wasm" +need "$ZJSTATUS" plugins +install -m644 "$ZJSTATUS" "$STAGE/share/sl0ppij/plugins/zjstatus.wasm" + # --- opinionated config ---------------------------------------------------- install -m644 "$ROOT/config/config.kdl" "$STAGE/share/sl0ppij/config.kdl" install -m644 "$ROOT/config/layouts/"*.kdl "$STAGE/share/sl0ppij/layouts/" @@ -76,6 +82,7 @@ echo "$VERSION" > "$STAGE/VERSION" { echo "sl0ppi $VERSION" echo "sl0ppij $(grep -m1 '^version = ' "$ROOT/sl0ppij/Cargo.toml" | cut -d'"' -f2)" + echo "sl0pstatus $(grep -m1 '^version = ' "$ROOT/sl0pstatus/Cargo.toml" | cut -d'"' -f2)" echo "pi $PI_VERSION" echo "bun $BUN_VERSION" } > "$STAGE/MANIFEST" |
