[PR #437] [MERGED] Launcher: when Minecraft isn't found, say where it looked and what to do #2565

Closed
opened 2026-11-02 15:57:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/437
Author: @ludovic111
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @ludovic111

Base: main ← Head: fix/launcher-missing-files-error


📝 Commits (1)

  • 561efb3 launcher: say which folders were checked when Minecraft is not found

📊 Changes

2 files changed (+76 additions, -8 deletions)

View changed files

📝 launcher/src/backend.rs (+67 -5)
📝 launcher/src/main.rs (+9 -3)

📄 Description

Fixes #419. Part of #434.

What

When Prepare can't find the game files, the error now reads:

Minecraft 26.3 was not found. Horizon looked in:
  /home/you/.minecraft (no versions/26.3/26.3.json or versions/26.3/26.3.jar)
To fix it:
  • Play 26.3 once in the official Minecraft launcher, then prepare again.
  • Or choose the folder where your launcher keeps Minecraft 26.3 (Minecraft folder › Choose… in the launcher, --minecraft on the command line).
  • Each folder looked in is listed with what it lacks: the folder doesn't exist, no 26.3.json, no 26.3.jar. A missing client jar is now caught here as well; before, horizon-prepare only reported it later.
  • The old message also had an unrelated log line stuck on the end (…or choose another folder.: Checking Java and your Minecraft install). That last log line is now added only after a preparer process's Exited with …, where it is the useful part.
  • The empty "Minecraft folder" row now says "Not found. Choose the folder where your launcher keeps Minecraft." instead of naming only the official launcher.

The next PRs in #434 add the other launchers (Prism, MultiMC, Modrinth App, ATLauncher, GDLauncher) and the owner download. Each one adds its folders and options to this same message.

How tested

  • Unit test a_folder_without_the_game_says_what_it_lacks_and_what_to_do: missing folder, missing json and jar, missing jar only, then complete.
  • Real run on the Mac mini (scratch HORIZON_LAUNCHER_HOME with v2026.10.14 installed, empty folder): horizon-launcher prepare --minecraft /tmp/hz-sources/empty prints the message above and exits 1.
  • Not checked: how the notice looks in the GUI window. The Mac mini session was locked, so screencapture only sees the lock screen. GPUI's shape_text splits on \n, so the lines should render separately.
cargo fmt --check                                                  ok
cargo clippy --features gpui/runtime_shaders --all-targets -D warnings   ok (launcher)
cargo test --features gpui/runtime_shaders                         ok (33 + 4 + 1 passed, 1 ignored)
tools/parity.py --changed origin/main --list                       0 of 306 harnesses depend on these files

Needs Ludovic

Nothing.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/437 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/launcher-missing-files-error` --- ### 📝 Commits (1) - [`561efb3`](https://github.com/horizon-rust/horizon/commit/561efb340ea1473e1ed1a62e2a28b3c411107571) launcher: say which folders were checked when Minecraft is not found ### 📊 Changes **2 files changed** (+76 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/backend.rs` (+67 -5) 📝 `launcher/src/main.rs` (+9 -3) </details> ### 📄 Description Fixes #419. Part of #434. ## What When Prepare can't find the game files, the error now reads: ``` Minecraft 26.3 was not found. Horizon looked in: /home/you/.minecraft (no versions/26.3/26.3.json or versions/26.3/26.3.jar) To fix it: • Play 26.3 once in the official Minecraft launcher, then prepare again. • Or choose the folder where your launcher keeps Minecraft 26.3 (Minecraft folder › Choose… in the launcher, --minecraft on the command line). ``` - Each folder looked in is listed with what it lacks: the folder doesn't exist, no `26.3.json`, no `26.3.jar`. A missing client jar is now caught here as well; before, horizon-prepare only reported it later. - The old message also had an unrelated log line stuck on the end (`…or choose another folder.: Checking Java and your Minecraft install`). That last log line is now added only after a preparer process's `Exited with …`, where it is the useful part. - The empty "Minecraft folder" row now says "Not found. Choose the folder where your launcher keeps Minecraft." instead of naming only the official launcher. The next PRs in #434 add the other launchers (Prism, MultiMC, Modrinth App, ATLauncher, GDLauncher) and the owner download. Each one adds its folders and options to this same message. ## How tested - Unit test `a_folder_without_the_game_says_what_it_lacks_and_what_to_do`: missing folder, missing json and jar, missing jar only, then complete. - Real run on the Mac mini (scratch `HORIZON_LAUNCHER_HOME` with v2026.10.14 installed, empty folder): `horizon-launcher prepare --minecraft /tmp/hz-sources/empty` prints the message above and exits 1. - **Not checked:** how the notice looks in the GUI window. The Mac mini session was locked, so `screencapture` only sees the lock screen. GPUI's `shape_text` splits on `\n`, so the lines should render separately. ``` cargo fmt --check ok cargo clippy --features gpui/runtime_shaders --all-targets -D warnings ok (launcher) cargo test --features gpui/runtime_shaders ok (33 + 4 + 1 passed, 1 ignored) tools/parity.py --changed origin/main --list 0 of 306 harnesses depend on these files ``` ## Needs Ludovic Nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:57:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#2565
No description provided.