diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/creator/CMakeLists.txt | 123 | ||||
-rw-r--r-- | source/darwin/blender.app/Contents/Info.plist | 8 | ||||
-rw-r--r-- | source/darwin/blendercreator.app/Contents/Info.plist | 53 | ||||
-rw-r--r-- | source/darwin/blendercreator.app/Contents/MacOS/blendercreator | 1 | ||||
-rw-r--r-- | source/darwin/blendercreator.app/Contents/PkgInfo | 1 | ||||
-rw-r--r-- | source/darwin/blendercreator.app/Contents/Resources/blender creator icon.icns | bin | 189097 -> 0 bytes | |||
-rw-r--r-- | source/darwin/blendercreator.app/Contents/Resources/blender file icon.icns | bin | 145836 -> 0 bytes | |||
-rw-r--r-- | source/darwin/blenderplayer.app/Contents/Info.plist | 54 | ||||
-rw-r--r-- | source/darwin/blenderpublisher.app/Contents/Info.plist | 53 | ||||
-rw-r--r-- | source/darwin/blenderpublisher.app/Contents/MacOS/blenderpublisher | 1 | ||||
-rw-r--r-- | source/darwin/blenderpublisher.app/Contents/PkgInfo | 1 | ||||
-rw-r--r-- | source/darwin/blenderpublisher.app/Contents/Resources/blender file icon.icns | bin | 1721 -> 0 bytes | |||
-rw-r--r-- | source/darwin/blenderpublisher.app/Contents/Resources/blender publisher icon.icns | bin | 1991 -> 0 bytes |
13 files changed, 124 insertions, 171 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 561f28a6154..5a5baee7f1d 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -186,7 +186,7 @@ if(MSVC) # ${CMAKE_CFG_INTDIR} should replace \${BUILD_TYPE} when using add_command set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE}) elseif(APPLE) - set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) + set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/\${BUILD_TYPE}) else() set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}) endif() @@ -528,56 +528,113 @@ if(WITH_INSTALL) endif() elseif(APPLE) - # TODO, APPLE needs a 'make install' target like win32 and unix - # also update GNUmakefile to run make install if you do this - set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app) set(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist) - set(TARGETINFO ${TARGETDIR}/blender.app/Contents/Info.plist) + set(TARGETDIR_VER ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}) - add_custom_command( - TARGET blender POST_BUILD MAIN_DEPENDENCY blender - COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/text/* ${TARGETDIR}/ + # setup Info.plist + execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BLENDER_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) + + set_target_properties(blender PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${SOURCEINFO} + MACOSX_BUNDLE_SHORT_VERSION_STRING ${BLENDER_VERSION} + MACOSX_BUNDLE_LONG_VERSION_STRING "${BLENDER_VERSION} ${BLENDER_DATE}") + + # important to make a clean install each time else old scripts get loaded. + install( + CODE + "file(REMOVE_RECURSE ${TARGETDIR_VER})" ) + # message after building. add_custom_command( TARGET blender POST_BUILD MAIN_DEPENDENCY blender - COMMAND cp -Rf ${SOURCEINFO} ${TARGETDIR}/blender.app/Contents/ - COMMAND cp -Rf ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/blender.app/Contents/ - COMMAND cp -Rf ${SOURCEDIR}/Contents/Resources ${TARGETDIR}/blender.app/Contents/ - COMMAND cat ${SOURCEINFO} | sed s/VERSION/${BLENDER_VERSION}${BLENDER_VERSION_CHAR}/ | sed s/DATE/`date +'%Y-%b-%d'`/ > ${TARGETINFO} - COMMAND rm -Rf ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION} - COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION} - COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/ - COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/ + COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${TARGETDIR_VER}' + ) + + # handy install macro to exclude files, we use \$ escape for the "to" + # argument when calling so ${BUILD_TYPE} does not get expanded + macro(install_dir from to) + install( + DIRECTORY ${from} + DESTINATION ${to} + PATTERN ".svn" EXCLUDE + PATTERN "*.pyc" EXCLUDE + PATTERN "*.pyo" EXCLUDE + PATTERN "*.orig" EXCLUDE + PATTERN "*.rej" EXCLUDE + PATTERN "__pycache__" EXCLUDE + PATTERN "__MACOSX" EXCLUDE + PATTERN ".DS_Store" EXCLUDE + ) + endmacro() + + # install release and app files + install_dir( + ${CMAKE_SOURCE_DIR}/release/text/ + \${TARGETDIR} ) + install( + FILES ${SOURCEDIR}/Contents/PkgInfo + DESTINATION ${TARGETDIR}/blender.app/Contents/ + ) + + install_dir( + ${SOURCEDIR}/Contents/Resources + \${TARGETDIR}/blender.app/Contents/ + ) + + install( + FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf + DESTINATION ${TARGETDIR_VER}/datafiles + ) + + # localization if(WITH_INTERNATIONAL) - add_custom_command( - TARGET blender POST_BUILD MAIN_DEPENDENCY blender - COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/ - COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/ + install( + FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages + DESTINATION ${TARGETDIR_VER}/datafiles + ) + + install_dir( + ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale/ + \${TARGETDIR_VER}/datafiles/locale ) endif() + # python if(WITH_PYTHON) + # the python zip is first extract as part of the build process, + # and then later installed as part of make install. this is much + # quicker, and means we can easily exclude files on copy + add_custom_target( + extractpyzip + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/python) + set(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip") + add_custom_command( - TARGET blender POST_BUILD MAIN_DEPENDENCY blender - COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/ - COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/python/ - COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/python/ - COMMAND find ${TARGETDIR}/blender.app -name '*.py[co]' -prune -exec rm -rf {} '\;' - COMMAND find ${TARGETDIR}/blender.app -name '__pycache__' -exec rmdir {} '+' + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python + COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/python/ + COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/python/ + COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${CMAKE_CURRENT_BINARY_DIR}/python/ + DEPENDS ${LIBDIR}/release/${PYTHON_ZIP}) + + add_dependencies(blender extractpyzip) + + # copy extracted python files + install_dir( + ${CMAKE_CURRENT_BINARY_DIR}/python + \${TARGETDIR_VER} ) - endif() - add_custom_command( - TARGET blender POST_BUILD MAIN_DEPENDENCY blender - COMMAND find ${TARGETDIR}/blender.app -name .DS_Store -prune -exec rm -rf {} "\;" - COMMAND find ${TARGETDIR}/blender.app -name .svn -prune -exec rm -rf {} "\;" - COMMAND find ${TARGETDIR}/blender.app -name __MACOSX -prune -exec rm -rf {} "\;" - ) + # copy scripts + install_dir( + ${CMAKE_SOURCE_DIR}/release/scripts + \${TARGETDIR_VER} + ) + endif() endif() endif() diff --git a/source/darwin/blender.app/Contents/Info.plist b/source/darwin/blender.app/Contents/Info.plist index 0accb3e9940..2f5d235a619 100644 --- a/source/darwin/blender.app/Contents/Info.plist +++ b/source/darwin/blender.app/Contents/Info.plist @@ -20,13 +20,13 @@ <string>Blender</string>
<key>CFBundleIdentifier</key>
<string>org.blenderfoundation.blender</string>
-
+
<key>CFBundleVersion</key>
- <string>VERSION, DATE, Blender Foundation</string>
+ <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}, Blender Foundation</string>
<key>CFBundleShortVersionString</key>
- <string>VERSION</string>
+ <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleGetInfoString</key>
- <string>VERSION, DATE, Blender Foundation</string>
+ <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}, Blender Foundation</string>
<key>CFBundleDocumentTypes</key>
<array>
diff --git a/source/darwin/blendercreator.app/Contents/Info.plist b/source/darwin/blendercreator.app/Contents/Info.plist deleted file mode 100644 index 08709cd26e3..00000000000 --- a/source/darwin/blendercreator.app/Contents/Info.plist +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
-<dict>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
-
- <key>CFBundleExecutable</key>
- <string>blendercreator</string>
-
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>????</string>
-
- <key>CFBundleIconFile</key>
- <string>blender creator icon.icns</string>
-
- <key>CFBundleName</key>
- <string>BlenderCreator</string>
- <key>CFBundleIdentifier</key>
- <string>com.nantechnologies.blendercreator</string>
-
- <key>CFBundleVersion</key>
- <string>VERSION, DATE, Copyright NaN Technologies BV</string>
- <key>CFBundleShortVersionString</key>
- <string>VERSION</string>
- <key>CFBundleGetInfoString</key>
- <string>VERSION, DATE, Copyright NaN Technologies BV</string>
-
- <key>CFBundleDocumentTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeIconFile</key>
- <string>blender file icon.icns</string>
- <key>CFBundleTypeName</key>
- <string>Blender File</string>
- <key>CFBundleTypeOSTypes</key>
- <array>
- <string>BLND</string>
- </array>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>blend</string>
- </array>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- <key>LSIsAppleDefaultForType</key>
- <true/>
- </dict>
- </array>
-</dict>
-</plist>
diff --git a/source/darwin/blendercreator.app/Contents/MacOS/blendercreator b/source/darwin/blendercreator.app/Contents/MacOS/blendercreator deleted file mode 100644 index 5e05e74a307..00000000000 --- a/source/darwin/blendercreator.app/Contents/MacOS/blendercreator +++ /dev/null @@ -1 +0,0 @@ -placeholder
diff --git a/source/darwin/blendercreator.app/Contents/PkgInfo b/source/darwin/blendercreator.app/Contents/PkgInfo deleted file mode 100644 index bd04210fb49..00000000000 --- a/source/darwin/blendercreator.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL????
\ No newline at end of file diff --git a/source/darwin/blendercreator.app/Contents/Resources/blender creator icon.icns b/source/darwin/blendercreator.app/Contents/Resources/blender creator icon.icns Binary files differdeleted file mode 100644 index 5eef94afde9..00000000000 --- a/source/darwin/blendercreator.app/Contents/Resources/blender creator icon.icns +++ /dev/null diff --git a/source/darwin/blendercreator.app/Contents/Resources/blender file icon.icns b/source/darwin/blendercreator.app/Contents/Resources/blender file icon.icns Binary files differdeleted file mode 100644 index 9065f1b359c..00000000000 --- a/source/darwin/blendercreator.app/Contents/Resources/blender file icon.icns +++ /dev/null diff --git a/source/darwin/blenderplayer.app/Contents/Info.plist b/source/darwin/blenderplayer.app/Contents/Info.plist index 18c4438884a..f99338d6c47 100644 --- a/source/darwin/blenderplayer.app/Contents/Info.plist +++ b/source/darwin/blenderplayer.app/Contents/Info.plist @@ -2,13 +2,35 @@ <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+
+ <key>CFBundleExecutable</key>
+ <string>blenderplayer</string>
+
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+
+ <key>CFBundleIconFile</key>
+ <string>blender player icon.icns</string>
+
+ <key>CFBundleName</key>
+ <string>BlenderPlayer</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.blenderfoundation.blenderplayer</string>
+
+ <key>CFBundleVersion</key>
+ <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}, Blender Foundation</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
+ <key>CFBundleGetInfoString</key>
+ <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}, Blender Foundation</string>
+
<key>CFBundleDocumentTypes</key>
<array>
<dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>blend</string>
- </array>
<key>CFBundleTypeIconFile</key>
<string>blender file icon.icns</string>
<key>CFBundleTypeName</key>
@@ -17,31 +39,15 @@ <array>
<string>BLND</string>
</array>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>blend</string>
+ </array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSIsAppleDefaultForType</key>
<false/>
</dict>
</array>
- <key>CFBundleExecutable</key>
- <string>blenderplayer</string>
- <key>CFBundleGetInfoString</key>
- <string>VERSION, DATE, Blender Foundation</string>
- <key>CFBundleIconFile</key>
- <string>blender player icon.icns</string>
- <key>CFBundleIdentifier</key>
- <string>org.blenderfoundation.blenderplayer</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>BlenderPlayer</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>VERSION</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>VERSION, DATE, Blender Foundation</string>
</dict>
</plist>
diff --git a/source/darwin/blenderpublisher.app/Contents/Info.plist b/source/darwin/blenderpublisher.app/Contents/Info.plist deleted file mode 100644 index f22de5a4460..00000000000 --- a/source/darwin/blenderpublisher.app/Contents/Info.plist +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
-<dict>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
-
- <key>CFBundleExecutable</key>
- <string>blenderpublisher</string>
-
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>????</string>
-
- <key>CFBundleIconFile</key>
- <string>blender publisher icon.icns</string>
-
- <key>CFBundleName</key>
- <string>BlenderPublisher</string>
- <key>CFBundleIdentifier</key>
- <string>com.nantechnologies.blenderpublisher</string>
-
- <key>CFBundleVersion</key>
- <string>VERSION, DATE, Copyright NaN Technologies BV</string>
- <key>CFBundleShortVersionString</key>
- <string>VERSION</string>
- <key>CFBundleGetInfoString</key>
- <string>VERSION, DATE, Copyright NaN Technologies BV</string>
-
- <key>CFBundleDocumentTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeIconFile</key>
- <string>blender file icon.icns</string>
- <key>CFBundleTypeName</key>
- <string>Blender File</string>
- <key>CFBundleTypeOSTypes</key>
- <array>
- <string>BLND</string>
- </array>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>blend</string>
- </array>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- <key>LSIsAppleDefaultForType</key>
- <true/>
- </dict>
- </array>
-</dict>
-</plist>
diff --git a/source/darwin/blenderpublisher.app/Contents/MacOS/blenderpublisher b/source/darwin/blenderpublisher.app/Contents/MacOS/blenderpublisher deleted file mode 100644 index 5e05e74a307..00000000000 --- a/source/darwin/blenderpublisher.app/Contents/MacOS/blenderpublisher +++ /dev/null @@ -1 +0,0 @@ -placeholder
diff --git a/source/darwin/blenderpublisher.app/Contents/PkgInfo b/source/darwin/blenderpublisher.app/Contents/PkgInfo deleted file mode 100644 index bd04210fb49..00000000000 --- a/source/darwin/blenderpublisher.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL????
\ No newline at end of file diff --git a/source/darwin/blenderpublisher.app/Contents/Resources/blender file icon.icns b/source/darwin/blenderpublisher.app/Contents/Resources/blender file icon.icns Binary files differdeleted file mode 100644 index a6041899cfb..00000000000 --- a/source/darwin/blenderpublisher.app/Contents/Resources/blender file icon.icns +++ /dev/null diff --git a/source/darwin/blenderpublisher.app/Contents/Resources/blender publisher icon.icns b/source/darwin/blenderpublisher.app/Contents/Resources/blender publisher icon.icns Binary files differdeleted file mode 100644 index 90784597129..00000000000 --- a/source/darwin/blenderpublisher.app/Contents/Resources/blender publisher icon.icns +++ /dev/null |