mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
Слежение за guard
This commit is contained in:
parent
6e648e17ad
commit
a1de896141
2 changed files with 8 additions and 2 deletions
|
@ -43,7 +43,7 @@ public ProguardConf(LaunchServer srv) {
|
||||||
if (this.srv.config.genMappings) confStrs.add("-printmapping \'" + mappings.toFile().getName() + "\'");
|
if (this.srv.config.genMappings) confStrs.add("-printmapping \'" + mappings.toFile().getName() + "\'");
|
||||||
confStrs.add("-obfuscationdictionary \'" + words.toFile().getName() + "\'");
|
confStrs.add("-obfuscationdictionary \'" + words.toFile().getName() + "\'");
|
||||||
confStrs.add("-injar \'../" + srv.config.binaryName + ".jar\'");
|
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() + "\'");
|
confStrs.add("-classobfuscationdictionary \'" + words.toFile().getName() + "\'");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Arrays;
|
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.CommonHelper;
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
import ru.gravit.utils.helper.JVMHelper;
|
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);
|
wrap64 = IOHelper.toAbsPath(wrapper64);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void start(Path path1) {
|
public static void start(Path path1) throws IOException {
|
||||||
Path path = path1.resolve("guard");
|
Path path = path1.resolve("guard");
|
||||||
processArched(handle(path.resolve("Avanguard32.dll"), "Avanguard32.dll"),
|
processArched(handle(path.resolve("Avanguard32.dll"), "Avanguard32.dll"),
|
||||||
handle(path.resolve("Avanguard64.dll"), "Avanguard64.dll"),
|
handle(path.resolve("Avanguard64.dll"), "Avanguard64.dll"),
|
||||||
handle(path.resolve(NAME + "32.exe"), "wrapper32.exe"),
|
handle(path.resolve(NAME + "32.exe"), "wrapper32.exe"),
|
||||||
handle(path.resolve(NAME + "64.exe"), "wrapper64.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 {
|
private static void transfer(byte[] orig, Path mustdiedll) throws IOException {
|
||||||
|
|
Loading…
Reference in a new issue