Fix Launcher packaging for net8/x64; doc + gitignore updates

build.bat was broken by the contract extraction: it staged the loose Launcher
.cs files into temp folders and published from there, but the projects now have
a ProjectReference to ..\Contract\Tesla.Contract.csproj which cannot resolve from
a temp dir. Publish the projects IN PLACE instead, and target net8 / win-x64
(self-contained single-file) to match the runtime/arch uplift. The resulting
TeslaLauncher\ package (Service\ + Agent\ + install.bat) installs on a pod with
no .NET runtime prerequisite.

- Launcher/README.md: correct net6->net8, x86->x64, BinaryFormatter->framed JSON,
  and note wire types now come from ../Contract.
- Launcher/.gitignore: ignore the TeslaLauncher-*.zip deployment package.
- Console/.gitignore: ignore the published TeslaConsole-app\ package + its zip
  (framework-dependent net48 console build for running against a test pod).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-06-30 08:30:13 -05:00
co-authored by Claude Opus 4.8
parent b9d8027cf6
commit a7aafaa9e9
4 changed files with 69 additions and 107 deletions
+26 -17
View File
@@ -1,6 +1,6 @@
# TeslaLauncher
.NET 6 rewrite of the original Elsewhen Studios LLC software (Windows 2000 / .NET Framework 2.0).
.NET 8 (win-x64, self-contained) rewrite of the original Elsewhen Studios LLC software (Windows 2000 / .NET Framework 2.0).
## Architecture
@@ -8,7 +8,7 @@ TeslaLauncher has three components that work together:
### TeslaLauncherService (Windows Service, Session 0)
- Runs at boot before any user logs in
- Listens on **TCP 53290** for OFB-encrypted BinaryFormatter RPC from TeslaConsole
- Listens on **TCP 53290** for OFB-encrypted framed-JSON RPC from TeslaConsole
- Forwards commands to the Agent via Named Pipe (`TeslaLauncherIPC`)
- Handles first-boot network configuration (SecureConfig)
- Handles game file transfers from the Console (InstallProduct)
@@ -29,12 +29,12 @@ TeslaLauncher has three components that work together:
## Communication Flow
```
TeslaConsole ──TCP 53290 (OFB + BinaryFormatter)──> TeslaLauncherService
Named Pipe (JSON)
v
TeslaLauncherAgent
TeslaConsole ──TCP 53290 (OFB + framed JSON)──> TeslaLauncherService
Named Pipe (JSON)
v
TeslaLauncherAgent
```
## Files
@@ -42,10 +42,10 @@ TeslaConsole ──TCP 53290 (OFB + BinaryFormatter)──> TeslaLauncherService
| File | Description |
|------|-------------|
| `TeslaLauncherService.cs` | Windows Service implementation |
| `TeslaLauncherService.csproj` | Service project (net6.0-windows, x86, self-contained) |
| `TeslaLauncherService.csproj` | Service project (net8.0-windows, x64, self-contained) |
| `TeslaLauncherAgent.cs` | Userspace Agent implementation |
| `TeslaLauncherAgent.csproj` | Agent project (WinForms, net6.0-windows, x86) |
| `LaunchModels_Shared.cs` | Wire types (Tesla.Net) and IPC types (Tesla.Launcher.Shared) |
| `TeslaLauncherAgent.csproj` | Agent project (WinForms, net8.0-windows, x64) |
| `LaunchModels_Shared.cs` | Service↔Agent IPC types (Tesla.Launcher.Shared). Wire types (Tesla.Net) now come from `../Contract/Tesla.Contract.csproj` |
| `SecureConfig.cs` | First-boot secure configuration protocol |
| `build.bat` | Builds both components |
| `install.bat` | Installs on a cockpit PC (run as Administrator) |
@@ -53,16 +53,19 @@ TeslaConsole ──TCP 53290 (OFB + BinaryFormatter)──> TeslaLauncherService
## Building
Requirements:
- .NET 6 SDK
- Internet access for NuGet restore
- .NET 8 SDK
- Internet access for NuGet restore (first build only)
```
build.bat :: build both components
build.bat :: build both components + assemble the package
build.bat /service :: build Service only
build.bat /agent :: build Agent only
```
Output goes to `TeslaLauncher\` with `Service\` and `Agent\` subdirectories.
Output goes to `TeslaLauncher\` with `Service\` and `Agent\` subdirectories plus
`install.bat`. The projects are published in place (self-contained, single-file,
win-x64) — they reference `../Contract`, so they cannot be staged into a temp
folder. No .NET runtime is required on the target pod.
## Installation
@@ -105,6 +108,12 @@ The Console connects to each configured pod on TCP 53290 and can:
## Wire Protocol
The Console uses BinaryFormatter over OFB-encrypted TCP streams. All types in the `Tesla.Net` namespace are exact replicas of the original structs from `TeslaConsoleLaunchLib.dll` to maintain serialization compatibility.
The Console talks to the Service with **length-prefixed System.Text.Json frames**
over the OFB-encrypted TCP stream (dispatch by method name) — see
`../Contract/PodRpcProtocol.cs`, shared by both ends. This replaced the original
`BinaryFormatter` + serialized-`MethodBase` scheme. The `Tesla.Net` wire types now
live in `../Contract/Tesla.Contract.csproj`, the single source of truth shared with
the Console.
The Service-to-Agent IPC uses length-prefixed JSON over a Named Pipe, with flat types that avoid the nested struct layout of the wire format.
The Service-to-Agent IPC uses length-prefixed JSON over a Named Pipe, with flat types
that avoid the nested struct layout of the wire format.