Skip to content

Commit 62d935d

Browse files
authored
Merge pull request #635 from hx2A/fixbuildonmacos
fix ant config so build can also run on macos
2 parents f699f57 + 32bd086 commit 62d935d

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

py5_jar/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<mkdir dir="${project.bin}"/>
1919
<javac release="17" debug="true" includeantruntime="false" srcdir="${project.src}" destdir="${project.bin}">
2020
<classpath>
21-
<fileset dir="${processing_dir}/lib/app/resources">
21+
<fileset dir="${processing_dir}/app/resources">
2222
<include name="**/*.jar"/>
2323
</fileset>
2424
</classpath>

py5_jar/src/main/java/py5/core/SketchBase.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,13 @@ public static void setJOGLProperties(String py5Path) {
6666
System.setProperty("jogamp.gluegen.UseTempJarCache", "false");
6767
}
6868

69-
String variant = PConstants.platformNames[PApplet.platform] + "-" + System.getProperty("os.arch");
69+
String variant = PConstants.platformNames[PApplet.platform];
70+
if (variant.equals("macos")) {
71+
variant = "macosx-universal";
72+
} else {
73+
// TODO: may need to do something special for Raspberry Pi computers
74+
variant += "-" + System.getProperty("os.arch");
75+
}
7076
String joglPath = py5Path + File.separator + "natives" + File.separator + variant;
7177
String javaLibraryPath = System.getProperty("java.library.path");
7278
if (javaLibraryPath == null) {

0 commit comments

Comments
 (0)