Skip to content

Commit 057106f

Browse files
bitroncmaglie
authored andcommitted
Moved version info to BaseNoGui new class (work in progress).
1 parent be96ae3 commit 057106f

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

app/src/processing/app/Base.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262
* files and images, etc) that comes from that.
6363
*/
6464
public class Base {
65-
public static final int REVISION = 158;
65+
public static final int REVISION = BaseNoGui.REVISION;
6666
/** This might be replaced by main() if there's a lib/version.txt file. */
67-
static String VERSION_NAME = "0158";
67+
static String VERSION_NAME = BaseNoGui.VERSION_NAME;
6868
/** Set true if this a proper release rather than a numbered revision. */
69-
static public boolean RELEASE = false;
69+
static public boolean RELEASE = BaseNoGui.RELEASE;
7070

7171
static Platform platform;
7272

app/src/processing/app/BaseNoGui.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package processing.app;
2+
3+
public class BaseNoGui {
4+
5+
public static final int REVISION = 158;
6+
/** This might be replaced by main() if there's a lib/version.txt file. */
7+
static String VERSION_NAME = "0158";
8+
/** Set true if this a proper release rather than a numbered revision. */
9+
static public boolean RELEASE = false;
10+
11+
}

app/src/processing/app/debug/Compiler.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import java.util.Map;
3838

3939
import processing.app.Base;
40+
import processing.app.BaseNoGui;
4041
import processing.app.I18n;
4142
import processing.app.PreferencesData;
4243
import processing.app.SketchCode;
@@ -578,7 +579,7 @@ private String[] getCommandCompilerS(List<File> includeFolders,
578579
throws RunnerException {
579580
String includes = prepareIncludes(includeFolders);
580581
PreferencesMap dict = new PreferencesMap(prefs);
581-
dict.put("ide_version", "" + Base.REVISION);
582+
dict.put("ide_version", "" + BaseNoGui.REVISION);
582583
dict.put("includes", includes);
583584
dict.put("source_file", sourceFile.getAbsolutePath());
584585
dict.put("object_file", objectFile.getAbsolutePath());
@@ -597,7 +598,7 @@ private String[] getCommandCompilerC(List<File> includeFolders,
597598
String includes = prepareIncludes(includeFolders);
598599

599600
PreferencesMap dict = new PreferencesMap(prefs);
600-
dict.put("ide_version", "" + Base.REVISION);
601+
dict.put("ide_version", "" + BaseNoGui.REVISION);
601602
dict.put("includes", includes);
602603
dict.put("source_file", sourceFile.getAbsolutePath());
603604
dict.put("object_file", objectFile.getAbsolutePath());
@@ -616,7 +617,7 @@ private String[] getCommandCompilerCPP(List<File> includeFolders,
616617
String includes = prepareIncludes(includeFolders);
617618

618619
PreferencesMap dict = new PreferencesMap(prefs);
619-
dict.put("ide_version", "" + Base.REVISION);
620+
dict.put("ide_version", "" + BaseNoGui.REVISION);
620621
dict.put("includes", includes);
621622
dict.put("source_file", sourceFile.getAbsolutePath());
622623
dict.put("object_file", objectFile.getAbsolutePath());
@@ -778,7 +779,7 @@ void compileCore()
778779
for (File file : coreObjectFiles) {
779780

780781
PreferencesMap dict = new PreferencesMap(prefs);
781-
dict.put("ide_version", "" + Base.REVISION);
782+
dict.put("ide_version", "" + BaseNoGui.REVISION);
782783
dict.put("archive_file", afile.getName());
783784
dict.put("object_file", file.getAbsolutePath());
784785

@@ -819,7 +820,7 @@ void compileLink()
819820
dict.put("compiler.c.elf.flags", flags);
820821
dict.put("archive_file", "core.a");
821822
dict.put("object_files", objectFileList);
822-
dict.put("ide_version", "" + Base.REVISION);
823+
dict.put("ide_version", "" + BaseNoGui.REVISION);
823824

824825
String[] cmdArray;
825826
try {
@@ -834,7 +835,7 @@ void compileLink()
834835
// 5. extract EEPROM data (from EEMEM directive) to .eep file.
835836
void compileEep() throws RunnerException {
836837
PreferencesMap dict = new PreferencesMap(prefs);
837-
dict.put("ide_version", "" + Base.REVISION);
838+
dict.put("ide_version", "" + BaseNoGui.REVISION);
838839

839840
String[] cmdArray;
840841
try {
@@ -849,7 +850,7 @@ void compileEep() throws RunnerException {
849850
// 6. build the .hex file
850851
void compileHex() throws RunnerException {
851852
PreferencesMap dict = new PreferencesMap(prefs);
852-
dict.put("ide_version", "" + Base.REVISION);
853+
dict.put("ide_version", "" + BaseNoGui.REVISION);
853854

854855
String[] cmdArray;
855856
try {

0 commit comments

Comments
 (0)