Skip to content

Fix #445: run Windows installs as hex-voice.exe so Discord stops matching Hex - #1411

Open
thdxr wants to merge 1 commit into
devfrom
fix/discord-hex-shards-detection
Open

thdxr wants to merge 1 commit into
devfrom
fix/discord-hex-shards-detection

Conversation

@thdxr

@thdxr thdxr commented Nov 5, 2026

Copy link
Copy Markdown
Member

Discord's game detection matches a running hex.exe to HEX: Shards of Fate. Discord's detectable list has exactly one entry with that executable: app 496778870104653824, "executables": [{"name": "hex.exe", "os": "win32"}]. Hex's managed install ran exactly that name, so Discord showed the game for as long as Hex ran (#445).

Windows installs now run hex-voice.exe. The release artifact is still built and published as hex.exe; only the installed name changes.

  • hex in a terminal still works: %APPDATA%\hex\bin\hex.com is on PATH and starts hex-voice.exe beside current-version, falling back to hex.exe for releases before this change.
  • The updater stages versions\<version>\hex-voice.exe and never writes hex.exe again. Update identity is the executable's SHA-256, which the rename doesn't change.
  • An install a pre-fix updater staged as hex.exe copies itself to hex-voice.exe on its first launch (only when it is the version current-version names, so a stale version can't take the launch surfaces), repoints the managed Start Menu shortcut and Launch at login, and relaunches before claiming the single instance. A failure keeps the old copy running and retries on the next launch.
  • The Inno installer, install-windows.ps1, the uninstaller's process stop, the console entry point, and the installer test use the new name. AppId, the receipt, current-version, and the published artifact names are untouched.
  • docs/windows.md, the Windows feature map, and the release docs record the reason and the migration.

Tests: cargo test --bin hex updater:: (32 pass) and the new install_name layout test; crates/console tests find both names; the Windows-only updater tests (activation_names_the_executable_for_discord_and_keeps_the_old_version, the_renamed_copy_is_complete_or_absent) compile under xwin and run in Check Windows. cargo clippy --bin hex --all-targets -D warnings passes on Linux and for x86_64-pc-windows-msvc; scripts/code-shape.py --check passes. No live Discord check was run.

Discord's game detection matches a running process named hex.exe to the
Steam game HEX: Shards of Fate, so the app was shown as that game for as
long as Hex ran. The detectable list has exactly one entry with that bare
executable, which is why the managed install matched.

Windows now installs and runs hex-voice.exe. A terminal still runs hex:
PATHEXT resolves it to hex.com, which starts the GUI executable beside it.
Releases before the rename were staged as hex.exe by their own updater, so
the app copies such an install to the new name, repoints the Start Menu
shortcut and Launch at login, and relaunches before claiming the single
instance. The installer, script installer, updater, console entry point,
and docs use the new name; the published artifact stays hex.exe.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant