Skip to content
Permalink
Browse files

8242507: Add support for Visual Studio 2019

Reviewed-by: arapte, jvos
  • Loading branch information
kevinrushforth committed May 5, 2020
1 parent 39d9c3b commit 2e900764e6dc80d21f50146fc7dcf1771ba1400b
@@ -190,22 +190,18 @@ if (hasProperty('toolchainDir')) {
def winSdkDllDir = "$WINDOWS_VS_WINSDKDLLINSTALLDIR/$CPU_BITS"

def WINDOWS_DLL_VER = WINDOWS_VS_VER
ext.MSVCR = null
ext.MSVCP = null

def windowsCRTVer = System.getenv("WINDOWS_CRT_VER") ?: WINDOWS_CRT_VER
if (WINDOWS_VS_VER == "150") {
WINDOWS_DLL_VER = "140"
ext.MSVCR = cygpath("${msvcRedstDir}/Microsoft.VC${windowsCRTVer}.CRT/vcruntime${WINDOWS_DLL_VER}.dll")
ext.MSVCP = cygpath("${msvcRedstDir}/Microsoft.VC${windowsCRTVer}.CRT/msvcp${WINDOWS_DLL_VER}.dll")
}

def vs2017DllPath = cygpath("${msvcRedstDir}/Microsoft.VC${windowsCRTVer}.CRT")
if (file(vs2017DllPath).exists()) {
ext.WIN.VS2017DLLNames = [
"concrt140.dll",
"msvcp140.dll",
"vcruntime140.dll"
"vcruntime140.dll",
"vcruntime140_1.dll"
];
ext.WIN.VS2017DLLs = []
ext.WIN.VS2017DLLNames.each { vsdll->
@@ -96,7 +96,7 @@ public Void run() {
} else {
overrideUIScale = 1.0f;
}
// This loading of msvcp140.dll and vcruntime140.dll (VS2017) is required on Windows platforms
// Load required Microsoft runtime DLLs on Windows platforms
Toolkit.loadMSWindowsLibraries();
Application.loadNativeLibrary();
return null;
@@ -153,8 +153,8 @@

// Finally load VS 2017 DLLs in the following order
"vcruntime140",
"msvcp140",
"concrt140"
"vcruntime140_1",
"msvcp140"
};

private static String lookupToolkitClass(String name) {
@@ -207,7 +207,7 @@ public static synchronized Toolkit getToolkit() {
return null;
});

// This loading of msvcp140.dll and vcruntime140.dll (VS2017) is required on Windows platforms
// Load required Microsoft runtime DLLs on Windows platforms
if (PlatformUtil.isWindows()) {
loadMSWindowsLibraries();
}

0 comments on commit 2e90076

Please sign in to comment.