From d1e9f0e3655c39cfe658110a3f10b6adef4a73a5 Mon Sep 17 00:00:00 2001 From: Cyd Date: Tue, 30 Jun 2026 20:06:50 -0500 Subject: [PATCH] Package both launcher and console into dist\ (parity) - Launcher/build.bat now outputs to dist\TeslaLauncher\ (was TeslaLauncher\ at the Launcher root) and produces dist\TeslaLauncher-podpkg.zip, matching Console\dist\. - Both build scripts now zip the package themselves (Compress-Archive) instead of leaving it as a manual step: Console/build-package.bat -> dist\TeslaConsole-pkg.zip. - Launcher/.gitignore: ignore /dist/ (drop the obsolete /TeslaLauncher/ + staging entries); Console already ignores /dist/. - READMEs updated to point at dist\. Co-Authored-By: Claude Opus 4.8 --- Console/build-package.bat | 8 +++++++- Launcher/.gitignore | 8 ++------ Launcher/README.md | 10 +++++----- Launcher/build.bat | 19 +++++++++++++++---- README.md | 10 ++++++---- 5 files changed, 35 insertions(+), 20 deletions(-) diff --git a/Console/build-package.bat b/Console/build-package.bat index c3c7215..42f0415 100644 --- a/Console/build-package.bat +++ b/Console/build-package.bat @@ -20,6 +20,7 @@ set ROOT=%~dp0 :: Package under dist\ so it never collides with the TeslaConsole\ SOURCE folder. set BUILD_DIR=%ROOT%dist\TeslaConsole set APP_OUT=%BUILD_DIR%\App +set ZIP=%ROOT%dist\TeslaConsole-pkg.zip echo. echo ============================================================ @@ -48,13 +49,18 @@ if errorlevel 1 ( if exist "%ROOT%install.bat" copy /y "%ROOT%install.bat" "%BUILD_DIR%\" >nul +echo Zipping package... +if exist "%ZIP%" del /q "%ZIP%" +powershell -NoProfile -Command "Compress-Archive -Path '%BUILD_DIR%' -DestinationPath '%ZIP%' -Force" + echo. echo ============================================================ echo Package built: %BUILD_DIR% +echo Zip : %ZIP% echo ============================================================ echo. echo Next steps: -echo 1. Copy the TeslaConsole\ folder to the control PC +echo 1. Copy TeslaConsole-pkg.zip to the control PC and extract it echo 2. Run TeslaConsole\install.bat as Administrator echo. pause diff --git a/Launcher/.gitignore b/Launcher/.gitignore index 2933674..8a051a9 100644 --- a/Launcher/.gitignore +++ b/Launcher/.gitignore @@ -3,12 +3,8 @@ [Bb]in/ [Oo]bj/ -# build.bat staging + final output (see build.bat: BUILD_DIR / *_STAGE) -/_stage_svc/ -/_stage_agt/ -/TeslaLauncher/ -# zipped deployment package produced for transfer to a pod -/TeslaLauncher-*.zip +# build.bat output: the package folder + zip (parity with Console\dist\) +/dist/ # ── Runtime / installer state ──────────────────────────────────────────────── # Generated by installutil / the service at runtime, not source diff --git a/Launcher/README.md b/Launcher/README.md index 9bb9b7d..9955d4a 100644 --- a/Launcher/README.md +++ b/Launcher/README.md @@ -62,11 +62,11 @@ build.bat /service :: build Service only build.bat /agent :: build Agent only ``` -Output goes to `TeslaLauncher\` with `Service\` and `Agent\` subdirectories plus -`install.bat`. The projects are published in place (framework-dependent net48) — they -reference `../Contract`, so they cannot be staged into a temp folder. Each folder holds -the exe plus its dependency DLLs; the target pod needs only .NET Framework 4.8 (built -into Windows 10/11), no bundled runtime. +Output goes to `dist\TeslaLauncher\` (with `Service\` and `Agent\` subdirectories plus +`install.bat`) and `dist\TeslaLauncher-podpkg.zip`, mirroring `Console\dist\`. The projects +are published in place (framework-dependent net48) — they reference `../Contract`, so they +cannot be staged into a temp folder. Each folder holds the exe plus its dependency DLLs; +the target pod needs only .NET Framework 4.8 (built into Windows 10/11), no bundled runtime. ## Installation diff --git a/Launcher/build.bat b/Launcher/build.bat index 6c12ab1..f35e4dc 100644 --- a/Launcher/build.bat +++ b/Launcher/build.bat @@ -16,12 +16,13 @@ :: build.bat /service - build Service only :: build.bat /agent - build Agent only :: -:: Output: -:: TeslaLauncher\ +:: Output (under dist\, parity with Console\dist\): +:: dist\TeslaLauncher\ :: install.bat :: Service\TeslaLauncherService.exe :: Agent\TeslaLauncherAgent.exe :: [oalinst.exe, dx9201006\] (if vendored under assets\) +:: dist\TeslaLauncher-podpkg.zip (the deployable package) :: :: NOTE: the projects reference ..\Contract\Tesla.Contract.csproj, so they are :: published IN PLACE (not staged into a temp folder) — the project reference @@ -31,7 +32,9 @@ setlocal enabledelayedexpansion set ROOT=%~dp0 -set BUILD_DIR=%ROOT%TeslaLauncher +:: Package under dist\ (parity with Console\dist\). +set BUILD_DIR=%ROOT%dist\TeslaLauncher +set ZIP=%ROOT%dist\TeslaLauncher-podpkg.zip :: -- Parse arguments ---------------------------------------------------------- set BUILD_SERVICE=1 @@ -114,6 +117,11 @@ if exist "%ROOT%install.bat" copy /y "%ROOT%install.bat" "%BUIL if exist "%ROOT%assets\oalinst.exe" copy /y "%ROOT%assets\oalinst.exe" "%BUILD_DIR%\" >nul if exist "%ROOT%assets\dx9201006\" xcopy /y /s /i /q "%ROOT%assets\dx9201006" "%BUILD_DIR%\dx9201006" >nul +:: -- Zip the package ---------------------------------------------------------- +echo Zipping package... +if exist "%ZIP%" del /q "%ZIP%" +powershell -NoProfile -Command "Compress-Archive -Path '%BUILD_DIR%' -DestinationPath '%ZIP%' -Force" + :: -- Summary ------------------------------------------------------------------ echo ============================================================ echo Build complete @@ -122,8 +130,11 @@ echo. if %BUILD_SERVICE%==1 echo Service : %BUILD_DIR%\Service\TeslaLauncherService.exe if %BUILD_AGENT%==1 echo Agent : %BUILD_DIR%\Agent\TeslaLauncherAgent.exe echo. +echo Package : %BUILD_DIR% +echo Zip : %ZIP% +echo. echo Next steps: -echo 1. Copy the TeslaLauncher\ folder to the pod (or stand-in) PC +echo 1. Copy TeslaLauncher-podpkg.zip to the pod (or stand-in) PC and extract it echo 2. Run TeslaLauncher\install.bat as Administrator echo. if "%QUIET%"=="0" pause diff --git a/README.md b/README.md index 407fbd8..ecdae3b 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,12 @@ dotnet test Console/tests/TeslaConsole.DiffTests # differential + protocol ``` **Pod deployment:** [`Launcher/build.bat`](Launcher/build.bat) publishes the -framework-dependent net48 package into `Launcher/TeslaLauncher/` (~3.7 MB on disk / -~1.6 MB zipped — no runtime to install, since .NET Framework 4.8 ships in Windows 10/11), -and [`Launcher/install.bat`](Launcher/install.bat) deploys it on a cockpit PC (registers -the Service, sets up the Agent for auto-login, hardens the box). +framework-dependent net48 package into `Launcher/dist/` (~1.6 MB zipped — no runtime to +install, since .NET Framework 4.8 ships in Windows 10/11), and +[`Launcher/install.bat`](Launcher/install.bat) deploys it on a cockpit PC (registers the +Service, sets up the Agent for auto-login, hardens the box). The operator console packages +the same way: [`Console/build-package.bat`](Console/build-package.bat) → `Console/dist/`, +installed with [`Console/install.bat`](Console/install.bat). ## Layout notes