![]() ![]() This technique is used by software like VMWare Fusion (if you need to run command-line code or similar) and /Library/Application Support or /Library/Frameworks The advantage is that deleting the Application also deletes your library, so you don't need to write an uninstaller. ![]() There are a number of problems with this, though: the user can move the Application, permissions may be wrong, and you have to be careful in any code that uses the Apple Hardened Runtime because it requires special flags to load code signed by anyone other than the signatory on the Application loading the library. If you have an Application that is being installed globally in the /Applications folder (most Applications are on the Mac, but sometimes users put them in strange places), then you could use the Application's own folder for storage of the library and it would be available to any code that can read in that folder. The Mac is a bit of a strange beast when it comes to file system locations, and it's going to get more difficult after macOS 10.15 (Catalina) ships, due to the primary boot file system being read-only.ĭepending on the purpose of accessing the library, there are some appropriate places to put it. Library/Frameworks comes the closest and I think I've encountered other apps that put dylibs in there, but it's obviously intended for frameworks. However neither place strikes me as correct for a dynamic library. Those folders would certainly be safer as users are not supposed to use them however they want, nor modify their permissions. Technically this sort of thing isn't disallowed on macOS - /usr/local is intended to be a place that the user can utilize however they like.Īn alternative solution could be in either /Library/Frameworks or /Library/Application Support/. Ordinarily I would think /usr/local/lib is correct, but occasionally we encounter users who do strange things with that folder, including changing its permissions so that only one user can access the files in it, thus breaking my software for other user accounts on that system. ![]() I'm not actually sure where the best place to put it is. I've developing a software package that needs to install a dylib somewhere globally accessible by all user accounts. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |