Comments & Constants Cleanup

This commit is contained in:
Konloch 2021-07-21 07:44:25 -07:00
parent ed709b07e2
commit eeaafa48eb
4 changed files with 30 additions and 11 deletions

View file

@ -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");

View file

@ -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)

View file

@ -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." +

View file

@ -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)
{