Developer Mode

If the maven version can't be found, assume developer mode
This commit is contained in:
Konloch 2021-07-21 07:28:30 -07:00
parent d9bf1dedb8
commit c07185a3fc
2 changed files with 18 additions and 2 deletions

View file

@ -262,7 +262,7 @@ public class BytecodeViewer
}
//version checking
if (viewer.updateCheck.isSelected())
if (viewer.updateCheck.isSelected() && !DEV_MODE)
versionChecker.start();
//show the main UI

View file

@ -16,14 +16,19 @@ import java.io.PrintStream;
public class Constants
{
/*per version*/
public static final String VERSION = BytecodeViewer.class.getPackage().getImplementationVersion();
public static String krakatauVersion = "12";
public static String enjarifyVersion = "4";
public static final boolean BLOCK_TAB_MENU = true;
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
//version is set via maven
public static final String VERSION = getVersion(BytecodeViewer.class.getPackage().getImplementationVersion());
//dev mode is just a check for running via IDE
public static boolean DEV_MODE;
public static final String fs = System.getProperty("file.separator");
public static final String nl = System.getProperty("line.separator");
@ -84,4 +89,15 @@ public class Constants
{
return System.getProperty("os.name").toLowerCase().contains("win");
}
public static String getVersion(String mavenVersion)
{
if(mavenVersion == null)
{
DEV_MODE = true;
return "Developer Mode";
}
return mavenVersion;
}
}