[PR #721] [MERGED] launcher: reach Prism's and MultiMC's shared libraries from an instance folder #2755

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

📋 Pull Request Information

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

Base: main ← Head: fix/launcher-prism-instance-folder


📝 Commits (1)

  • 4b78122 launcher: reach Prism's and MultiMC's shared libraries from an instance folder (#693)

📊 Changes

3 files changed (+132 additions, -17 deletions)

View changed files

📝 launcher/src/backend.rs (+1 -1)
📝 launcher/src/sources.rs (+61 -15)
📝 launcher/src/sources_tests.rs (+70 -1)

📄 Description

What and why

Fixes #693.

A Prism or MultiMC instance keeps no client jar of its own: the jar lives in the launcher root's shared libraries, two or three folders above instances/, and the game is downloaded only once the instance is launched. launcher/src/sources.rs::resolve already walked a few folders above the chosen one, but the advice when it failed did not name the launcher and offered no way out for a fresh instance.

  • resolve now also looks in the launcher root above an instances folder (instance_root), so a folder deeper than the four walked above the chosen one — e.g. PrismLauncher\instances\26.3\minecraft\saves — still finds the shared libraries. Prism (minecraft) and MultiMC (.minecraft) are both covered.
  • When nothing is found and the chosen folder is inside a launcher Horizon knows, the not-found error names it and says what to do there: "Launch the 26.3 instance once in Prism Launcher so it downloads the game, then prepare again." An unknown folder keeps the current advice that lists every launcher.
  • Prepare already shows a progress bar and the running log line as soon as it is clicked, and turns the error into a notice below; the chosen folder is handed straight to preparer, so with the fix above the resolution is immediate either way.

Tests: a Prism/MultiMC instances list, an instance, its game folder and a deeper folder all find the launcher root; the not-found message names the chosen launcher and falls back to the generic wording for an unknown folder.

Vanilla reference

Horizon-only (launcher tooling). None.

Self-check

pr_ready (tools/pr_ready.py on archlinux, against origin/main at 39ddc8db3)

Check Result
Scope ✅ 3 files, +132 −17
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
tokens.css up to date ➖ theme untouched
launcher rustfmt ❌ pre-existing on main (unrelated modpacks.rs, and the relinking_follows… line; verified against origin/main with this rustfmt)
launcher clippy ✅ (43 s)
launcher tests ✅ 56 passed (4 s)
Parity ➖ not run (no vanilla data here)

Screenshots

Launcher message change; no screenshot available in this environment.


🔄 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/721 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/launcher-prism-instance-folder` --- ### 📝 Commits (1) - [`4b78122`](https://github.com/horizon-rust/horizon/commit/4b7812296e794bfcfcef1749e7280452f4fc099e) launcher: reach Prism's and MultiMC's shared libraries from an instance folder (#693) ### 📊 Changes **3 files changed** (+132 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/backend.rs` (+1 -1) 📝 `launcher/src/sources.rs` (+61 -15) 📝 `launcher/src/sources_tests.rs` (+70 -1) </details> ### 📄 Description ## What and why Fixes #693. A Prism or MultiMC instance keeps no client jar of its own: the jar lives in the launcher root's shared `libraries`, two or three folders above `instances/`, and the game is downloaded only once the instance is launched. `launcher/src/sources.rs::resolve` already walked a few folders above the chosen one, but the advice when it failed did not name the launcher and offered no way out for a fresh instance. - `resolve` now also looks in the launcher root above an `instances` folder (`instance_root`), so a folder deeper than the four walked above the chosen one — e.g. `PrismLauncher\instances\26.3\minecraft\saves` — still finds the shared libraries. Prism (`minecraft`) and MultiMC (`.minecraft`) are both covered. - When nothing is found and the chosen folder is inside a launcher Horizon knows, the not-found error names it and says what to do there: *"Launch the 26.3 instance once in Prism Launcher so it downloads the game, then prepare again."* An unknown folder keeps the current advice that lists every launcher. - Prepare already shows a progress bar and the running log line as soon as it is clicked, and turns the error into a notice below; the chosen folder is handed straight to `preparer`, so with the fix above the resolution is immediate either way. Tests: a Prism/MultiMC `instances` list, an instance, its game folder and a deeper folder all find the launcher root; the not-found message names the chosen launcher and falls back to the generic wording for an unknown folder. ## Vanilla reference Horizon-only (launcher tooling). None. ## Self-check **pr_ready** (`tools/pr_ready.py` on archlinux, against origin/main at 39ddc8db3) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +132 −17 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ❌ pre-existing on `main` (unrelated `modpacks.rs`, and the `relinking_follows…` line; verified against `origin/main` with this rustfmt) | | launcher clippy | ✅ (43 s) | | launcher tests | ✅ 56 passed (4 s) | | Parity | ➖ not run (no vanilla data here) | ## Screenshots Launcher message change; no screenshot available in this environment. <!-- Allow edits by maintainers: yes --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:58:47 +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#2755
No description provided.