I am trying to port a game I made using Qt 5 to Mac OS. Everything is working fine, except that I have a pretty big Assets folder that I can't turn into a resource file.
On Windows and Linux I was using relative paths to load images from the Assets directory, essentially all the assets from the game are loaded via QImage.load("../Assets/some_asset");
and the Assets folder is of course one directory up from the executable.
I have used getcwd
to determine that the working directory for my game is <path_to_app_bundle>/Contents/MacOS
and then I have included the Assets folder in the application bundle in the <path_to_app_bundle>/Contents
directory, but QImage.load
still returns false and furthermore calling access("<path_to_app_bundle>/Contents/Assets/some_asset", F_OK)
returns -1.
I have triple checked for typos and permission issues, I have also tried to include the Assets folder in all the levels of the app bundle hierarchy, nothing worked.
I'm using Mac OS X 10.9.3 and Qt 5.3 with clang.