pquiring / javaforce

JavaForce library for building powerful Apps and Services (Native Bindings for Camera, OpenGL, ffmpeg). Includes VoIP stack, PLC I/O and many apps.
http://pquiring.github.io/javaforce
GNU Lesser General Public License v3.0
55 stars 24 forks source link

building for Mac os #3

Closed danieldonoghue closed 4 years ago

danieldonoghue commented 6 years ago

how do I build for macOS?

I have jdk and jre 10+ and ant. I go into the Repo main folder and run ant and then into the project folders and ant them.

when I try to create a dmg file i persistently get told jfdmg is missing; if I go into that folder and try to build, it tells me target "help" is missing. if I remove "help" from the default in build, it doesn't doesn't anything; if I manually add the script there to my path and re-run ant dmg, I get errors that the dmg file is missing so I feel I must be missing a step or misreading the readme file?

pquiring commented 6 years ago

Wow! I haven't tried using the build process on mac in a long time. I've put in some minor fixes, but the process needs Java extracted to $HOME/jre which I haven't figured out just yet.

Thanks

pquiring commented 6 years ago

jfdmg needs two files : Info.plist and ${app}.icns (mac icon file). jfedit is the only project that has these sample files.

pquiring commented 6 years ago

I've updated jfdmg to work with Java9+ JREs and updated readme.txt with more instructions. Haven't tested it yet but should work.

pquiring commented 6 years ago

Ok, I think I've fixed the dmg creation. But I'm still not able to get the launcher working. When I try to open the java dylib and create a JVM instance, MacOS pops up a window claiming Java6 needs to be intsalled (even if the app is trying to load a newer version directly). I've never been able to get it working correctly.

pquiring commented 6 years ago

Ok, I've racked my brain all day and can't fix this. I've posted a question on stackoverflow.com. Hopefully someone know's how things work on MacOSX.

https://stackoverflow.com/questions/52580440/how-to-create-jvm-on-macosx-with-java9

pquiring commented 4 years ago

That link is dead but can be found on web.archive.org: https://web.archive.org/web/20181002230101/https://stackoverflow.com/questions/52580440/how-to-create-jvm-on-macosx-with-java9

pquiring commented 4 years ago

Fixed the mac loader (after all these years). See https://bugs.openjdk.java.net/browse/JDK-8064542 libjli.dylib should be used instead of libjvm.dylib

See https://github.com/pquiring/javaforce/blob/master/stubs/mac/mac.c

Thanks!

pquiring commented 4 years ago

AWT is not working yet, might take another 2 years to fix that ;)

pquiring commented 4 years ago

Got AWT working in launcher. MacOS requires event loop to run on main thread.