I am porting an application from Windows and Linux to macOS.
The application is written in Qt. It has a few dependent dylib (some built, some sdk). The exact same libraries and same Qt version are used for some other applications (which are not ready to be ported yet). It will not be distributed through the App Store.
The application can read, write, drag-and-drop, print custom type user files. It uses a sqlite3 database, provided - users should be able to browse to its location (since they should also have the ability to use a database from a different location). During print, it would be best to use the cups temporary folder to save temporary bitmap files.
I have tried to figure out the best way to install this type of app. Is the bundle packaging right for this type of app, or should I use the file system to place all required files in the most likely locations?
Creating a bundle so far, I have the dependencies (including Qt frameworks) inside the Contents/Frameworks directory.
- Where would I place the user created files... inside the bundle or inside the
Users/MyCompany/MyProgram
directory? I tried to save inside... can't browse inside the MyApp.app from inside the program. - Where would I place the sqlite3 database? If I place it inside the bundle (e.g.
Contents/Resources
), I cannot access it from inside the program. - Where would the entire bundle be installed? in
/Applications/MyCompany/MyProduct
is my guess?
- Where would I place the user created files... inside the bundle or inside the
Without a bundle: from what I read, the following may be good locations:
- For the executable:
/Applications
as above? - For the dependent libs:
usr/share/MyCompany/MyProduct
or/Library/MyCompany/MyProduct
? - User files obviously
Users/MyCompany/MyProgram
- Resource database ? I have no idea what a good place is, accessible to all users, where to keep such a file
- This setup would allow other applications to be installed and use the same Qt framework and dependent dylibs... But I read something about apps not working if the dylibs are modified ?
- For the executable:
Which is the best way and in that case, which are the best folder locations?
Should I assume that the installation is made with sudo rights? Can the installation be done without admin rights?