Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CollapseLauncher/Collapse/llms.txt
Use this file to discover all available pages before exploring further.
Collapse Launcher is a WinUI 3 application targeting .NET 10 on Windows x64. The codebase is organized around a set of C# interfaces that decouple per-game implementations from the UI and core logic.
Top-level structure
CollapseLauncher/ # Main WinUI 3 app project
├── XAMLs/ # UI pages and windows
│ ├── MainApp/Pages/ # HomePage, RepairPage, CachesPage, SettingsPage, etc.
│ ├── MainApp/Pages/OOBE/ # First-run setup flow
│ └── MainApp/Pages/GameSettingsPages/ # Per-game settings editors
├── Classes/
│ ├── GameManagement/ # Game settings, versioning, playtime, backgrounds
│ ├── InstallManagement/ # Download, install, move, uninstall per game
│ ├── RepairManagement/ # File integrity check and repair per game
│ ├── CachesManagement/ # Pre-update cache download per game
│ ├── Plugins/ # Plugin loader, wrappers, lifecycle
│ ├── Interfaces/ # Core C# contracts
│ ├── Helper/ # HTTP client, metadata, update, locale, speed limiter
│ └── DiscordPresence/ # Discord Rich Presence manager
Core interfaces
All per-game functionality is expressed through interfaces. This is what makes adding support for a new game (or a plugin) possible without touching the UI.
| Interface | Purpose |
|---|
IGameVersion | Version detection, game state, INI config management |
IGameInstallManager | Download, verify, install, move, preload, uninstall |
IRepair | File integrity check and automated repair |
ICache | Pre-update settings cache download |
IGameSettings | Read/write game graphics and audio settings from/to the registry |
IGamePlaytime | Track and persist per-game playtime |
ILauncherApi | Abstraction over the HoYoPlay API (and plugin API wrapper) |
IBackgroundActivity | Common interface for background download tasks |
Per-game implementations
Each game has its own implementation of the install, repair, and settings interfaces:
InstallManagement/
├── Base/ # InstallManagerBase — Sophon, HDiffPatch, package download shared logic
├── Honkai/ # HonkaiInstall — delta-patch, Steam↔Global migration
├── Genshin/ # GenshinInstall — voice-line language selection
├── StarRail/ # StarRailInstall — Sophon patch protocol
└── Zenless/ # ZenlessInstall — Sophon patch protocol
RepairManagement/
├── HonkaiV2/ # Block/audio/generic check+repair
├── Genshin/ # Includes persistent audio and cutscene repair
├── StarRailV2/ # Sophon-aware repair
└── Zenless/ # Zenless repair pipeline
Plugin system
The plugin subsystem lives in CollapseLauncher/Classes/Plugins/. Plugins are native libraries (or NativeAOT .NET assemblies) loaded via NativeLibrary. Collapse wraps each plugin’s COM interfaces behind internal wrapper classes so the rest of the UI code sees the same IGameInstallManager, IRepair, etc. interfaces as for built-in games.
See Plugin Development for full details.
Helper libraries (submodules)
| Library | Role |
|---|
Hi3Helper.Sophon | Chunked differential download engine |
Hi3Helper.Http | Multi-session HTTP download with progress |
Hi3Helper.EncTool | Encryption/hashing for cache integrity |
Hi3Helper.Win32 | Win32 P/Invoke helpers |
Hi3Helper.Plugin.Core | Plugin SDK — COM interface definitions |
Hi3Helper.SharpDiscordRPC | Discord Rich Presence |
Hi3Helper.Core | Shared logger, locale JSON, preset config |
CI/CD pipeline
| Workflow | Trigger | Output |
|---|
build.yml | Push/PR to main | Canary debug build, Discord notification |
release-signed.yml | Manual (on preview/stable branch) | Signed NativeAOT release via SignPath.io |
release-winget.yml | Post-release | Updates WinGet manifest |
qodana-scan.yml | Push/PR | JetBrains Qodana code quality analysis |
snyk-security.yml | Scheduled | Dependency vulnerability scanning |
vt-scan-releases.yml | Post-release | VirusTotal scan of release artifacts |
Start by reading the IGameInstallManager and IRepair interfaces in CollapseLauncher/Classes/Interfaces/ — they are the clearest entry point to understanding how per-game logic is structured.