aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri/src/main.rs
Commit message (Collapse)AuthorAgeFilesLines
* fix(macro): update ts export macroHsiangNianian2026-03-181-1/+2
| | | | https://github.com/HydroRoll-Team/DropOut/pull/117#discussion_r2922886584
* Potential fix for pull request finding简律纯2026-03-181-6/+11
| | | Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* feat(instance): finish multi instances systemHsiangNianian2026-03-121-449/+669
|
* feat: prepare for nightly alpha苏向夜2026-02-251-1/+12
|
* refactor(client): rewrite macros to generate client苏向夜2026-02-181-9/+76
|
* merge: dev苏向夜2026-02-151-0/+1
|
* fix: resolve rebase conflicts and compilation errorsBegonia, HE2026-01-291-1/+0
| | | | | | | | | | | | - Export JavaError from java module - Fix type mismatches in Adoptium provider methods - Add type annotations for reqwest json() calls - Remove non-existent cache_version field from JavaCatalog - Fix resolve_java_for_launch call signature (remove extra window param) - Add error conversion to String for Tauri commands - Fix import for save_catalog_cache in adoptium.rs Reviewed-by: Claude Sonnet 4.5
* refactor(java): improve error handling and loggingBegonia, HE2026-01-291-0/+1
| | | | | | | | | | - Extract JavaError to dedicated error.rs module - Add serde defaults for JavaInstallation optional fields - Replace unwrap() with proper error propagation - Add detailed logging for Java resolution priority chain - Improve error mapping in validation (NotFound vs VerificationFailed) Reviewed-by: Claude Sonnet 4.5
* feat(java): Enhance Java detection and error handlingBegonia, HE2026-01-291-5/+15
| | | | | | | | | | | | - Added support for detecting Java installations from SDKMAN! in `find_sdkman_java`. - Improved `run_which_command_with_timeout` to handle command timeouts gracefully. - Introduced a unified `JavaError` enum for consistent error handling across Java operations. - Updated functions to return `Result` types instead of `Option` for better error reporting. - Enhanced `load_cached_catalog` and `save_catalog_cache` to use `JavaError`. - Refactored `fetch_java_catalog`, `fetch_java_release`, and `fetch_available_versions` to return `JavaError`. - Improved validation functions to return detailed errors when checking Java installations. - Added tests for version parsing and compatibility checks. - Updated `resolve_java_for_launch` to handle instance-specific and global Java paths.
* refactor(java): simplify version compatibility logic and improve error handlingBegonia, HE2026-01-291-101/+50
| | | | | | | | | | | - Extract version compatibility check into shared validation function - Remove duplicated version checking code across multiple modules - Simplify Java detection timeout logic in detection.rs - Expand vendor detection to support more JDK distributions (Dragonwell, Kona, Semeru, BiSheng, etc.) - Refactor start_game to use priority-based Java resolution - Improve error handling in Adoptium provider task collection Reviewed-by: Claude Sonnet 4.5
* refactor(java): modularize Java detection and management systemBegonia, HE2026-01-291-6/+14
| | | | | | | | | | | | | | | | - Split monolithic java.rs (1089 lines) into focused modules - detection: Java installation discovery - validation: Version validation and requirements checking - priority: Installation selection priority logic - provider: Java download provider trait - providers: Provider implementations (Adoptium) - persistence: Cache and catalog management - Add java_path_override field to Instance struct for per-instance Java configuration - Export JavaInstallation at core module level This refactoring improves maintainability and prepares for multi-vendor Java provider support. Reviewed-by: Claude Sonnet 4.5
* feat(ts-bindings): fix ts bindings naming convention苏向夜2026-01-231-0/+6
|
* feat(ts-bindings): fix ts bindings naming convention苏向夜2026-01-211-24/+6
|
* fix(fabric): Add untagged attribute to FabricMainClass enum exportHsiangNianian2026-01-211-1/+1
|
* fix: Update ts_rs import to include SerializeHsiangNianian2026-01-211-1/+1
|
* fix: Update TypeScript export paths to reflect new directory structureHsiangNianian2026-01-211-6/+9
|
* feat: Add TypeScript support to data structures using ts-rs for type generationHsiangNianian2026-01-211-7/+29
|
* Potential fix for code scanning alert no. 3: Cleartext logging of sensitive ↵简律纯2026-01-191-1/+1
| | | | | information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* chore(release): bump versionsgithub-actions[bot]2026-01-191-1/+1
|
* feat(backend): enhance instance management for editor supportHsiangNianian2026-01-181-6/+121
| | | | | | | - Sync instance.version_id after start_game, install_fabric, install_forge - Add jvm_args_override and memory_override to Instance struct - Add file management commands: list_instance_directory, delete_instance_file, open_file_explorer - Support per-instance settings overrides (Java args, memory)
* feat(migration): implement shared cache migration with SHA1 dedupHsiangNianian2026-01-181-1/+51
| | | | | | | | - Add migrate_to_shared_caches() with hard link preference - SHA1-based deduplication across all instances - Copy fallback for cross-filesystem scenarios - Auto-enable use_shared_caches after successful migration - UI shows statistics: moved files, hardlinks/copies, MB saved
* fix(ci): improve pre-commit fmt hook configurationHsiangNianian2026-01-181-67/+163
| | | | | | - Add pass_filenames: false to fmt hook - Add -- separator for cargo fmt args - Manually format code with cargo fmt
* fix: complete Instance/Profile System isolation and state managementHsiangNianian2026-01-181-7/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Overview Fixed critical multi-instance isolation bugs where versions, mod loaders, and instance state were not properly isolated between instances. These changes ensure full data isolation and consistent instance metadata. ## Bug Fixes - P0 (Critical Isolation Issues) ### 1. Backend: get_versions() command isolation - Problem: Used global app_data_dir instead of instance-specific game_dir - Fix: Added instance_id parameter, now queries instance.game_dir - Impact: Versions are now properly isolated per instance ### 2. Frontend: delete_version missing instanceId - Problem: Frontend passed only versionId, not instanceId - Fix: Updated VersionsView.svelte to pass instanceId parameter - Impact: Version deletion now targets correct instance ### 3. Frontend: get_version_metadata missing instanceId - Problem: Metadata queries didn't specify which instance to check - Fix: Updated VersionsView.svelte to pass instanceId parameter - Impact: Version info displayed per-instance correctly ### 4. Frontend: Instance switching doesn't refresh versions - Problem: Switching instances didn't reload version list - Fix: Added $effect hook in GameState to watch activeInstanceId changes - Impact: Version list auto-refreshes on instance switch ## Bug Fixes - P1 (State Synchronization) ### 5. Backend: install_fabric doesn't update Instance.mod_loader - Problem: Instance.mod_loader field wasn't updated after installation - Fix: Added instance_state.update_instance() call - Impact: Instance metadata stays in sync ### 6. Backend: install_forge doesn't update Instance.mod_loader - Problem: Instance.mod_loader field wasn't updated after installation - Fix: Added instance_state.update_instance() call - Impact: Instance metadata stays in sync ### 7. Backend: delete_version doesn't clean up Instance state - Problem: Deleting version didn't clear Instance.version_id or .mod_loader - Fix: Added cleanup logic to clear stale references - Impact: Instance state remains valid after deletion ## Testing - Added comprehensive integration tests in instance_isolation_tests.rs - Tests document 10 key scenarios for multi-instance isolation - All code compiles cleanly with no errors
* fix(auth): add token expiry check in start_gameHsiangNianian2026-01-181-1/+30
| | | | | | | | | Check if the Microsoft account token is expired before attempting to launch the game. If expired, attempt to refresh using the refresh_token. If refresh fails, return an error instructing the user to login again. Also removed #[allow(dead_code)] from is_token_expired since it's now actively used.
* fix(forge): check if installer created version JSON before manual creationHsiangNianian2026-01-181-4/+22
| | | | | | | The Forge installer may or may not create the version.json file depending on the installer version. Check if the file exists after running the installer before manually creating it to avoid overwriting any installer-generated configuration.
* feat: implement instance management features and enhance game launch processHsiangNianian2026-01-161-72/+188
| | | | Added functionality for managing game instances, including creating, deleting, updating, and duplicating instances. Integrated instance selection into the game launch process, allowing users to specify the instance when starting a game. Updated the main application logic to handle instance states and paths, ensuring proper directory management for each instance. Introduced a new module for instance management and updated relevant commands to support instance-specific operations.
* feat: enhance Java version management for Minecraft versionsHsiangNianian2026-01-161-24/+359
| | | | Added functionality to determine and validate the required Java version for Minecraft versions, including checks for compatibility with older versions. Implemented event emissions for version installation and deletion, and updated the UI to reflect Java version requirements and installation status. Improved version metadata handling and added support for deleting versions.
* Merge pull request #53 from BegoniaHe/fix/windows-java-path简律纯2026-01-161-4/+20
|\
* | fix: update logging for Java arguments in game start functionHsiangNianian2026-01-161-1/+1
| | | | | | | | Modified the logging statement in the start_game function to display all Java arguments instead of just the first ten, improving debugging capabilities.
| * fix(windows): resolve Java executable path issues on WindowsBegonia, HE2026-01-161-4/+20
|/ | | | | | | | | | | | | | - Add normalize_java_path utility function with Windows-specific handling - Automatically append .exe extension when missing on Windows - Use 'where' command to locate java.exe in PATH if not found - Improve error messages with full path display for debugging - Apply path normalization in both start_game and install_forge commands This fixes the "Failed to launch java: program not found" error on Windows by properly handling Java executable paths, including relative paths, missing extensions, and PATH resolution. Reviewed-by: Claude Sonnet 4.5
* feat: integrate AI assistant functionality and configuration managementHsiangNianian2026-01-161-27/+141
| | | | Implemented new commands for managing the AI assistant, including health checks, chat interactions, and model listings for both Ollama and OpenAI. Enhanced the configuration system to support raw JSON editing and added a dedicated AssistantConfig structure for better management of assistant settings. This update significantly improves the user experience by providing comprehensive control over AI interactions and configurations.
* fix(security): Potential fix for code scanning alert no. 3: Cleartext ↵简律纯2026-01-161-5/+1
| | | | | logging of sensitive information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* feat: Enhance Forge installation process by fetching installer manifest and ↵HsiangNianian2026-01-151-3/+41
| | | | improving library management for better compatibility
* feat: Implement local version fetching and enhance version type detection to ↵HsiangNianian2026-01-151-34/+60
| | | | support modpacks in version management
* feat: Add functionality to list installed game versions in the application, ↵HsiangNianian2026-01-151-0/+89
| | | | enhancing version management and user experience in BottomBar
* feat: Add version installation and check functionality to enhance mod loader ↵HsiangNianian2026-01-151-0/+290
| | | | support in the application
* feat: Implement upload_to_pastebin command for log file uploads with content ↵HsiangNianian2026-01-151-1/+79
| | | | length validation and support for Pastebin and paste.rs services
* fix: Clean up main.rs by removing unused imports and updating variable names ↵HsiangNianian2026-01-151-2/+2
| | | | for clarity; enhance HomeView.svelte by correcting emoji processing logic
* feat: Implement get_github_releases command to fetch and serialize GitHub ↵HsiangNianian2026-01-151-1/+48
| | | | release data
* feat(java): Implement Java catalog management and download featuresBegonia, HE2026-01-151-0/+52
| | | | | | | | - Added commands to fetch and refresh the Java catalog, cancel downloads, and manage pending downloads. - Enhanced the Java download modal in the UI to support version selection, download progress, and pending downloads. - Introduced new types for Java catalog, download progress, and pending downloads. - Updated settings store to handle Java catalog state, download progress, and pending downloads. - Improved user experience with loading states, error handling, and status notifications for Java installations.
* fix: change Java installation path to use Tauri app handle for directory accessBegonia, HE2026-01-151-3/+4
|
* fix: update JVM argument handling to set sha256 to NoneBegonia, HE2026-01-151-1/+2
|
* Apply suggestion from @Copilot简律纯2026-01-151-1/+1
| | | Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: add missing sha256 field to DownloadTask for Maven librariesBegonia, HE2026-01-141-0/+1
|
* Merge main into feat/download-java-rtBegonia, HE2026-01-141-101/+359
|\ | | | | | | | | | | | | - Integrate latest main branch changes (Fabric, Forge support, new UI) - Keep Adoptium Java download feature with SHA256 support - Merge improved download progress tracking with checksum verification - Update dependencies and build configuration
| * feat: enhance dark mode support across UI componentsHsiangNianian2026-01-141-4/+0
| | | | | | | | | | | | | | | | - Updated BottomBar, HomeView, LoginModal, ModLoaderSelector, SettingsView, Sidebar, StatusToast, and VersionsView components for improved dark mode styling. - Adjusted color schemes for various elements to ensure better visibility and aesthetics in dark mode. - Added a theme property to settings to enforce dark mode as the default. - Refactored version badges in VersionsView for better color differentiation. - Enhanced button and input styles for consistency in both light and dark themes.
| * feat: Enhance UI components and add visual effectsHsiangNianian2026-01-141-0/+1
| | | | | | | | | | | | | | | | | | - Updated Sidebar component styles for improved aesthetics and usability. - Refactored VersionsView component with a new layout and enhanced version filtering. - Improved DownloadMonitor and GameConsole components for better performance and visual consistency. - Added new settings for GPU acceleration and visual effects in settings store. - Introduced ParticleBackground component with customizable effects (Constellation and Saturn). - Implemented ConstellationEffect and SaturnEffect classes for dynamic background animations.
| * refactor: clean up formatting and improve readability in core modulesHsiangNianian2026-01-141-19/+16
| |
| * feat: enhance start_game function to support modded versions and add Fabric ↵HsiangNianian2026-01-141-38/+208
| | | | | | | | and Forge commands
| * Add documentation to clarify placeholder detection logiccopilot-swe-agent[bot]2026-01-141-5/+12
| | | | | | | | Co-authored-by: HsiangNianian <44714368+HsiangNianian@users.noreply.github.com>