1
General / Load resources in app bundle
« on: September 20, 2015, 08:05:38 pm »
I compile and bundle my SFML application into a .app, and then I run the app by typing open Orbs.app.
What I cannot figure out, however, is the working directory so that I can load a font. I copy a font to the Resources folder of the app during compilation, but the app can't find it. I thought that the default working directory of an SFML app was the resources folder?
Here is my folder structure:
Orbs.app
Contents
Mac OSX
main (main binary)
Resources
SFML stuff
geometos.ttf
icon.icns
info.plist
I want to be able to load the geometos.ttf font, but font.loadFromFile("geometos.ttf") cannot find the font. What do I have to do?
What I cannot figure out, however, is the working directory so that I can load a font. I copy a font to the Resources folder of the app during compilation, but the app can't find it. I thought that the default working directory of an SFML app was the resources folder?
Here is my folder structure:
Orbs.app
Contents
Mac OSX
main (main binary)
Resources
SFML stuff
geometos.ttf
icon.icns
info.plist
I want to be able to load the geometos.ttf font, but font.loadFromFile("geometos.ttf") cannot find the font. What do I have to do?