summaryrefslogtreecommitdiff
path: root/src/parsersettings.cc
diff options
context:
space:
mode:
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