Files
TeslaSuite/Console/build-package.bat
T
CydandClaude Opus 4.8 4a61a9f8c3 Fix pod reconfigure timeout; add console installer + package
Reconfigure timeout (launcher reinstall of an already-configured pod):
- The console pings each configured pod and connects on success, on a loop, and
  never tore that down — so it kept hammering the pod's old IP with a stale
  connection while SecureConfig tried to bring the pod up on that address, which
  timed out. Only a console restart (closing all sockets) cleared it.
- DeletePod now Disconnect()s the pod's connection (closes the lingering socket)
  so delete-to-reconfigure works WITHOUT a console restart.
- Reconfiguring a known pod in place now pauses that pod's ping/connect loop
  (OperationInProgress) and drops its stale connection before SecureConfig, and
  resumes on completion (success or failure) so it reconnects with the new key.
  (StopPing kills the ping thread irreversibly, so pause via OperationInProgress.)
  Note: PodInfo's static mPods registry is dead code (nothing registers), so the
  real fix is the disconnect, not an unregister.

Console deployment:
- Console/install.bat: installs the console to C:\Program Files\TeslaConsole,
  preps the %ProgramData%\Tesla Console data dir (Users: modify), creates a Start
  Menu shortcut, and adds a per-program inbound firewall rule so it can receive
  pod discovery beacons. net48 is in-box, no runtime install.
- Console/build-package.bat: publishes the console (net48 framework-dependent) to
  dist\TeslaConsole\App and assembles the package with install.bat.

74 tests green; the pod-config fix is UI/network behavior, validate on a pod.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 19:26:28 -05:00

61 lines
2.0 KiB
Batchfile

@echo off
:: =============================================================================
:: TeslaConsole - Build ^& Package
:: =============================================================================
:: Publishes the console (net48, framework-dependent) into TeslaConsole\App and
:: assembles the installable package (App\ + install.bat) next to it. net48 is
:: in-box on Windows 10/11, so the target control PC needs no runtime install.
::
:: Requirements: .NET SDK (6.0+) to drive the build; internet for first restore.
::
:: Output:
:: TeslaConsole\
:: install.bat
:: App\ (TeslaConsole.exe + dependencies + RedPlanet\ content)
:: =============================================================================
setlocal
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
echo.
echo ============================================================
echo TeslaConsole - Build ^& Package (net48, framework-dependent)
echo Output : %BUILD_DIR%
echo ============================================================
echo.
where dotnet >nul 2>&1
if errorlevel 1 (
echo ERROR: dotnet not found. Install the .NET SDK from https://dotnet.microsoft.com/download
pause & exit /b 1
)
:: Don't publish over a running instance.
taskkill /F /IM TeslaConsole.exe >nul 2>&1
echo Publishing TeslaConsole...
if exist "%APP_OUT%" rmdir /s /q "%APP_OUT%"
dotnet publish "%ROOT%TeslaConsole.csproj" -c Release -o "%APP_OUT%"
if errorlevel 1 (
echo.
echo ERROR: Build failed.
pause & exit /b 1
)
if exist "%ROOT%install.bat" copy /y "%ROOT%install.bat" "%BUILD_DIR%\" >nul
echo.
echo ============================================================
echo Package built: %BUILD_DIR%
echo ============================================================
echo.
echo Next steps:
echo 1. Copy the TeslaConsole\ folder to the control PC
echo 2. Run TeslaConsole\install.bat as Administrator
echo.
pause