diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java b/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java index d8482c1f..531dcca0 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/ProguardConf.java @@ -43,7 +43,7 @@ public ProguardConf(LaunchServer srv) { if (this.srv.config.genMappings) confStrs.add("-printmapping \'" + mappings.toFile().getName() + "\'"); confStrs.add("-obfuscationdictionary \'" + words.toFile().getName() + "\'"); confStrs.add("-injar \'../" + srv.config.binaryName + ".jar\'"); - confStrs.add("-injar \'../" + srv.config.binaryName + "-obf.jar\'"); + confStrs.add("-outjar \'../" + srv.config.binaryName + "-obf.jar\'"); confStrs.add("-classobfuscationdictionary \'" + words.toFile().getName() + "\'"); } diff --git a/Launcher/src/main/java/ru/gravit/launcher/AvanguardStarter.java b/Launcher/src/main/java/ru/gravit/launcher/AvanguardStarter.java index 6b4efb60..98d9ff35 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/AvanguardStarter.java +++ b/Launcher/src/main/java/ru/gravit/launcher/AvanguardStarter.java @@ -5,6 +5,8 @@ import java.nio.file.Path; import java.util.Arrays; +import ru.gravit.launcher.hasher.DirWatcher; +import ru.gravit.launcher.hasher.HashedDir; import ru.gravit.utils.helper.CommonHelper; import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.JVMHelper; @@ -100,12 +102,16 @@ private static void processArched(Path arch32, Path arch64, Path wrapper32, Path wrap64 = IOHelper.toAbsPath(wrapper64); } - public static void start(Path path1) { + public static void start(Path path1) throws IOException { Path path = path1.resolve("guard"); processArched(handle(path.resolve("Avanguard32.dll"), "Avanguard32.dll"), handle(path.resolve("Avanguard64.dll"), "Avanguard64.dll"), handle(path.resolve(NAME + "32.exe"), "wrapper32.exe"), handle(path.resolve(NAME + "64.exe"), "wrapper64.exe")); + HashedDir guard = new HashedDir(path,null,true,false); + try(DirWatcher dirWatcher = new DirWatcher(path, guard, null, false)){ + CommonHelper.newThread("Guard Directory Watcher", true, dirWatcher).start(); + } } private static void transfer(byte[] orig, Path mustdiedll) throws IOException {