File tree 6 files changed +11
-37
lines changed
arduino-core/src/processing/app 6 files changed +11
-37
lines changed Original file line number Diff line number Diff line change 58
58
* files and images, etc) that comes from that.
59
59
*/
60
60
public class Base {
61
- public static final int REVISION = BaseNoGui .REVISION ;
62
- /** This might be replaced by main() if there's a lib/version.txt file. */
63
- static String VERSION_NAME = BaseNoGui .VERSION_NAME ;
64
- /** Set true if this a proper release rather than a numbered revision. */
65
- static public boolean RELEASE = BaseNoGui .RELEASE ;
66
61
67
62
static private boolean commandLine ;
68
63
@@ -104,8 +99,6 @@ static public void main(String args[]) throws Exception {
104
99
BaseNoGui .initParameters (args );
105
100
106
101
BaseNoGui .initVersion ();
107
- VERSION_NAME = BaseNoGui .VERSION_NAME ;
108
- RELEASE = BaseNoGui .RELEASE ;
109
102
110
103
// if (System.getProperty("mrj.version") != null) {
111
104
// //String jv = System.getProperty("java.version");
@@ -1509,7 +1502,7 @@ public void paint(Graphics g) {
1509
1502
1510
1503
g .setFont (new Font ("SansSerif" , Font .PLAIN , 11 ));
1511
1504
g .setColor (Color .white );
1512
- g .drawString (VERSION_NAME , 50 , 30 );
1505
+ g .drawString (BaseNoGui . VERSION_NAME , 50 , 30 );
1513
1506
}
1514
1507
};
1515
1508
window .addMouseListener (new MouseAdapter () {
Original file line number Diff line number Diff line change @@ -2208,13 +2208,8 @@ protected boolean handleOpenInternal(File sketchFile) {
2208
2208
}
2209
2209
header .rebuild ();
2210
2210
// Set the title of the window to "sketch_070752a - Processing 0126"
2211
- setTitle (
2212
- I18n .format (
2213
- _ ("{0} | Arduino {1}" ),
2214
- sketch .getName (),
2215
- Base .VERSION_NAME
2216
- )
2217
- );
2211
+ setTitle (I18n .format (_ ("{0} | Arduino {1}" ), sketch .getName (),
2212
+ BaseNoGui .VERSION_NAME ));
2218
2213
// Disable untitled setting from previous document, if any
2219
2214
untitled = false ;
2220
2215
Original file line number Diff line number Diff line change @@ -464,7 +464,7 @@ public void keyTyped(KeyEvent event) {
464
464
copyErrorButton .addActionListener (new ActionListener () {
465
465
public void actionPerformed (ActionEvent e ) {
466
466
String message = "" ;
467
- message += _ ("Arduino: " ) + Base .VERSION_NAME + " (" + System .getProperty ("os.name" ) + "), " ;
467
+ message += _ ("Arduino: " ) + BaseNoGui .VERSION_NAME + " (" + System .getProperty ("os.name" ) + "), " ;
468
468
message += _ ("Board: " ) + "\" " + Base .getBoardPreferences ().get ("name" ) + "\" \n \n " ;
469
469
message += editor .console .consoleTextPane .getText ().trim ();
470
470
if ((Preferences .getBoolean ("build.verbose" )) == false ) {
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ public void run() {
79
79
try {
80
80
String info ;
81
81
info = URLEncoder .encode (id + "\t " +
82
- PApplet .nf (Base .REVISION , 4 ) + "\t " +
82
+ PApplet .nf (BaseNoGui .REVISION , 4 ) + "\t " +
83
83
System .getProperty ("java.version" ) + "\t " +
84
84
System .getProperty ("java.vendor" ) + "\t " +
85
85
System .getProperty ("os.name" ) + "\t " +
@@ -104,7 +104,7 @@ public void run() {
104
104
"would you like to visit the Arduino download page?" );
105
105
106
106
if (base .activeEditor != null ) {
107
- if (latest > Base .REVISION ) {
107
+ if (latest > BaseNoGui .REVISION ) {
108
108
Object [] options = { _ ("Yes" ), _ ("No" ) };
109
109
int result = JOptionPane .showOptionDialog (base .activeEditor ,
110
110
prompt ,
Original file line number Diff line number Diff line change 41
41
42
42
public class BaseNoGui {
43
43
44
+ /** Version string to be used for build */
44
45
public static final int REVISION = 158 ;
45
- /** This might be replaced by main() if there's a lib/version.txt file. */
46
- static String VERSION_NAME = "0158" ;
47
- /** Set true if this a proper release rather than a numbered revision. */
48
- static public boolean RELEASE = false ;
46
+ /** Extended version string displayed on GUI */
47
+ static String VERSION_NAME = "1.5.8" ;
49
48
50
49
static File buildFolder ;
51
50
@@ -608,19 +607,6 @@ static public void initPortableFolder() {
608
607
}
609
608
610
609
static public void initVersion () {
611
- try {
612
- File versionFile = getContentFile ("lib/version.txt" );
613
- if (versionFile .exists ()) {
614
- String version = PApplet .loadStrings (versionFile )[0 ];
615
- if (!version .equals (VERSION_NAME ) && !version .equals ("${version}" )) {
616
- VERSION_NAME = version ;
617
- RELEASE = true ;
618
- }
619
- }
620
- } catch (Exception e ) {
621
- e .printStackTrace ();
622
- }
623
-
624
610
// help 3rd party installers find the correct hardware path
625
611
PreferencesData .set ("last.ide." + VERSION_NAME + ".hardwarepath" , getHardwarePath ());
626
612
PreferencesData .set ("last.ide." + VERSION_NAME + ".daterun" , "" + (new Date ()).getTime () / 1000 );
Original file line number Diff line number Diff line change 169
169
<tokenfilter >
170
170
<linetokenizer />
171
171
<containsregex pattern =" String VERSION_NAME = " />
172
- <replaceregex pattern =" [^0-9]* " flags =" g" replace =" " />
172
+ <replaceregex pattern =" .*"(.*)".* " flags =" g" replace =" \1 " />
173
173
</tokenfilter >
174
174
</filterchain >
175
175
</loadfile >
176
- <echo message =" Revision in BaseNoGui.java is: ${ revision.base } " />
176
+ <echo message =" Revision in BaseNoGui.java is: ${ revision.base } " />
177
177
</target >
178
178
179
179
<!-- - - - - - - - -->
You can’t perform that action at this time.
0 commit comments