mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Adding build.verbose prefence to print compilation command lines.
This commit is contained in:
@ -325,9 +325,12 @@ public class Compiler implements MessageConsumer {
|
|||||||
baseCommandCompiler[baseCommandCompiler.length - 2] = sourceNames[i];
|
baseCommandCompiler[baseCommandCompiler.length - 2] = sourceNames[i];
|
||||||
baseCommandCompiler[baseCommandCompiler.length - 1] = "-o"+ objectNames[i];
|
baseCommandCompiler[baseCommandCompiler.length - 1] = "-o"+ objectNames[i];
|
||||||
//System.arraycopy(baseCommandCompiler.length
|
//System.arraycopy(baseCommandCompiler.length
|
||||||
//for(int j = 0; j < baseCommandCompiler.length; j++) {
|
if (Preferences.getBoolean("build.verbose")) {
|
||||||
// System.out.println(baseCommandCompiler[j]);
|
for(int j = 0; j < baseCommandCompiler.length; j++) {
|
||||||
//}
|
System.out.print(baseCommandCompiler[j] + " ");
|
||||||
|
}
|
||||||
|
System.out.println();
|
||||||
|
}
|
||||||
process = Runtime.getRuntime().exec(baseCommandCompiler);
|
process = Runtime.getRuntime().exec(baseCommandCompiler);
|
||||||
new MessageSiphon(process.getInputStream(), this);
|
new MessageSiphon(process.getInputStream(), this);
|
||||||
new MessageSiphon(process.getErrorStream(), this);
|
new MessageSiphon(process.getErrorStream(), this);
|
||||||
@ -354,9 +357,12 @@ public class Compiler implements MessageConsumer {
|
|||||||
for(int i = 0; i < fileCountCPP; i++) {
|
for(int i = 0; i < fileCountCPP; i++) {
|
||||||
baseCommandCompilerCPP[baseCommandCompilerCPP.length - 2] = sourceNamesCPP[i];
|
baseCommandCompilerCPP[baseCommandCompilerCPP.length - 2] = sourceNamesCPP[i];
|
||||||
baseCommandCompilerCPP[baseCommandCompilerCPP.length - 1] = "-o"+ objectNamesCPP[i];
|
baseCommandCompilerCPP[baseCommandCompilerCPP.length - 1] = "-o"+ objectNamesCPP[i];
|
||||||
//for(int j = 0; j < baseCommandCompilerCPP.length; j++) {
|
if (Preferences.getBoolean("build.verbose")) {
|
||||||
// System.out.println(baseCommandCompilerCPP[j]);
|
for(int j = 0; j < baseCommandCompilerCPP.length; j++) {
|
||||||
//}
|
System.out.print(baseCommandCompilerCPP[j] + " ");
|
||||||
|
}
|
||||||
|
System.out.println();
|
||||||
|
}
|
||||||
process = Runtime.getRuntime().exec(baseCommandCompilerCPP);
|
process = Runtime.getRuntime().exec(baseCommandCompilerCPP);
|
||||||
new MessageSiphon(process.getInputStream(), this);
|
new MessageSiphon(process.getInputStream(), this);
|
||||||
new MessageSiphon(process.getErrorStream(), this);
|
new MessageSiphon(process.getErrorStream(), this);
|
||||||
@ -381,9 +387,12 @@ public class Compiler implements MessageConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//for(int j = 0; j < commandLinker.length; j++) {
|
if (Preferences.getBoolean("build.verbose")) {
|
||||||
// System.out.println(commandLinker[j]);
|
for(int j = 0; j < commandLinker.length; j++) {
|
||||||
//}
|
System.out.print(commandLinker[j] + " ");
|
||||||
|
}
|
||||||
|
System.out.println();
|
||||||
|
}
|
||||||
process = Runtime.getRuntime().exec(commandLinker);
|
process = Runtime.getRuntime().exec(commandLinker);
|
||||||
new MessageSiphon(process.getInputStream(), this);
|
new MessageSiphon(process.getInputStream(), this);
|
||||||
new MessageSiphon(process.getErrorStream(), this);
|
new MessageSiphon(process.getErrorStream(), this);
|
||||||
@ -401,13 +410,16 @@ public class Compiler implements MessageConsumer {
|
|||||||
if(result!=0)
|
if(result!=0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*for(int j = 0; j < baseCommandObjcopy.length; j++) {
|
|
||||||
System.out.println(baseCommandObjcopy[j]);
|
|
||||||
}*/
|
|
||||||
baseCommandObjcopy[2] = "srec";
|
baseCommandObjcopy[2] = "srec";
|
||||||
baseCommandObjcopy[4] = ".eeprom";
|
baseCommandObjcopy[4] = ".eeprom";
|
||||||
baseCommandObjcopy[5] = buildPath + File.separator + sketch.name + ".elf";
|
baseCommandObjcopy[5] = buildPath + File.separator + sketch.name + ".elf";
|
||||||
baseCommandObjcopy[6] = buildPath + File.separator + sketch.name + ".rom";
|
baseCommandObjcopy[6] = buildPath + File.separator + sketch.name + ".rom";
|
||||||
|
if (Preferences.getBoolean("build.verbose")) {
|
||||||
|
for(int j = 0; j < baseCommandObjcopy.length; j++) {
|
||||||
|
System.out.print(baseCommandObjcopy[j] + " ");
|
||||||
|
}
|
||||||
|
System.out.println();
|
||||||
|
}
|
||||||
process = Runtime.getRuntime().exec(baseCommandObjcopy);
|
process = Runtime.getRuntime().exec(baseCommandObjcopy);
|
||||||
new MessageSiphon(process.getInputStream(), this);
|
new MessageSiphon(process.getInputStream(), this);
|
||||||
new MessageSiphon(process.getErrorStream(), this);
|
new MessageSiphon(process.getErrorStream(), this);
|
||||||
@ -429,6 +441,12 @@ public class Compiler implements MessageConsumer {
|
|||||||
baseCommandObjcopy[4] = ".flash";
|
baseCommandObjcopy[4] = ".flash";
|
||||||
baseCommandObjcopy[5] = buildPath + File.separator + sketch.name + ".elf";
|
baseCommandObjcopy[5] = buildPath + File.separator + sketch.name + ".elf";
|
||||||
baseCommandObjcopy[6] = buildPath + File.separator + sketch.name + ".hex";
|
baseCommandObjcopy[6] = buildPath + File.separator + sketch.name + ".hex";
|
||||||
|
if (Preferences.getBoolean("build.verbose")) {
|
||||||
|
for(int j = 0; j < baseCommandObjcopy.length; j++) {
|
||||||
|
System.out.print(baseCommandObjcopy[j] + " ");
|
||||||
|
}
|
||||||
|
System.out.println();
|
||||||
|
}
|
||||||
process = Runtime.getRuntime().exec(baseCommandObjcopy);
|
process = Runtime.getRuntime().exec(baseCommandObjcopy);
|
||||||
new MessageSiphon(process.getInputStream(), this);
|
new MessageSiphon(process.getInputStream(), this);
|
||||||
new MessageSiphon(process.getErrorStream(), this);
|
new MessageSiphon(process.getErrorStream(), this);
|
||||||
|
@ -299,3 +299,4 @@ build.mcu=atmega8
|
|||||||
build.f_cpu=16000000L
|
build.f_cpu=16000000L
|
||||||
build.extension=c
|
build.extension=c
|
||||||
build.target=arduino
|
build.target=arduino
|
||||||
|
build.verbose=false
|
||||||
|
Reference in New Issue
Block a user