`game::java::discover::path_key` 只在 `cfg!(windows)` 分支折分隔符,POSIX 上 把 `C:\a\b\java.exe` 原样留成带反斜杠的键,与 `C:/a/b/java.exe` 不同键 → `dedupe` 不去重。三条用例(Windows 语义无 cfg 门)因此在 `test (ubuntu-latest)` 挂:`path_key_normalises_separators`、 `dedupe_keeps_the_higher_priority_source`、 `java_discover::dedupe_collapses_one_install_found_twice`。 - `path_key`:`\?\` 前缀剥离与分隔符折成 `/` 改为**与平台无关**(同一个 `bin/java[.exe]` 用哪种拼法都是同一个文件,键必须相同);大小写折叠仍只有 Windows 做——POSIX 上 `Java` 与 `java` 是两个目录,折了会把两份真实安装误并。 已知取舍写进文档:POSIX 上文件名里的字面反斜杠会一并被当分隔符。 - 三条用例:不靠 `#[cfg(windows)]` 跳过。`path_key` 单测改成平台无关断言 + 大小写折叠的双侧断言(Windows 折 / POSIX 不折,两侧都钉住);集成用例的 「同一路径第二种写法」按平台给(Windows 用大小写+分隔符,POSIX 用分隔符)。 - 回归钉子:新增 `one_install_normalises_to_one_key_whatever_the_spelling` (普通写法 / 反斜杠写法 / `\?\` 前缀写法 / 混合写法 四种拼法同键)与 `path_key_folds_case_only_where_the_filesystem_does`。 验证:Linux(rust:1-bookworm 容器,ull-linux-target 热缓存) `cargo test -p unlucky-core --lib --test game` → 224 + 120 passed / 0 failed (基线是 lib 220/2 failed、game 119/1 failed); `cargo test --workspace --all-targets --no-fail-fast` → 34 个测试块 1137 passed / 0 failed(该次跑在 M48 launch 修复叠加的临时副本上,因为 M48 尚未合入 main,见报告)。Windows 本机 `cargo fmt --check`、 `cargo clippy -p unlucky-core --all-targets -D warnings`、 `cargo test -p unlucky-core` 全绿(17 个测试块 0 failed)。
Unlucky Launcher (ULL)
English · 简体中文
Official project home: https://github.com/AskaEth/Unlucky-Launcher
Unlucky Launcher (ULL) is a free, open-source Minecraft: Java Edition launcher written in Rust (Apache-2.0, non-commercial), with a Slint + Metro UI. It embeds an AI agent client (chat / configuration / crash diagnosis) and integrates with the broader agent tooling ecosystem via MCP. Minimum baseline: Windows 10.
- Runtime: a single native Rust binary — no JVM, no WebView, no external runtime
- UI: Slint (Royalty-Free 2.0; GL preferred, CPU software-rendering fallback so older machines without a usable GPU still get the full UI)
- License: Apache-2.0 © AskaEth (YeiJ)
Compliance statement
Authentication uses only official Microsoft/Mojang endpoints — Microsoft OAuth 2.0 device code flow, Xbox Live, XSTS, and api.minecraftservices.com — so players sign in with their own Microsoft account and launch the game they already own. Account tokens are stored only on the user's local machine and are never sent to any server operated by the project. ULL does not distribute, mirror, proxy or modify any Minecraft game files. Online play always requires a Microsoft account with valid entitlements. Local offline profiles never contact Microsoft or Mojang services and cannot join online-mode servers. Not affiliated with Mojang or Microsoft.
Status
The core engine is complete (workspace: 983+ tests passing):
- Microsoft sign-in: OAuth 2.0 device code flow → Xbox Live → XSTS → Minecraft Services, with entitlement verification
- Account credentials are stored only on the local machine — never uploaded, and inaccessible to the AI features
- Mod loaders: Forge / NeoForge / Fabric / Quilt, verified on real machines
- Java management: Temurin / Oracle / Microsoft / Zulu with a regional fallback chain
- Multi-source download engine; YAML rule-based crash diagnosis
- Usable as an MCP server for external agent tooling (
ull agent serve) - Local offline profiles: for local / isolated-network testing only; they perform no Microsoft authentication and cannot join servers with online-mode enabled
CLI (ull) is fully usable: install / launch / accounts / java / diagnose / agent.
GUI in development: crates/app is currently a Slint + Metro skeleton; the theme system and
the full interface ship with subsequent versions — use the CLI until then.
Module map
Unlucky-Launcher (cargo workspace)
├── crates/core # domain library, zero UI dependencies, eight modules
├── crates/agent # AI agent: ToolSpec registry + built-in client + MCP server (one shared core)
├── crates/app # Slint UI: the only crate allowed to depend on a UI framework
├── crates/cli # CLI (bin `ull`): headless, zero UI, depends on core + agent
└── packaging # single-file artifact matrix and packaging assets (planned)
The eight modules of crates/core:
| Module | Responsibility |
|---|---|
setting |
three data-directory modes, schema-based config, atomic writes, migrations |
download |
multi-source health scoring, mirrors, chunked downloads, hash-while-downloading |
game |
version / instance repository, snapshots and inheritance resolution |
launch |
10-stage launch pipeline, processes, JSONL event stream |
auth |
Microsoft sign-in / local offline profiles |
addon |
mod loader installation, modpacks, CurseForge / Modrinth |
diagnose |
five signal collectors, YAML rule engine, hs_err parsing |
platform |
OS abstraction: paths, processes, file locks, capability probing, runtime OS detection |
Building
Prerequisites:
- Rust stable (
rust-toolchain.tomlselects the toolchain automatically; componentsrustfmt/clippy) - Windows: MSVC toolchain (used by CI) or MinGW-w64 (
x86_64-pc-windows-gnu) - Linux:
libxkbcommon-dev libfontconfig1-dev libgl1-mesa-dev libegl1-mesa-dev libwayland-dev libxcb1-dev(Slint winit backend + femtovg build dependencies)
cargo fmt --all --check # formatting
cargo clippy --workspace --all-targets -- -D warnings # lints (zero-warning gate)
cargo test --workspace # tests
cargo build --release # artifact: target/release/unlucky-launcher[.exe]
Software-rendering switch (machines without a usable GPU / with broken drivers):
unlucky-launcher --software-renderer (equivalent to SLINT_BACKEND=winit-software).
Dependency license check (optional locally, required in CI):
cargo deny check licenses bans sources.
CI gates
| Workflow | Content |
|---|---|
.github/workflows/ci.yml |
fmt + clippy + test + build, Windows / Linux matrix |
.github/workflows/guards.yml |
zero-UI guard for core, 400-line-per-file guard, cargo-deny license guard |
Platform baseline
Minimum baseline: Windows 10. Windows 8.1 / 8 / 7 are not supported:
- Windows 10/11 builds use the standard toolchain (MSVC / GNU) — no custom target specs, no
-Zbuild-std, no import-table allowlists - Other platforms: macOS 12+ first class; Linux x64 with X11 preferred, Wayland as the long-term direction; Android Termux experimental, not committed
- UI fallback: Slint software rendering (fully usable on machines without a GPU or with broken drivers)
- Platform independence is expressed through separate test matrices, not separate artifact pipelines; capability differences use feature gates with runtime probing
License and acknowledgements
- This project: Apache License 2.0, see LICENSE; third-party notices in NOTICE
- The GUI uses Slint (Royalty-Free 2.0 track). Per the RF 2.0 obligations an
AboutSlintwidget will be placed on the about page (P2); until then NOTICE and this section serve the attribution duty.
Thanks to HMCL and PCL2 (both GPL-3.0) — these two launchers have accompanied the vast majority of Minecraft players for many years. ULL learned a great deal about design and implementation from them, and this project is dedicated to those two pioneers.