Integrate script for making a relocatable OS X app
This commit is contained in:
28
src/MacAppBundle/CMakeLists.txt
Normal file
28
src/MacAppBundle/CMakeLists.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
set(PYTHON_DIR_BASENAME python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
|
||||
if(PYTHON_LIBRARY MATCHES "(.*Python\\.framework).*")
|
||||
#framework
|
||||
set(PYTHON_DIR ${CMAKE_MATCH_1}/Versions/Current/lib/${PYTHON_DIR_BASENAME})
|
||||
else()
|
||||
#unix
|
||||
get_filename_component(PYTHON_DIR ${PYTHON_LIBRARY} PATH)
|
||||
set(PYTHON_DIR ${PYTHON_DIR}/${PYTHON_DIR_BASENAME})
|
||||
endif()
|
||||
|
||||
install(CODE "execute_process(COMMAND
|
||||
${CMAKE_COMMAND} -E copy_directory ${PYTHON_DIR} ${CMAKE_INSTALL_LIBDIR}/${PYTHON_DIR_BASENAME}
|
||||
)")
|
||||
install(DIRECTORY ${QT_PLUGINS_DIR}/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/qtplugins)
|
||||
|
||||
#files installed by homebrew do not have write permission for regular user
|
||||
install(CODE "execute_process(COMMAND chmod -R a+w ${CMAKE_INSTALL_LIBDIR})")
|
||||
|
||||
get_filename_component(APP_PATH ${CMAKE_INSTALL_PREFIX} PATH)
|
||||
|
||||
install(CODE
|
||||
"message(STATUS \"Making bundle relocatable...\")
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/src/Tools/MakeMacBundleRelocatable.py ${APP_PATH}
|
||||
)"
|
||||
)
|
||||
38
src/MacAppBundle/FreeCAD.app/Contents/Info.plist
Normal file
38
src/MacAppBundle/FreeCAD.app/Contents/Info.plist
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>FreeCAD</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string></string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>freecad.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string></string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleName</key>
|
||||
<string>FreeCAD</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.14-dev</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
</dict>
|
||||
</plist>
|
||||
1
src/MacAppBundle/FreeCAD.app/Contents/MacOS/FreeCAD
Symbolic link
1
src/MacAppBundle/FreeCAD.app/Contents/MacOS/FreeCAD
Symbolic link
@@ -0,0 +1 @@
|
||||
../bin/FreeCAD
|
||||
BIN
src/MacAppBundle/FreeCAD.app/Contents/Resources/freecad.icns
Normal file
BIN
src/MacAppBundle/FreeCAD.app/Contents/Resources/freecad.icns
Normal file
Binary file not shown.
2
src/MacAppBundle/FreeCAD.app/Contents/Resources/qt.conf
Normal file
2
src/MacAppBundle/FreeCAD.app/Contents/Resources/qt.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
[Paths]
|
||||
Plugins=lib/qtplugins
|
||||
Reference in New Issue
Block a user