aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri
Commit message (Collapse)AuthorAgeFilesLines
* Revert "chore(release): bump versions"苏向夜2026-02-253-12/+2
|
* chore(release): bump versionsgithub-actions[bot]2026-02-253-2/+12
|
* revert: revert release manually苏向夜2026-02-253-8/+2
|
* feat(tauri): update tauri product name苏向夜2026-02-251-1/+1
|
* chore(release): bump versionsgithub-actions[bot]2026-02-243-2/+8
|
* Revert "chore(release): bump versions"苏向夜2026-02-253-8/+2
|
* chore(release): bump versionsgithub-actions[bot]2026-02-243-2/+8
|
* chore: use semifold to release aur苏向夜2026-02-251-1/+0
|
* chore(release): bump versionsgithub-actions[bot]2026-02-243-3/+9
|
* chore(workspace): replace legacy codes苏向夜2026-02-251-3/+3
|
* feat: prepare for nightly alpha苏向夜2026-02-252-1/+13
|
* refactor: rewrite login and settings pages苏向夜2026-02-242-3/+5
|
* feat(macros): sort client api苏向夜2026-02-241-1/+6
|
* Clean up Cargo.toml by removing unused sections简律纯2026-02-231-7/+0
| | | Removed Debian package metadata and dependencies.
* Merge branch 'main' into refactor/migrate-to-react简律纯2026-02-235-0/+507
|\
| * Add modpack parsing and extraction for Modrinth, CurseForge, MultiMC (#100)SuperCCC2026-02-222-0/+490
| |
* | refactor(client): rewrite macros to generate client苏向夜2026-02-1818-249/+247
| |
| * chore: apply prek auto-fixes [skip ci]HsiangNianian2026-02-151-1/+1
| |
| * Fix Windows MinGW linker error with COFF resource compilation (#96)Copilot2026-02-153-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Description MinGW linker fails on `resource.lib` because `tauri-build` generates MSVC-format resources. MinGW requires COFF format. This PR adds conditional resource compilation using `embed-resource` for GNU targets. ## Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update - [ ] UI/UX improvement - [ ] Performance improvement - [ ] Code refactoring (no functional changes) - [ ] Configuration change - [ ] Test addition or update ## LLM-Generated Code Disclosure - [x] This PR contains LLM-generated code, and I **provide** quality assurance - [ ] This PR contains LLM-generated code, and I **do not provide** quality assurance - [ ] This PR does not contain LLM-generated code ## Related Issues Fixes the Windows x86_64-pc-windows-gnu build failure in CI (Job ID: 63620685213) ## Changes Made ### Backend (Rust) - N/A ### Frontend (Svelte) - N/A ### Configuration - **src-tauri/Cargo.toml**: Added `embed-resource = "2.4"` as target-specific build dependency for `cfg(all(windows, target_env = "gnu"))` - **src-tauri/build.rs**: Added conditional resource compilation - calls `embed_resource::compile()` for MinGW, preserves `tauri_build::build()` for all targets - **src-tauri/icon.rc**: Created Windows resource file referencing `icons/icon.ico` **Key implementation**: ```rust fn main() { #[cfg(all(windows, target_env = "gnu"))] { embed_resource::compile("icon.rc", embed_resource::NONE); } tauri_build::build() } ``` **Impact**: MSVC builds unchanged, Linux/macOS unaffected (dependency not loaded), MinGW builds now generate COFF-compatible resources. ## Testing ### Test Environment - **OS**: Ubuntu 22.04 (Linux validation) - **DropOut Version**: 0.2.0-alpha.1 - **Minecraft Version Tested**: N/A (build-only fix) - **Mod Loader**: N/A ### Test Cases - [ ] Tested on Windows - [ ] Tested on macOS - [x] Tested on Linux - [ ] Tested with vanilla Minecraft - [ ] Tested with Fabric - [ ] Tested with Forge - [ ] Tested game launch - [ ] Tested authentication flow - [ ] Tested Java detection/download ### Steps to Test 1. Run `cargo check` on Linux (verified - passes) 2. CI validation pending: `semifold-ci.yaml` "Windows x86_64 (GNU)" job should complete without linker errors 3. Manual Windows MinGW build verification recommended ## Checklist ### Code Quality - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings or errors ### Testing Verification - [x] I have tested my changes locally - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] I have tested on at least one target platform ### Documentation - [x] I have updated the documentation accordingly - [ ] I have updated the README if needed - [x] I have added/updated code comments where necessary ### Dependencies - [x] I have checked that no unnecessary dependencies were added - [x] All new dependencies are properly documented - [x] `Cargo.lock` and/or `pnpm-lock.yaml` are updated (if dependencies changed) ## Screenshots / Videos N/A - build configuration change only ## Additional Notes - Target-specific dependency prevents unnecessary bloat on non-Windows platforms - `embed-resource` generates COFF format compatible with `x86_64-w64-mingw32-gcc` - No runtime code changes - purely build-time fix ## Breaking Changes None. Fully backward compatible. --- **For Maintainers:** - [ ] Code review completed - [ ] CI checks passing - [ ] Ready to merge <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > ## Problem > > The Windows x86_64-pc-windows-gnu build is failing in the CI/CD pipeline with a linker error: > > ``` > error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1 > note: D:\a\DropOut\DropOut\target\x86_64-pc-windows-gnu\release\build\dropout-d2b2a5095bbadd51\out\resource.lib: file not recognized: file format not recognized > ``` > > This occurs because `tauri-build` generates `resource.lib` in a format incompatible with the MinGW (GNU) toolchain. The file is likely being created in MSVC format instead of the COFF format required by MinGW. > > **Failing Job:** https://github.com/HydroRoll-Team/DropOut/actions (Job ID: 63620685213) > **Commit:** e6eb1bd0111d40b3b1fd39fafd583ce5dbf30f03 > **Target:** x86_64-pc-windows-gnu > > ## Solution > > Update the `build.rs` file to conditionally use `embed-resource` crate when building for the GNU toolchain, which properly generates MinGW-compatible resource files. > > ### Changes Required > > 1. **Update `src-tauri/Cargo.toml`**: Add `embed-resource` as a build dependency for Windows GNU targets > 2. **Update `src-tauri/build.rs`**: Implement conditional resource compilation: > - Use `embed-resource` for `x86_64-pc-windows-gnu` target > - Continue using default `tauri-build` for MSVC targets > > ### Implementation Details > > **src-tauri/Cargo.toml** - Add to `[build-dependencies]`: > ```toml > [build-dependencies] > tauri-build = { version = "2.0", features = [] } > embed-resource = "2.4" > ``` > > **src-tauri/build.rs** - Replace current content: > ```rust > fn main() { > // For MinGW targets, use embed-resource to generate proper COFF format > #[cfg(all(windows, target_env = "gnu"))] > { > embed_resource::compile("icon.rc", embed_resource::NONE); > } > > tauri_build::build() > } > ``` > > If `icon.rc` doesn't exist, create **src-tauri/icon.rc**: > ```rc > 1 ICON "icons/icon.ico" > ``` > > ### Testing > > After this fix: > - Windows MSVC builds should continue working as before > - Windows GNU (MinGW) builds should successfully link without the "file format not recognized" error > - The generated resource.lib will be in COFF format compatible with `x86_64-w64-mingw32-gcc` > > ### References > > - Tauri issue tracker (similar issues): https://github.com/tauri-apps/tauri/issues > - embed-resource crate: https://crates.io/crates/embed-resource > - MinGW resource compilation: https://sourceforge.net/p/mingw-w64/wiki2/windres/ > </details> <!-- START COPILOT CODING AGENT SUFFIX --> *This pull request was created from Copilot chat.* > <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/HydroRoll-Team/DropOut/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: HsiangNianian <44714368+HsiangNianian@users.noreply.github.com>
* | merge: dev苏向夜2026-02-152-27/+34
| |
* | feat(java): add mise version manager support and refactor detection logicBegonia, HE2026-01-304-12/+76
| | | | | | | | | | | | | | | | | | | | - Add scan_java_dir() helper to filter symlinks and scan directories - Implement find_mise_java() for ~/.local/share/mise/installs/java/ - Refactor find_sdkman_java() to scan candidates dir instead of 'current' - Fix import paths to use absolute crate::core::java:: paths - Add mise detection to Linux and macOS candidates Reviewed-by: Claude Sonnet 4.5
* | refactor: add TypeScript support to account storage structuresHsiangNianian2026-01-301-3/+21
| |
* | refactor: add TypeScript support to JavaConfig structHsiangNianian2026-01-301-3/+7
| |
* | refactor(java): add TypeScript support to Java data structuresHsiangNianian2026-01-301-4/+21
| |
* | refactor(java): enhance Adoptium structs with TypeScript supportHsiangNianian2026-01-301-5/+26
| |
* | fix: resolve rebase conflicts and compilation errorsBegonia, HE2026-01-295-138/+152
| | | | | | | | | | | | | | | | | | | | | | | | - 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-295-20/+140
| | | | | | | | | | | | | | | | | | | | - 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): implement cache versioning, size limits, and automatic cleanupBegonia, HE2026-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add CACHE_VERSION constant for cache format compatibility tracking - Add MAX_CACHE_SIZE_BYTES limit (10 MB) to prevent unbounded cache growth - Add cache_version field to JavaCatalog struct with default value - Implement cache version validation in load_cached_catalog() - Implement cache size enforcement in save_catalog_cache() - Add cleanup_expired_caches() for background cache cleanup - Add enforce_cache_size_limit() to validate cache file sizes - Add is_cache_version_compatible() helper function - Automatically clean up expired caches on load and clear operations - Validate cache version before using cached data Fixes: - Cache expiration without automatic cleanup (now cleaned on load) - Missing cache version control (now validates format compatibility) - Unbounded cache size growth (now limited to 10 MB) Reviewed-by: Claude 3.5 Sonnet
* | feat(java): Enhance Java detection and error handlingBegonia, HE2026-01-294-33/+121
| | | | | | | | | | | | | | | | | | | | | | | | - 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-296-182/+133
| | | | | | | | | | | | | | | | | | | | | | - 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): replace unwrap with expect for better error handlingBegonia, HE2026-01-291-1/+6
| | | | | | | | | | | | Replace potentially panicking unwrap() call with expect() that includes a descriptive error message to aid debugging if the edge case occurs. Reviewed-by: Claude Sonnet 4.5
* | refactor(java): suppress dead code warnings and improve detectionBegonia, HE2026-01-294-16/+19
| | | | | | | | | | | | | | | | | | - Add #[allow(dead_code)] attributes to utility functions - Improve 64-bit detection with case-insensitive check - Support aarch64 architecture in bitness detection - Add TODO for future vendor expansion Reviewed-by: Claude Sonnet 4.5
* | refactor(java): address Sourcery AI code review feedbackBegonia, HE2026-01-294-84/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Centralize strip_unc_prefix into java/mod.rs to eliminate duplication across detection.rs and validation.rs - Remove unused JAVA_CHECK_TIMEOUT constant from validation.rs - Implement actual timeout mechanism in run_which_command_with_timeout() using try_wait() loop - Parallelize Adoptium API requests for better catalog fetch performance Fixes: - Multiple strip_unc_prefix implementations consolidated - Timeout constant now properly enforced in which/where command execution - Catalog fetching now uses concurrent tokio::spawn tasks instead of sequential await Reviewed-by: Claude Sonnet 4.5
* | refactor(java): modularize Java detection and management systemBegonia, HE2026-01-2912-1125/+1354
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | docs(java): add TODO comment for refactoring candidate detectionBegonia, HE2026-01-291-0/+2
| | | | | | | | Reviewed-by: Claude-Sonnet-4.5
* | feat(ui): add new ui project苏向夜2026-01-231-3/+3
| |
* | feat(ts-bindings): fix ts bindings naming convention苏向夜2026-01-2311-0/+48
| |
* | feat(ts-bindings): fix ts bindings naming convention苏向夜2026-01-2111-103/+76
| |
* | fix(fabric): Add untagged attribute to FabricMainClass enum exportHsiangNianian2026-01-212-2/+3
| |
* | fix: Update ts_rs import to include SerializeHsiangNianian2026-01-211-1/+1
| |
* | fix(auth): Remove commented-out prism's Client ID from auth.rsHsiangNianian2026-01-211-1/+0
| |
* | fix(deps): Update ts-rs dependency to include serde-compat featureHsiangNianian2026-01-211-1/+1
| |
* | fix: Update TypeScript export paths to reflect new directory structureHsiangNianian2026-01-2111-58/+76
| |
* | feat: Add TypeScript support to data structures using ts-rs for type generationHsiangNianian2026-01-2111-61/+276
| |
* | chore(deps): Add ts-rs dependency version 11.1.0HsiangNianian2026-01-201-0/+1
|/
* Potential fix for code scanning alert no. 3: Cleartext logging of sensitive ↵简律纯2026-01-191-1/+1
|\ | | | | | | information (#71)
| * 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(ui): refactor workspace to monorepo苏向夜2026-01-191-1/+1
|/
* Merge branch 'main' into chore/migrate-repository苏向夜2026-01-1911-166/+930
|\
| * chore(release): bump versionsgithub-actions[bot]2026-01-194-3/+10
| |