@@ -50,7 +50,6 @@ public final class EntryPoint {
|
|||||||
LOG.start(Metadata.HMCL_CURRENT_DIRECTORY.resolve("logs"));
|
LOG.start(Metadata.HMCL_CURRENT_DIRECTORY.resolve("logs"));
|
||||||
|
|
||||||
setupJavaFXVMOptions();
|
setupJavaFXVMOptions();
|
||||||
checkDirectoryPath();
|
|
||||||
|
|
||||||
if (OperatingSystem.CURRENT_OS == OperatingSystem.MACOS && !isInsideMacAppBundle())
|
if (OperatingSystem.CURRENT_OS == OperatingSystem.MACOS && !isInsideMacAppBundle())
|
||||||
initIcon();
|
initIcon();
|
||||||
@@ -192,16 +191,6 @@ public final class EntryPoint {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void checkDirectoryPath() {
|
|
||||||
String currentDir = System.getProperty("user.dir", "");
|
|
||||||
if (currentDir.contains("!")) {
|
|
||||||
LOG.error("The current working path contains an exclamation mark: " + currentDir);
|
|
||||||
// No Chinese translation because both Swing and JavaFX cannot render Chinese character properly when exclamation mark exists in the path.
|
|
||||||
showErrorAndExit("Exclamation mark(!) is not allowed in the path where HMCL is in.\n"
|
|
||||||
+ "The path is " + currentDir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void checkJavaFX() {
|
private static void checkJavaFX() {
|
||||||
try {
|
try {
|
||||||
SelfDependencyPatcher.patch();
|
SelfDependencyPatcher.patch();
|
||||||
|
|||||||
@@ -102,7 +102,19 @@ public final class Main {
|
|||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void checkDirectoryPath() {
|
||||||
|
String currentDir = System.getProperty("user.dir", "");
|
||||||
|
if (currentDir.contains("!")) {
|
||||||
|
SwingUtils.initLookAndFeel();
|
||||||
|
System.err.println("The current working path contains an exclamation mark: " + currentDir);
|
||||||
|
// No Chinese translation because both Swing and JavaFX cannot render Chinese character properly when exclamation mark exists in the path.
|
||||||
|
SwingUtils.showErrorDialog("Exclamation mark(!) is not allowed in the path where HMCL is in.\n" + "The path is " + currentDir);
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Throwable {
|
public static void main(String[] args) throws Throwable {
|
||||||
|
checkDirectoryPath();
|
||||||
if (getJavaFeatureVersion(System.getProperty("java.version")) >= MINIMUM_JAVA_VERSION) {
|
if (getJavaFeatureVersion(System.getProperty("java.version")) >= MINIMUM_JAVA_VERSION) {
|
||||||
EntryPoint.main(args);
|
EntryPoint.main(args);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user