Building & Packaging (Inno Setup 7, WinGet & Scoop)
This guide explains how to produce production builds of LocalTelemetry, compile application binaries, configure Inno Setup 7, generate WinGet and Scoop manifests, and execute uninstallation scripts.
Building Production Binaries
Svelte 5 Frontend Build
Compile the Svelte 5 settings panel single-page application:
cd src/LocalTelemetry.App/Settings/wwwroot
bun install
bun run build
cd ../../../..Application Binary Compilation
LocalTelemetry.App.csproj includes automated MSBuild targets (CopyNotifier and CopyWwwroot) alongside PreserveNewest deployment of PawnIO_setup.exe and Uninstall.bat:
# Framework-dependent build (.NET 10 Desktop Runtime required, used in release pipeline)
dotnet publish src/LocalTelemetry.App/LocalTelemetry.App.csproj -c Release -r win-x64 --no-self-contained -p:PublishSingleFile=true -o ./publish/
# Optional: self-contained build (bundles the entire .NET 10 runtime)
dotnet publish src/LocalTelemetry.App/LocalTelemetry.App.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o ./publish/This single command produces the following deployment files in ./publish/:
LocalTelemetry.exe: Main application executable.LocalTelemetry.Notifier.exe: Standalone toast notification helper executable.wwwroot/: Embedded Svelte 5 frontend assets.PawnIO_setup.exe: Hardware kernel sensor driver setup executable.Uninstall.bat: Automated administrative driver and service cleanup script for portable mode.
Compiling the Inno Setup 7 Installer
LocalTelemetry uses Inno Setup 7 to build its official installer executable (LocalTelemetrySetup.exe).
The configuration script is located at setup.iss in the root repository folder.
Inno Setup Lifecycle Controls
- Running Process Detection (
CloseApplicationsFilter): Inspects whetherLocalTelemetry.exeorLocalTelemetry.Notifier.exeis active, prompting to terminate them before updating. - Automatic .NET 10 Runtime Bootstrapper: Checks whether the .NET 10 Desktop Runtime is installed (
IsDotNet10DesktopInstalled). If missing, it automatically downloads and installs Microsoft's official runtime package (~55 MB) with a progress bar. - PawnIO Driver Provisioning: Stops and deletes any stale
PawnIOservice, executesPawnIO_setup.exe -install -silent, retries if Windows returns error 1072 (service marked for deletion), and flags for reboot if needed. - Scheduled Task Registration: Uses the Task Scheduler COM API to create
LocalTelemetry StartupwithTASK_RUNLEVEL_HIGHEST,DisallowStartIfOnBatteries = false,StopIfGoingOnBatteries = false, andExecutionTimeLimit = "PT0S"(infinite runtime). - App Mode Marker: Creates
{app}\app.modeso the application routes user settings to%LOCALAPPDATA%\LocalTelemetry. - Complete Driver & Registry Cleanup on Uninstall: Closes processes, removes the scheduled task, stops the service, and invokes PowerShell with
pnputil.exe /delete-driver /uninstall /forceto purgepawnio.inffrom the Windows DriverStore. If Windows returns code3010, it warns the user that a restart is required to release the driver from memory. - User Data Prompt: Interactively asks the user whether to preserve or remove user configuration (
settings.json) and bandwidth history (internet_usage.jsonl).
Compiling via ISCC CLI
If Inno Setup 7 is installed on your system (via winget install --id JRSoftware.InnoSetup.7):
& "C:\Program Files\Inno Setup 7\ISCC.exe" /DAppVersion=1.0.0-rc.1 /DAppVersionInfoVersion=1.0.0.0 setup.issThis compiles LocalTelemetrySetup.exe into the repository root folder.
Portable Mode Cleanup Script
For portable installations, Uninstall.bat provides complete system cleanup:
- UAC Auto-Elevation: Requests administrator privileges via
powershell -Command "Start-Process '%~dpnx0' -Verb RunAs". - Process Termination: Terminates
LocalTelemetry.exeandLocalTelemetry.Notifier.exeusingtaskkill /F. - PawnIO Service Removal: Stops and deletes the
PawnIOservice viasc stop PawnIOandsc delete PawnIO. - DriverStore Purge: Scans
pnputil.exe /enum-driversforpawnio.infand executespnputil /delete-driver <oem.inf> /uninstall /force. If Windows returns exit code3010, a message box informs the user that a restart is required. - Registry Cleanup: Removes startup keys from
HKCU\Software\Microsoft\Windows\CurrentVersion\Runand theLocalTelemetry Startupscheduled task. - Residual Folder Removal: Deletes
C:\Program Files\PawnIO,%ProgramData%\LocalTelemetry, and%LocalAppData%\Temp\PawnIo.
WinGet Packaging Specifications
The repository maintains the Windows Package Manager manifest in packaging/winget/localtelemetry.yaml:
- Package Identifier:
Nicconike.LocalTelemetry - Installer Type:
inno - Silent Switches:
/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- - Automated Workflow: When a release is published via
.github/workflows/release.yml, the workflow calculates the SHA-256 hash ofLocalTelemetrySetup.exe, updatespackaging/winget/localtelemetry.yaml, and submits the release to the WinGet Community Repository via Microsoft's officialwingetcreateCLI utility.
Scoop Packaging Specifications
The repository hosts a direct Scoop bucket manifest at bucket/localtelemetry.json:
Manifest: Specifies binary extraction for
LocalTelemetry-win-x64.zip, start menu shortcut creation, and GitHub release tracking.Automated Workflow: When a release is published,
build.ps1updatesbucket/localtelemetry.jsonwith the new version and SHA-256 hash, and commits the update directly tomaster.Installation: Users install directly from this repository without requiring third-party bucket approvals:
powershellscoop bucket add localtelemetry https://github.com/Nicconike/LocalTelemetry scoop install localtelemetry
Generating Portable ZIP Package
The portable release package bundles the ./publish/* directory (including Uninstall.bat):
Compress-Archive -Path ./publish/* -DestinationPath ./LocalTelemetry-win-x64.zip -Force