diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java index eb0526d7..c971970d 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java @@ -127,6 +127,7 @@ public JARLauncherBinary(LaunchServer server) throws IOException { initScriptFile = runtimeDir.resolve(Launcher.INIT_SCRIPT_FILE); obfJar = syncBinaryFile; tryUnpackRuntime(); + tryUnpackGuard(); } @Override @@ -293,6 +294,7 @@ public void tryUnpackRuntime() throws IOException { // Unpack launcher guard files Files.createDirectory(runtimeDir); LogHelper.info("Unpacking launcher runtime files"); + if (Launcher.class.getResource("/runtime.zip") == null) return; try (ZipInputStream input = IOHelper.newZipInput(IOHelper.getResourceURL("runtime.zip"))) { for (ZipEntry entry = input.getNextEntry(); entry != null; entry = input.getNextEntry()) { if (entry.isDirectory()) @@ -312,6 +314,7 @@ public void tryUnpackGuard() throws IOException { // Unpack launcher guard files Files.createDirectory(guardDir); LogHelper.info("Unpacking launcher native guard files"); + if (Launcher.class.getResource("/guard.zip") == null) return; try (ZipInputStream input = IOHelper.newZipInput(IOHelper.getResourceURL("guard.zip"))) { for (ZipEntry entry = input.getNextEntry(); entry != null; entry = input.getNextEntry()) { if (entry.isDirectory()) diff --git a/LaunchServer/src/main/resources/guard.zip b/LaunchServer/src/main/resources/guard.zip deleted file mode 100644 index c2d3f43e..00000000 Binary files a/LaunchServer/src/main/resources/guard.zip and /dev/null differ diff --git a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg index 56240dcb..747c1662 100644 --- a/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg +++ b/LaunchServer/src/main/resources/ru/gravit/launchserver/defaults/proguard.cfg @@ -14,17 +14,14 @@ -overloadaggressively -repackageclasses 'ru.gravit.launcher' --keep class ru.zaxar163.* --keep class cpw.mods.fml.* --keep class net.minecraftforge.fml.* -keepattributes SourceFile,LineNumberTable,*Annotation* -renamesourcefileattribute SourceFile -keepattributes Signature -adaptresourcefilecontents META-INF/MANIFEST.MF --keeppackagenames com.eclipsesource.json.**,com.mojang.**,org.apache.**,com.google.gson.** +-keeppackagenames com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,oshi.**,com.sun.jna.**,com.google.gson.** --keep class com.mojang.**,org.apache.**,com.google.gson.**,com.eclipsesource.json.** { +-keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,oshi.**,com.sun.jna.**,com.google.gson.** { *; }