Skip to content

Launcher

The launcher is the desktop face of PoZoUSEMS: it finds your Steam games, lists installed mods, and launches the injected game with one click.

Terminal window
cargo build -p usems-launcher
target\debug\usems-launcher.exe

The window shows:

  • Header — version + detection status
  • Right panel — re-detect button, injection-delay slider, LAUNCH
  • Center — every mod under <game>/mods/ with enable checkboxes
  • Bottom — rolling activity log

Detection scans every Steam library for the game’s appmanifest_<appid>.acf and verifies the executable actually exists inside installdir. Sources probed, in order:

  1. STEAM_PATH environment variable (override for portable installs)
  2. C:\Program Files (x86)\Steam
  3. HKCU\Software\Valve\Steam\SteamPath registry value
  4. Every additional library from that install’s libraryfolders.vdf
Game AppID Status
Portal 1 400 detected + launch-verified
more titles as caps land per title

First successful detection is persisted to %APPDATA%\PoZoUSEMS\launcher.toml:

game_dir = 'D:\!stem\steamapps\common\Portal'
inject_delay_ms = 12000

The mod list reads <game>/mods/*/mod.toml directly (same discovery rules as the core). The checkbox writes only the enabled = true/false line in the package’s manifest, preserving all other content byte-for-byte — comments survive. Unticked mods are skipped by the loader at next launch.

One click spawns the sibling usems-injector.exe with everything wired:

usems-injector --exe <game>\hl2.exe
--args "-game portal -steam -novid -console"
--dll <x86 usems_core.dll>
--delay 12000 --timeout 5000

Resolution order for both helper binaries: same directory as the launcher, then the cargo workspace target\... layouts (debug, then release). The core DLL must be the x86 build (i686-pc-windows-msvc) since Portal is a 32-bit process.

The injection delay slider exists because the engine needs time to map its DLLs before the core can arm (see Injection Pipeline timing table).

  • profiles: named enable/disable sets per game
  • mod browser: install-from-folder, delete packages
  • inject status feedback (watch injector exit code; tail core log)
  • release build bundling: launcher + injector + core in one zip