Build and Deploy

Windows launcher

Launcher/Crossworlds.Launcher is a WPF desktop application that checks for and applies updates before launching the game client.

Update behaviour

On startup, LauncherWindow calls Velopack's UpdateManager against the update feed at https://playcrossworlds.com/downloads/updates/win-x64. If an update is available it is downloaded and applied, then the launcher restarts the process with --updated passed through. If the update server is unreachable, the launcher enables the Play button immediately with the installed version.

When UpdateManager.IsInstalled is false (development build), the update check is skipped and the Play button is enabled without downloading anything.

Steam detection

The launcher treats a launch as Steam-managed when either:

  • The --distribution=steam command-line argument is present.
  • The SteamAppId environment variable is non-empty.

When Steam is detected, the update check is skipped (Steam manages its own patching) and Game/Crossworlds.exe is started with --distribution=steam. Otherwise --distribution=direct is passed.

Smoke test

Passing --smoke-test causes the launcher to verify that Game/Crossworlds.exe exists relative to its base directory, then exit with code 0 (found) or 2 (missing) without opening a window. Used in CI to confirm a packaged release is intact.

Windows installer build script

tools/build-windows-installer.ps1 produces a versioned Velopack installer release for the direct-download Windows distribution.

Prerequisites:

  • .tools\dotnet\dotnet.exe โ€” project-local .NET SDK. Must be installed before running the script.
  • build\WindowsClient\Crossworlds.exe โ€” a completed Unity Windows client build.

Usage:

.\tools\build-windows-installer.ps1 -Version 1.0.0

The -Version parameter must be a valid semver string.

Steps performed:

  1. Publishes the launcher project (Launcher/Crossworlds.Launcher) as a self-contained win-x64 executable to build\DirectRelease\launcher.
  2. Copies the launcher output and the game client (build\WindowsClient) into a staging directory.
  3. Runs vpk pack (Velopack CLI, restored as a dotnet local tool) to produce the release packages.

Output: build\DirectRelease\releases\ โ€” Velopack release packages.

Velopack fieldValue
Pack IDCrossworldsBCE
Main executableCrossworldsLauncher.exe
Pack titleCrossworlds - Beyond the Celestial Edge