I write a software which is running on multiple platforms, and I need a place to store and find some stuff (logs, configurations, etc.). This needs to be an absolute path, so the code knows where to look for the files. (I have tried using relative paths, but this didn't work well, as I am bundling python executables and PyInstaller / AppImageTool seem to wrap the code into subdirectories which are then unpacked to /tmp, so I have decided to use absolute paths).
On Linux, I use /opt as the folder, which seems ideal for this purpose. Currently, on Mac, I also use /opt, but I have noticed this doesn't exist by default and isn't a standard folder. On windows, should I just create C:\opt or are there any existing dirs made for this purpose?
Are there any better alternatives than using /opt or C:\opt on OSX / Windows?
I am using the platform module in python to detect different platforms and it is no problem for me to set a different folder for each platform.
On Mac, unless you're using Homebrew, /usr/local/{bin,etc} is a good place for user related binaries and resources
On Windows, if you're against using Program Files, then %HOME%\AppData
, or creating a dot-folder directly in the user's home folder