New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for XDG Base Directory Specification #561
Conversation
This is interesting -- would it be possible to have a OSX-style implementation along these lines? |
@bakercp sure, this would be no problem. but i'm not familiar with the special needs on OSX. Taking account of the information from your link, I would recommend the following mapping:
But for the sake of completeness there should also be implemented a support for plist-configurations. |
Add missing method declaration
Can we also have meaningful Windows implementations of these functions? |
i think windows implementations are also no problem. According to http://windows.microsoft.com/de-de/windows-8/what-appdata-folder and http://de.wikipedia.org/wiki/Umgebungsvariable the following mapping should be meaningful
|
So @bschramke @obiltschnig @bakercp , is this good to be merged or does it require more work on various platforms? |
We should have meaningful Windows and OS X implementations before we merge this. |
I'm not sure if they are meaningful, but implementations for OSX and Windows are already there. I've tested the Linux and Windows implementations on openSUSE 13.1 and Windows 8, and they work fine. The mappings on Win and OSX maybe need some fine adjustment, especially the fallback mappings on Windows, but on the whole i think it's ready. |
@obiltschnig any further comments or is it good to go? |
OK, looked at it again. Looks like everything's there already. The class documentation for SystemConfiguration should be updated to include the new properties. |
Ok, great. This should go in 1.7.0; I'll fork off 1.6.1 and merge this into develop if there are no more objections. |
Support for XDG Base Directory Specification
Made some little changes, that makes it easy to stick to XDG Base Directory Specification.
On Linux its not a good idea to save configuration files beside the application's executable, because of executables normally located in '/usr/bin'. Also it's no good idea to clutter the users home directory with application specific data.
New methods:
/.config/'), OSX('/Library/Preferences/'), Win('%APPDATA%'), VxWorks & Other(invokes homeImpl)/.local/share/'), OSX('/Library/Application Support/'), Win('%LOCALAPPDATA%'), VxWorks & Other(invokes homeImpl)/.cache/'), OSX('/Library/Caches/'), Win('%TEMP%'), VxWorks & Other(invokes tempImpl)/.local/tmp/'), OSX('/Library/Caches/'), Win('%TEMP%'), VxWorks & Other(invokes tempImpl)New configuration values:
EDIT: add OSX compliant implementation
EDIT: add Windows compliant implementation