Mac OSX folders needed by application
-
-
I have dealt with this in the past . Because of osx bundle madness. I wrote a helper function that just uses QString and cuts off the bundle madness. Alternatively if you are asking about system wide paths take a look at QStanderedPaths .
-
I have an application and some associated files. First I was just putting them an folder , app and associated folders. On windows it is easy to reference these folders based on the location of the application . On Mac I get an extra mess for the application path. Could you share your helper function ideas ? This seems like something that should be standard in Qt, if it's going to be truly Cross Platform.
-
Hi,
What folders do you have in mind ?
Where are you putting them ?
What is your use of them ? -
Right now I'm just building, and the application couldn't fine the folders
Have a
Bin folder with application
Menu folder that builds a dynamic menu
Des folder that has some information
Image that has images to displayI added CONFIG -= app_bundle to .pro file and now running the app finds the folders..
I guess I could have a predefined folder for Mac and Windows somewhere
-
Where are you storing them on Windows and Linux ?
-
Image and Des folder looks like static content, right ?
What about Menu ? Is it something your user can modify ? -
Then regardless of the OS, you should put that user customizable subfolder in the
QStandardPaths::AppConfigLocation
.The other folders content will be updated when you provide a new version of the application.
In any case, don't put anything user editable in the same folder as the binary. On Windows, the folder is read-only, and it should be the same on Linux.