Skip to content

Building and Releasing

knoxxr edited this page Jul 14, 2026 · 1 revision

Building & Releasing

Prerequisites

  • .NET 9 SDK
  • Windows 10/11 (x64) for the Windows build
  • Inno Setup 6 to rebuild the installer (winget install JRSoftware.InnoSetup)

Build & run

dotnet run -c Release              # run locally
dotnet build -c Release            # compile
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o publish-sc

Versioning

  • Every local build increments build.counter, stamping the version as <VersionPrefix>.<build> (the StampBuildVersion target in VirtualDesktopIndicator.csproj). build.counter is git-ignored (per-machine).
  • For a meaningful release, bump <VersionPrefix> in the csproj.
  • CI passes an explicit -p:Version=<tag> with -p:SkipVersionStamp=true, so release builds carry the exact tag version.

Rebuild the installer locally

# 1) Publish a self-contained build (runtime bundled)
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o publish-sc
Remove-Item publish-sc\*.pdb -EA SilentlyContinue
# 2) Compile the installer (produces Setup.exe under installer\)
& "$env:LocalAppData\Programs\Inno Setup 6\ISCC.exe" installer.iss

The wizard config (version, shortcuts, autostart) lives in installer.iss.

Automated releases

Pushing a tag like v1.3.2 triggers the release workflow:

  1. windows job: publishes the self-contained build, compiles the Inno Setup installer, and creates the GitHub Release with the installer attached.
  2. linux job: publishes the linux-x64 build and uploads a .tar.gz to the same release.
# bump <VersionPrefix> in the csproj first, then:
git commit -am "release vX.Y.Z"
git tag vX.Y.Z
git push origin main --tags

Microsoft Store (MSIX)

The Store package is built by a separate, manually-triggered workflow — see Microsoft Store (MSIX).

Project structure

App.xaml(.cs)                  Entry point, tray icon/menu, startup update check
OverlayWindow.xaml(.cs)        Translucent click-through overlay; polling/repositioning
SettingsWindow.xaml(.cs)       Hotkey UI + autostart + appearance + version/update
UpdateFlow.cs                  Update prompt → download/install/exit on consent
Services/
  AppConfig.cs                 Loads/saves config.json
  AppVersion.cs                App version stamped at build time
  PackageContext.cs            Detects MSIX-packaged vs plain-exe at runtime
  UpdateService.cs             GitHub release query + installer download/run
  VirtualDesktopRegistry.cs    Reads current number/count/name from the registry
  DesktopSwitcher.cs           Switches desktops (direct COM first, key-input fallback)
  VirtualDesktopInternal.cs    Direct switch via internal COM + vtable verification
  VirtualDesktopManagerCom.cs  Public COM (MoveWindowToDesktop) wrapper
  HotKeyManager.cs             Registers/handles global hotkeys
  StartupManager.cs            Run-at-startup (HKCU\Run, or MSIX StartupTask when packaged)
packaging/msix/                MSIX manifest, assets, build scripts (see Store page)
linux/                         Linux/X11 build (Avalonia UI)

Clone this wiki locally