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

This commit is contained in:
Gravit 2019-01-24 17:16:03 +07:00
parent 51ce84152c
commit f5ef34ce32

View file

@ -1,5 +1,6 @@
package ru.gravit.launcher.guard;
import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.client.DirBridge;
import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.JVMHelper;
@ -29,8 +30,8 @@ public void init(boolean clientInstance) {
try {
String wrapperName = JVMHelper.JVM_BITS == 64 ? "wrapper64.exe" : "wrapper32.exe";
String antiInjectName = JVMHelper.JVM_BITS == 64 ? "AntiInject64.dll" : "AntiInject32.dll";
UnpackHelper.unpack(IOHelper.getResourceURL("guard/" + wrapperName),DirBridge.getGuardDir().resolve(wrapperName));
UnpackHelper.unpack(IOHelper.getResourceURL("guard/" + antiInjectName),DirBridge.getGuardDir().resolve(antiInjectName));
UnpackHelper.unpack(Launcher.getResourceURL(wrapperName, "guard"),DirBridge.getGuardDir().resolve(wrapperName));
UnpackHelper.unpack(Launcher.getResourceURL(antiInjectName, "guard"),DirBridge.getGuardDir().resolve(antiInjectName));
} catch (IOException e) {
throw new SecurityException(e);
}