Corrected Visual Studio gradle configuration which must also support

standalone GPL builds
This commit is contained in:
ghidra1 2019-09-10 16:03:25 -04:00
parent af3fdf5391
commit d9da0f0b66
4 changed files with 60 additions and 37 deletions

View file

@ -74,43 +74,7 @@ project.ext.set("OS_NAMES", ["osx64", "win32", "win64", "linux64"])
/****************************************************************************
* Establish Visual Studio configuration environment for Windows native builds
****************************************************************************/
// Unclear if we can rely on the VisualCpp plugin to properly identify the correct
// Visual Studio paths when multiple versions of Visual Studio and SDKs are installed
project.ext.VISUAL_STUDIO_BASE_DIR = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017"
project.ext.WINDOWS_KITS_DIR = "C:\\Program Files (x86)\\Windows Kits\\10"
project.ext.VISUAL_STUDIO_INSTALL_DIR = "/"
project.ext.VISUAL_STUDIO_VCVARS_CMD = "UNKNOWN"
project.ext.MSVC_SDK_VERSION = "UNKNOWN"
project.ext.MSVC_TOOLS_VERSION = "UNKNOWN"
if (org.gradle.internal.os.OperatingSystem.current().isWindows()) {
project.ext.VISUAL_STUDIO_INSTALL_DIR = project.ext.VISUAL_STUDIO_BASE_DIR + "\\Professional"
if (!file(project.ext.VISUAL_STUDIO_INSTALL_DIR).exists()) {
project.ext.VISUAL_STUDIO_INSTALL_DIR = project.ext.VISUAL_STUDIO_BASE_DIR + "\\Community"
}
if (file(project.ext.VISUAL_STUDIO_INSTALL_DIR).exists()) {
println "Visual Studio Path: ${VISUAL_STUDIO_INSTALL_DIR}"
project.ext.VISUAL_STUDIO_VCVARS_CMD = "\"${VISUAL_STUDIO_INSTALL_DIR}\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x86_amd64"
// NOTE: Windows 7 targeting requires the use of the Windows 8.1 SDK and setting the
// WINVER property a value of "0x0601" which may be specified to the compiler/linker.
// If using a VS Solution this must be specified within the project file(s).
project.ext.WINVER = "0x0601"
// Rely on vcvars script to supply SDK versions
def COMMAND = "cmd /v:ON /c ${VISUAL_STUDIO_VCVARS_CMD} > nul && cmd /c echo"
project.ext.MSVC_SDK_VERSION = "${COMMAND} !WINDOWSSDKVERSION!".execute().text.trim().replace('\\', '')
println "Visual Studio SDK Version: ${MSVC_SDK_VERSION}"
project.ext.MSVC_TOOLS_VERSION = "${COMMAND} !VCTOOLSVERSION!".execute().text.trim().replace('\\', '')
println "Visual Studio VCTools Version: ${MSVC_TOOLS_VERSION}"
}
}
apply from: "GPL/vsconfig.gradle"
/*********************************************************************************
* Imports