From 288fc7e70bba23a60bbb57062b715d74d9b27f9e Mon Sep 17 00:00:00 2001 From: Zaxar163 <35835496+Zaxar163@users.noreply.github.com> Date: Wed, 9 Jan 2019 18:03:14 +0300 Subject: [PATCH] Config fix (#137) * Removed unnecessary conf. * Config bugs fixes. * Organize imports. --- .../main/java/ru/gravit/launchserver/LaunchServer.java | 10 +--------- .../launchserver/command/hash/IndexAssetCommand.java | 3 +-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index e134fbc3..f2421da7 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -119,8 +119,6 @@ public static final class Config { public ExeConf launch4j; - public PostBuildTransformConf buildPostTransform; - public boolean compress; public int authRateLimit; @@ -232,11 +230,6 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO } } - public static class PostBuildTransformConf { - public boolean enabled; - public List script; - } - public static void main(String... args) throws Throwable { JVMHelper.checkStackTrace(LaunchServer.class); JVMHelper.verifySystemProperties(LaunchServer.class, true); @@ -571,9 +564,8 @@ private void generateConfigIfNotExists() throws IOException { newConfig.launch4j.txtProductVersion = "%s, build %d"; newConfig.launch4j.productName = "GravitLauncher"; newConfig.launch4j.productVer = newConfig.launch4j.fileVer; - newConfig.buildPostTransform = new PostBuildTransformConf(); newConfig.env = LauncherConfig.LauncherEnvironment.STD; - newConfig.startScript = "." + File.separator + "start.sh"; + newConfig.startScript = JVMHelper.OS_TYPE.equals(JVMHelper.OS.MUSTDIE) ? "." + File.separator + "start.bat" : "." + File.separator + "start.sh"; newConfig.authHandler = new MemoryAuthHandler(); newConfig.hwidHandler = new AcceptHWIDHandler(); diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/IndexAssetCommand.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/IndexAssetCommand.java index d7a24294..e54d3d67 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/IndexAssetCommand.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/IndexAssetCommand.java @@ -10,9 +10,8 @@ import java.util.Collections; import com.google.gson.Gson; -import com.google.gson.JsonArray; - import com.google.gson.JsonObject; + import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.command.Command; import ru.gravit.launchserver.command.CommandException;