mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-15 00:02:49 +03:00
Removed duplicate version fields in Base class
This commit is contained in:
@ -58,11 +58,6 @@ import static processing.app.I18n._;
|
|||||||
* files and images, etc) that comes from that.
|
* files and images, etc) that comes from that.
|
||||||
*/
|
*/
|
||||||
public class Base {
|
public class Base {
|
||||||
public static final int REVISION = BaseNoGui.REVISION;
|
|
||||||
/** This might be replaced by main() if there's a lib/version.txt file. */
|
|
||||||
static String VERSION_NAME = BaseNoGui.VERSION_NAME;
|
|
||||||
/** Set true if this a proper release rather than a numbered revision. */
|
|
||||||
static public boolean RELEASE = BaseNoGui.RELEASE;
|
|
||||||
|
|
||||||
static private boolean commandLine;
|
static private boolean commandLine;
|
||||||
|
|
||||||
@ -104,8 +99,6 @@ public class Base {
|
|||||||
BaseNoGui.initParameters(args);
|
BaseNoGui.initParameters(args);
|
||||||
|
|
||||||
BaseNoGui.initVersion();
|
BaseNoGui.initVersion();
|
||||||
VERSION_NAME = BaseNoGui.VERSION_NAME;
|
|
||||||
RELEASE = BaseNoGui.RELEASE;
|
|
||||||
|
|
||||||
// if (System.getProperty("mrj.version") != null) {
|
// if (System.getProperty("mrj.version") != null) {
|
||||||
// //String jv = System.getProperty("java.version");
|
// //String jv = System.getProperty("java.version");
|
||||||
@ -1509,7 +1502,7 @@ public class Base {
|
|||||||
|
|
||||||
g.setFont(new Font("SansSerif", Font.PLAIN, 11));
|
g.setFont(new Font("SansSerif", Font.PLAIN, 11));
|
||||||
g.setColor(Color.white);
|
g.setColor(Color.white);
|
||||||
g.drawString(VERSION_NAME, 50, 30);
|
g.drawString(BaseNoGui.VERSION_NAME, 50, 30);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
window.addMouseListener(new MouseAdapter() {
|
window.addMouseListener(new MouseAdapter() {
|
||||||
|
@ -2208,13 +2208,8 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
}
|
}
|
||||||
header.rebuild();
|
header.rebuild();
|
||||||
// Set the title of the window to "sketch_070752a - Processing 0126"
|
// Set the title of the window to "sketch_070752a - Processing 0126"
|
||||||
setTitle(
|
setTitle(I18n.format(_("{0} | Arduino {1}"), sketch.getName(),
|
||||||
I18n.format(
|
BaseNoGui.VERSION_NAME));
|
||||||
_("{0} | Arduino {1}"),
|
|
||||||
sketch.getName(),
|
|
||||||
Base.VERSION_NAME
|
|
||||||
)
|
|
||||||
);
|
|
||||||
// Disable untitled setting from previous document, if any
|
// Disable untitled setting from previous document, if any
|
||||||
untitled = false;
|
untitled = false;
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ public class EditorStatus extends JPanel /*implements ActionListener*/ {
|
|||||||
copyErrorButton.addActionListener(new ActionListener() {
|
copyErrorButton.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
String message = "";
|
String message = "";
|
||||||
message += _("Arduino: ") + Base.VERSION_NAME + " (" + System.getProperty("os.name") + "), ";
|
message += _("Arduino: ") + BaseNoGui.VERSION_NAME + " (" + System.getProperty("os.name") + "), ";
|
||||||
message += _("Board: ") + "\"" + Base.getBoardPreferences().get("name") + "\"\n\n";
|
message += _("Board: ") + "\"" + Base.getBoardPreferences().get("name") + "\"\n\n";
|
||||||
message += editor.console.consoleTextPane.getText().trim();
|
message += editor.console.consoleTextPane.getText().trim();
|
||||||
if ((Preferences.getBoolean("build.verbose")) == false) {
|
if ((Preferences.getBoolean("build.verbose")) == false) {
|
||||||
|
@ -79,7 +79,7 @@ public class UpdateCheck implements Runnable {
|
|||||||
try {
|
try {
|
||||||
String info;
|
String info;
|
||||||
info = URLEncoder.encode(id + "\t" +
|
info = URLEncoder.encode(id + "\t" +
|
||||||
PApplet.nf(Base.REVISION, 4) + "\t" +
|
PApplet.nf(BaseNoGui.REVISION, 4) + "\t" +
|
||||||
System.getProperty("java.version") + "\t" +
|
System.getProperty("java.version") + "\t" +
|
||||||
System.getProperty("java.vendor") + "\t" +
|
System.getProperty("java.vendor") + "\t" +
|
||||||
System.getProperty("os.name") + "\t" +
|
System.getProperty("os.name") + "\t" +
|
||||||
@ -104,7 +104,7 @@ public class UpdateCheck implements Runnable {
|
|||||||
"would you like to visit the Arduino download page?");
|
"would you like to visit the Arduino download page?");
|
||||||
|
|
||||||
if (base.activeEditor != null) {
|
if (base.activeEditor != null) {
|
||||||
if (latest > Base.REVISION) {
|
if (latest > BaseNoGui.REVISION) {
|
||||||
Object[] options = { _("Yes"), _("No") };
|
Object[] options = { _("Yes"), _("No") };
|
||||||
int result = JOptionPane.showOptionDialog(base.activeEditor,
|
int result = JOptionPane.showOptionDialog(base.activeEditor,
|
||||||
prompt,
|
prompt,
|
||||||
|
@ -41,11 +41,10 @@ import processing.app.packages.LibraryList;
|
|||||||
|
|
||||||
public class BaseNoGui {
|
public class BaseNoGui {
|
||||||
|
|
||||||
|
/** Version string to be used for build */
|
||||||
public static final int REVISION = 158;
|
public static final int REVISION = 158;
|
||||||
/** This might be replaced by main() if there's a lib/version.txt file. */
|
/** Extended version string displayed on GUI */
|
||||||
static String VERSION_NAME = "0158";
|
static String VERSION_NAME = "1.5.8";
|
||||||
/** Set true if this a proper release rather than a numbered revision. */
|
|
||||||
static public boolean RELEASE = false;
|
|
||||||
|
|
||||||
static File buildFolder;
|
static File buildFolder;
|
||||||
|
|
||||||
@ -608,19 +607,6 @@ public class BaseNoGui {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static public void initVersion() {
|
static public void initVersion() {
|
||||||
try {
|
|
||||||
File versionFile = getContentFile("lib/version.txt");
|
|
||||||
if (versionFile.exists()) {
|
|
||||||
String version = PApplet.loadStrings(versionFile)[0];
|
|
||||||
if (!version.equals(VERSION_NAME) && !version.equals("${version}")) {
|
|
||||||
VERSION_NAME = version;
|
|
||||||
RELEASE = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
// help 3rd party installers find the correct hardware path
|
// help 3rd party installers find the correct hardware path
|
||||||
PreferencesData.set("last.ide." + VERSION_NAME + ".hardwarepath", getHardwarePath());
|
PreferencesData.set("last.ide." + VERSION_NAME + ".hardwarepath", getHardwarePath());
|
||||||
PreferencesData.set("last.ide." + VERSION_NAME + ".daterun", "" + (new Date()).getTime() / 1000);
|
PreferencesData.set("last.ide." + VERSION_NAME + ".daterun", "" + (new Date()).getTime() / 1000);
|
||||||
|
@ -169,11 +169,11 @@
|
|||||||
<tokenfilter>
|
<tokenfilter>
|
||||||
<linetokenizer />
|
<linetokenizer />
|
||||||
<containsregex pattern="String VERSION_NAME = "/>
|
<containsregex pattern="String VERSION_NAME = "/>
|
||||||
<replaceregex pattern="[^0-9]*" flags="g" replace=""/>
|
<replaceregex pattern=".*"(.*)".*" flags="g" replace="\1"/>
|
||||||
</tokenfilter>
|
</tokenfilter>
|
||||||
</filterchain>
|
</filterchain>
|
||||||
</loadfile>
|
</loadfile>
|
||||||
<echo message="Revision in BaseNoGui.java is: ${revision.base}" />
|
<echo message=" Revision in BaseNoGui.java is: ${revision.base}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- - - - - - - - -->
|
<!-- - - - - - - - -->
|
||||||
|
Reference in New Issue
Block a user