mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
Изменение имени wrapper'а
This commit is contained in:
parent
303402310b
commit
6e648e17ad
3 changed files with 10 additions and 1 deletions
|
@ -29,7 +29,6 @@
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.zip.CRC32;
|
import java.util.zip.CRC32;
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
import ru.gravit.launcher.LauncherAPI;
|
||||||
import ru.gravit.launcher.hasher.HashedDir;
|
import ru.gravit.launcher.hasher.HashedDir;
|
||||||
import ru.gravit.utils.helper.CommonHelper;
|
import ru.gravit.utils.helper.CommonHelper;
|
||||||
|
@ -95,6 +94,8 @@ public static final class Config extends ConfigObject {
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
public final String authRejectString;
|
public final String authRejectString;
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
|
public final String projectName;
|
||||||
|
@LauncherAPI
|
||||||
public final String whitelistRejectString;
|
public final String whitelistRejectString;
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
public final boolean genMappings;
|
public final boolean genMappings;
|
||||||
|
@ -135,6 +136,7 @@ private Config(BlockConfigEntry block, Path coredir) {
|
||||||
launch4j = new ExeConf(block.getEntry("launch4J", BlockConfigEntry.class));
|
launch4j = new ExeConf(block.getEntry("launch4J", BlockConfigEntry.class));
|
||||||
sign = new SignConf(block.getEntry("signing", BlockConfigEntry.class), coredir);
|
sign = new SignConf(block.getEntry("signing", BlockConfigEntry.class), coredir);
|
||||||
binaryName = block.getEntryValue("binaryName", StringConfigEntry.class);
|
binaryName = block.getEntryValue("binaryName", StringConfigEntry.class);
|
||||||
|
projectName = block.hasEntry("projectName") ? block.getEntryValue("projectName", StringConfigEntry.class) : "Minecraft";
|
||||||
compress = block.getEntryValue("compress", BooleanConfigEntry.class);
|
compress = block.getEntryValue("compress", BooleanConfigEntry.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,12 @@ public void setAddress(String address)
|
||||||
body.append(address);
|
body.append(address);
|
||||||
body.append("\";");
|
body.append("\";");
|
||||||
}
|
}
|
||||||
|
public void setProjectName(String name)
|
||||||
|
{
|
||||||
|
body.append("this.projectname = \"");
|
||||||
|
body.append(name);
|
||||||
|
body.append("\";");
|
||||||
|
}
|
||||||
|
|
||||||
public void setPort(int port)
|
public void setPort(int port)
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,6 +134,7 @@ private void stdBuild() throws IOException {
|
||||||
server.buildHookManager.preHook(context);
|
server.buildHookManager.preHook(context);
|
||||||
jaConfigurator.setAddress(server.config.getAddress());
|
jaConfigurator.setAddress(server.config.getAddress());
|
||||||
jaConfigurator.setPort(server.config.port);
|
jaConfigurator.setPort(server.config.port);
|
||||||
|
jaConfigurator.setProjectName(server.config.projectName);
|
||||||
server.buildHookManager.registerAllClientModuleClass(jaConfigurator);
|
server.buildHookManager.registerAllClientModuleClass(jaConfigurator);
|
||||||
try (ZipInputStream input = new ZipInputStream(
|
try (ZipInputStream input = new ZipInputStream(
|
||||||
IOHelper.newInput(IOHelper.getResourceURL("Launcher.jar")))) {
|
IOHelper.newInput(IOHelper.getResourceURL("Launcher.jar")))) {
|
||||||
|
|
Loading…
Reference in a new issue