2018-01-16 19:34:53 +08:00
|
|
|
/*
|
|
|
|
|
* Hello Minecraft! Launcher.
|
2018-02-20 18:03:34 +08:00
|
|
|
* Copyright (C) 2018 huangyuhui <huanghongxun2008@126.com>
|
2018-01-16 19:34:53 +08:00
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
|
|
|
|
*/
|
|
|
|
|
package org.jackhuang.hmcl;
|
|
|
|
|
|
2018-02-28 23:34:31 +08:00
|
|
|
import org.jackhuang.hmcl.util.Logging;
|
2018-01-16 19:34:53 +08:00
|
|
|
|
2018-03-02 23:42:38 +08:00
|
|
|
import javax.swing.*;
|
2018-01-16 19:34:53 +08:00
|
|
|
import java.io.File;
|
|
|
|
|
|
2018-02-28 23:34:31 +08:00
|
|
|
public final class Main {
|
2018-01-16 19:34:53 +08:00
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
2018-02-28 23:34:31 +08:00
|
|
|
String currentDirectory = new File("").getAbsolutePath();
|
|
|
|
|
if (currentDirectory.contains("!")) {
|
2018-03-04 23:29:27 +08:00
|
|
|
System.err.println("Exclamation mark(!) is not allowed in the path where HMCL is in. Forcibly exit.");
|
2018-02-28 23:34:31 +08:00
|
|
|
|
|
|
|
|
// No Chinese translation because both Swing and JavaFX cannot render Chinese character properly when exclamation mark exists in the path.
|
|
|
|
|
String message = "Exclamation mark(!) is not allowed in the path where HMCL is in.\nThe path is " + currentDirectory;
|
|
|
|
|
JOptionPane.showMessageDialog(null, message, "Error", JOptionPane.ERROR_MESSAGE);
|
|
|
|
|
System.exit(1);
|
|
|
|
|
} else
|
|
|
|
|
Launcher.main(args);
|
2018-01-16 19:34:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|