diff options
author | Marius Kintel <marius@kintel.net> | 2014-01-07 20:44:28 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2014-01-07 20:44:28 (GMT) |
commit | 20938506b6eb7bb9ee6d211df8b067c9fead47d4 (patch) | |
tree | 01b7f8715d56b4b12e1bc6cc55d2affa116f2ef0 /src/parsersettings.cc | |
parent | f7a633c57fe71228518f4429acd6bf0751706918 (diff) |
Mac fix: We need to use bundled resources when running bundled apps in cmd-line node
Diffstat (limited to 'src/parsersettings.cc')
-rw-r--r-- | src/parsersettings.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/parsersettings.cc b/src/parsersettings.cc index de1ff98..ba4a223 100644 --- a/src/parsersettings.cc +++ b/src/parsersettings.cc @@ -88,7 +88,7 @@ fs::path find_valid_path(const fs::path &sourcepath, return fs::path(); } -void parser_init(const std::string &applicationpath, bool isgui) +void parser_init(const std::string &applicationpath) { // Add paths from OPENSCADPATH before adding built-in paths const char *openscadpaths = getenv("OPENSCADPATH"); @@ -117,7 +117,8 @@ void parser_init(const std::string &applicationpath, bool isgui) fs::path tmpdir; #ifdef __APPLE__ // Libraries can be bundled on Mac. If not, fall back to development layout - if (isgui) { + bool isbundle = is_directory(libdir / ".." / "Resources"); + if (isbundle) { libdir /= "../Resources"; if (!is_directory(libdir / "libraries")) libdir /= "../../.."; } |