[platform] 32-bit JRE detection in Windows launchers (IDEA-229379)

GitOrigin-RevId: 3e7c7acf3042a6a4c3dd3b415b5d5dff08ca604a
This commit is contained in:
Roman Shevchenko
2020-02-10 16:13:17 +01:00
committed by intellij-monorepo-bot
parent de452c6c08
commit 52c60e9788
4 changed files with 8 additions and 17 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -288,16 +288,9 @@ bool LocateJVM()
if (FindJVMInSettings()) return true;
std::vector<std::string> jrePaths;
if(need64BitJRE) jrePaths.push_back(GetAdjacentDir("jbr"));
if(need64BitJRE) jrePaths.push_back(GetAdjacentDir("jre64"));
jrePaths.push_back(GetAdjacentDir("jre32"));
jrePaths.push_back(GetAdjacentDir("jre"));
for(std::vector<std::string>::iterator it = jrePaths.begin(); it != jrePaths.end(); ++it) {
if (FindValidJVM((*it).c_str()) && Is64BitJRE(jvmPath) == need64BitJRE)
{
return true;
}
if (FindValidJVM(GetAdjacentDir(need64BitJRE ? "jbr" : "jre32").c_str()) && Is64BitJRE(jvmPath) == need64BitJRE)
{
return true;
}
if (FindJVMInEnvVar("JAVA_HOME", result))

View File

@@ -33,14 +33,12 @@ IF NOT "%JDK%" == "" (
IF EXIST "%JDK%" GOTO check
)
IF EXIST "%IDE_HOME%\jbr" SET JDK=%IDE_HOME%\jbr
IF EXIST "%JDK%" GOTO check
IF EXIST "%IDE_HOME%\jre64" SET JDK=%IDE_HOME%\jre64
IF EXIST "%JDK%" GOTO check
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
IF EXIST "%IDE_HOME%\jbr" SET JDK=%IDE_HOME%\jbr
IF EXIST "%JDK%" GOTO check
)
IF EXIST "%IDE_HOME%\jre32" SET JDK=%IDE_HOME%\jre32
IF EXIST "%JDK%" GOTO check
IF EXIST "%IDE_HOME%\jre" SET JDK=%IDE_HOME%\jre
IF EXIST "%JDK%" GOTO check
IF EXIST "%JDK_HOME%" SET JDK=%JDK_HOME%
IF EXIST "%JDK%" GOTO check
@@ -61,7 +59,7 @@ IF EXIST "%JRE%\jre" SET JRE=%JDK%\jre
IF EXIST "%JRE%\lib\amd64" (
SET BITS=64
) ELSE (
IF EXIST "%JRE%\lib\jrt-fs.jar" SET BITS=64
IF EXIST "%JRE%\bin\windowsaccessbridge-64.dll" SET BITS=64
)
:: ---------------------------------------------------------------------