MCPcopy Index your code
hub / github.com/processing/processing / Runner

Method Runner

java/src/processing/mode/java/runner/Runner.java:86–124  ·  view source on GitHub ↗
(JavaBuild build, RunnerListener listener)

Source from the content-addressed store, hash-verified

84
85
86 public Runner(JavaBuild build, RunnerListener listener) throws SketchException {
87 this.listener = listener;
88// this.sketch = sketch;
89 this.build = build;
90
91 checkLocalHost();
92
93 if (listener instanceof JavaEditor) {
94 this.editor = (JavaEditor) listener;
95 sketchErr = editor.getConsole().getErr();
96 sketchOut = editor.getConsole().getOut();
97 } else {
98 sketchErr = System.err;
99 sketchOut = System.out;
100 }
101
102 // Make sure all the imported libraries will actually run with this setup.
103 int bits = Platform.getNativeBits();
104 String variant = Platform.getVariant();
105
106 for (Library library : build.getImportedLibraries()) {
107 if (!library.supportsArch(PApplet.platform, variant)) {
108 sketchErr.println(library.getName() + " does not run on this architecture: " + variant);
109 int opposite = (bits == 32) ? 64 : 32;
110 if (Platform.isMacOS()) {
111 //if (library.supportsArch(PConstants.MACOSX, opposite)) { // should always be true
112 throw new SketchException("To use " + library.getName() + ", " +
113 "switch to " + opposite + "-bit mode in Preferences.");
114 //}
115 } else {
116 throw new SketchException(library.getName() + " is only compatible " +
117 "with the " + opposite + "-bit download of Processing.");
118 //throw new SketchException(library.getName() + " does not run in " + bits + "-bit mode.");
119 // "To use this library, switch to 32-bit mode in Preferences." (OS X)
120 // "To use this library, you must use the 32-bit version of Processing."
121 }
122 }
123 }
124 }
125
126
127 /**

Callers

nothing calls this directly

Calls 11

checkLocalHostMethod · 0.95
getNativeBitsMethod · 0.95
getVariantMethod · 0.95
isMacOSMethod · 0.95
getErrMethod · 0.80
getConsoleMethod · 0.80
getOutMethod · 0.80
getImportedLibrariesMethod · 0.80
supportsArchMethod · 0.80
printlnMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected