Skip to content

Commit 2f38d1a

Browse files
committed
Added "Using library.." debugging message in verbose output.
1 parent a21d92e commit 2f38d1a

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

app/src/processing/app/Sketch.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,10 +1424,7 @@ public String preprocess(String buildPath, PdePreprocessor preprocessor) throws
14241424

14251425
importedLibraries = new LibraryList();
14261426
for (String item : preprocessor.getExtraImports()) {
1427-
14281427
Library lib = Base.importToLibraryTable.get(item);
1429-
//If needed can Debug libraryPath here
1430-
14311428
if (lib != null && !importedLibraries.contains(lib)) {
14321429
importedLibraries.add(lib);
14331430
}

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public boolean compile(Sketch _sketch, String _buildPath,
7575
String _primaryClassName, boolean _verbose)
7676
throws RunnerException {
7777
sketch = _sketch;
78-
verbose = _verbose;
78+
verbose = _verbose || Preferences.getBoolean("build.verbose");
7979
sketchIsCompiled = false;
8080
objectFiles = new ArrayList<File>();
8181

@@ -87,10 +87,17 @@ public boolean compile(Sketch _sketch, String _buildPath,
8787
includePaths.add(prefs.get("build.core.path"));
8888
if (prefs.get("build.variant.path").length() != 0)
8989
includePaths.add(prefs.get("build.variant.path"));
90-
for (Library lib : sketch.getImportedLibraries())
90+
for (Library lib : sketch.getImportedLibraries()) {
91+
if (verbose)
92+
System.out.println(I18n
93+
.format(_("Using library {0} in folder: {1} {2}"), lib.getName(),
94+
lib.getFolder(), lib.isPre15Lib() ? "(pre-1.5)" : ""));
9195
for (File folder : lib.getSrcFolders(targetArch))
9296
includePaths.add(folder.getPath());
93-
97+
}
98+
if (verbose)
99+
System.out.println();
100+
94101
// 1. compile the sketch (already in the buildPath)
95102
sketch.setCompilingProgress(30);
96103
compileSketch(includePaths);
@@ -308,8 +315,8 @@ private boolean is_already_compiled(File src, File obj, File dep, Map<String, St
308315
} catch (Exception e) {
309316
return false; // any error reading dep file = recompile it
310317
}
311-
if (ret && (verbose || Preferences.getBoolean("build.verbose"))) {
312-
System.out.println(" Using previously compiled: " + obj.getPath());
318+
if (ret && verbose) {
319+
System.out.println(I18n.format(_("Using previously compiled file: {0}"), obj.getPath()));
313320
}
314321
return ret;
315322
}
@@ -334,7 +341,7 @@ private void execAsynchronously(String[] command) throws RunnerException {
334341
return;
335342
int result = 0;
336343

337-
if (verbose || Preferences.getBoolean("build.verbose")) {
344+
if (verbose) {
338345
for (String c : command)
339346
System.out.print(c + " ");
340347
System.out.println();

0 commit comments

Comments
 (0)