Files
Neutron/scripts/package.sh
T

76 lines
4.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
source "$(dirname "$0")/env.sh"
scripts/build-linux.sh
scripts/build-windows.sh
python3 tools/extractors/prepare.py --all-scenes --audio sounds musicsecretlab
for rid in linux-x64 win-x64; do
out="dist/$rid"
mkdir -p "$out/assets" "$out/scenes/level1b" "$out/scenes/VR01" "$out/scenes/animations" "$out/scenes/actors" "$out/scenes/ui" "$out/audio/sounds" "$out/licenses" "$out/docs"
for directory in ASE png gam omt; do cp -a "../Original/$directory" "$out/assets/"; done
cp ../Original/fontsmall.png ../Original/green_font.png ../Original/alpha.omt ../Original/NewGame.tsk ../Original/readme.txt "$out/assets/"
cp -a artifacts/extracted/level1b/. "$out/scenes/level1b/"
cp -a artifacts/extracted/animations/. "$out/scenes/animations/"
cp -a artifacts/extracted/actors/. "$out/scenes/actors/"
cp -a artifacts/extracted/ui/. "$out/scenes/ui/"
mkdir -p "$out/scenes/effects"
cp -a artifacts/extracted/effects/. "$out/scenes/effects/"
cp artifacts/extracted/scene-catalog.json "$out/scenes/scene-catalog.json"
cp -a artifacts/extracted/VR01/. "$out/scenes/VR01/"
for manifest in artifacts/extracted/*/scene.json; do
scene_directory="$(dirname "$manifest")"
scene_name="$(basename "$scene_directory")"
mkdir -p "$out/scenes/$scene_name"
cp -a "$scene_directory/." "$out/scenes/$scene_name/"
done
cp -a artifacts/extracted/musicsecretlab/. "$out/audio/"
cp -a artifacts/extracted/sounds/. "$out/audio/sounds/"
cp .tools/sdl-win/LICENSE.txt "$out/licenses/SDL3.txt"
cp docs/infrastructure.md "$out/BUILD-AND-LIMITATIONS.md"
cp docs/compatibility.md "$out/COMPATIBILITY.md"
cp docs/dependencies.md "$out/licenses/DEPENDENCIES.md"
cp -a docs/. "$out/docs/"
cp README.md "$out/SOURCE-README.md"
cat > "$out/README.md" <<'NOTES'
# Neutron lab story and jet pack checkpoint
Linux: run ./launch-scene.sh. Windows: run launch-scene.cmd.
Append --headless --frames 2 to render without a window, or --screenshot lab.ppm
to save GPU readback. A Vulkan 1.3 graphics driver/loader is required.
This package includes the .NET runtime, SDL3, shaders and local asset copies.
The default opens the controllable original lab. Arrows walk/backpedal/turn;
Shift, Insert, numpad 0 or right mouse jump. R resets to the original start area;
C pauses into inspection and resumes the chase camera. F11 fullscreen, Escape quit.
Inspection: arrows/WASD orbit, +/- zoom, 1 idle, 2 run, 3 jump, 4 scratch preview.
Append --inspect to start directly in the old scene inspector.
The default runs the recovered lab camera/speech sequence; Escape/Space skips
its actions and restores control. --skip-intro starts with control; --mute disables
scene audio. O raises/lowers objectives. The original jet pack pickup opens the
practice prompt: Y/Yes enters VR04; N/No resumes. Hold jump for a powered burst
after obtaining it. --headless --story-time 12 renders a deterministic story shot.
Original actor/model/sprite props, common patrol, buttons/moving bars, lab task
route, objectives, practice flow and checkpoint CLI are integrated. Collision,
60Hz cadence, pivots, rendering states and animation timing remain provisional.
Full combat, AI, progression, menus and runtime saves remain incomplete. Initial
Windows rendering is user-confirmed for an older build; this story/tutorial
checkpoint still needs native Windows input/physics/audio validation.
See BUILD-AND-LIMITATIONS.md, COMPATIBILITY.md and docs/ for evidence and remaining
work. SOURCE-README.md describes development from the separate source repository.
NOTES
done
cat > dist/linux-x64/launch-scene.sh <<'LAUNCH'
#!/usr/bin/env bash
set -euo pipefail
here="$(cd "$(dirname "$0")" && pwd)"
exec "$here/GamePort" --assets "$here/assets" --scene "$here/scenes/level1b/scene.json" --level gam/level1b.gam --walk "$@"
LAUNCH
chmod +x dist/linux-x64/launch-scene.sh
cat > dist/win-x64/launch-scene.cmd <<'LAUNCH'
@echo off
"%~dp0GamePort.exe" --assets "%~dp0assets" --scene "%~dp0scenes\level1b\scene.json" --level gam/level1b.gam --walk %*
LAUNCH
printf '%s\n' 'Local Linux and Windows investigation packages prepared in dist/.'