Skip to main content

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.
InterfacePurpose
IGameVersionVersion detection, game state, INI config management
IGameInstallManagerDownload, verify, install, move, preload, uninstall
IRepairFile integrity check and automated repair
ICachePre-update settings cache download
IGameSettingsRead/write game graphics and audio settings from/to the registry
IGamePlaytimeTrack and persist per-game playtime
ILauncherApiAbstraction over the HoYoPlay API (and plugin API wrapper)
IBackgroundActivityCommon 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)

LibraryRole
Hi3Helper.SophonChunked differential download engine
Hi3Helper.HttpMulti-session HTTP download with progress
Hi3Helper.EncToolEncryption/hashing for cache integrity
Hi3Helper.Win32Win32 P/Invoke helpers
Hi3Helper.Plugin.CorePlugin SDK — COM interface definitions
Hi3Helper.SharpDiscordRPCDiscord Rich Presence
Hi3Helper.CoreShared logger, locale JSON, preset config

CI/CD pipeline

WorkflowTriggerOutput
build.ymlPush/PR to mainCanary debug build, Discord notification
release-signed.ymlManual (on preview/stable branch)Signed NativeAOT release via SignPath.io
release-winget.ymlPost-releaseUpdates WinGet manifest
qodana-scan.ymlPush/PRJetBrains Qodana code quality analysis
snyk-security.ymlScheduledDependency vulnerability scanning
vt-scan-releases.ymlPost-releaseVirusTotal 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.

Build docs developers (and LLMs) love