This repository was archived by the owner on Jun 19, 2026. It is now read-only.
forked from inferno-os/inferno-os
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-dev-bundle.sh
More file actions
executable file
·81 lines (67 loc) · 2.75 KB
/
Copy pathbuild-dev-bundle.sh
File metadata and controls
executable file
·81 lines (67 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
# Assemble an unsigned dev InferNode.app bundle from the working tree.
# Mirrors the production release.yml steps minus codesign + notarize +
# strip. Intended for local testing of harness changes against the
# Hephaestus-served LLM via 9P-remote.
#
# Output: /tmp/InferNode-dev.app
#
# Usage:
# ./build-dev-bundle.sh
# open --stdout /tmp/infernode-dev.out --stderr /tmp/infernode-dev.err /tmp/InferNode-dev.app
#
# Secstore / wallet state lives in ~/.infernode regardless of which
# bundle launches it, so config persists across the production
# /Applications/InferNode.app and this dev bundle.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
APP="${1:-/tmp/InferNode-dev.app}"
CONTENTS="$APP/Contents"
MACOS="$CONTENTS/MacOS"
RESOURCES="$CONTENTS/Resources"
[ -x "$ROOT/emu/MacOSX/o.emu" ] || {
echo "build-dev-bundle: emu not found — run ./build-macos-sdl3.sh first" >&2
exit 1
}
echo "Assembling dev bundle: $APP"
rm -rf "$APP"
cp -a "$ROOT/MacOSX/InferNode.app" "$APP"
mkdir -p "$MACOS" "$RESOURCES"
# Emulator binary (the SDL3 build links homebrew SDL3 by absolute path,
# so we don't need to copy the dylib for local dev).
cp "$ROOT/emu/MacOSX/o.emu" "$MACOS/emu"
# Native tools (some Limbo features call out to these).
mkdir -p "$MACOS/tools"
cp "$ROOT/MacOSX/arm64/bin/limbo" "$MACOS/tools/"
cp "$ROOT/MacOSX/arm64/bin/mk" "$MACOS/tools/"
# Runtime tree
for d in dis lib fonts module services locale usr mnt; do
[ -d "$ROOT/$d" ] && cp -a "$ROOT/$d" "$RESOURCES/"
done
mkdir -p "$RESOURCES/tmp" "$RESOURCES/usr/inferno/secstore" "$RESOURCES/usr/inferno/tmp"
# Bundled default LLM config — gets overridden by the writable overlay
# at ~/.infernode/lib/ndb/llm.
cat > "$RESOURCES/lib/ndb/llm" << 'LLMCONF'
mode=local
backend=api
url=https://api.anthropic.com
model=claude-sonnet-4-5-20250929
dial=
LLMCONF
cp "$ROOT/mkconfig" "$RESOURCES/"
[ -d "$ROOT/mkfiles" ] && cp -a "$ROOT/mkfiles" "$RESOURCES/"
for f in LICENCE NOTICE TRADEMARK.md README.md QUICKSTART.md \
build-macos-sdl3.sh build-macos-headless.sh makemk.sh; do
[ -f "$ROOT/$f" ] && cp "$ROOT/$f" "$RESOURCES/"
done
# Surface the build provenance — useful when comparing dev vs prod runs.
SHA=$(git -C "$ROOT" rev-parse --short=8 HEAD 2>/dev/null || echo unknown)
echo "Built from $ROOT @ $SHA at $(date -Iseconds)" > "$RESOURCES/dev-bundle-stamp.txt"
echo "Bundle assembled."
echo " emu sha: $(shasum "$MACOS/emu" | cut -c1-8)"
echo " llmclient.dis sha: $(shasum "$RESOURCES/dis/lib/llmclient.dis" | cut -c1-8)"
echo " agentlib.dis sha: $(shasum "$RESOURCES/dis/veltro/agentlib.dis" | cut -c1-8)"
echo " lucibridge.dis sha: $(shasum "$RESOURCES/dis/lucibridge.dis" | cut -c1-8)"
echo
echo "Launch with:"
echo " open --stdout /tmp/infernode-dev.out --stderr /tmp/infernode-dev.err $APP"