This commit is contained in:
Konloch 2021-07-06 21:45:39 -07:00
parent c5b53be4b8
commit 2dbcb8bb7d
2 changed files with 20 additions and 8 deletions

View file

@ -12,6 +12,7 @@ import org.apache.commons.io.FileUtils;
import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.ClassNode;
import the.bytecode.club.bootloader.Boot; import the.bytecode.club.bootloader.Boot;
import the.bytecode.club.bytecodeviewer.api.ClassNodeLoader; import the.bytecode.club.bytecodeviewer.api.ClassNodeLoader;
import the.bytecode.club.bytecodeviewer.api.ExceptionUI;
import the.bytecode.club.bytecodeviewer.gui.components.*; import the.bytecode.club.bytecodeviewer.gui.components.*;
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.TabbedPane; import the.bytecode.club.bytecodeviewer.gui.resourceviewer.TabbedPane;
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.ClassViewer; import the.bytecode.club.bytecodeviewer.gui.resourceviewer.viewer.ClassViewer;
@ -222,7 +223,10 @@ public class BytecodeViewer
*/ */
public static void boot(boolean cli) public static void boot(boolean cli)
{ {
//delete files in the temp folder
cleanupAsync(); cleanupAsync();
//shutdown hooks
Runtime.getRuntime().addShutdownHook(new Thread(() -> Runtime.getRuntime().addShutdownHook(new Thread(() ->
{ {
for (Process proc : createdProcesses) for (Process proc : createdProcesses)
@ -231,7 +235,10 @@ public class BytecodeViewer
cleanup(); cleanup();
}, "Shutdown Hook")); }, "Shutdown Hook"));
//setup the viewer
viewer.calledAfterLoad(); viewer.calledAfterLoad();
//setup the recent files
Settings.resetRecentFilesMenu(); Settings.resetRecentFilesMenu();
//ping back once on first boot to add to global user count //ping back once on first boot to add to global user count
@ -240,15 +247,19 @@ public class BytecodeViewer
pingBack.start(); pingBack.start();
Configuration.pingback = true; Configuration.pingback = true;
} }
//version checking
if (viewer.updateCheck.isSelected()) if (viewer.updateCheck.isSelected())
versionChecker.start(); versionChecker.start();
//show the main UI
if (!cli) if (!cli)
viewer.setVisible(true); viewer.setVisible(true);
//print startup time
System.out.println("Start up took " + ((System.currentTimeMillis() - Configuration.start) / 1000) + " seconds"); System.out.println("Start up took " + ((System.currentTimeMillis() - Configuration.start) / 1000) + " seconds");
//open files from launch args
if (!cli) if (!cli)
if (launchArgs.length >= 1) if (launchArgs.length >= 1)
for (String s : launchArgs) for (String s : launchArgs)
@ -580,7 +591,7 @@ public class BytecodeViewer
*/ */
public static void handleException(Throwable t) public static void handleException(Throwable t)
{ {
BytecodeViewer.handleException(t); handleException(t, ExceptionUI.KONLOCH);
} }
/** /**
@ -588,7 +599,7 @@ public class BytecodeViewer
*/ */
public static void handleException(Throwable t, String author) public static void handleException(Throwable t, String author)
{ {
BytecodeViewer.handleException(t, author); new ExceptionUI(t, author);
} }
/** /**

View file

@ -38,6 +38,11 @@ import the.bytecode.club.bytecodeviewer.plugin.preinstalled.EZInjection;
public class RunOptions extends JFrame public class RunOptions extends JFrame
{ {
private final JTextField mainMethodFQN;
private final JCheckBox debugMethodCalls;
private final JTextField debugClasses;
private final JTextField socksProxy;
public RunOptions() public RunOptions()
{ {
this.setIconImages(Resources.iconList); this.setIconImages(Resources.iconList);
@ -125,8 +130,4 @@ public class RunOptions extends JFrame
} }
private static final long serialVersionUID = -2662514582647810868L; private static final long serialVersionUID = -2662514582647810868L;
private final JTextField mainMethodFQN;
private final JCheckBox debugMethodCalls;
private final JTextField debugClasses;
private final JTextField socksProxy;
} }