From 9286fed583625aee58c3927e0022d79955ad87ba Mon Sep 17 00:00:00 2001 From: zaxar163 Date: Sun, 6 Jan 2019 21:27:13 +0400 Subject: [PATCH] Final fixes. --- .../binary/tasks/UnpackBuildTask.java | 7 ++-- .../gravit/launchserver/defaults/config.cfg | 34 +++++++++++-------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/UnpackBuildTask.java b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/UnpackBuildTask.java index df46b778..7dc5dfb1 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/UnpackBuildTask.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/UnpackBuildTask.java @@ -11,9 +11,11 @@ public class UnpackBuildTask implements LauncherBuildTask { private final LaunchServer server; + private final Path result; public UnpackBuildTask(LaunchServer server) { this.server = server; + result = server.dir.resolve(server.config.binaryName + "-clean.jar"); } @Override @@ -23,9 +25,8 @@ public String getName() { @Override public Path process(Path inputFile) throws IOException { - Path result = server.dir.resolve(server.config.binaryName + "-clean.jar"); - URL url = IOHelper.getResourceURL("Launcher.jar"); - UnpackHelper.unpack(url, result); + UnpackHelper.unpack(IOHelper.getResourceURL("Launcher.jar"), result); + tryUnpack(); return result; } diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg index dff8f626..32a03972 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/config.cfg @@ -1,14 +1,22 @@ { "port": 7240, - "authHandler": { - "type": "memory" - }, + "address": "xx.xx", + "bindAddress": "0.0.0.0", + "projectName": "XXX", + "mirrors": [ + "http://mirror.gravitlauncher.ml/" + ], + "binaryName": "Launcher", + "env": "STD", "authProvider": [ { "message": "Настройте authProvider", "type": "reject" } ], + "authHandler": { + "type": "memory" + }, "permissionsHandler": { "filename": "permissions.json", "type": "json" @@ -21,12 +29,14 @@ "hwidHandler": { "type": "accept" }, - "threadCount": 0, + "threadCount": 2, "threadCoreCount": 0, "launch4j": { "enabled": false, - "fileDesc": "GravitLauncher 4.1.0", - "fileVer": "4.1.0", + "productName": "GravitLauncher", + "productVer": "4.2.0.0", + "fileDesc": "GravitLauncher 4.2.0", + "fileVer": "4.2.0.0", "internalName": "Launcher", "copyright": "© GravitLauncher Team", "trademarks": "This product is licensed under GPLv3", @@ -44,12 +54,8 @@ "genMappings": false, "isUsingWrapper": false, "isDownloadJava": false, - "mirrors": [ - "http://mirror.gravitlauncher.ml/" - ], - "binaryName": "Launcher", - "address": "localhost", - "bindAddress": "0.0.0.0", - "env": "STD", - "isWarningMissArchJava": false + "isWarningMissArchJava": false, + "enabledProGuard": true, + "stripLineNumbers": true, + "startScript": ".\\start.sh" } \ No newline at end of file