mirror of https://github.com/vitalif/openscad
Mac fix: Only use NSLog when GUI launched
parent
985d9a2f61
commit
acab1dda1c
|
@ -18,6 +18,11 @@
|
||||||
<string>@SHORT_VERSION@</string>
|
<string>@SHORT_VERSION@</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>@SHORT_VERSION@</string>
|
<string>@SHORT_VERSION@</string>
|
||||||
|
<key>LSEnvironment</key>
|
||||||
|
<dict>
|
||||||
|
<key>GUI_LAUNCHED</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
<key>CFBundleDocumentTypes</key>
|
<key>CFBundleDocumentTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
|
|
|
@ -582,8 +582,9 @@ int gui(const vector<string> &inputFiles, const fs::path &original_path, int arg
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
bool isGuiLaunched = getenv("GUI_LAUNCHED") != 0;
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
set_output_handler(CocoaUtils::nslog, NULL);
|
if (isGuiLaunched) set_output_handler(CocoaUtils::nslog, NULL);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_CGAL
|
#ifdef ENABLE_CGAL
|
||||||
// Causes CGAL errors to abort directly instead of throwing exceptions
|
// Causes CGAL errors to abort directly instead of throwing exceptions
|
||||||
|
|
Loading…
Reference in New Issue