Skip to content

Craft Anything: understand how any software works, and craft your own.

Rust

Point Unreal's C++ guidance at the right toolchain per platform (#777)

Alex Joaquim Pereira8a6af4155c38
diff --git a/crates/engines/src/game.rs b/crates/engines/src/game.rs
index d354ecc1..abca5489 100644
--- a/crates/engines/src/game.rs
+++ b/crates/engines/src/game.rs
@@ -118,9 +118,15 @@ impl Builder {
/// Roughly what getting it involves, in plain words.
pub fn needs(self) -> &'static str {
+ self.needs_for(std::env::consts::OS)
+ }
+
+ /// [`needs`](Builder::needs) for a named OS, so every platform's words are testable here.
+ fn needs_for(self, os: &str) -> &'static str {
match self {
Builder::Unity => "About 10 GB. Free for personal use with a Unity account.",
- Builder::Unreal if cfg!(target_os = "linux") => "An Unreal Engine Linux installation with its bundled Clang C++ toolchain.",
+ Builder::Unreal if os == "linux" => "An Unreal Engine Linux installation with its bundled Clang C++ toolchain.",
+ Builder::Unreal if os == "macos" => "About 60 GB, an Epic Games account, and Xcode.",
Builder::Unreal => "About 60 GB, an Epic Games account, and Visual Studio's C++ tools.",
Builder::Godot => "A small download (under 200 MB). Free, no account needed.",
Builder::Rust => "The Rust toolchain (rustup.rs).",
@@ -972,6 +978,14 @@ mod tests {
std::fs::write(p, bytes).unwrap();
}
+ #[test]
+ fn unreal_needs_names_the_toolchain_for_each_platform() {
+ assert!(Builder::Unreal.needs_for("linux").contains("bundled Clang"));
+ assert!(Builder::Unreal.needs_for("macos").contains("Xcode"));
+ assert!(!Builder::Unreal.needs_for("macos").contains("Visual Studio"));
+ assert!(Builder::Unreal.needs_for("windows").contains("Visual Studio"));
+ }
+
#[test]
fn a_unity_games_stack_comes_from_its_assembly_names() {
let d = tempfile::tempdir().unwrap();
diff --git a/crates/ui-egui/src/engine_ui.rs b/crates/ui-egui/src/engine_ui.rs
index eeb87bc1..6d3b263e 100644
--- a/crates/ui-egui/src/engine_ui.rs
+++ b/crates/ui-egui/src/engine_ui.rs
@@ -654,6 +654,32 @@ pub fn build_with(app: &mut CraftApp, ui: &mut Ui) {
}
}
+// `xtask i18n-coverage` only scans direct `tr("…")` literals. These keys are
+// translated by `status_line`/`step`, so keep the TSV catalogs in sync with them.
+/// What the status line says when Unreal is installed but its C++ tools are missing.
+fn unreal_tools_missing(os: &str) -> &'static str {
+ match os {
+ "linux" => "Unreal is here, but its bundled Clang C++ toolchain wasn't found.",
+ "macos" => "Unreal is here, but it also needs Xcode.",
+ _ => "Unreal is here, but it also needs Visual Studio's C++ tools.",
+ }
+}
+
+/// The C++ toolchain step for Unreal: title, detail, and the page to open (if any).
+fn cpp_step(os: &str) -> (&'static str, &'static str, Option<&'static str>) {
+ match os {
+ "linux" => (
+ "Add Unreal's Linux C++ toolchain",
+ "Run Engine/Build/BatchFiles/Linux/SetupToolchain.sh in the engine folder to install its bundled Clang toolchain. If you built Unreal from source, Setup.sh downloads the native toolchain instead. A system Clang may not match the engine's version.",
+ None,
+ ),
+ "macos" => ("Install Xcode", "Unreal builds games with Apple's Xcode, free in the App Store.", None),
+ _ => {
+ ("Add Visual Studio's C++ tools", "Install Visual Studio Community (free) and tick \"Game development with C++\".", Some(game::VISUAL_STUDIO_PAGE))
+ }
+ }
+}
+
/// "Ready — Unity 6000.0.23f1" or "Not on this computer yet" with the way to get it.
fn status_line(app: &mut CraftApp, ui: &mut Ui, b: Builder, offer: bool) {
let t = Tokens::get(ui.ctx());
@@ -672,7 +698,7 @@ fn status_line(app: &mut CraftApp, ui: &mut Ui, b: Builder, offer: bool) {
Some(inv) => {
icons::show(ui, "download", 16.0, t.warning);
let text = if b == Builder::Unreal && inv.best(b).is_some() {
- tr("Unreal is here, but it also needs Visual Studio's C++ tools.")
+ tr(unreal_tools_missing(std::env::consts::OS))
} else {
format!("{} {}", trf("{name} isn't on this computer yet.", &[("name", b.name())]), tr(b.needs()))
};
@@ -761,12 +787,8 @@ fn steps(app: &CraftApp, b: Builder, inv: &Inventory) -> Vec<Step> {
inv.best(b).is_some(),
launcher.map(Action::OpenApp),
));
- let (title, detail) = if cfg!(target_os = "macos") {
- ("Install Xcode", "Unreal builds games with Apple's Xcode, free in the App Store.")
- } else {
- ("Add Visual Studio's C++ tools", "Install Visual Studio Community (free) and tick \"Game development with C++\".")
- };
- v.push(step(title, detail, inv.cpp_tools, (!cfg!(target_os = "macos")).then_some(Action::OpenPage(game::VISUAL_STUDIO_PAGE))));
+ let (title, detail, page) = cpp_step(std::env::consts::OS);
+ v.push(step(title, detail, inv.cpp_tools, page.map(Action::OpenPage)));
v
}
}
@@ -958,6 +980,32 @@ fn open_app(app: &mut CraftApp, b: Builder) {
mod tests {
use super::*;
+ #[test]
+ fn linux_unreal_guidance_names_the_bundled_clang() {
+ let (title, detail, page) = cpp_step("linux");
+ assert!(title.contains("Linux"));
+ assert!(detail.contains("Engine/Build/BatchFiles/Linux/SetupToolchain.sh"));
+ assert!(detail.contains("bundled Clang"));
+ assert!(detail.contains("native toolchain"), "Setup.sh must be described as the source-build path");
+ assert!(!detail.contains("Visual Studio"), "Linux must not send people to Visual Studio");
+ assert_eq!(page, None, "Linux must not open the Visual Studio download page");
+ let status = unreal_tools_missing("linux");
+ assert!(status.contains("bundled Clang"));
+ assert!(!status.contains("Visual Studio"));
+ }
+
+ #[test]
+ fn other_platforms_keep_their_unreal_guidance() {
+ let (mac_title, _mac_detail, mac_page) = cpp_step("macos");
+ assert_eq!(mac_title, "Install Xcode");
+ assert_eq!(mac_page, None);
+ assert_eq!(unreal_tools_missing("macos"), "Unreal is here, but it also needs Xcode.");
+ let (win_title, _win_detail, win_page) = cpp_step("windows");
+ assert_eq!(win_title, "Add Visual Studio's C++ tools");
+ assert_eq!(win_page, Some(game::VISUAL_STUDIO_PAGE));
+ assert!(unreal_tools_missing("windows").contains("Visual Studio"));
+ }
+
#[test]
fn the_request_picks_the_engine_or_none() {
let kinds = KindRegistry::built_in();
diff --git a/crates/ui-egui/src/fr.tsv b/crates/ui-egui/src/fr.tsv
index 1372dddd..10567ddc 100644
--- a/crates/ui-egui/src/fr.tsv
+++ b/crates/ui-egui/src/fr.tsv
@@ -852,3 +852,8 @@ Providers Fournisseurs
Harnesses Agents
Nothing of this kind was found. Rien de ce type n'a été trouvé.
Another model Autre modèle
+Unreal is here, but its bundled Clang C++ toolchain wasn't found. Unreal est installé, mais sa chaîne d'outils Clang C++ intégrée est introuvable.
+Add Unreal's Linux C++ toolchain Ajouter la chaîne d'outils C++ Linux d'Unreal
+Run Engine/Build/BatchFiles/Linux/SetupToolchain.sh in the engine folder to install its bundled Clang toolchain. If you built Unreal from source, Setup.sh downloads the native toolchain instead. A system Clang may not match the engine's version. Dans le dossier du moteur, exécutez Engine/Build/BatchFiles/Linux/SetupToolchain.sh pour installer sa chaîne d'outils Clang intégrée. Si vous compilez depuis les sources, Setup.sh télécharge à la place la chaîne d'outils native. Un Clang système peut ne pas correspondre à la version du moteur.
+Unreal is here, but it also needs Xcode. Unreal est là, mais il lui faut aussi Xcode.
+About 60 GB, an Epic Games account, and Xcode. Environ 60 Go, un compte Epic Games et Xcode.
diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv
index 42244aed..b06d0cfe 100644
--- a/crates/ui-egui/src/i18n/cs.tsv
+++ b/crates/ui-egui/src/i18n/cs.tsv
@@ -1417,3 +1417,8 @@ Providers Poskytovatelé
Harnesses Agenti
Nothing of this kind was found. Nic takového nebylo nalezeno.
Another model Jiný model
+Unreal is here, but its bundled Clang C++ toolchain wasn't found. Unreal je nainstalovaný, ale jeho přibalený nástrojový řetězec Clang C++ nebyl nalezen.
+Add Unreal's Linux C++ toolchain Přidat linuxový nástrojový řetězec C++ pro Unreal
+Run Engine/Build/BatchFiles/Linux/SetupToolchain.sh in the engine folder to install its bundled Clang toolchain. If you built Unreal from source, Setup.sh downloads the native toolchain instead. A system Clang may not match the engine's version. Ve složce enginu spusťte Engine/Build/BatchFiles/Linux/SetupToolchain.sh a nainstaluje se přibalený nástrojový řetězec Clang. Při sestavení ze zdrojů Setup.sh místo toho stáhne nativní nástrojový řetězec. Systémový Clang nemusí odpovídat verzi enginu.
+Unreal is here, but it also needs Xcode. Unreal je dostupný, ale potřebuje také Xcode.
+About 60 GB, an Epic Games account, and Xcode. Přibližně 60 GB, účet Epic Games a Xcode.
diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv
index f63831fb..444c97eb 100644
--- a/crates/ui-egui/src/i18n/de.tsv
+++ b/crates/ui-egui/src/i18n/de.tsv
@@ -1417,3 +1417,8 @@ Providers Anbieter
Harnesses Agenten
Nothing of this kind was found. Nichts dieser Art wurde gefunden.
Another model Anderes Modell
+Unreal is here, but its bundled Clang C++ toolchain wasn't found. Unreal ist da, aber die mitgelieferte Clang-C++-Toolchain wurde nicht gefunden.
+Add Unreal's Linux C++ toolchain Unreals Linux-C++-Toolchain hinzufügen
+Run Engine/Build/BatchFiles/Linux/SetupToolchain.sh in the engine folder to install its bundled Clang toolchain. If you built Unreal from source, Setup.sh downloads the native toolchain instead. A system Clang may not match the engine's version. Führe im Engine-Ordner Engine/Build/BatchFiles/Linux/SetupToolchain.sh aus, um die mitgelieferte Clang-Toolchain zu installieren. Bei einem Quellcode-Build lädt Setup.sh stattdessen die native Toolchain herunter. Ein System-Clang passt möglicherweise nicht zur Engine-Version.
+Unreal is here, but it also needs Xcode. Unreal ist da, braucht aber zusätzlich Xcode.
+About 60 GB, an Epic Games account, and Xcode. Etwa 60 GB, ein Epic-Games-Konto und Xcode.
diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv
index 5ebc002e..a23ae8f6 100644
--- a/crates/ui-egui/src/i18n/ko.tsv
+++ b/crates/ui-egui/src/i18n/ko.tsv
@@ -1417,3 +1417,8 @@ Providers 제공자
Harnesses 에이전트
Nothing of this kind was found. 이런 종류는 찾지 못했습니다.
Another model 다른 모델
+Unreal is here, but its bundled Clang C++ toolchain wasn't found. Unreal은 설치되어 있지만 함께 제공되는 Clang C++ 도구 체인을 찾지 못했습니다.
+Add Unreal's Linux C++ toolchain Unreal의 Linux C++ 도구 체인 추가
+Run Engine/Build/BatchFiles/Linux/SetupToolchain.sh in the engine folder to install its bundled Clang toolchain. If you built Unreal from source, Setup.sh downloads the native toolchain instead. A system Clang may not match the engine's version. 엔진 폴더에서 Engine/Build/BatchFiles/Linux/SetupToolchain.sh를 실행해 함께 제공되는 Clang 도구 체인을 설치하세요. 소스 빌드라면 Setup.sh가 대신 네이티브 도구 체인을 내려받습니다. 시스템 Clang은 엔진 버전과 맞지 않을 수 있습니다.
+Unreal is here, but it also needs Xcode. Unreal은 있지만 Xcode도 필요합니다.
+About 60 GB, an Epic Games account, and Xcode. 약 60 GB, Epic Games 계정, Xcode가 필요합니다.
diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv
index edc1ae3d..e5eb45ee 100644
--- a/crates/ui-egui/src/i18n/ru.tsv
+++ b/crates/ui-egui/src/i18n/ru.tsv
@@ -1417,3 +1417,8 @@ Providers Провайдеры
Harnesses Агенты
Nothing of this kind was found. Ничего такого не найдено.
Another model Другая модель
+Unreal is here, but its bundled Clang C++ toolchain wasn't found. Unreal установлен, но встроенная цепочка инструментов Clang C++ не найдена.
+Add Unreal's Linux C++ toolchain Добавить цепочку инструментов C++ для Linux в Unreal
+Run Engine/Build/BatchFiles/Linux/SetupToolchain.sh in the engine folder to install its bundled Clang toolchain. If you built Unreal from source, Setup.sh downloads the native toolchain instead. A system Clang may not match the engine's version. Запустите Engine/Build/BatchFiles/Linux/SetupToolchain.sh в папке движка, чтобы установить встроенную цепочку инструментов Clang. При сборке из исходников Setup.sh вместо этого скачивает нативную цепочку инструментов. Системный Clang может не подходить к версии движка.
+Unreal is here, but it also needs Xcode. Unreal установлен, но также требует Xcode.
+About 60 GB, an Epic Games account, and Xcode. Около 60 ГБ, аккаунт Epic Games и Xcode.
diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv
index 3eed9504..11f1b60b 100644
--- a/crates/ui-egui/src/i18n/zh-hans.tsv
+++ b/crates/ui-egui/src/i18n/zh-hans.tsv
@@ -1417,3 +1417,8 @@ Providers 提供商
Harnesses 代理
Nothing of this kind was found. 没有找到这类项目。
Another model 其他模型
+Unreal is here, but its bundled Clang C++ toolchain wasn't found. Unreal 已安装,但未找到其自带的 Clang C++ 工具链。
+Add Unreal's Linux C++ toolchain 添加 Unreal 的 Linux C++ 工具链
+Run Engine/Build/BatchFiles/Linux/SetupToolchain.sh in the engine folder to install its bundled Clang toolchain. If you built Unreal from source, Setup.sh downloads the native toolchain instead. A system Clang may not match the engine's version. 在引擎文件夹中运行 Engine/Build/BatchFiles/Linux/SetupToolchain.sh,安装其自带的 Clang 工具链。如果是源码构建,Setup.sh 会改为下载本机工具链。系统 Clang 可能与引擎版本不匹配。
+Unreal is here, but it also needs Xcode. 已安装 Unreal,但还需要 Xcode。
+About 60 GB, an Epic Games account, and Xcode. 约 60 GB,需要 Epic Games 账户和 Xcode。
diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv
index a408d01a..6184f60d 100644
--- a/crates/ui-egui/src/i18n/zh-hant.tsv
+++ b/crates/ui-egui/src/i18n/zh-hant.tsv
@@ -1417,3 +1417,8 @@ Providers 供應商
Harnesses 代理
Nothing of this kind was found. 沒有找到這類項目。
Another model 其他模型
+Unreal is here, but its bundled Clang C++ toolchain wasn't found. Unreal 已安裝,但找不到其內建的 Clang C++ 工具鏈。
+Add Unreal's Linux C++ toolchain 新增 Unreal 的 Linux C++ 工具鏈
+Run Engine/Build/BatchFiles/Linux/SetupToolchain.sh in the engine folder to install its bundled Clang toolchain. If you built Unreal from source, Setup.sh downloads the native toolchain instead. A system Clang may not match the engine's version. 在引擎資料夾中執行 Engine/Build/BatchFiles/Linux/SetupToolchain.sh,安裝其內建的 Clang 工具鏈。如果是原始碼建置,Setup.sh 會改為下載原生工具鏈。系統 Clang 可能與引擎版本不相符。
+Unreal is here, but it also needs Xcode. 已安裝 Unreal,但還需要 Xcode。
+About 60 GB, an Epic Games account, and Xcode. 約 60 GB,需要 Epic Games 帳戶和 Xcode。
diff --git a/crates/ui-egui/src/ja.tsv b/crates/ui-egui/src/ja.tsv
index 79f63ae1..d1e63a37 100644
--- a/crates/ui-egui/src/ja.tsv
+++ b/crates/ui-egui/src/ja.tsv
@@ -854,3 +854,8 @@ Providers プロバイダ
Harnesses ハーネス
Nothing of this kind was found. この種類のものは見つかりませんでした。
Another model 別のモデル
+Unreal is here, but its bundled Clang C++ toolchain wasn't found. Unreal はインストールされていますが、同梱の Clang C++ ツールチェーンが見つかりません。
+Add Unreal's Linux C++ toolchain Unreal の Linux C++ ツールチェーンを追加
+Run Engine/Build/BatchFiles/Linux/SetupToolchain.sh in the engine folder to install its bundled Clang toolchain. If you built Unreal from source, Setup.sh downloads the native toolchain instead. A system Clang may not match the engine's version. エンジンのフォルダーで Engine/Build/BatchFiles/Linux/SetupToolchain.sh を実行し、同梱の Clang ツールチェーンをインストールします。ソースからビルドした場合は、代わりに Setup.sh がネイティブツールチェーンをダウンロードします。システムの Clang はエンジンのバージョンと一致しない場合があります。
+Unreal is here, but it also needs Xcode. Unreal はありますが、Xcode も必要です。
+About 60 GB, an Epic Games account, and Xcode. 約 60 GB、Epic Games アカウント、Xcode が必要です。
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index 2fe3cde2..062e0a77 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -50,7 +50,7 @@ The project should be easy to fork and bend. New features land behind a seam, no
| Milestone | Goal | Owner | Where it stands (2026-11-02) |
|---|---|---|---|
| M0 Foundations | Docs match the code, licences checked, one live end-to-end run | maintainers | Done |
-| M1 Extensibility | Seams for target kinds, checks, builders, asset providers, engines, plugins | maintainers | Done, except engine pins (R1.5) and Unreal's Linux guidance (R1.6) |
+| M1 Extensibility | Seams for target kinds, checks, builders, asset providers, engines, plugins | maintainers | Done, except engine pins (R1.5) |
| M2 Product completeness | Every kind of target gets study → build → check → refine with a real check | maintainers | Websites complete; apps and games build and run; API-key builds have never run live (R5.5); agents other than Claude Code are only partly wired (R2.2) |
| M3 Engine depth | More tools, and the known partial ones | open | 314 tools; the open lane |
| M4 Release | Packaging, signing, a managed tier | maintainers | v0.3.0 released, signed, on every platform; a macOS CLI question and the managed tier remain |
@@ -84,7 +84,7 @@ Issues are ranked by people affected and how badly, after leaving out what's alr
| 3 | R2.4 Runtime study, R2.5 Behaviour checks | scripted input (R2.4) before R2.5's sheet check | Makes "ready" mean more for apps and games |
| 3 | R2.7, R2.8 | — | Small gaps left in finished work |
| 3 | R2.9 Everyday use, R2.10 Pinned builds | — | Open to anyone at any time; most lines stand alone |
-| 3 | R1.5, R1.6 | — | Small leftovers |
+| 3 | R1.5 | — | Small leftovers |
| Any | M3: R3.3, R3.9, R3.11 | — | Open lane |
| Later | R4.1 macOS CLI, R4.2 Managed tier | **decision** | Not before M5 |
@@ -418,8 +418,11 @@ Owner: open · Status: in progress
### R1.6 Headless first
Owner: maintainers · Status: in progress
-- [ ] Give Linux-specific Clang guidance in Unreal's guided installer when the bundled compiler
+- [x] Give Linux-specific Clang guidance in Unreal's guided installer when the bundled compiler
is missing (the requirements summary is already platform-specific).
+ — claimed: AlexJoaquimPereira, branch `bugfix/r1.6-linux-unreal-clang`
+- [x] Give macOS the right C++ guidance when Xcode is missing: the status line and
+ requirements summary now name Xcode, matching the guided step.
- [x] Find Visual Studio's C++ tools on Windows when Visual Studio is installed outside Program
Files (through the Visual Studio Installer's `ProgramData` instance state or developer
environment variables, #669, [PR #726](https://github.com/storytold/craft-anything/pull/726))
diff --git a/docs/STATUS.md b/docs/STATUS.md
index f381fe78..f318b6c6 100644
--- a/docs/STATUS.md
+++ b/docs/STATUS.md
@@ -116,15 +116,18 @@ validation. Hub and headless tool selections share a strict disk-based save that
settings changes and refuses damaged files or changed backends. Regression tests cover both entry
points. Rejected or cancelled model validation emits a terminal turn event so headless chat exits.
-### Linux Unreal setup
+### Unreal setup
Unreal installations registered in `~/.config/Epic/UnrealEngine/Install.ini` are found on Linux.
A valid absolute `UE_ROOT` selects an installation explicitly; an invalid override falls back to
registered installations. The version comes from `Engine/Build/Build.version`, and C++ readiness
checks for the selected engine's bundled Clang, not an unrelated system compiler or another
installation's SDK. The Linux requirements summary (`Builder::needs` for Unreal) now describes
-the bundled Clang toolchain. The guided installer still shows Visual Studio instructions when
-Clang is missing; platform-specific guidance in that flow remains a follow-up.
+the bundled Clang toolchain. The guided installer now gives Linux-specific guidance: it names the
+bundled Clang and points at the engine's `Engine/Build/BatchFiles/Linux/SetupToolchain.sh` (or `Setup.sh`
+for a source build) when Clang is missing. On macOS, the status line and requirements summary now
+name Xcode, matching the guided step. The guidance strings are unit-tested; no live Unreal
+install or macOS run was performed for this copy change.
Checked with isolated registry and SDK fixtures and with a native Fedora install of Unreal
5.8.4. On Windows, Visual Studio C++ readiness also checks instances registered in