mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-15 06:45:42 -04:00
fix: Compilation Error
This commit is contained in:
parent
1e3a5f9515
commit
f55fe0fc45
@ -54,10 +54,8 @@ import org.jackhuang.hmcl.util.*;
|
|||||||
import org.jackhuang.hmcl.util.gson.UUIDTypeAdapter;
|
import org.jackhuang.hmcl.util.gson.UUIDTypeAdapter;
|
||||||
import org.jackhuang.hmcl.util.i18n.I18n;
|
import org.jackhuang.hmcl.util.i18n.I18n;
|
||||||
import org.jackhuang.hmcl.util.io.ResponseCodeException;
|
import org.jackhuang.hmcl.util.io.ResponseCodeException;
|
||||||
import org.jackhuang.hmcl.util.platform.CommandBuilder;
|
import org.jackhuang.hmcl.util.platform.*;
|
||||||
import org.jackhuang.hmcl.util.platform.JavaVersion;
|
import org.jackhuang.hmcl.util.platform.JavaVersion;
|
||||||
import org.jackhuang.hmcl.util.platform.ManagedProcess;
|
|
||||||
import org.jackhuang.hmcl.util.platform.OperatingSystem;
|
|
||||||
import org.jackhuang.hmcl.util.versioning.VersionNumber;
|
import org.jackhuang.hmcl.util.versioning.VersionNumber;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -373,7 +371,7 @@ public final class LauncherHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!flag && java.getPlatform() == org.jackhuang.hmcl.util.platform.Platform.BIT_32 &&
|
if (!flag && java.getPlatform() == org.jackhuang.hmcl.util.platform.Platform.BIT_32 &&
|
||||||
org.jackhuang.hmcl.util.platform.Platform.IS_64_BIT) {
|
Architecture.CURRENT.getPlatform() == org.jackhuang.hmcl.util.platform.Platform.BIT_64) {
|
||||||
final JavaVersion java32 = java;
|
final JavaVersion java32 = java;
|
||||||
|
|
||||||
// First find if same java version but whose platform is 64-bit installed.
|
// First find if same java version but whose platform is 64-bit installed.
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
package org.jackhuang.hmcl.game;
|
package org.jackhuang.hmcl.game;
|
||||||
|
|
||||||
import org.jackhuang.hmcl.util.Lang;
|
import org.jackhuang.hmcl.util.Lang;
|
||||||
|
import org.jackhuang.hmcl.util.platform.Architecture;
|
||||||
import org.jackhuang.hmcl.util.platform.OperatingSystem;
|
import org.jackhuang.hmcl.util.platform.OperatingSystem;
|
||||||
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@ -71,7 +72,7 @@ public final class OSRestriction {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (arch != null)
|
if (arch != null)
|
||||||
return !Lang.test(() -> !Pattern.compile(arch).matcher(OperatingSystem.SYSTEM_ARCHITECTURE).matches());
|
return !Lang.test(() -> !Pattern.compile(arch).matcher(Architecture.SYSTEM_ARCHITECTURE).matches());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -44,15 +44,10 @@ public enum Platform {
|
|||||||
return bit;
|
return bit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* True if current Java Environment is 64-bit.
|
|
||||||
*/
|
|
||||||
public static final boolean IS_64_BIT = OperatingSystem.SYSTEM_ARCHITECTURE.contains("64");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The platform of current Java Environment.
|
* The platform of current Java Environment.
|
||||||
*/
|
*/
|
||||||
public static final Platform PLATFORM = IS_64_BIT ? BIT_64 : BIT_32;
|
public static final Platform PLATFORM = Architecture.CURRENT.getPlatform();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The json serializer to {@link Platform}.
|
* The json serializer to {@link Platform}.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user