mirror of
https://github.com/processing/processing4.git
synced 2026-05-03 17:35:00 +02:00
do revision check and set RELEASE variable based on the result
This commit is contained in:
@@ -41,7 +41,10 @@ import processing.core.*;
|
||||
*/
|
||||
public class Base {
|
||||
static final int REVISION = 179;
|
||||
public static String VERSION_NAME = "0179";
|
||||
/** This might be replaced by main() if there's a lib/version.txt file. */
|
||||
static public String VERSION_NAME = "0179";
|
||||
/** Set true if this a proper release rather than a numbered revision. */
|
||||
static public boolean RELEASE = false;
|
||||
|
||||
static HashMap<Integer, String> platformNames = new HashMap<Integer, String>();
|
||||
static {
|
||||
@@ -103,7 +106,11 @@ public class Base {
|
||||
try {
|
||||
File versionFile = getContentFile("lib/version.txt");
|
||||
if (versionFile.exists()) {
|
||||
VERSION_NAME = PApplet.loadStrings(versionFile)[0];
|
||||
String version = PApplet.loadStrings(versionFile)[0];
|
||||
if (!version.equals(VERSION_NAME)) {
|
||||
VERSION_NAME = version;
|
||||
RELEASE = true;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -820,10 +820,12 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
|
||||
// These are temporary entries while Android mode is being worked out.
|
||||
// The mode will not be in the tools menu, and won't involve a cmd-key
|
||||
item = createToolMenuItem("processing.app.tools.android.AndroidTool");
|
||||
item.setAccelerator(KeyStroke.getKeyStroke('D', modifiers));
|
||||
menu.add(item);
|
||||
menu.add(createToolMenuItem("processing.app.tools.android.Reset"));
|
||||
if (!Base.RELEASE) {
|
||||
item = createToolMenuItem("processing.app.tools.android.AndroidTool");
|
||||
item.setAccelerator(KeyStroke.getKeyStroke('D', modifiers));
|
||||
menu.add(item);
|
||||
menu.add(createToolMenuItem("processing.app.tools.android.Reset"));
|
||||
}
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user