diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java b/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java index d8159be7..afc8208f 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java @@ -165,7 +165,7 @@ public class BytecodeViewer //welcome message System.out.print("Bytecode Viewer " + VERSION); if(FAT_JAR) - System.out.print(" [FatJar]"); + System.out.print(" [Fat Jar]"); System.out.println(" - Created by @Konloch"); System.out.println("https://bytecodeviewer.com - https://the.bytecode.club"); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/Constants.java b/src/main/java/the/bytecode/club/bytecodeviewer/Constants.java index e4157393..c0adeda2 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/Constants.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/Constants.java @@ -19,10 +19,26 @@ public class Constants public static String krakatauVersion = "12"; public static String enjarifyVersion = "4"; + //if true this disables testing code for tabs + //until dragging and full right-click menu support is added this is + //a starting point public static final boolean BLOCK_TAB_MENU = true; + + //if true this will attempt to launch the decompilers in a new JVM process + //the pro's to this are: + // + You can control the java arguments (more memory & stack) + //the cons to this are: + // + If you could keep it in memory, now you need to write to disk (windows limitations) public static final boolean LAUNCH_DECOMPILERS_IN_NEW_PROCESS = false; //TODO - public static final boolean FAT_JAR = true; //could be automatic by checking if it's loaded a class named whatever for a library - public static final boolean OFFLINE_MODE = true; //disables the automatic updater + + //could be automatic by checking if it's loaded a class named whatever for a library + //maybe it could be automatic with some maven plugin? + public static final boolean FAT_JAR = true; + + //the automatic updater + //SHADED_LIBRARIES must be false for the boot loader to startup + //TODO this needs to be changed to support maven + public static final boolean AUTOMATIC_LIBRARY_UPDATING = false; //version is set via maven public static final String VERSION = getVersion(BytecodeViewer.class.getPackage().getImplementationVersion()); @@ -90,6 +106,9 @@ public class Constants return System.getProperty("os.name").toLowerCase().contains("win"); } + /** + * Detects developer mode or returns the current version + */ public static String getVersion(String mavenVersion) { if(mavenVersion == null) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/api/ExceptionUI.java b/src/main/java/the/bytecode/club/bytecodeviewer/api/ExceptionUI.java index 8d922fd9..e71b4a76 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/api/ExceptionUI.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/api/ExceptionUI.java @@ -123,7 +123,7 @@ public class ExceptionUI extends JFrame */ public static String buildErrorLogHeader(String author) { - String fatJar = FAT_JAR ? " [FatJar]" : ""; + String fatJar = FAT_JAR ? " [Fat Jar]" : ""; return "Please send this error log to " + author + "\nIf you hold appropriate legal rights to the relevant class/jar/apk file please include that as well." + diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/util/InstallFatJar.java b/src/main/java/the/bytecode/club/bytecodeviewer/util/InstallFatJar.java index 2afc704d..cd9c7ae3 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/util/InstallFatJar.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/util/InstallFatJar.java @@ -2,7 +2,7 @@ package the.bytecode.club.bytecodeviewer.util; import the.bytecode.club.bytecodeviewer.bootloader.Boot; -import static the.bytecode.club.bytecodeviewer.Constants.OFFLINE_MODE; +import static the.bytecode.club.bytecodeviewer.Constants.AUTOMATIC_LIBRARY_UPDATING; /*************************************************************************** * Bytecode Viewer (BCV) - Java & Android Reverse Engineering Suite * @@ -37,12 +37,7 @@ public class InstallFatJar implements Runnable { try { - if (OFFLINE_MODE) - { - Boot.dropKrakatau(); - Boot.dropEnjarify(); - } - else + if (AUTOMATIC_LIBRARY_UPDATING) { Boot.populateUrlList(); Boot.populateLibsDirectory(); @@ -50,6 +45,11 @@ public class InstallFatJar implements Runnable Boot.checkKrakatau(); Boot.checkEnjarify(); } + else + { + Boot.dropKrakatau(); + Boot.dropEnjarify(); + } } catch (Exception e) {