mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-03 22:30:31 +03:00
Fix issue with proguard.
This commit is contained in:
parent
d21558e316
commit
21209083be
3 changed files with 5 additions and 5 deletions
|
@ -127,6 +127,7 @@ public JARLauncherBinary(LaunchServer server) throws IOException {
|
||||||
initScriptFile = runtimeDir.resolve(Launcher.INIT_SCRIPT_FILE);
|
initScriptFile = runtimeDir.resolve(Launcher.INIT_SCRIPT_FILE);
|
||||||
obfJar = syncBinaryFile;
|
obfJar = syncBinaryFile;
|
||||||
tryUnpackRuntime();
|
tryUnpackRuntime();
|
||||||
|
tryUnpackGuard();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -293,6 +294,7 @@ public void tryUnpackRuntime() throws IOException {
|
||||||
// Unpack launcher guard files
|
// Unpack launcher guard files
|
||||||
Files.createDirectory(runtimeDir);
|
Files.createDirectory(runtimeDir);
|
||||||
LogHelper.info("Unpacking launcher runtime files");
|
LogHelper.info("Unpacking launcher runtime files");
|
||||||
|
if (Launcher.class.getResource("/runtime.zip") == null) return;
|
||||||
try (ZipInputStream input = IOHelper.newZipInput(IOHelper.getResourceURL("runtime.zip"))) {
|
try (ZipInputStream input = IOHelper.newZipInput(IOHelper.getResourceURL("runtime.zip"))) {
|
||||||
for (ZipEntry entry = input.getNextEntry(); entry != null; entry = input.getNextEntry()) {
|
for (ZipEntry entry = input.getNextEntry(); entry != null; entry = input.getNextEntry()) {
|
||||||
if (entry.isDirectory())
|
if (entry.isDirectory())
|
||||||
|
@ -312,6 +314,7 @@ public void tryUnpackGuard() throws IOException {
|
||||||
// Unpack launcher guard files
|
// Unpack launcher guard files
|
||||||
Files.createDirectory(guardDir);
|
Files.createDirectory(guardDir);
|
||||||
LogHelper.info("Unpacking launcher native guard files");
|
LogHelper.info("Unpacking launcher native guard files");
|
||||||
|
if (Launcher.class.getResource("/guard.zip") == null) return;
|
||||||
try (ZipInputStream input = IOHelper.newZipInput(IOHelper.getResourceURL("guard.zip"))) {
|
try (ZipInputStream input = IOHelper.newZipInput(IOHelper.getResourceURL("guard.zip"))) {
|
||||||
for (ZipEntry entry = input.getNextEntry(); entry != null; entry = input.getNextEntry()) {
|
for (ZipEntry entry = input.getNextEntry(); entry != null; entry = input.getNextEntry()) {
|
||||||
if (entry.isDirectory())
|
if (entry.isDirectory())
|
||||||
|
|
Binary file not shown.
|
@ -14,17 +14,14 @@
|
||||||
|
|
||||||
-overloadaggressively
|
-overloadaggressively
|
||||||
-repackageclasses 'ru.gravit.launcher'
|
-repackageclasses 'ru.gravit.launcher'
|
||||||
-keep class ru.zaxar163.*
|
|
||||||
-keep class cpw.mods.fml.*
|
|
||||||
-keep class net.minecraftforge.fml.*
|
|
||||||
-keepattributes SourceFile,LineNumberTable,*Annotation*
|
-keepattributes SourceFile,LineNumberTable,*Annotation*
|
||||||
-renamesourcefileattribute SourceFile
|
-renamesourcefileattribute SourceFile
|
||||||
-keepattributes Signature
|
-keepattributes Signature
|
||||||
-adaptresourcefilecontents META-INF/MANIFEST.MF
|
-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.** {
|
||||||
*;
|
*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue