(You might ask: why bother with SDL? PureBasic already does cross-platform video, graphics, audio, keyboard, mouse, joystick... Well (A) it has some nice extras, like more Joystick functions and the GameController subsystem which translates many different gamepads to a standard XBox-like layout... also (B) I just want to learn SDL and practice importing libraries into PB!)
I just finished my first PB + SDL project, a small game for Windows and Mac. On Windows, the process was easy: import SDL functions, build the executable, package it with the necessary DLLs.
But Mac OSX doesn't use DLLs, it uses Frameworks, and the SDL2 runtime is packaged as a Disk Image (.dmg) which must be "mounted" and then installed to /Library/Frameworks. This is new and confusing to me!
I guess my ultimate question is: What is the "best" way to release a PureBasic Mac project that uses external Frameworks like SDL? I see 5 options:
1. Release the app WITHOUT the runtime, prompt the user if they need to download + install it
2. Release the app with the runtime, prompt the user if they need to install it
3. Release the app with the runtime, automatically install it if missing
4. Release the app with the runtime, load it from the local directory like a DLL, no installation to /Library/Frameworks
5. Statically link the runtime, no external framework needed
Some thoughts about each option:
1. Easiest method for me, but biggest annoyance for the user (download, mount, install)
2. Maybe the best overall method
3. I don't know if a PB program can auto-install a Framework, there might be permission issues, and you can't just copy a DMG into "Frameworks"
4. Again, I don't know how this works on Mac. I don't think you can just drop a DMG in a folder and expect it to do anything.
5. I have no idea how to statically link an open-source library written in C to a PureBasic Mac project... but I am willing to learn!
Any ideas, PureBasic and Mac and SDL experts?
