SFML community forums

General => General discussions => Topic started by: Dragnalith on October 11, 2013, 12:35:17 am

Title: SFML runtime for OS X
Post by: Dragnalith on October 11, 2013, 12:35:17 am
When you compile SFML on OS X, you need to install Freetype to run your SFML application ( at least in OS X 10.8 ). This is done with make install which copy freetype.framework at the right place. But when you distribute your app, you do not want the user to have to install the framework.

What are the right ways to solve this problem? Make an .app bundle with the freetype framework? An install script to copy the framework? Put the .framework in the same folder than your SFML application binary?
Title: Re: SFML runtime for OS X
Post by: Ixrec on October 11, 2013, 12:52:59 am
The best option is to make an .app bundle.  If you're using XCode as the official SFML Mac tutorial describes, then you should get an .app automatically.

If you want to distribute a simple zip file with your executable, then the framework must be located in [executable path]/../Frameworks.  This is analogous to how Windows .dlls must be located in [executable path]/.

There might be a way to make a .dmg with an installer that takes care of the frameworks somehow but I haven't looked into that yet, and it's probably overkill for your first program.