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>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@SHORT_VERSION@</string>
|
||||
<key>LSEnvironment</key>
|
||||
<dict>
|
||||
<key>GUI_LAUNCHED</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<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 rc = 0;
|
||||
bool isGuiLaunched = getenv("GUI_LAUNCHED") != 0;
|
||||
#ifdef Q_OS_MAC
|
||||
set_output_handler(CocoaUtils::nslog, NULL);
|
||||
if (isGuiLaunched) set_output_handler(CocoaUtils::nslog, NULL);
|
||||
#endif
|
||||
#ifdef ENABLE_CGAL
|
||||
// Causes CGAL errors to abort directly instead of throwing exceptions
|
||||
|
|
Loading…
Reference in New Issue