mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
LauncherEngine инициализируется во время загрухки клиента
This commit is contained in:
parent
49f6316417
commit
89027479c1
3 changed files with 9 additions and 1 deletions
|
@ -204,7 +204,7 @@ public void start(String... args) throws Throwable {
|
|||
// Load init.js script
|
||||
loadScript(Launcher.API_SCRIPT_FILE);
|
||||
loadScript(Launcher.INIT_SCRIPT_FILE);
|
||||
loadScript("config.js");
|
||||
loadScript(Launcher.CONFIG_SCRIPT_FILE);
|
||||
loadScript("dialog/dialog.js");
|
||||
LogHelper.info("Invoking start() function");
|
||||
Invocable invoker = (Invocable) engine;
|
||||
|
@ -216,4 +216,8 @@ public void start(String... args) throws Throwable {
|
|||
Launcher.modulesManager.postInitModules();
|
||||
invoker.invokeFunction("start", (Object) args);
|
||||
}
|
||||
public static LauncherEngine clientInstance()
|
||||
{
|
||||
return new LauncherEngine();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -401,6 +401,9 @@ else if(isDownloadJava)
|
|||
public static void main(String... args) throws Throwable {
|
||||
Launcher.modulesManager = new ClientModuleManager(null);
|
||||
LauncherConfig.getAutogenConfig().initModules(); //INIT
|
||||
LauncherEngine engine = LauncherEngine.clientInstance();
|
||||
engine.loadScript(Launcher.API_SCRIPT_FILE);
|
||||
engine.loadScript(Launcher.CONFIG_SCRIPT_FILE);
|
||||
Launcher.modulesManager.preInitModules();
|
||||
if (Launcher.isUsingAvanguard()) {
|
||||
AvanguardStarter.load();
|
||||
|
|
|
@ -59,6 +59,7 @@ static int readBuildNumber() {
|
|||
public static final String INIT_SCRIPT_FILE = "init.js";
|
||||
@LauncherAPI
|
||||
public static final String API_SCRIPT_FILE = "engine/api.js";
|
||||
public static final String CONFIG_SCRIPT_FILE = "config.js";
|
||||
|
||||
private static final Pattern UUID_PATTERN = Pattern.compile("-", Pattern.LITERAL);
|
||||
public static int MAJOR = 4;
|
||||
|
|
Loading…
Reference in a new issue