Implement game launcher with crash analysis and backup improvements#6
Open
Implement game launcher with crash analysis and backup improvements#6
Conversation
Implements a complete launch-from-MCED feature allowing users to start Minecraft directly without switching to their launcher. Key changes: - New LaunchService.ts: direct Java launch with per-launcher support (Modrinth, Prism/MultiMC, CurseForge, vanilla fallback) - Auth tokens read from launcher storage (Prism accounts.json, Modrinth app.db, vanilla launcher_accounts.json); offline fallback - Java detection: launcher-bundled → JAVA_HOME → PATH → common paths - Version JSON + classpath resolution per launcher type - Cross-platform classpath separator fix (: on Linux/Mac, ; on Windows) - 4 IPC handlers: game:launch, game:kill, game:isRunning, game:getRunning - Preload API: launchGame, killGame, isGameRunning, getRunningGames - Header.tsx: Play/Stop button with 3s running-state poll - App.tsx landing page: Play button overlay on recent instance cards - LandingPage.tsx: onLaunchInstance prop + Play button overlay https://claude.ai/code/session_01G1cMMQeJbAj2BYdK1pP8LC
- Stream stdout/stderr from the Minecraft process to the renderer via IPC (LaunchService emits 'log' events → mainWindow.webContents.send) - Add onGameLog / removeGameLogListener to preload contextBridge API - New GameConsole component: scrollable log view with color-coded stdout (green), stderr (red), system (yellow) lines, timestamps, clear + download actions, auto-scroll with manual override - Header: ℹ info icon next to Play button shows tooltip warning that the instance must be launched in the original launcher at least once before using MCED launch (with offline-fallback note) - Header: Terminal button appears once game output arrives, opens the GameConsole modal https://claude.ai/code/session_01G1cMMQeJbAj2BYdK1pP8LC
## Backup System (ZIP-based) - backup:create now zips config/, kubejs/ and defaultconfigs/ with proper folder structure so restores work correctly and KubeJS scripts no longer appear as loose files in the backup dir - backup:restore extracts to instance root so all folders are restored - Added missing backup:rename IPC handler ## Game Launcher - JVM heap memory (max/min) is now configurable in Settings (Game Launch section) - Added jvmMaxMemory/jvmMinMemory to settingsStore (defaults: 4096/1024 MB) - LaunchService, IPC handler and preload all updated to pass -Xmx/-Xms from settings ## UI/UX - Sidebar collapse button: click the chevron on the sidebar edge to collapse/expand the mod list - SmartSearch filter pills: filter results by type (boolean/integer/float/string/enum/array) or "Changed only" - "Recently Changed" widget on landing page shows last 5 modified settings with mod name ## Config Editor - Reset to Defaults button: resets all settings in current config to their defaultValue - Presets: save/load named config presets via localStorage, accessible from toolbar dropdown ## New Format Support - HOCON parser added (HoconParser.ts) for .conf files used by older Forge mods - ConfigService.ts updated to detect .conf files as cfg format ## Mod Update Checker - UpdateCheckerService checks Modrinth for newer mod versions in the background after instance loads - updateStore (Zustand) caches results; update badges appear in ModListItem ## Crash Log Analyzer - New CrashAnalyzer.tsx component: drag & drop crash log .txt/.log - IPC handler crash:analyze extracts main cause, error patterns and mentioned mod IDs - Button in Header to open analyzer ## Modpack Export (.mrpack) - IPC handler export:modpack creates mrpack ZIP with modrinth.index.json manifest + config/ and kubejs/ as overrides - Export button in Header with prompt for pack name https://claude.ai/code/session_01G1cMMQeJbAj2BYdK1pP8LC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR re-implements the game launcher functionality that was previously removed, adds crash log analysis capabilities, improves backup management, and introduces update checking for mods. The launcher now supports multiple launcher types (Prism, MultiMC, Modrinth, Vanilla) with automatic authentication and Java detection.
Key Changes
Game Launcher (
LaunchService)LaunchServiceclass that handles Minecraft game launching with:Game Console UI
GameConsolecomponent for real-time game output monitoringCrash Analysis
CrashAnalyzercomponent for analyzing crash logsBackup Improvements
config/(main configuration folder)kubejs/(KubeJS scripts)defaultconfigs/(default configurations)backup:renameIPC handlerUpdate Checking
UpdateCheckerServicefor checking mod updatesupdateStorefor managing update stateConfiguration & Settings
UI Enhancements
IPC Handlers
game:launch- Launch a game instancegame:kill- Stop a running gamegame:isRunning- Check if instance is runninggame:getRunning- Get all running instancesgame:log- Event for game log outputbackup:rename- Rename a backupanalyzeCrashLog- Analyze crash log filesImplementation Details
releasefile in JRE roothttps://claude.ai/code/session_01G1cMMQeJbAj2BYdK1pP8LC