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. - Selective User Data Cleanup: Presents a custom cleanup form (
PromptUserDataCleanup) to selectively remove Application Settings (settings.json), Cache & Diagnostic Logs (logs/,webview2_data/), and Traffic History (internet_usage.jsonl), preserving bandwidth history by default.
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.2.0 /DAppVersionInfoVersion=1.2.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 official multi-file Windows Package Manager manifests in packaging/winget/:
- Version Manifest (
Nicconike.LocalTelemetry.yaml): Defines the package identifier (Nicconike.LocalTelemetry), version, and default locale. - Installer Manifest (
Nicconike.LocalTelemetry.installer.yaml): Defines the Inno Setup installer type, architecture (x64), download URL, SHA-256 hash, and silent switches (/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-). - Locale Manifest (
Nicconike.LocalTelemetry.locale.en-US.yaml): Contains package metadata, description, license, tags, and release notes URL. - Automated Workflow: When a release is published via
.github/workflows/release.yml,build.ps1updates all three manifest files. The release workflow then submits the update to the official Microsoft WinGet Community Repository viawingetcreate.
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 -ForceArtifact Signing with Cosign
Release binaries are signed keylessly with Sigstore Cosign using GitHub Actions OIDC:
cosign sign-blob --yes --bundle ./checksums.txt.sigstore.json ./checksums.txt
cosign sign-blob --yes --bundle ./LocalTelemetrySetup.exe.sigstore.json ./LocalTelemetrySetup.exe
cosign sign-blob --yes --bundle ./LocalTelemetry-win-x64.zip.sigstore.json ./LocalTelemetry-win-x64.zip