From 62ec69530319a17552f52dbfb7bdf3c4575ac85b Mon Sep 17 00:00:00 2001 From: gensokyo-dev Date: Sat, 21 Nov 2026 19:10:26 +0000 Subject: [PATCH] fix(ghidra): link the published installation guide from decompiler remediation The npm package does not ship docs/, so a repository-relative guide path in doctor's remediation could not be opened by npm users. Link the guide on GitHub instead. Refs #7018 Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> --- src/ghidra/GhidraInstallation.test.ts | 18 +++++++++++++++--- src/ghidra/GhidraInstallation.ts | 8 ++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/ghidra/GhidraInstallation.test.ts b/src/ghidra/GhidraInstallation.test.ts index 822e9cee47..887f873491 100644 --- a/src/ghidra/GhidraInstallation.test.ts +++ b/src/ghidra/GhidraInstallation.test.ts @@ -667,9 +667,21 @@ describe("Ghidra installation rejection diagnostics", () => { describe("Ghidra native decompiler remediation", () => { it.each([ - ["darwin", "x64", "installation.md#missing-macos-native-decompiler"], - ["darwin", "arm64", "installation.md#macos-arm64-native-decompiler"], - ["linux", "arm64", "installation.md#ghidra"], + [ + "darwin", + "x64", + "https://github.com/morluto/rea/blob/main/docs/getting-started/installation.md#missing-macos-native-decompiler", + ], + [ + "darwin", + "arm64", + "https://github.com/morluto/rea/blob/main/docs/getting-started/installation.md#macos-arm64-native-decompiler", + ], + [ + "linux", + "arm64", + "https://github.com/morluto/rea/blob/main/docs/getting-started/installation.md#ghidra", + ], ["linux", "x64", undefined], ] as const)( "points a missing %s/%s decompiler to how to build it", diff --git a/src/ghidra/GhidraInstallation.ts b/src/ghidra/GhidraInstallation.ts index f4ceadda17..bc27cecd83 100644 --- a/src/ghidra/GhidraInstallation.ts +++ b/src/ghidra/GhidraInstallation.ts @@ -984,6 +984,10 @@ const nativeDecompilerCheck = ({ }); }; +/** The published installation guide; the npm package does not ship `docs/`. */ +const INSTALLATION_GUIDE = + "https://github.com/morluto/rea/blob/main/docs/getting-started/installation.md"; + /** * Where to get a decompiler that official release archives omit. Ghidra's * official archives ship native binaries only for Windows and Linux x64; the @@ -994,9 +998,9 @@ const nativeDecompilerBuildHint = ( architecture: NodeJS.Architecture, ): string => platform === "darwin" && (architecture === "x64" || architecture === "arm64") - ? ` Official Ghidra release archives include no macOS decompiler; build it from the archive's decompiler source as described in docs/getting-started/installation.md#${architecture === "arm64" ? "macos-arm64-native-decompiler" : "missing-macos-native-decompiler"}.` + ? ` Official Ghidra release archives include no macOS decompiler; build it from the archive's decompiler source as described in ${INSTALLATION_GUIDE}#${architecture === "arm64" ? "macos-arm64-native-decompiler" : "missing-macos-native-decompiler"}.` : platform === "linux" && architecture === "arm64" - ? " Official Ghidra release archives include no Linux arm64 decompiler; build Ghidra's native components for this host as described in docs/getting-started/installation.md#ghidra." + ? ` Official Ghidra release archives include no Linux arm64 decompiler; build Ghidra's native components for this host as described in ${INSTALLATION_GUIDE}#ghidra.` : ""; /**