[FIX] Фикс распаковки врапперов

This commit is contained in:
Gravit 2019-01-24 16:38:56 +07:00
parent 752a29449f
commit 44d9be49da

View file

@ -26,10 +26,13 @@ public Path getJavaBinPath() {
@Override
public void init(boolean clientInstance) {
//try {
// UnpackHelper.unpack(IOHelper.getResourceURL(JVMHelper.JVM_BITS == 64 ? "guard/wrapper64.exe" : "guard/wrapper32.exe"),DirBridge.getGuardDir());
//} catch (IOException e) {
// throw new SecurityException(e);
//}
try {
String wrapperName = JVMHelper.JVM_BITS == 64 ? "wrapper64.exe" : "wrapper32.exe";
String antiInjectName = JVMHelper.JVM_BITS == 64 ? "AntiInject64.exe" : "AntiInject32.exe";
UnpackHelper.unpack(IOHelper.getResourceURL("guard/" + wrapperName),DirBridge.getGuardDir().resolve(wrapperName));
UnpackHelper.unpack(IOHelper.getResourceURL("guard/" + antiInjectName),DirBridge.getGuardDir().resolve(antiInjectName));
} catch (IOException e) {
throw new SecurityException(e);
}
}
}