Ghidra is a software reverse engineering (SRE) framework
GP-2786: Backporting Visual Studio Build Tools support to patch
Ryan Kurtz1bf953fc2a96
diff --git a/GPL/nativeBuildProperties.gradle b/GPL/nativeBuildProperties.gradleindex f83073e35b..4d887dba10 100644--- a/GPL/nativeBuildProperties.gradle+++ b/GPL/nativeBuildProperties.gradle@@ -52,6 +52,13 @@ model {}}}+ if (isCurrentWindows() && VISUAL_STUDIO_INSTALL_DIR) {+ // specify installDir because Gradle doesn't find VS Build Tools.+ // See https://github.com/gradle/gradle-native/issues/617#issuecomment-575735288+ visualCpp(VisualCpp) {+ installDir VISUAL_STUDIO_INSTALL_DIR+ }+ }}}diff --git a/GPL/vsconfig.gradle b/GPL/vsconfig.gradleindex 915b90ea90..4fe1edc223 100644--- a/GPL/vsconfig.gradle+++ b/GPL/vsconfig.gradle@@ -29,13 +29,13 @@ def configureVisualStudio() {println "Searching for latest Visual Studio and required components..."def vswherePath = "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vswhere.exe"if (!file(vswherePath).exists()) {- println "Visual Studio not found!"+ println " -> Visual Studio vswhere.exe not found!"return}- def vswhereOutput = "${vswherePath} -latest -format json".execute().text.trim()+ def vswhereOutput = "${vswherePath} -products * -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -format json".execute().text.trim()def vswhereJson = new groovy.json.JsonSlurper().parseText(vswhereOutput);if (vswhereJson.isEmpty()) {- println "Visual Studio not found!"+ println " -> Visual Studio not found!"return}def vsInstallDir = vswhereJson[0].installationPathdiff --git a/GhidraDocs/InstallationGuide.html b/GhidraDocs/InstallationGuide.htmlindex 20aee4d5b7..06da43fbe2 100644--- a/GhidraDocs/InstallationGuide.html+++ b/GhidraDocs/InstallationGuide.html@@ -326,7 +326,13 @@ system:</p><li>make, gcc, and g++ (Linux/macOS-only)</li><li><a href="https://visualstudio.microsoft.com/vs/community/">Microsoft Visual Studio</a>- 2017 or later (Windows-only)+ 2017 or later, or <a href="https://visualstudio.microsoft.com/visual-cpp-build-tools/">+ Microsoft C++ Build Tools</a> with the following components installed (Windows-only):+ <ul>+ <li>MSVC</li>+ <li>Windows SDK</li>+ <li>C++ ATL</li>+ </ul></li></ul><p>To build the native binaries for your current platform, execute the following script:</p>diff --git a/README.md b/README.mdindex 43fa6ef08a..f6ca04aa62 100644--- a/README.md+++ b/README.md@@ -46,7 +46,11 @@ To create the latest development build for your platform from this source reposi* [JDK 17 64-bit][jdk17]* [Gradle 7.3+][gradle]* make, gcc, and g++ (Linux/macOS-only)-* [Microsoft Visual Studio][vs] (Windows-only)+* [Microsoft Visual Studio][vs] or [Microsoft C++ Build Tools][vcbuildtools] with the following+ components installed (Windows-only):+ - MSVC+ - Windows SDK+ - C++ ATL##### Download and extract the source:[Download from GitHub][master]@@ -116,6 +120,7 @@ source project.[jdk17]: https://adoptium.net/temurin/releases[gradle]: https://gradle.org/releases/[vs]: https://visualstudio.microsoft.com/vs/community/+[vcbuildtools]: https://visualstudio.microsoft.com/visual-cpp-build-tools/[eclipse]: https://www.eclipse.org/downloads/packages/[master]: https://github.com/NationalSecurityAgency/ghidra/archive/refs/heads/master.zip[security]: https://github.com/NationalSecurityAgency/ghidra/security/advisories\ No newline at end of file