diff --git a/CMakeLists.txt b/CMakeLists.txt index a0d8f5eb4..5b4b2eb01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -880,15 +880,21 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") "from PySide2.QtWidgets import *\n") file(WRITE ${CMAKE_BINARY_DIR}/bin/PySide/QtSvg.py "from PySide2.QtSvg import *\n") - INSTALL( - FILES - ${CMAKE_BINARY_DIR}/bin/PySide/__init__.py - ${CMAKE_BINARY_DIR}/bin/PySide/QtCore.py - ${CMAKE_BINARY_DIR}/bin/PySide/QtGui.py - ${CMAKE_BINARY_DIR}/bin/PySide/QtSvg.py - DESTINATION - bin/PySide - ) + if(APPLE) + INSTALL( + DIRECTORY + ${CMAKE_BINARY_DIR}/bin/PySide + DESTINATION + MacOS + ) + else() + INSTALL( + DIRECTORY + ${CMAKE_BINARY_DIR}/bin/PySide + DESTINATION + bin + ) + endif() else() # set(PYTHON_SUFFIX -python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) SET(PYTHON_SUFFIX -python2.7) # for shiboken diff --git a/src/MacAppBundle/FreeCAD.app/Contents/MacOS/PySide b/src/MacAppBundle/FreeCAD.app/Contents/MacOS/PySide deleted file mode 120000 index df160d514..000000000 --- a/src/MacAppBundle/FreeCAD.app/Contents/MacOS/PySide +++ /dev/null @@ -1 +0,0 @@ -../bin/PySide \ No newline at end of file diff --git a/src/MacAppBundle/FreeCAD.app/Contents/bin/FreeCAD b/src/MacAppBundle/FreeCAD.app/Contents/bin/FreeCAD deleted file mode 120000 index 41942cc6e..000000000 --- a/src/MacAppBundle/FreeCAD.app/Contents/bin/FreeCAD +++ /dev/null @@ -1 +0,0 @@ -../MacOS/FreeCAD \ No newline at end of file diff --git a/src/Main/CMakeLists.txt b/src/Main/CMakeLists.txt index b783d164d..4948cb262 100644 --- a/src/Main/CMakeLists.txt +++ b/src/Main/CMakeLists.txt @@ -94,11 +94,16 @@ if(WIN32) RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -else(WIN32) +elseif(APPLE) + INSTALL(TARGETS FreeCADMainCmd + RUNTIME DESTINATION MacOS + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +else() INSTALL(TARGETS FreeCADMainCmd RUNTIME DESTINATION bin ) -endif(WIN32) +endif() ######################## FreeCADMainPy ######################## diff --git a/src/Tools/MakeMacBundleRelocatable.py b/src/Tools/MakeMacBundleRelocatable.py index e12a8e958..801eb1d09 100755 --- a/src/Tools/MakeMacBundleRelocatable.py +++ b/src/Tools/MakeMacBundleRelocatable.py @@ -359,7 +359,7 @@ def main(): path = sys.argv[1] bundle_path = os.path.abspath(os.path.join(path, "Contents")) graph = DepsGraph() - dir_filter = ["bin", "lib", "Mod", "Mod/PartDesign", + dir_filter = ["MacOS", "lib", "Mod", "lib/python2.7/site-packages", "lib/python2.7/lib-dynload"] search_paths = [bundle_path + "/lib"] + sys.argv[2:]