Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2011-09-27 14:51:57 +0400
committerJens Verwiebe <info@jensverwiebe.de>2011-09-27 14:51:57 +0400
commit7ba71fff8c0158e1d3fe7e0ee5f6e8caee808d8e (patch)
tree2d5cf85155660f52b6ec25bd58016633dee31a6f /source/creator
parent768806adc08e2dd5b1fccb4baafec8129076e659 (diff)
OSX: fix player bundle_creation
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/CMakeLists.txt72
1 files changed, 49 insertions, 23 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 0bd2763c7d2..a2cd7c23c06 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -713,40 +713,66 @@ elseif(APPLE)
# install blenderplayer bundle - copy of blender.app above. re-using macros et al
# note we are using OSX Bundle as base and copying Blender dummy bundle on top of it
if(WITH_GAMEENGINE AND WITH_PLAYER)
- set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blenderplayer.app)
- set(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist)
- set(TARGETDIR_VER ${TARGETDIR}/blenderplayer.app/Contents/MacOS/${BLENDER_VERSION})
+ set(PLAYER_SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blenderplayer.app)
+ set(PLAYER_SOURCEINFO ${PLAYER_SOURCEDIR}/Contents/Info.plist)
+ set(PLAYER_TARGETDIR_VER ${TARGETDIR}/blenderplayer.app/Contents/MacOS/${BLENDER_VERSION})
- # 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.
+ # 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 ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${TARGETDIR_VER}'
+ "file(REMOVE_RECURSE ${PLAYER_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(
- FILES ${SOURCEDIR}/Contents/PkgInfo
+ FILES ${PLAYER_SOURCEDIR}/Contents/PkgInfo
DESTINATION ${TARGETDIR}/blenderplayer.app/Contents
)
-
+
install_dir(
- ${SOURCEDIR}/Contents/Resources
+ ${PLAYER_SOURCEDIR}/Contents/Resources
\${TARGETDIR}/blenderplayer.app/Contents/
)
+ install(
+ FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
+ DESTINATION ${PLAYER_TARGETDIR_VER}
+ )
+
+ # localization
+ if(WITH_INTERNATIONAL)
+ install(
+ FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
+ DESTINATION ${PLAYER_TARGETDIR_VER}/datafiles
+ )
+
+ install(
+ DIRECTORY
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
+ DESTINATION ${PLAYER_TARGETDIR_VER}/datafiles
+ PATTERN ".svn" EXCLUDE
+ )
+ endif()
+
# python
if(WITH_PYTHON)
add_custom_command(
@@ -759,10 +785,10 @@ elseif(APPLE)
# copy extracted python files
install_dir(
${CMAKE_CURRENT_BINARY_DIR}/python
- \${TARGETDIR_VER}
+ \${PLAYER_TARGETDIR_VER}
)
endif()
-
+
endif()
endif()