Merge pull request #43 from ludovic111/domain

Add the playhorizon.dev website link
This commit is contained in:
Ludovic Marie
2026-10-13 20:40:03 +02:00
committed by GitHub
11 changed files with 36 additions and 19 deletions
+2 -1
View File
@@ -12,6 +12,7 @@
</p>
<p align="center">
<a href="https://playhorizon.dev"><b>Website</b></a> ·
<a href="#download"><b>Download</b></a> ·
<a href="#screenshots"><b>Screenshots</b></a> ·
<a href="#project-status"><b>Parity status</b></a> ·
@@ -28,7 +29,7 @@ Every subsystem matches vanilla in all 281 parity harnesses, on Linux and macOS:
## Download
**[Download the Horizon launcher](https://github.com/ludovic111/horizon/releases?q=launcher-v&expanded=true)** for Linux x86-64, macOS Apple Silicon or Windows x64: take the newest `launcher-v*` release (currently [launcher-v0.1.1](https://github.com/ludovic111/horizon/releases/tag/launcher-v0.1.1)); the launcher then updates itself. The launcher is the way to get Horizon: it installs and updates the game, prepares its resources from your own copy of Minecraft, and starts the client or a dedicated server.
**[Download the Horizon launcher](https://github.com/ludovic111/horizon/releases?q=launcher-v&expanded=true)** (or see [playhorizon.dev](https://playhorizon.dev)) for Linux x86-64, macOS Apple Silicon or Windows x64: take the newest `launcher-v*` release (currently [launcher-v0.1.1](https://github.com/ludovic111/horizon/releases/tag/launcher-v0.1.1)); the launcher then updates itself. The launcher is the way to get Horizon: it installs and updates the game, prepares its resources from your own copy of Minecraft, and starts the client or a dedicated server.
**You need** Minecraft: Java Edition installed with the official launcher, with 26.3 played once; Python 3.10 or newer and Java 25 (a JDK, e.g. Eclipse Temurin 25) for the one-time resource preparation; and a GPU with Vulkan on Linux and Windows, or any Apple Silicon Mac.
+1 -1
View File
@@ -1,6 +1,6 @@
# Horizon documentation
To play, use [the launcher](../launcher/README.md). These pages are for developers.
To play, use [the launcher](../launcher/README.md); the project site is [playhorizon.dev](https://playhorizon.dev). These pages are for developers.
## Build and run
+1 -1
View File
@@ -2565,7 +2565,7 @@ dependencies = [
[[package]]
name = "horizon-launcher"
version = "0.1.2"
version = "0.1.3"
dependencies = [
"clap",
"dirs 5.0.1",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "horizon-launcher"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
license = "MIT"
description = "Downloads, prepares and starts Horizon builds"
+4 -4
View File
@@ -17,7 +17,7 @@ The opening, then Play ([clip](docs/opening.webm)):
- **Play**: prepares resources as `PLAY.txt` describes (your launcher's 26.3 install, the
26.3 server jar from that version's own json, Python 3.10+ and Java 25), then starts the
client, or a server (`--dedicated --nogui`) in a folder you choose, with a live console.
- **Patch notes**: each release's notes, newest first, with a link to GitHub Sponsors. A quiet "Join Discord" link sits in the sidebar footer.
- **Patch notes**: each release's notes, newest first, with a link to GitHub Sponsors. Quiet "Join Discord" and "Website" links sit in the sidebar footer.
- **What's next**: the README's roadmap, from main.
Data lives in the platform's data directory (`~/.local/share/horizon-launcher` on Linux,
@@ -31,8 +31,8 @@ Windows): `versions/<tag>/`, `server-jars/`, `server/` and `settings.json`.
inside the game, so the launcher is where you return to Horizon's. It is the `menuStyle:` line
of `horizon.txt` in the game's home folder (`HORIZON_HOME`, else `horizon` in the data
directory), which the game reads when it starts.
- **Links**: the Discord invite and the Sponsors page come from `launcher/links.json` on main
(`{"discord": "...", "sponsor": "..."}`), so they change without a launcher release. Offline,
- **Links**: the Discord invite, the Sponsors page and the website come from `launcher/links.json` on main
(`{"discord": "...", "sponsor": "...", "website": "..."}`), so they change without a launcher release. Offline,
the launcher uses the same values built in; an empty address hides its button.
## Updates
@@ -63,7 +63,7 @@ The same binary is a command-line tool; without a subcommand it opens the window
horizon-launcher server [--dir <dir>] [--version <tag>] [--accept-eula]
horizon-launcher notes [<tag>] patch notes as plain text
horizon-launcher next the roadmap
horizon-launcher links the Discord and sponsor links
horizon-launcher links the Discord, sponsor and website links
horizon-launcher menu-style [horizon|classic] show or set the game's menu style
horizon-launcher update [--check] Horizon and the launcher
+1 -1
View File
@@ -1 +1 @@
{"discord": "https://discord.gg/HcTeMZxe5E", "sponsor": "https://github.com/sponsors/ludovic111"}
{"discord": "https://discord.gg/HcTeMZxe5E", "sponsor": "https://github.com/sponsors/ludovic111", "website": "https://playhorizon.dev"}
+9 -5
View File
@@ -162,18 +162,19 @@ pub fn roadmap() -> Result<String, String> {
Err("The README has no roadmap section yet.".into())
}
/// The community and sponsor links, from `launcher/links.json` on main, so they can change
/// The community, sponsor and website links, from `launcher/links.json` on main, so they can change
/// without a launcher release. An empty address hides its button.
#[derive(Clone, Debug, PartialEq, serde::Serialize)]
pub struct Links {
pub discord: String,
pub sponsor: String,
pub website: String,
}
impl Default for Links {
/// What the launcher uses until (or unless) it can read links.json.
fn default() -> Self {
Self { discord: "https://discord.gg/HcTeMZxe5E".into(), sponsor: "https://github.com/sponsors/ludovic111".into() }
Self { discord: "https://discord.gg/HcTeMZxe5E".into(), sponsor: "https://github.com/sponsors/ludovic111".into(), website: "https://playhorizon.dev".into() }
}
}
@@ -183,7 +184,7 @@ impl Links {
pub fn parse(text: &str) -> Self {
let mut links = Self::default();
if let Ok(serde_json::Value::Object(map)) = serde_json::from_str(text) {
for (key, slot) in [("discord", &mut links.discord), ("sponsor", &mut links.sponsor)] {
for (key, slot) in [("discord", &mut links.discord), ("sponsor", &mut links.sponsor), ("website", &mut links.website)] {
if let Some(url) = map.get(key).and_then(|v| v.as_str()) {
*slot = url.trim().to_string();
}
@@ -979,8 +980,9 @@ mod tests {
let defaults = Links::default();
assert_eq!(defaults.discord, "https://discord.gg/HcTeMZxe5E");
assert_eq!(defaults.sponsor, "https://github.com/sponsors/ludovic111");
assert_eq!(defaults.website, "https://playhorizon.dev");
// The file on main says the same thing as the defaults.
let file = Links::parse(r#"{"discord": "https://discord.gg/HcTeMZxe5E", "sponsor": "https://github.com/sponsors/ludovic111"}"#);
let file = Links::parse(r#"{"discord": "https://discord.gg/HcTeMZxe5E", "sponsor": "https://github.com/sponsors/ludovic111", "website": "https://playhorizon.dev"}"#);
assert_eq!(file, defaults);
// Unreadable or missing, offline included: the defaults.
assert_eq!(Links::parse(""), defaults);
@@ -989,7 +991,9 @@ mod tests {
assert_eq!(Links::parse(r#"{"discord": 5}"#), defaults);
// A key that is missing keeps its default; a new address replaces it; empty hides it.
assert_eq!(Links::parse(r#"{"discord": "https://x.y/z"}"#), Links { discord: "https://x.y/z".into(), ..defaults.clone() });
assert_eq!(Links::parse(r#"{"discord": "", "sponsor": " "}"#), Links { discord: String::new(), sponsor: String::new() });
assert_eq!(Links::parse(r#"{"discord": "", "sponsor": " "}"#), Links { discord: String::new(), sponsor: String::new(), ..defaults.clone() });
// A key this launcher does not know is ignored.
assert_eq!(Links::parse(r#"{"mastodon": "https://x.y/z"}"#), defaults);
}
#[test]
+2 -2
View File
@@ -57,7 +57,7 @@ enum Cmd {
Notes { tag: Option<String> },
/// Show the roadmap
Next,
/// Show the Discord and sponsor links
/// Show the Discord, sponsor and website links
Links,
/// Show or set the game's menu style (classic is vanilla's own screens)
MenuStyle {
@@ -211,7 +211,7 @@ fn execute(command: Cmd, as_json: bool) -> Result<(), String> {
if as_json {
json(serde_json::to_value(&links).unwrap());
} else {
for (name, url) in [("Discord", &links.discord), ("Sponsor", &links.sponsor)] {
for (name, url) in [("Discord", &links.discord), ("Sponsor", &links.sponsor), ("Website", &links.website)] {
println!("{name:<8} {}", if url.is_empty() { "(none)" } else { url });
}
}
+13 -2
View File
@@ -124,7 +124,7 @@ struct Launcher {
confirm_remove: Option<String>,
picker_open: bool,
settings: Settings,
/// The Discord and sponsor links: built in until links.json on main has been read.
/// The Discord, sponsor and website links: built in until links.json on main has been read.
links: backend::Links,
menu_style: backend::MenuStyle,
preparing: bool,
@@ -775,6 +775,17 @@ impl Launcher {
.child("Join Discord")
.on_click(move |_, _, cx| cx.open_url(&url))
});
let website = (!self.links.website.is_empty()).then(|| {
let url = self.links.website.clone();
div()
.id("website")
.mb(px(4.))
.text_color(t.muted)
.cursor_pointer()
.hover(move |s| s.text_color(t.text))
.child("Website")
.on_click(move |_, _, cx| cx.open_url(&url))
});
div()
.flex()
.flex_col()
@@ -797,7 +808,7 @@ impl Launcher {
)
.child(nav)
.child(div().flex_1())
.child(div().px(px(10.)).text_size(px(theme::SMALL)).text_color(t.faint).children(discord).child(footer))
.child(div().px(px(10.)).text_size(px(theme::SMALL)).text_color(t.faint).children(discord).children(website).child(footer))
}
fn segmented(&self, cx: &mut Context<Self>) -> Div {
+1 -1
View File
@@ -38,7 +38,7 @@ fn tools() -> Value {
{ "name": "patch_notes", "description": "A release's patch notes as markdown.",
"inputSchema": { "type": "object", "properties": { "tag": { "type": "string", "description": "Default: the newest release." } } } },
{ "name": "roadmap", "description": "What's planned next for Horizon, from the README's roadmap.", "inputSchema": none },
{ "name": "links", "description": "The Horizon community links: the Discord invite and the GitHub Sponsors page (an empty one is not offered).", "inputSchema": none },
{ "name": "links", "description": "The Horizon links: the Discord invite, the GitHub Sponsors page and the website (an empty one is not offered).", "inputSchema": none },
{ "name": "menu_style", "description": "Show or set the game's menu style. \"horizon\" is Horizon's own menus, \"classic\" is vanilla's screens, which have no way back inside the game. The game reads it when it starts.",
"inputSchema": { "type": "object", "properties": { "style": { "type": "string", "enum": ["horizon", "classic"], "description": "Omit to show the current style." } } } },
{ "name": "check_updates", "description": "Check GitHub for a Horizon release newer than every installed version, and for a newer launcher.", "inputSchema": none },
+1
View File
@@ -14,6 +14,7 @@ Playing through the Horizon launcher
Downloaded this archive directly?
Get the launcher instead; it installs, prepares and updates Horizon for you:
https://github.com/ludovic111/horizon/releases?q=launcher-v&expanded=true
More about Horizon: https://playhorizon.dev
To prepare this folder by hand you need Minecraft Java Edition 26.3, played
once from the official launcher, Python 3.10+ and Java 25 (a JDK). Then,