Add command line args "skipeditor" (skips initing editor libs) and "quickstart" (skips editor and Python)
This commit is contained in:
parent
008c6e6f25
commit
9c4648f304
@ -38,7 +38,6 @@ import java.io.InputStreamReader;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JInternalFrame;
|
import javax.swing.JInternalFrame;
|
||||||
import javax.swing.KeyStroke;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -51,6 +50,7 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
public static final String VERSION_NAME = "0.8";
|
public static final String VERSION_NAME = "0.8";
|
||||||
public static String argfile = "";
|
public static String argfile = "";
|
||||||
public static boolean skipPython = false; // Skip python init on start?
|
public static boolean skipPython = false; // Skip python init on start?
|
||||||
|
public static boolean skipEditor = false; // Skip editor init on start?
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form MainGUI
|
* Creates new form MainGUI
|
||||||
@ -525,7 +525,12 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
for (String arg : args) {
|
for (String arg : args) {
|
||||||
if (arg.equals("skippython")) {
|
if (arg.equals("skippython")) {
|
||||||
skipPython = true;
|
skipPython = true;
|
||||||
} else {
|
} else if (arg.equals("skipeditor")) {
|
||||||
|
skipEditor = true;
|
||||||
|
} else if (arg.equals("quickstart")) {
|
||||||
|
skipPython = true;
|
||||||
|
skipEditor = true;
|
||||||
|
}else {
|
||||||
argfile = args[0];
|
argfile = args[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,10 +118,12 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!MainGUI.skipEditor) {
|
||||||
|
System.out.println("Preparing editor, to skip run with argument 'skipeditor'");
|
||||||
setProgress(50, "Preparing editor...");
|
setProgress(50, "Preparing editor...");
|
||||||
// Get editor going too
|
// Get editor going too
|
||||||
CodeEditor edit = new CodeEditor();
|
CodeEditor edit = new CodeEditor();
|
||||||
|
}
|
||||||
setProgress(70, "Loading main interface...");
|
setProgress(70, "Loading main interface...");
|
||||||
new MainGUI().setVisible(true);
|
new MainGUI().setVisible(true);
|
||||||
setProgress(100, "Done!");
|
setProgress(100, "Done!");
|
||||||
@ -130,6 +132,7 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the progress bar.
|
* Set the progress bar.
|
||||||
|
*
|
||||||
* @param progress how full to make it (0 <= progress <= 100)
|
* @param progress how full to make it (0 <= progress <= 100)
|
||||||
* @param label The String to put on the label.
|
* @param label The String to put on the label.
|
||||||
*/
|
*/
|
||||||
@ -169,7 +172,7 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
} else if (val.endsWith(". ")) {
|
} else if (val.endsWith(". ")) {
|
||||||
progBar.setString(val.replace(". ", ".. "));
|
progBar.setString(val.replace(". ", ".. "));
|
||||||
} else if (!val.endsWith(" ")) {
|
} else if (!val.endsWith(" ")) {
|
||||||
progBar.setString(val+". ");
|
progBar.setString(val + ". ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user