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

[vcpkg] Use XDG/LOCALAPPDATA for default binary caching path #12091

Merged
merged 5 commits into from Jun 26, 2020

Conversation

ras0219
Copy link
Contributor

@ras0219 ras0219 commented Jun 24, 2020

For binary caching, we should follow the XDG base directory specification[1] on non-Windows platforms. This means we should use ~/.cache/vcpkg/archives as the default package storage location instead of ~/.vcpkg/archives.

On Windows, the appropriate per-user base directory is %LOCALAPPDATA%, so we will use %LOCALAPPATA%/vcpkg/archives.

[1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

@ras0219 ras0219 changed the title Dev/roschuma/xdg [vcpkg] Use XDG/LOCALAPPDATA for default binary caching path Jun 24, 2020
toolsrc/include/vcpkg/base/system.h Show resolved Hide resolved
toolsrc/src/vcpkg/base/system.cpp Outdated Show resolved Hide resolved
toolsrc/src/vcpkg/base/system.cpp Outdated Show resolved Hide resolved
toolsrc/src/vcpkg/base/system.cpp Outdated Show resolved Hide resolved
toolsrc/src/vcpkg/binarycaching.cpp Outdated Show resolved Hide resolved
@ras0219-msft ras0219-msft merged commit 4c527e4 into microsoft:master Jun 26, 2020
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
…ft#12091)

* [vcpkg] Use XDG Base Directory Specification on non-Windows

* [vcpkg] Move user-wide binary cache on Windows to $LOCALAPPDATA/vcpkg/archives

* [vcpkg] Address code review comments; refactor other uses of LOCALAPPDATA

* [vcpkg] Address code review comments

* [vcpkg] filesystem::path::append() accepts string arguments, not paths.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
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.

None yet

3 participants