summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/Application/UnixApplicationPathProvider.cpp')
-rw-r--r--SwifTools/Application/UnixApplicationPathProvider.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/SwifTools/Application/UnixApplicationPathProvider.cpp b/SwifTools/Application/UnixApplicationPathProvider.cpp
index c0d24ab..a68f249 100644
--- a/SwifTools/Application/UnixApplicationPathProvider.cpp
+++ b/SwifTools/Application/UnixApplicationPathProvider.cpp
@@ -14,6 +14,7 @@ namespace Swift {
UnixApplicationPathProvider::UnixApplicationPathProvider(const std::string& name) : ApplicationPathProvider(name) {
resourceDirs.push_back(getExecutableDir() / "../resources"); // Development
+ resourceDirs.push_back(getExecutableDir() / ".." / "share" / boost::to_lower_copy(getApplicationName())); // Local install
char* xdgDataDirs = getenv("XDG_DATA_DIRS");
if (xdgDataDirs) {
std::vector<std::string> dataDirs = String::split(xdgDataDirs, ':');
@@ -24,8 +25,8 @@ UnixApplicationPathProvider::UnixApplicationPathProvider(const std::string& name
return;
}
}
- resourceDirs.push_back("/usr/local/share/swift");
- resourceDirs.push_back("/usr/share/swift");
+ resourceDirs.push_back("/usr/local/share/" + boost::to_lower_copy(getApplicationName()));
+ resourceDirs.push_back("/usr/share/" + boost::to_lower_copy(getApplicationName()));
}
boost::filesystem::path UnixApplicationPathProvider::getHomeDir() const {