Game data should ideally be stored in the User Library for macOS
Currently, (in macOS and other platforms where applicable), data/preferences for the application is stored beside the executable file/application bundle (if configured that way), which can lead to ClassiCube leaving behind a huge mess, especially if we switch to the application bundle by default and the user moves the bundle to /Applications. This is the current way files are stored:
Now, we could distribute the bundle/executable itself in a folder like, for example, Adobe programs do:
And make the user drag the whole folder into the Applications folder from, say, a dmg file (and set permissions for that folder accordingly), but this feels alien to the concepts and abstractions of a native macOS application. There are paths specifically designed for user data that isn't intended to be viewed directly by an end-user (while still making it possible for those who need it), so why not use them?
So, ideally, user data should be stored in a path like ~/Library/Application Support/ClassiCube and not alongside the binary/bundle in macOS. This also makes the game technically support multiple users as each data folder is unique to that user.
Great proposal! Also removes the need for enabling unnecessary Terminal permissions.
ClassiCube tries to store data in the working directory that is provided to it (unless the working directory is a likely problematic directory, e.g. $HOME folder or System32 folder on windows). I do prefer having it behave that way.
The macOS build is distributed as an executable, because if it was instead distributed as an app bundle, then it gets quarantined into readonly storage (App translocation) until it is first manually moved by the user to another folder.