mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-07-30 07:18:37 -09:00
GP-2786: Backporting Visual Studio Build Tools support to patch
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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].installationPath
|
||||
|
||||
Reference in New Issue
Block a user