From 637867dbc85c32800fa62e95e4dc4dd1078f2082 Mon Sep 17 00:00:00 2001 From: Gravit Date: Thu, 29 Nov 2018 00:16:38 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=87=D0=B5=D0=BD=D1=8C=20=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D0=BD=D1=8B=D0=B9=20=D0=91=D0=B0=D0=B3=20?= =?UTF-8?q?=D1=81=20NPE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/gravit/launchserver/binary/JARLauncherBinary.java | 7 +++---- Launcher/runtime/dialog/overlay/settings/settings.js | 1 + Launcher/runtime/engine/api.js | 2 +- .../src/main/java/ru/gravit/launcher/JSApplication.java | 1 - .../src/main/java/ru/gravit/launcher/LauncherEngine.java | 2 ++ 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java index cf67ff62..d47aa24b 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java @@ -123,8 +123,7 @@ public JARLauncherBinary(LaunchServer server) throws IOException { runtimeDir = server.dir.resolve(Launcher.RUNTIME_DIR); guardDir = server.dir.resolve("guard"); initScriptFile = runtimeDir.resolve(Launcher.INIT_SCRIPT_FILE); - obfJar = server.config.buildPostTransform.enabled ? server.dir.resolve(server.config.binaryName + "-obf.jar") - : syncBinaryFile; + obfJar = syncBinaryFile; tryUnpackRuntime(); } @@ -179,8 +178,8 @@ public void build() throws IOException { } } } - if (server.config.buildPostTransform.enabled) - transformedBuild(); + //if (server.config.buildPostTransform.enabled) + // transformedBuild(); } private void transformedBuild() throws IOException { diff --git a/Launcher/runtime/dialog/overlay/settings/settings.js b/Launcher/runtime/dialog/overlay/settings/settings.js index 1ec553fe..f0ce9af1 100644 --- a/Launcher/runtime/dialog/overlay/settings/settings.js +++ b/Launcher/runtime/dialog/overlay/settings/settings.js @@ -169,6 +169,7 @@ var settingsOverlay = { settingsOverlay.dirLabel.setText(IOHelper.toString(settings.updatesDir)); } }; +LogHelper.debug("Dir: %s", DirBridge.dir); var settings = new settingsClass; /* ====================== CLI PARAMS ===================== */ var cliParams = { diff --git a/Launcher/runtime/engine/api.js b/Launcher/runtime/engine/api.js index fb4ded98..37b3ab55 100644 --- a/Launcher/runtime/engine/api.js +++ b/Launcher/runtime/engine/api.js @@ -2,7 +2,7 @@ var Launcher = LauncherClass.static; var LauncherConfig = LauncherConfigClass.static; var HTTPRequest = HTTPRequestClass.static; var DirBridge = DirBridgeClass.static; -var FunctionalBridge = FunctionalBridgeClass.class; +var FunctionalBridge = FunctionalBridgeClass.static; // Hasher class API imports var PlayerProfile = PlayerProfileClass.static; diff --git a/Launcher/src/main/java/ru/gravit/launcher/JSApplication.java b/Launcher/src/main/java/ru/gravit/launcher/JSApplication.java index 9c43985c..71ae1192 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/JSApplication.java +++ b/Launcher/src/main/java/ru/gravit/launcher/JSApplication.java @@ -3,7 +3,6 @@ import java.util.concurrent.atomic.AtomicReference; import javafx.application.Application; -import ru.gravit.launcher.LauncherAPI; @SuppressWarnings("AbstractClassNeverImplemented") public abstract class JSApplication extends Application { diff --git a/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java b/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java index 89f61a62..9fa86788 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java +++ b/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java @@ -204,6 +204,7 @@ private void setScriptBindings() { @LauncherAPI public void start(String... args) throws Throwable { + LogHelper.debug("%d", LauncherSettings.settingsMagic); Launcher.modulesManager = new ClientModuleManager(this); LauncherConfig.getAutogenConfig().initModules(); //INIT Launcher.modulesManager.preInitModules(); @@ -216,6 +217,7 @@ public void start(String... args) throws Throwable { CommonHelper.newThread("FX Task Worker", true, FunctionalBridge.worker); loadScript(Launcher.API_SCRIPT_FILE); loadScript(Launcher.CONFIG_SCRIPT_FILE); + LogHelper.debug("Dir: %s", DirBridge.dir); loadScript(Launcher.INIT_SCRIPT_FILE); LogHelper.info("Invoking start() function"); Invocable invoker = (Invocable) engine;