mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
do check for whether all native libs are supported when running
This commit is contained in:
@@ -84,7 +84,7 @@ public class Runner implements MessageConsumer {
|
||||
// private String appletClassName;
|
||||
|
||||
|
||||
public Runner(JavaBuild build, RunnerListener listener) {
|
||||
public Runner(JavaBuild build, RunnerListener listener) throws SketchException {
|
||||
this.listener = listener;
|
||||
// this.sketch = sketch;
|
||||
this.build = build;
|
||||
@@ -94,6 +94,14 @@ public class Runner implements MessageConsumer {
|
||||
// } else {
|
||||
// System.out.println("actually it's a " + listener.getClass().getName());
|
||||
}
|
||||
|
||||
// Make sure all the imported libraries will actually run with this setup.
|
||||
int bits = Base.getNativeBits();
|
||||
for (Library library : build.getImportedLibraries()) {
|
||||
if (!library.supportsArch(PApplet.platform, bits)) {
|
||||
throw new SketchException(library.getName() + " does not run in " + bits + "-bit mode.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -281,7 +289,7 @@ public class Runner implements MessageConsumer {
|
||||
"java -Xrunjdwp:transport=dt_shmem,address=" + addr + ",suspend=y ";
|
||||
} else if (Base.isMacOS()) {
|
||||
commandArgs =
|
||||
"java -d" + Preferences.get("run.options.bits") +
|
||||
"java -d" + Base.getNativeBits() + //Preferences.get("run.options.bits") +
|
||||
" -Xrunjdwp:transport=dt_socket,address=" + addr + ",suspend=y ";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user