# 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 (looped netnub via `loop_rp.bat`) | | `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:` (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 ] ` [-Renderer ] [-VcRedist ] [-NoContent] [-SkipBuild] ``` Publishes `pod-launch` self-contained, stages the tree (postinstall.bat at the zip root + the package folder), and writes `emulator\dist\.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). ## DLLs / runtime `dosbox-x.exe` is a **static build** (182 MB): its import table is only Windows system DLLs and the delay-import table is empty, so there are **no MinGW/SDL DLLs to bundle**. The one runtime DLL it needs, `wpcap.dll`, is provided by the Npcap install. (Its other `LoadLibrary` strings are optional features our confs don't use -- Glide/3dfx, ASPI, ANGLE, inpout -- or Windows-provided D3D/DXGI.) Both deploy confs run netnub in a **loop** until the supervisor is killed (`loop.bat` for BT, `loop_rp.bat` for RP) -- no single-shot in the deployable. ## 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).