Merge branch 'dev' into 'feature/updater-VerCheck'

This commit is contained in:
zaxar163 2019-01-24 15:45:36 +03:00
commit 7abd9898c8
No known key found for this signature in database
GPG key ID: E3B309DD3852DE06

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;
@ -27,7 +28,10 @@ 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());
String wrapperName = JVMHelper.JVM_BITS == 64 ? "wrapper64.exe" : "wrapper32.exe";
String antiInjectName = JVMHelper.JVM_BITS == 64 ? "AntiInject64.dll" : "AntiInject32.dll";
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);
}