Skip to content
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

Change datadir to use GetUserConfigDir() #4840

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Lucki
Copy link

@Lucki Lucki commented Jul 15, 2019

Since there are only stored configuration files it makes sense to use the appropriate folder.

This has the advantage over GetUserDataDir() that the XDG-specification can be used on Unix. Also the folder for Mac changes to an equivalent.

The following folders will be used with the applications name appended:

  • Unix: XDG_CONFIG_HOME or ~/.config
  • Windows: C:\Users\username\AppData\Roaming or C:\Documents and Settings\username\Application Data
  • Mac: ~/Library/Preferences

If the folder exists at the old location it will be used instead.

These changes require wxWidgets >= 3.1.1


While GetUserConfigDir() uses XDG_CONFIG_HOME GetUserDataDir() does still not use XDG_DATA_HOME so it's required to use GetUserConfigDir() to take advantage of these changes on Unix.

The changes will start working when line 367 in src/slic3r.cpp is removed.

In my little testing this worked as expected. However I don't have a Mac or Windows so I can't verify this on those.

This fixes #832

Since there are only stored configuration files it makes sense to use the appropriate folder.

This has the advantage over GetUserDataDir() that the XDG-specification can be used on Unix. Also the folder for Mac changes to an equivalent.

The following folders will be used with the applications name appended:

* Unix: XDG_CONFIG_HOME or ~/.config
* Windows: C:\Users\username\AppData\Roaming or C:\Documents and Settings\username\Application Data
* Mac: ~/Library/Preferences

If the folder exists at the old location it will be used instead.

These changes require wxWidgets >= 3.1.1
@AppVeyorBot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

slic3r isn't using XDG_* env variables
2 participants