Commit graph

4 commits

Author SHA1 Message Date
2552d46210 fix(installer): wrap shortcut Target in 'runas /trustlevel:0x20000'
Some checks failed
CI / build-and-test (push) Failing after 27s
The in-process ShouldDeElevate check (commit 191b2c5) didn't fire on the test box because ParticipantPID resolution against Win32_Process can return null fast enough that the check skips before the elevated explorer-spawned TeamsISO has fully booted. Belt-and-braces: ALSO wrap the shortcut Target so the runas demotion happens at shell-launch time, before TeamsISO.exe even runs. Result on the dev box: clicking the Start Menu / Desktop shortcut now lands a working medium-integrity TeamsISO with NDI discovery succeeding, regardless of explorer's elevation.

Uses [SystemFolder]runas.exe (resolved by MSI at install time) and Show='minimized' to hide the brief runas console flash.
2026-05-16 11:43:54 -04:00
09e5b59dfd fix: cold-start discovery + installer shortcuts + single-instance hardening
Some checks failed
CI / build-and-test (push) Failing after 26s
Three independent fixes bundled because all were chasing the same operator
report: 'I just installed, launched from the shortcut, no participants.'

1) NdiDiscoveryService: poll immediately, then ramp from 200ms to the
   configured interval over the first 3 seconds. PeriodicTimer.WaitForNext-
   TickAsync waits the full interval before its first tick, so for a 500ms
   discovery interval the operator stared at 'no ndi sources yet' for half
   a second on every cold start. Force-poll up front (catches the runtime
   cache), then run a fast inner loop for ~3s while mDNS replies trickle
   in. Both loops share a try/finally so the NDI finder is always disposed.

2) MainViewModel.IsDiscovering: new boolean, true for 8s after engine start
   AS LONG AS no participants have arrived. MainWindow.xaml swaps the
   empty-state copy on this binding:
     IsDiscovering=true  -> 'scanning for ndi sources...' (cyan dot)
     IsDiscovering=false -> 'no ndi sources visible -- is teams in a
                            meeting?' + Refresh CTA
   The old copy ('no ndi sources yet -- open teams and start a meeting')
   was being shown immediately at launch even when discovery just hadn't
   run yet, making the app look broken.

3) App.xaml.cs: single-instance mutex moved from Local\ to Global\. On
   admin-user boxes with UAC disabled, launches from different parents
   (elevated File Explorer, non-elevated shell, etc.) can land in slightly
   different security contexts and a Local\ name can be invisible to the
   sibling. Global\ namespace closes that hole — both processes see the
   same mutex regardless of integrity. Belt-and-braces against future
   dual-instance file/port contention.

4) installer/Package.wxs: add a Desktop shortcut component (per-machine
   feature, HKCU keypath per ICE38/ICE43). Operators who can't find the
   Start Menu entry get the Desktop icon. Both shortcuts target the
   installed exe, NOT a stale path under publish/.
2026-05-16 11:23:19 -04:00
e8f52a3153 feat: app icon, FPS, drops counter, --version, About dialog, Stop Teams toggle
Six related polish items, all building on tonight's groundwork.

1. App icon: teamsiso.ico generated from dragon-mark.png at 7 sizes (16-256), wired as ApplicationIcon in the WPF csproj, MainWindow.Icon, AboutWindow.Icon, and ARPPRODUCTICON in the WiX MSI. Taskbar / window / Add-Remove-Programs all show the dragon mark now.

2. Running incoming FPS: ring buffer of last 30 frame timestamps in IsoPipeline; ComputeFps() returns moving-average rate. Surfaced on IsoHealthStats.IncomingFps and shown in the Source column of the participants DataGrid as 'WxH · 59.94 fps'. Resets cleanly on every supervisor restart.

3. Drops counter: FrameProcessor.Stats already aggregated FramesDropped (closest-frame strategy when the receiver outpaces the processor) and FramesDuplicated; just plumbed _liveProcessor through IsoPipeline so GetStats() can read them. Exposed in the Live column under the in/out counters as a coral-tinted 'drop N'.

4. Console --version flag: prints engine version (with embedded git SHA), .NET version, OS, NDI runtime banner, expected prefix, exit-code legend, plus a wilddragon.net link. Useful for support tickets.

5. About dialog: chromeless modal with the dragon mark + version / .NET / OS / NDI runtime fields and a link to wilddragon.net. Triggered by clicking the rail logo.

6. Teams launcher Stop toggle: TeamsLauncher gains IsRunning() and StopAll(). The rail's Teams button now toggles — if Teams is up, ask to close all Teams windows via WM_CLOSE; otherwise launch as before. Confirms before stopping so we don't kill the user's call mid-transition.

Tests: 74/74 unit + 9/9 NDI integration green throughout. MSI builds clean and now embeds the dragon icon for ARP.
2026-05-08 13:50:19 -04:00
d2c0c2159f feat(installer): WiX v5 MSI scaffold for Wild Dragon TeamsISO
Some checks failed
CI / build-and-test (push) Failing after 34s
Adds installer/TeamsISO.Installer.wixproj (WixToolset.Sdk 5.0.2 + WixToolset.UI.wixext) plus Package.wxs that produces a per-machine x64 MSI bundling the Release publish output of TeamsISO.App.

Layout: Program Files\\Wild Dragon\\TeamsISO\\, Start Menu shortcut under Programs\\Wild Dragon\\TeamsISO, ARP entry pointing at https://wilddragon.net for both help and about, NoRepair set so users uninstall+install for upgrades. MajorUpgrade is wired so upgrade-in-place from older versions works; downgrade is blocked with a friendly message.

NDI runtime presence is searched (HKLM environment NDI_RUNTIME_DIR_V6) and surfaced as the NDIRUNTIMEDIR property — the install no longer prompts via the deprecated VBScript custom action; instead the WPF app's existing first-run NDI check pops the install link dialog if the runtime is missing. Operators can stage the app before NDI rolls out.

Build:

    dotnet publish src/TeamsISO.App/TeamsISO.App.csproj -c Release -r win-x64 -o publish/TeamsISO

    dotnet build installer/TeamsISO.Installer.wixproj -c Release

Verified locally: MSI builds clean (0 warnings, 0 errors), produces TeamsISO-Setup-1.0.0-alpha.0.msi (336 KB), summary info reads correctly via WindowsInstaller COM API. Property table contains ARPHELPLINK/ARPURLINFOABOUT/Manufacturer/ProductName/UpgradeCode as expected.
2026-05-08 00:16:26 -04:00