Name fixes.

This commit is contained in:
zaxar163 2018-12-08 11:50:52 +03:00
parent d0d92fcf86
commit d559025241
No known key found for this signature in database
GPG key ID: E3B309DD3852DE06
3 changed files with 9 additions and 5 deletions

View file

@ -357,7 +357,6 @@ public LaunchServer(Path dir) throws IOException, InvalidKeySpecException {
CommandHandler localCommandHandler;
try {
Class.forName("jline.Terminal");
// JLine2 available
localCommandHandler = new JLineCommandHandler(this);
LogHelper.info("JLine2 terminal enabled");
@ -379,7 +378,8 @@ public LaunchServer(Path dir) throws IOException, InvalidKeySpecException {
KeyPair pair = SecurityHelper.genRSAKeyPair();
publicKey = (RSAPublicKey) pair.getPublic();
privateKey = (RSAPrivateKey) pair.getPrivate();
Files.deleteIfExists(publicKeyFile);
Files.deleteIfExists(privateKeyFile);
// Write key pair files
LogHelper.info("Writing RSA keypair files");
IOHelper.write(publicKeyFile, publicKey.getEncoded());
@ -447,7 +447,11 @@ public LaunchServer(Path dir) throws IOException, InvalidKeySpecException {
}
private LauncherBinary binary() {
if (config.launch4j.enabled) return new EXEL4JLauncherBinary(this);
try {
Class.forName("net.sf.launch4j.Builder");
if (config.launch4j.enabled) return new EXEL4JLauncherBinary(this);
} catch (ClassNotFoundException ignored) {
}
return new EXELauncherBinary(this);
}

View file

@ -41,7 +41,7 @@ public ProguardConf(LaunchServer srv) {
confStrs.add("-printmapping \'" + mappings.toFile().getName() + "\'");
confStrs.add("-obfuscationdictionary \'" + words.toFile().getName() + "\'");
confStrs.add("-injar \'" + srv.dir.toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + "-nonObf.jar\'");
confStrs.add("-outjar \'" + srv.dir.toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + "-obfed.jar\'");
confStrs.add("-outjar \'" + srv.dir.toAbsolutePath() + IOHelper.PLATFORM_SEPARATOR + srv.config.binaryName + "-obfPre.jar\'");
confStrs.add("-classobfuscationdictionary \'" + words.toFile().getName() + "\'");
confStrs.add(readConf());

View file

@ -127,7 +127,7 @@ public JARLauncherBinary(LaunchServer server) throws IOException {
runtimeDir = server.dir.resolve(Launcher.RUNTIME_DIR);
guardDir = server.dir.resolve(Launcher.GUARD_DIR);
initScriptFile = runtimeDir.resolve(Launcher.INIT_SCRIPT_FILE);
obfJar = server.dir.resolve(server.config.binaryName + "-obfed.jar");
obfJar = server.dir.resolve(server.config.binaryName + "-obfPre.jar");
obfOutJar = server.config.buildPostTransform.enabled ? server.dir.resolve(server.config.binaryName + "-obf.jar")
: syncBinaryFile;
cleanJar = server.dir.resolve(server.config.binaryName + "-clean.jar");