From a4fe76d2a7de14e5e2d5830e21e71d19197d8698 Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Sat, 8 Feb 2014 18:33:21 +0100 Subject: [PATCH] [MacOSX] Setting Set3DShapesPath --- common/edaappl.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/common/edaappl.cpp b/common/edaappl.cpp index c3595b0f8b..c4780b49f3 100644 --- a/common/edaappl.cpp +++ b/common/edaappl.cpp @@ -1231,8 +1231,22 @@ bool EDA_APP::Set3DShapesPath( const wxString& aKiSys3Dmod ) wxString relpath( wxT( "modules/packages3d" ) ); // Apple MacOSx -#ifdef __APPLE__ - // TO DO +#ifdef __WXMAC__ + path = wxT("/Library/Application Support/kicad/modules/packages3d/"); + + if( wxFileName::DirExists( path ) ) + { + wxSetEnv( aKiSys3Dmod, path ); + return true; + } + + path = wxString( wxGetenv( wxT( "HOME" ) ) ) + wxT("/Library/Application Support/kicad/modules/packages3d/"); + + if( wxFileName::DirExists( path ) ) + { + wxSetEnv( aKiSys3Dmod, path ); + return true; + } #elif defined(__UNIX__) // Linux and non-Apple Unix path = wxT("/usr/local/kicad/share/") + relpath;