mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +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");
|
||||
launcherLibrariesCompile = dir.resolve("launcher-libraries-compile");
|
||||
this.args = Arrays.asList(args);
|
||||
configFile = dir.resolve("LaunchServer.conf");
|
||||
runtimeConfigFile = dir.resolve("RuntimeLaunchServer.conf");
|
||||
if(IOHelper.exists(dir.resolve("LaunchServer.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");
|
||||
privateKeyFile = dir.resolve("private.key");
|
||||
updatesDir = dir.resolve("updates");
|
||||
|
@ -765,7 +779,7 @@ private void generateConfigIfNotExists(boolean testEnv) throws IOException {
|
|||
LogHelper.error("ProjectName null. Using MineCraft");
|
||||
newConfig.projectName = "MineCraft";
|
||||
}
|
||||
|
||||
|
||||
newConfig.netty.address = "ws://" + address + ":9274/api";
|
||||
newConfig.netty.downloadURL = "http://" + address + ":9274/%dirname%/";
|
||||
newConfig.netty.launcherURL = "http://" + address + ":9274/Launcher.jar";
|
||||
|
|
|
@ -58,7 +58,7 @@ public void invoke(String... args) throws IOException, CommandException {
|
|||
client.setTitle(dirName);
|
||||
client.setDir(dirName);
|
||||
try (BufferedWriter writer = IOHelper.newWriter(IOHelper.resolveIncremental(server.profilesDir,
|
||||
dirName, "cfg"))) {
|
||||
dirName, "json"))) {
|
||||
Launcher.gsonManager.configGson.toJson(client, writer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue