Added explicit support for Mac OS.
This commit is contained in:
parent
de3d4ea8a7
commit
326c02cd0f
|
@ -37,6 +37,7 @@ def _fc_path():
|
|||
os.path.join(os.path.expanduser("~"), "lib/freecad/lib"),
|
||||
"/usr/local/lib/freecad/lib",
|
||||
"/usr/lib/freecad/lib",
|
||||
"/opt/freecad/lib/",
|
||||
"/usr/bin/freecad/lib",
|
||||
]:
|
||||
if os.path.exists(_PATH):
|
||||
|
@ -84,6 +85,14 @@ def _fc_path():
|
|||
]:
|
||||
if os.path.exists(_PATH):
|
||||
return _PATH
|
||||
else:
|
||||
#Assume we're dealing with a Mac
|
||||
for _PATH in [
|
||||
os.path.join(os.path.expanduser("~"), "Library/Application Support/FreeCAD/lib"),
|
||||
"/Applications/FreeCAD.app/lib",
|
||||
]:
|
||||
if os.path.exists(_PATH):
|
||||
return _PATH
|
||||
|
||||
#Make sure that the correct FreeCAD path shows up in Python's system path
|
||||
sys.path.insert(0, _fc_path())
|
||||
sys.path.insert(0, _fc_path())
|
||||
|
|
Loading…
Reference in New Issue
Block a user