Sammy1Am / Moppy2

The evolution of the Musical flOPPY controller
Other
309 stars 50 forks source link

launching MoppyControlGUI on a mac #177

Open mentaluproar opened 1 year ago

mentaluproar commented 1 year ago

I have Mac and linux stuff, no windows machines. I haven't touched java since 2004 so I'm having trouble creating a .sh file that replicates what the .bat file does to launch in windows. Has anyone here run moppy on a Mac?

Sammy1Am commented 1 year ago

Before trying to build your own, have you tried using the shell script included in the release zip? It's in the same folder as the .bat file.

mentaluproar commented 1 year ago

Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/xm/n92l0yxs5cxfkfxr6d8swb9r0000gn/T/jSerialComm/1669508790816-libjSerialComm.jnilib at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2408) at java.base/java.lang.Runtime.load0(Runtime.java:785) at java.base/java.lang.System.load(System.java:2011) at com.fazecast.jSerialComm.SerialPort.(SerialPort.java:248) at com.moppy.core.comms.bridge.BridgeSerial.getAvailableSerials(BridgeSerial.java:31) at com.moppy.control.NetworkManager.(NetworkManager.java:53) at com.moppy.control.MoppyControlGUI.main(MoppyControlGUI.java:41)

I've installed Java 19

Sammy1Am commented 1 year ago

Alright, I don't have a Linux/Mac system to test on at the moment (I don't think WSL supports GUI programs yet), but the end result of both the .bat and shell script is essentially: java --class-path "lib/*" com.moppy.control.MoppyControlGUI

So if you cd to the MoppyControlGUI folder and run that command, it should attempt to run the control GUI. All the extra script stuff is to deal with like, finding Java, dealing with environment variables, etc. But for a basic run you shouldn't need it.

There's a chance that jSerialComm isn't supported on your system I guess, what kind of Mac do you have?

mentaluproar commented 1 year ago

14 inch Mac Pro running on apple silicon. I’ll try this command when I get back home.

mentaluproar commented 1 year ago

EDIT: I tried launching from /bin so of course it wouldn't work. Anyways, after properly following your directions, I get an error over jSerialComm.

MoppyControlGUI-2.1.0 % java --class-path "lib/*" com.moppy.control.MoppyControlGUI Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/xm/n92l0yxs5cxfkfxr6d8swb9r0000gn/T/jSerialComm/1669700750561-libjSerialComm.jnilib at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2393) at java.base/java.lang.Runtime.load0(Runtime.java:755) at java.base/java.lang.System.load(System.java:1953) at com.fazecast.jSerialComm.SerialPort.(SerialPort.java:248) at com.moppy.core.comms.bridge.BridgeSerial.getAvailableSerials(BridgeSerial.java:31) at com.moppy.control.NetworkManager.(NetworkManager.java:53) at com.moppy.control.MoppyControlGUI.main(MoppyControlGUI.java:41)

Sammy1Am commented 1 year ago

Ah, okay, seems like it's a jSerialComm thing. Eventually I'll hopefully get a chance to update to the newest version and then if you're able to test again hopefully it will work. Seems like maybe an ARM support thing.