Launcher 0.1.4: a new version reuses resources another installed version prepared

After installing a version (CLI install and update, the window's automatic install, MCP),
when it is not prepared and another installed version with the same Minecraft version is,
the launcher copies that version's prepared resources. Players who auto-updated to
v2026.10.13.1 no longer prepare again, and can play it without their Minecraft folder.

The prepared output depends on the Horizon version as well as Minecraft's: the manifest
records the hashes of the vanilla exporter sources it was made with, and
prepare_native_client.py writes every file and the manifest's schema. So resources are reused
only when both versions have the same pinned jars in research-lock.json, the same
prepare_native_client.py and the same exporter sources the manifest lists. They are copied
(prepare rewrites files in place, so hard links would tie the versions together), into a
partial folder renamed when complete. install and the MCP tool say when it is prepared already.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-13 21:08:06 +02:00
parent 3a522af067
commit 8fa3eef809
5 changed files with 211 additions and 14 deletions
+7 -1
View File
@@ -180,7 +180,13 @@ fn execute(command: Cmd, as_json: bool) -> Result<(), String> {
let label = format!("Installing {tag}");
let tag = backend::install_tag(&tag, false, progress(label))?;
if as_json {
json(serde_json::json!({ "installed": tag }));
json(
serde_json::json!({ "installed": tag, "prepared": backend::is_prepared(&tag) }),
);
} else if backend::is_prepared(&tag) {
println!(
"Installed {tag}. It is prepared already, from another installed version."
);
} else {
println!(
"Installed {tag}. Prepare it next: horizon-launcher prepare --version {tag}"