Network-agnostic, air-gapped pod install for the two DOSBox titles (BT/RP 4.10), fitting the existing TeslaConsole/TeslaLauncher pod-bay architecture. emulator/DEPLOYMENT-PLAN.md Full design: bridge on the one NIC (pods form a source-proven P2P TCP mesh, so NAT/slirp is out); launcher keeps the bay IP, the DOSBox guest bridges at bayIP+100 (egg/mesh/game endpoint); two-edit +100 convention (postinstall + console DOSBox flag); static, air-gapped, <=32 pods. emulator/pod-launch/ (C# net8 supervising entry-point) Creates a Job Object (KILL_ON_JOB_CLOSE), launches DOSBox-X + the render bridge into it and blocks -- kill this process and both die (kernel-enforced, even on a hard TerminateProcess of a hung session; verified). Mode dispatch: bt/rp wired (also serve camera + live mission-review via egg hostType); review + diagnostics recognized but fail clean until their DOS launch args are known. emulator/deploy/ (install side) postinstall.bat (thin elevated wrapper) + configure.ps1 (NIC detect, realnic bind as a contiguous letter-leading GUID fragment, game IP = bayIP+100, stable MAC, render net_*.conf templates, stamp WATTCP.CFG my_ip) + tokenized conf templates + package.ps1 (assemble the zip). Render/bind/stamp + packaging verified against a scratch tree. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
84 lines
4.0 KiB
Markdown
84 lines
4.0 KiB
Markdown
# deploy/ -- install-side artifacts
|
|
|
|
Sources for the self-contained, air-gapped pod install. See
|
|
[`../DEPLOYMENT-PLAN.md`](../DEPLOYMENT-PLAN.md) for the full design.
|
|
|
|
## Files
|
|
|
|
| File | Role |
|
|
|---|---|
|
|
| `postinstall.bat` | elevated entry TeslaLauncher runs after extraction: finds the package folder, installs bundled Npcap, calls `configure.ps1` |
|
|
| `configure.ps1` | the per-pod step: detects the NIC + bay IP, derives the game IP = **bayIP+100**, binds DOSBox's pcap (`realnic`), renders the conf templates, stamps `WATTCP.CFG my_ip` |
|
|
| `net_loop.conf.tmpl` | BattleTech conf template (looped netnub) |
|
|
| `net_rp.conf.tmpl` | Red Planet conf template (single-shot) |
|
|
| `package.ps1` | assembles the deployable zip from repo sources + a fresh self-contained `pod-launch` publish |
|
|
|
|
Template tokens filled at install: `@@ROOT@@` (package dir), `@@REALNIC@@` (this
|
|
pod's NIC GUID fragment), `@@MACADDR@@` (stable MAC derived from the game IP).
|
|
|
|
## Packaged zip layout
|
|
|
|
The archive extracts to the games root (`C:\games`). Zip root = one package
|
|
folder + `postinstall.bat`:
|
|
|
|
```
|
|
C:\games\
|
|
postinstall.bat <- from deploy/postinstall.bat
|
|
TeslaPod410\ <- the single package folder (= ROOT)
|
|
pod-launch.exe <- built from ../pod-launch (self-contained)
|
|
dosbox-x.exe (+ DLLs)
|
|
net_loop.conf.tmpl <- from deploy/ (rendered -> net_loop.conf)
|
|
net_rp.conf.tmpl <- from deploy/ (rendered -> net_rp.conf)
|
|
renderer.exe <- frozen renderer (OPEN: packaging w/ David)
|
|
roms\awe32.raw
|
|
ALPHA_1\... <- game content (incl. the WATTCP.CFG files)
|
|
net-boot\... <- ODI/packet drivers, NET.CFG @340/INT10
|
|
deploy\
|
|
configure.ps1 <- from deploy/
|
|
npcap.exe <- bundled Npcap silent installer (NOT in repo)
|
|
vc_redist.x64.exe <- optional, if the DOSBox build needs it
|
|
```
|
|
|
|
`postinstall.bat` derives `ROOT` as the single folder beside it, so the folder
|
|
can be named per package.
|
|
|
|
## What runs at install (elevated, no network -- air-gapped)
|
|
|
|
1. `postinstall.bat` locates `ROOT`, runs `ROOT\deploy\npcap.exe /S`.
|
|
2. `configure.ps1 -Root ROOT`:
|
|
- finds the one static IPv4 (the **bay IP**) + its adapter GUID;
|
|
- `realnic` = a contiguous, letter-leading fragment of a single GUID block
|
|
(DOSBox reads a leading digit as an interface index; the fragment must be a
|
|
substring of `\Device\NPF_{GUID}`);
|
|
- **game IP = bay IP + 100** on the last octet (≤32 pods, bays `.1-.100`);
|
|
- `macaddr` = `02:00:<game IP octets in hex>` (stable, locally-administered);
|
|
- renders `*.conf.tmpl` -> `*.conf` (tokens filled);
|
|
- stamps `my_ip = gameIP` into every `ALPHA_1\...\WATTCP.CFG`.
|
|
3. `pod-launch.exe` (the supervisor) then selects + launches the rendered conf.
|
|
|
|
Verified against a scratch package tree: NIC detect, `realnic` (contiguous-match
|
|
checked), `bayIP+100`, MAC, conf render, and WATTCP stamp all correct.
|
|
|
|
## Building the zip
|
|
|
|
```
|
|
deploy\package.ps1 [-PackageName TeslaPod410] [-Npcap <installer>] `
|
|
[-Renderer <exe>] [-VcRedist <exe>] [-NoContent] [-SkipBuild]
|
|
```
|
|
|
|
Publishes `pod-launch` self-contained, stages the tree (postinstall.bat at the
|
|
zip root + the package folder), and writes `emulator\dist\<PackageName>.zip`.
|
|
`-NoContent` skips `ALPHA_1`/`net-boot` for a fast structural check. Externally-
|
|
procured pieces are bundled only when their paths are passed (else flagged).
|
|
|
|
## Not yet in the repo / OPEN
|
|
|
|
- `npcap.exe` (licensed installer -- procured out-of-band) and any `vc_redist`.
|
|
- The frozen `renderer.exe` (packaging decision with David; `pod-launch` falls
|
|
back to `pyw live_bridge.py` when absent).
|
|
- **DOSBox-X runtime DLL closure** (MinGW/SDL DLLs): none sit beside
|
|
`dosbox-x.exe` in the dev tree -- it finds them via MSYS2 on PATH. The air-
|
|
gapped package must bundle them; `package.ps1` copies any DLLs beside the exe
|
|
and warns when there are none.
|
|
- RP loop-vs-single-shot for retail parity (template currently mirrors dev).
|