Skip to content

Launcher: out-of-game launcher with server selection#59

Merged
Kheartz merged 3 commits into
mainfrom
launcher_autoconnect
Jun 27, 2026
Merged

Launcher: out-of-game launcher with server selection#59
Kheartz merged 3 commits into
mainfrom
launcher_autoconnect

Conversation

@Kheartz

@Kheartz Kheartz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Adds a standalone windowed launcher (HogwartsMPLauncher.exe) that takes server selection out of the game and into a pre-launch step: browse/pick a server in a native CEF UI, and the launcher then injects the client and the game auto-connects — no in-game host/port entry.

  • A windowed CEF host that serves a React/TS UI over a custom secure hmp://app/ scheme. The UI is not bundled in the exe — it's fetched from a remote (GitHub Pages) into a local cache: fresh when online, last-good from cache when the network or our host is down, with a baked-in offline page (its own drag bar + close button, since the window is frameless). Fonts (Cinzel/Spectral) ship locally under files/data/ and serve from hmp://app/local/. Dev overrides: HOGWARTSMP_LAUNCHER_REMOTE (mirror a local server) / HOGWARTSMP_LAUNCHER_URL (Vite dev server).

  • Collapses the old two-exe model (UI exe spawns a separate injector) rites connect.json, arms a launch, and closes; then main() — afterCEF fully tears down — fetches the avatar pak and injects HogwartsMPClient.dll (a Steam relaunch + injection can't share the process with a live CEF message loop). The old standalone code/launcher injector is removed/absorbed. Notable: entry is main() not wWinMain (FrameworkLoader forces /ENTRY:mainCRTStartup, still windowed/no-console), and CEF children self-reexec this app so the custom scheme stays consistent. The injected client reads connect.json from its own module dir on the way through the Menu state and goes straight to connection, skipping the in-game prompt (kept as the fallback for direct dev injection). The file is consumed so a disconnect → menu doesn't reconnect-loop.

Net UX: run HogwartsMPLauncher.exe → pick a server → game launches, injects, auto-connects.

Kheartz added 3 commits June 27, 2026 12:31
Brings the windowed CEF launcher (HogwartsMP.exe) onto main and serves
its React UI over hmp://app/ by mirroring a remote build (GitHub Pages)
into a local cache: fresh when online, last-good when our hosting or the
network is down. Fonts ship next to the exe under files/data and serve
from hmp://app/local/ (MafiaMP convention), so there's no Google Fonts
dependency. The frameless offline placeholder carries its own drag strip
and close button.
One exe now does both the UI and the launch: code/launcher is folded into
HogwartsMPLauncher (renamed from HogwartsMP) and deleted. On connect the UI
writes connect.json, arms a launch, and closes; after CefShutdown() main()
fetches the avatar pak, injects HogwartsMPClient.dll, and starts the game.
Entry is main() not wWinMain — FrameworkLoader forces /ENTRY:mainCRTStartup
(+ /SUBSYSTEM:windows, so no console) — and CEF children self-reexec this
app so the hmp:// scheme + render-side router stay consistent.
The pre-launch launcher writes connect.json next to the client DLL; read it
on the way through the Menu state and go straight to SessionConnection,
skipping the manual prompt (kept as the fallback for direct dev injection).
Consume the file so a disconnect -> menu doesn't reconnect-loop.
@Kheartz Kheartz changed the title Launcher: merge the injector into the CEF launcher exe Launcher: out-of-game launcher with server selection Jun 27, 2026
@Kheartz Kheartz merged commit 1480c86 into main Jun 27, 2026
2 checks passed
@Kheartz Kheartz deleted the launcher_autoconnect branch June 27, 2026 17:43
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