laamaa / m8c

Cross-platform M8 tracker headless client
Other
380 stars 81 forks source link

app bundle won't run on macos 10.14 #90

Open gmarinov opened 1 year ago

gmarinov commented 1 year ago

expected: double-clicking downloaded app runs m8c.

actual:

$ ./m8c 
2022-11-06 19:52:08.038 m8c[11889:201100] INFO: Reading config /Users/g/Library/Application Support/m8c/config.ini
2022-11-06 19:52:08.038 m8c[11889:201100] INFO: Writing config file to /Users/g/Library/Application Support/m8c/config.ini
2022-11-06 19:52:08.038 m8c[11889:201100] INFO: Looking for USB serial devices.
2022-11-06 19:52:08.039 m8c[11889:201100] INFO: Found M8 in /dev/cu.usbmodem121139201.
2022-11-06 19:52:08.040 m8c[11889:201100] INFO: Opening port.
Segmentation fault: 11

xattr -r -d com.apple.quarantine path/to/app.app doesn't fix it

but works from source

compiling from source, e.g. make and then ./m8c works fine:

...
2022-11-06 19:54:00.637 m8c[11915:202571] INFO: Looking for USB serial devices.
2022-11-06 19:54:00.639 m8c[11915:202571] INFO: Found M8 in /dev/cu.usbmodem121139201.
2022-11-06 19:54:00.639 m8c[11915:202571] INFO: Opening port.
2022-11-06 19:54:01.098 m8c[11915:202571] INFO: Looking for game controllers
2022-11-06 19:54:01.109 m8c[11915:202571] INFO: Trying to open game controller database from /Users/g/Library/Application Support/m8c/gamecontrollerdb.txt
2022-11-06 19:54:01.109 m8c[11915:202571] INFO: Trying to open game controller database from /Volumes/data/_music/M8/headless/m8c/src/m8c/gamecontrollerdb.txt
2022-11-06 19:54:01.110 m8c[11915:202571] INFO: Found 37 game controller mappings
2022-11-06 19:54:01.110 m8c[11915:202571] INFO: Enabling and resetting M8 display
2022-11-06 19:54:01.115 m8c[11915:202571] INFO: Reset display
2022-11-06 19:55:05.653 m8c[11915:202571] INFO: Received msg_quit from input device.
2022-11-06 19:55:05.664 m8c[11915:202571] INFO: Shutting down
2022-11-06 19:55:05.667 m8c[11915:202571] INFO: Disconnecting M8
laamaa commented 1 year ago

Dang. Could someone else with a mac try the package too and see if it's broken for everyone? I probably won't have time to debug the build/packaging anytime soon as I don't have easy access to a mac :/

gmarinov commented 1 year ago

i tried to tweak the Info.plist file or the adjacent files but nothing worked, until I replaced the m8c binary itself with the one I compiled from source. The downloaded one is ~75kb, the compiled one I have is just over ~40kb.

otool on both looks very similar.

otool-m8c-release.txt

otool-m8c-compiled.txt

laamaa commented 1 year ago

Seems like Github Actions has recently switched to a newer Mac OS version in the builds... I tried manually triggering a new build, could you please check if this works any better? m8c-20221117-macos.zip

gmarinov commented 1 year ago

this is better. the wrapper app still won't open directly from the finder. however, the binary no longer segfaults, so I'm able to "show package contents" and then use "open" from inside it.

Screenshot 2022-11-17 at 15 04 49

+

Screenshot 2022-11-17 at 15 04 55
laamaa commented 1 year ago

I think someone with the proper skills (and a computer for testing...) should rewrite the OSX build thing :)

Schism Tracker for example nowadays seems to have a nice way to automatically cross-compile it directly to both Intel and ARM, but unfortunately I do not have the time to get too much into how it works...

laamaa commented 1 year ago

The build system was updated a little, could you please test if this build works?

m8c-2023-03-08-macos.zip

gmarinov commented 1 year ago
Screenshot 2023-03-09 at 17 18 39 Screenshot 2023-03-09 at 17 18 44