mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2024-11-27 06:10:08 +08:00
feat: EXE launcher no longer reject Java 11 and later.
This commit is contained in:
parent
2f17552b2c
commit
61597cb83d
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.exe filter=lfs diff=lfs merge=lfs -text
|
Binary file not shown.
@ -23,7 +23,7 @@
|
||||
<ProjectGuid>{672B1019-E741-4C0D-A986-627E2ACE157B}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>HMCL</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>HMCLauncher</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
@ -49,7 +49,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -9,7 +9,7 @@ const LPCWSTR JRE_OLD = L"SOFTWARE\\JavaSoft\\Java Runtime Environment";
|
||||
const LPCWSTR JDK_NEW = L"SOFTWARE\\JavaSoft\\JDK";
|
||||
const LPCWSTR JRE_NEW = L"SOFTWARE\\JavaSoft\\JRE";
|
||||
|
||||
bool oldJavaFound = false, newJavaFound = false;
|
||||
bool oldJavaFound = false;
|
||||
|
||||
bool FindJavaByRegistryKey(HKEY rootKey, LPCWSTR subKey, std::wstring & path)
|
||||
{
|
||||
@ -58,8 +58,6 @@ bool FindJavaByRegistryKey(HKEY rootKey, LPCWSTR subKey, std::wstring & path)
|
||||
{
|
||||
if (Version(javaVer) < JAVA_8)
|
||||
oldJavaFound = true;
|
||||
else if (JAVA_11 <= Version(javaVer))
|
||||
newJavaFound = true;
|
||||
else
|
||||
flag = true;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
Version J8(TEXT("8")), J11(TEXT("11"));
|
||||
Version J8(TEXT("8"));
|
||||
|
||||
void RawLaunchJVM(const wstring &javaPath, const wstring &jarPath)
|
||||
{
|
||||
@ -20,7 +20,7 @@ void LaunchJVM(const wstring &javaPath, const wstring &jarPath)
|
||||
if (!MyGetFileVersionInfo(javaPath, javaVersion))
|
||||
return;
|
||||
|
||||
if (J8 <= javaVersion && javaVersion < J11)
|
||||
if (J8 <= javaVersion)
|
||||
{
|
||||
RawLaunchJVM(javaPath, jarPath);
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ bool FindFirstFileExists(LPCWSTR lpPath, DWORD dwFilter)
|
||||
bool GetArch(bool & is64Bit)
|
||||
{
|
||||
#if _WIN64
|
||||
isWindows64bit = true;
|
||||
is64Bit = true;
|
||||
return true;
|
||||
#elif _WIN32
|
||||
typedef BOOL(WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
|
||||
|
Loading…
Reference in New Issue
Block a user