Config fix (#137)

* Removed unnecessary conf.

* Config bugs fixes.

* Organize imports.
This commit is contained in:
Zaxar163 2019-01-09 18:03:14 +03:00 committed by Gravit
parent 8653de90d4
commit 288fc7e70b
2 changed files with 2 additions and 11 deletions

View file

@ -119,8 +119,6 @@ public static final class Config {
public ExeConf launch4j; public ExeConf launch4j;
public PostBuildTransformConf buildPostTransform;
public boolean compress; public boolean compress;
public int authRateLimit; 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<String> script;
}
public static void main(String... args) throws Throwable { public static void main(String... args) throws Throwable {
JVMHelper.checkStackTrace(LaunchServer.class); JVMHelper.checkStackTrace(LaunchServer.class);
JVMHelper.verifySystemProperties(LaunchServer.class, true); JVMHelper.verifySystemProperties(LaunchServer.class, true);
@ -571,9 +564,8 @@ private void generateConfigIfNotExists() throws IOException {
newConfig.launch4j.txtProductVersion = "%s, build %d"; newConfig.launch4j.txtProductVersion = "%s, build %d";
newConfig.launch4j.productName = "GravitLauncher"; newConfig.launch4j.productName = "GravitLauncher";
newConfig.launch4j.productVer = newConfig.launch4j.fileVer; newConfig.launch4j.productVer = newConfig.launch4j.fileVer;
newConfig.buildPostTransform = new PostBuildTransformConf();
newConfig.env = LauncherConfig.LauncherEnvironment.STD; 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.authHandler = new MemoryAuthHandler();
newConfig.hwidHandler = new AcceptHWIDHandler(); newConfig.hwidHandler = new AcceptHWIDHandler();

View file

@ -10,9 +10,8 @@
import java.util.Collections; import java.util.Collections;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.command.Command; import ru.gravit.launchserver.command.Command;
import ru.gravit.launchserver.command.CommandException; import ru.gravit.launchserver.command.CommandException;