summaryrefslogtreecommitdiff
path: root/src/parsersettings.cc
diff options
context:
space:
mode:
authordonbright <hugh.m.bright@gmail.com>2013-05-27 05:28:56 (GMT)
committerdonbright <hugh.m.bright@gmail.com>2013-05-27 05:28:56 (GMT)
commitef7b80656fc39dc0fd4012231633cf858e6aa10b (patch)
tree17e5a57dfa154821918094cab47476189771ce00 /src/parsersettings.cc
parent0967a26bff45951d7b86fe628e8b1156e6e40ede (diff)
parent37dc9342a14206f5862447eb9d3d5049ec67f638 (diff)
Merge pull request #368 from openscad/issue125
Issue125
Diffstat (limited to 'src/parsersettings.cc')
-rw-r--r--src/parsersettings.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/parsersettings.cc b/src/parsersettings.cc
index cb7c93d..8db33a8 100644
--- a/src/parsersettings.cc
+++ b/src/parsersettings.cc
@@ -3,9 +3,7 @@
#include <boost/foreach.hpp>
#include "boosty.h"
#include <boost/algorithm/string.hpp>
-#ifdef __APPLE__
-#include "CocoaUtils.h"
-#endif
+#include "PlatformUtils.h"
namespace fs = boost::filesystem;
@@ -104,12 +102,15 @@ void parser_init(const std::string &applicationpath)
}
}
- // FIXME: Add ~/.openscad/libraries
-#if defined(__APPLE__) && !defined(OPENSCAD_TESTING)
- fs::path docdir(CocoaUtils::documentsPath());
+ // This is the built-in user-writable library path
+#ifndef OPENSCAD_TESTING
+ // This will resolve to ~/Documents on Mac, "My Documents" on Windows and
+ // ~/.local/share on Linux
+ fs::path docdir(PlatformUtils::documentsPath());
add_librarydir(boosty::stringy(docdir / "OpenSCAD" / "libraries"));
#endif
+ // This is the built-in read-only library path
std::string librarydir;
fs::path libdir(applicationpath);
fs::path tmpdir;
contact: Jan Huwald // Impressum