mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] json расширение вместо conf/cfg
This commit is contained in:
parent
e556bd70e8
commit
b93c7d33eb
2 changed files with 18 additions and 4 deletions
|
@ -463,8 +463,22 @@ public LaunchServer(Path dir, boolean testEnv, String[] args) throws IOException
|
||||||
launcherLibraries = dir.resolve("launcher-libraries");
|
launcherLibraries = dir.resolve("launcher-libraries");
|
||||||
launcherLibrariesCompile = dir.resolve("launcher-libraries-compile");
|
launcherLibrariesCompile = dir.resolve("launcher-libraries-compile");
|
||||||
this.args = Arrays.asList(args);
|
this.args = Arrays.asList(args);
|
||||||
configFile = dir.resolve("LaunchServer.conf");
|
if(IOHelper.exists(dir.resolve("LaunchServer.conf")))
|
||||||
runtimeConfigFile = dir.resolve("RuntimeLaunchServer.conf");
|
{
|
||||||
|
configFile = dir.resolve("LaunchServer.conf");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
configFile = dir.resolve("LaunchServer.json");
|
||||||
|
}
|
||||||
|
if(IOHelper.exists(dir.resolve("RuntimeLaunchServer.conf")))
|
||||||
|
{
|
||||||
|
runtimeConfigFile = dir.resolve("RuntimeLaunchServer.conf");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
runtimeConfigFile = dir.resolve("RuntimeLaunchServer.json");
|
||||||
|
}
|
||||||
publicKeyFile = dir.resolve("public.key");
|
publicKeyFile = dir.resolve("public.key");
|
||||||
privateKeyFile = dir.resolve("private.key");
|
privateKeyFile = dir.resolve("private.key");
|
||||||
updatesDir = dir.resolve("updates");
|
updatesDir = dir.resolve("updates");
|
||||||
|
@ -765,7 +779,7 @@ private void generateConfigIfNotExists(boolean testEnv) throws IOException {
|
||||||
LogHelper.error("ProjectName null. Using MineCraft");
|
LogHelper.error("ProjectName null. Using MineCraft");
|
||||||
newConfig.projectName = "MineCraft";
|
newConfig.projectName = "MineCraft";
|
||||||
}
|
}
|
||||||
|
|
||||||
newConfig.netty.address = "ws://" + address + ":9274/api";
|
newConfig.netty.address = "ws://" + address + ":9274/api";
|
||||||
newConfig.netty.downloadURL = "http://" + address + ":9274/%dirname%/";
|
newConfig.netty.downloadURL = "http://" + address + ":9274/%dirname%/";
|
||||||
newConfig.netty.launcherURL = "http://" + address + ":9274/Launcher.jar";
|
newConfig.netty.launcherURL = "http://" + address + ":9274/Launcher.jar";
|
||||||
|
|
|
@ -58,7 +58,7 @@ public void invoke(String... args) throws IOException, CommandException {
|
||||||
client.setTitle(dirName);
|
client.setTitle(dirName);
|
||||||
client.setDir(dirName);
|
client.setDir(dirName);
|
||||||
try (BufferedWriter writer = IOHelper.newWriter(IOHelper.resolveIncremental(server.profilesDir,
|
try (BufferedWriter writer = IOHelper.newWriter(IOHelper.resolveIncremental(server.profilesDir,
|
||||||
dirName, "cfg"))) {
|
dirName, "json"))) {
|
||||||
Launcher.gsonManager.configGson.toJson(client, writer);
|
Launcher.gsonManager.configGson.toJson(client, writer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue