[PR #3354] [MERGED] Launcher: Play downloads and prepares Minecraft for an owner with no install #4923

Closed
opened 2026-11-03 05:08:56 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-owner-play


📝 Commits (1)

  • dc943f9 Launcher: Play downloads and prepares Minecraft for an owner

📊 Changes

7 files changed (+107 additions, -18 deletions)

View changed files

📝 README.md (+3 -3)
📝 docs/native-client.md (+1 -1)
📝 launcher/README.md (+5 -1)
📝 launcher/lang/fr.json (+2 -0)
📝 launcher/lang/ru.json (+2 -0)
📝 launcher/src/backend.rs (+4 -2)
📝 launcher/src/main.rs (+90 -11)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What and why

A player whose Microsoft account owns Java Edition should not need Minecraft installed. The download from Mojang for an owner already exists (#434: download_for_owner, mojang.rs, Mojang's Java runtime), but the path to it did not say so:

  • Play was off until the version was prepared, so an owner had to find the Resources row's Download and prepare and then press Play.
  • The Resources row offered From my install on a computer with no install.
  • The Minecraft folder row said "Not found. Choose the folder where your launcher keeps Minecraft."
  • The README's "You need" asked for Minecraft 26.3 played once and a Java 25 runtime.

Changes

  • Play prepares first for an owner (play_press in main.rs): on a version not prepared yet, when the strict keychain answer says an account here owns the game (Launcher::owner == Some(true)), Play prepares the version and then starts the game. It prepares from the player's install when one is found, else downloads from Mojang. This is the existing MinecraftFrom::Install path: its fallback is download_for_owner, which asks the owner gate again. Without an owner Play stays off, as before.
  • No install found: the Resources row says "Play downloads Minecraft 26.3 from Mojang for your account and prepares it." and offers Download and prepare alone. The folder row says "None needed: Horizon downloads Minecraft from Mojang for your account." Choose… stays.
  • The CLI's not-prepared error names horizon-launcher prepare --version <tag> and both sources.
  • README ("You need", the launcher line, Build from source), launcher/README.md and docs/native-client.md are updated. New strings have French and Russian translations.
  • download_for_owner, download_for and mojang.rs are unchanged, so mojang_downloads_only_for_an_owner holds as is.

Tested

  • New unit test play_prepares_first_for_an_owner (Play, prepare-then-play, or off, for each prepared / owner / busy state).
  • Download into the official layout from a fixture manifest is already covered by mojang_tests.rs (mock server, never Mojang). So is the gate (mojang_downloads_only_for_an_owner). No real Mojang download here.
  • Screenshot: the launcher in fresh mktemp -d homes (HOME, HORIZON_HOME, HORIZON_LAUNCHER_HOME, XDG, no keychain), with one fake installed version, no Minecraft folder, and an owner answer forced in a local build that was not committed. Play is on; Resources and the Minecraft folder rows show the new text. The top bar reads Offline only because the forced build has no account. File: ~/builds/horizon/launcher-java-1/pr1-play-no-install-dark.png on the Mac mini.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 1d6d4cf0a, 6 min 16 s)

Check Result
Scope ✅ 7 files, +107 −18
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 399 passed (2 min 54 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (2 s)
launcher clippy ✅ (1 min 14 s)
launcher tests ✅ 226 passed (2 min 6 s)
Parity ➖ 1 affected, to run in CI (--quick): lan_integration
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Label: feature (an owner without an install now just presses Play).

🤖 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/3354 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-owner-play` --- ### 📝 Commits (1) - [`dc943f9`](https://github.com/horizon-rust/horizon/commit/dc943f95e895a1ad66f7e1cafb6ad7cfbf4008db) Launcher: Play downloads and prepares Minecraft for an owner ### 📊 Changes **7 files changed** (+107 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+3 -3) 📝 `docs/native-client.md` (+1 -1) 📝 `launcher/README.md` (+5 -1) 📝 `launcher/lang/fr.json` (+2 -0) 📝 `launcher/lang/ru.json` (+2 -0) 📝 `launcher/src/backend.rs` (+4 -2) 📝 `launcher/src/main.rs` (+90 -11) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What and why A player whose Microsoft account owns Java Edition should not need Minecraft installed. The download from Mojang for an owner already exists (#434: `download_for_owner`, `mojang.rs`, Mojang's Java runtime), but the path to it did not say so: - **Play** was off until the version was prepared, so an owner had to find the Resources row's **Download and prepare** and then press Play. - The Resources row offered **From my install** on a computer with no install. - The Minecraft folder row said "Not found. Choose the folder where your launcher keeps Minecraft." - The README's "You need" asked for Minecraft 26.3 played once and a Java 25 runtime. ## Changes - **Play prepares first for an owner** (`play_press` in `main.rs`): on a version not prepared yet, when the strict keychain answer says an account here owns the game (`Launcher::owner == Some(true)`), Play prepares the version and then starts the game. It prepares from the player's install when one is found, else downloads from Mojang. This is the existing `MinecraftFrom::Install` path: its fallback is `download_for_owner`, which asks the owner gate again. Without an owner Play stays off, as before. - **No install found**: the Resources row says "Play downloads Minecraft 26.3 from Mojang for your account and prepares it." and offers **Download and prepare** alone. The folder row says "None needed: Horizon downloads Minecraft from Mojang for your account." **Choose…** stays. - The CLI's not-prepared error names `horizon-launcher prepare --version <tag>` and both sources. - README ("You need", the launcher line, Build from source), `launcher/README.md` and `docs/native-client.md` are updated. New strings have French and Russian translations. - `download_for_owner`, `download_for` and `mojang.rs` are unchanged, so `mojang_downloads_only_for_an_owner` holds as is. ## Tested - New unit test `play_prepares_first_for_an_owner` (Play, prepare-then-play, or off, for each prepared / owner / busy state). - Download into the official layout from a fixture manifest is already covered by `mojang_tests.rs` (mock server, never Mojang). So is the gate (`mojang_downloads_only_for_an_owner`). No real Mojang download here. - Screenshot: the launcher in fresh `mktemp -d` homes (`HOME`, `HORIZON_HOME`, `HORIZON_LAUNCHER_HOME`, XDG, no keychain), with one fake installed version, no Minecraft folder, and an owner answer forced in a local build that was not committed. Play is on; Resources and the Minecraft folder rows show the new text. The top bar reads Offline only because the forced build has no account. File: `~/builds/horizon/launcher-java-1/pr1-play-no-install-dark.png` on the Mac mini. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 1d6d4cf0a, 6 min 16 s) | Check | Result | | --- | --- | | Scope | ✅ 7 files, +107 −18 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 399 passed (2 min 54 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (2 s) | | launcher clippy | ✅ (1 min 14 s) | | launcher tests | ✅ 226 passed (2 min 6 s) | | Parity | ➖ 1 affected, to run in CI (--quick): lan_integration | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Label: `feature` (an owner without an install now just presses Play). 🤖 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-03 05:08:56 +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#4923
No description provided.