WebLaunch Overview
Relevant source files
The following files were used as context for generating this wiki page:
WebLaunch is a multi-game launcher system that enables users to start game clients via specialized web-to-desktop custom protocol handlers. The system integrates a Blazor WebAssembly frontend with a C# backend to manage game updates, authentication, and secure process injection.
The project primarily supports Final Fantasy XIV (FFXIV) and The Chronicles of Spellborn. It provides a robust framework for handling game-specific requirements like the Dalamud plugin system for FFXIV and registry-based installation tracking for Spellborn.
Sources: handlerlaunch/Program.cs:400-474, handlerlaunch/SupportObjects.cs:115-180
System Architecture
WebLaunch uses a decoupled architecture consisting of a web frontend, a protocol handler execution engine, and specialized library modules for game logic and UI.
Core Components
| Component | Responsibility |
|---|---|
| LaunchApp | A Blazor WebAssembly frontend that provides the user interface for initiating game launches. |
| WMConsole/handlerlaunch | The main desktop entry point that handles the HandleWebRequest custom protocol. |
| CoreLibLaunchSupport | Manages native process launching, ACL fixes, and FFXIV-specific authentication. |
| LibDalamud | Handles the lifecycle of the Dalamud plugin framework, including updates and injection. |
| SpinningWheelLib | Provides WPF-based progress windows and message boxes for desktop user feedback. |
Sources: LaunchApp/wwwroot/index.html:1-40, handlerlaunch/Program.cs:40-60, CoreLibLaunchSupport/Class1.cs:20-60, LibDalamud/Dalamud/DalamudLauncher.cs:15-30
Launch Request Flow
The following diagram illustrates the sequence of operations when a user initiates a launch from the web interface:
Protocol Handling and Execution
The system registers a custom URL protocol named HandleWebRequest in the Windows Registry to bridge web interactions with local execution.
Registry Registration
The RegisterProtocolHandler function creates the necessary registry keys under Software\Classes\HandleWebRequest. It sets the "URL Protocol" string and defines the shell command to point to WMConsole.exe.
Sources: handlerlaunch/Program.cs:173-189
Argument Parsing
The application parses incoming URI arguments to extract game-specific parameters. It uses the TextFollowing helper to isolate keys such as login=, pass=, hash=, and gamepath=.
Sources: handlerlaunch/Program.cs:73-83, handlerlaunch/SupportObjects.cs:415-460
Final Fantasy XIV Integration
The FFXIV module handles complex authentication and integrates the Dalamud plugin framework.
Authentication Logic
The FfxivAuthenticationService performs a multi-step login:
- Fetches a
_STORED_token from the Square Enix login page. - Posts credentials (username, password, OTP) to the SID endpoint.
- Validates the subscription and acquires a unique session identifier.
Sources: CoreLibLaunchSupport/Class1.cs:675-760
Process Injection and Security
WebLaunch uses a NativeProcessLauncher to start the game process in a suspended state. This allows the system to:
- Apply Access Control List (ACL) fixes to the process handle.
- Configure DPI awareness settings (
HighDPIAwareorDPIUnaware). - Disable
SeDebugPrivilegefor security. - Inject Dalamud hooks before resuming the primary thread.
Sources: CoreLibLaunchSupport/Class1.cs:195-260, CoreLibLaunchSupport/Class1.cs:330-360
Chronicles of Spellborn Support
The Spellborn supporter manages game updates and local file integrity via MD5 checksums.
Update Mechanism
The system fetches an updates.json file from a remote server to compare the installedVersion in the registry against the latest.json.
- Detection: Checks the registry key
Software\The Chronicles of Spellborn\installPath. - Download: Uses
WebClientto download zip patches if versions mismatch. - Verification: Validates the MD5 hash of downloaded files before extraction.
- Extraction: Overwrites existing files using
Ionic.Zip.
User Interface and Feedback
WebLaunch utilizes a WPF library (SpinningWheelLib) to display progress during long-running tasks like updates or authentication.
Progress and Message Windows
The Window1 class provides two modes:
- Progress Mode: Shows a circular indeterminate loader or a percentage-based progress bar for downloads.
- MessageBox Mode: Displays custom labels, list items (e.g., launch steps), and action buttons (OK/Cancel).
The system redirects standard console output to these WPF windows using a ConsoleOutputRedirector, ensuring that background logs are visible to the user in the desktop UI.
Sources: SpinningWheelLib/Window1.xaml.cs:90-150, handlerlaunch/Program.cs:17-45
Desktop Notifications
WebLaunch employs Microsoft.Toolkit.Uwp.Notifications to send Windows Toast notifications for lifecycle events such as "Application Started" or "FFXIV Launch".
Sources: handlerlaunch/Program.cs:265-274
Summary
WebLaunch provides a specialized bridge between web-based game management and local execution. By centralizing authentication, update logic, and process security into a protocol handler, it simplifies the launch experience for complex legacy and modern MMORPGs while maintaining granular control over the client environment.