Files
DorkNet/launcher
Alexa 5452ff06ee launcher: welcome screen + guided setup wizard
First launch went straight to a Host/Join card picker with no
framing. Replaced with a two-phase onboarding:

WelcomeView — branded intro with the wordmark, three feature
bullets (2 min setup, free, works with regular Rec Room), and one
big "Get started" button. Dismissed via AppState.WelcomeSeen.

SetupView — multi-step wizard with a STEP X OF N indicator:
1. Host vs Join card picker (self-advances on click)
2. Rec Room install (shows auto-detected path with a green "we
   found it" banner; Pick... overrides)
3. (Host only) Server name + WHO CAN JOIN radios
4. (Host only) Photon AppIds — "Open setup walkthrough" launches
   the existing PhotonWizard, or paste fields below for advanced
   users; live status line confirms when AppIds are set
5. Done card with Finish button

Join mode hops 2 -> done since it doesn't need server config or
Photon. AppState.SetupComplete gates entry; future launches skip
the wizard and route directly to HostView / JoinView. Existing
state files get auto-migrated on load (Mode set + RecRoomPath
populated = WelcomeSeen + SetupComplete backfilled to true, then
flushed). Settings -> "Re-run setup" clears the flag for users
who want to walk through again.
2026-05-27 11:25:28 +03:00
..

DorkNet Launcher

Single-download desktop launcher for self-hosting / joining DorkNet servers. Native WPF — no embedded browser, no WebView2 dependency. .NET 9 single-file self-contained build.

This README is for developers of the launcher. End-users see the main README and download a prebuilt .exe from Releases.

What it does

  • Host mode: fetches the matching server binary from GitHub Releases for the user's picked Rec Room version, runs it as a subprocess, opens a Cloudflare quick-tunnel, patches the user's Rec Room install, hands the user a shareable join code.
  • Join mode: parses the join code, fetches the matching client patcher from GitHub Releases, patches the user's Rec Room install to point at the host.

Layout

launcher/
├── DorkNet.Launcher.csproj    .NET 9 WPF, single-file self-contained
├── App.xaml + App.xaml.cs     WPF Application bootstrap, dark-theme palette
├── MainWindow.xaml            All views (first-run / host / join / settings)
├── MainWindow.xaml.cs         Code-behind: event handlers → Backend/* calls
├── app.manifest               Windows DPI-awareness manifest
└── Backend/                   Orchestration — UI-framework-agnostic
    ├── AppPaths.cs            %APPDATA%\DorkNet layout
    ├── AppState.cs            Persisted user choices (mode, paths, Photon AppId)
    ├── VersionsManifest.cs    Fetches versions.json from main
    ├── ReleaseDownloader.cs   GitHub Releases API + artifact unpack
    ├── ServerProcess.cs       Spawns the downloaded server binary
    ├── ClientPatcher.cs       Invokes install-plugin.ps1 from the unpacked patcher
    ├── Tunnel.cs              Wraps `cloudflared tunnel --url …`
    ├── RecRoomPicker.cs       Microsoft.Win32.OpenFolderDialog
    └── JoinCode.cs            base64url-encoded {host, version, photonAppId, …}

MainWindow.xaml holds all four views (first-run wizard, host, join, settings) as sibling panels; code-behind toggles Visibility to switch between them. No MVVM framework — direct event handlers in the code-behind read/write Backend/* services.

Build + run

cd launcher
dotnet run

Window opens immediately on the first-run wizard.

Publish a self-contained .exe

dotnet publish -c Release
# Output: bin\Release\net9.0-windows\win-x64\publish\dorknet.exe (~70 MB)

The published exe is what ships in GitHub Releases on main (use the launcher release workflow once it exists).

Dependencies on per-version branches

The launcher fetches release artifacts from GitHub Releases tagged on the per-version branches. See RELEASES.md for the exact naming convention each branch must follow.

Adding a new feature

  1. New backend logic → add to (or create) a Backend/*.cs class.
  2. New UI controls → add XAML in MainWindow.xaml.
  3. New event handlers → method in MainWindow.xaml.cs calling the backend service.

Keep code-behind handlers small: they marshal between WPF dispatcher thread + the backend services. Long work goes in Backend/*.