Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8135


Ignore:
Timestamp:
Mar 27, 2011, 9:50:18 PM (13 years ago)
Author:
youngk
Message:

Generalized and cleaned up the creation of the Apple Dev Bundle. No more desktop icon now, but you still can\'t start it via Xcode. You\'ll have to use the symlink in the project build directory root instead.

Location:
code/branches/mac_osx
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/mac_osx/cmake/PrepareDevBundle.cmake

    r8090 r8135  
    2525
    2626IF(APPLE)
     27  IF(NOT CMAKE_CONFIGURATION_TYPES)
     28  SET(_subdirs .)
     29  SET(_default_subdir .)
     30ELSE()
     31  SET(_subdirs ${CMAKE_CONFIGURATION_TYPES})
     32  SET(_default_subdir) # No default subdir
     33ENDIF()
     34
     35FOREACH(_subdir ${_subdirs})
     36  GET_FILENAME_COMPONENT(CURRENT_RUNTIME_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_subdir} ABSOLUTE)
     37
    2738  # Convenience variables
    28   # Note that this is just an empty bundle! It will be copied into the
    29   # corresponding directory at build time
    30   SET(DEVBUNDLE_CURRENT_DIR "${CMAKE_BINARY_DIR}/${DEFAULT_BUNDLE_PATH}/Dummy/${PROJECT_NAME}.app/Contents")
     39  # Note that this is just an empty bundle! The executable itself will
     40  # be added at build time
     41  SET(DEVBUNDLE_CURRENT_DIR "${CURRENT_RUNTIME_DIR}/${PROJECT_NAME}.app/Contents")
    3142  SET(DEVBUNDLE_CURRENT_BIN "${DEVBUNDLE_CURRENT_DIR}/MacOS")
    3243  SET(DEVBUNDLE_CURRENT_RESOURCES "${DEVBUNDLE_CURRENT_DIR}/Resources")
     
    4657  CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/${DEFAULT_DATA_PATH}/mac/${DEVBUNDLE_DEFAULT_LANGFILE}/${DEVBUNDLE_NIB_FILE}/keyedobjects.nib" "${DEVBUNDLE_CURRENT_RESOURCES}/${DEVBUNDLE_DEFAULT_LANGFILE}/${DEVBUNDLE_NIB_FILE}/keyedobjects.nib" COPYONLY)
    4758  CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/${DEFAULT_DATA_PATH}/mac/${DEVBUNDLE_DEFAULT_LANGFILE}/InfoPlist.strings" "${DEVBUNDLE_CURRENT_RESOURCES}/${DEVBUNDLE_DEFAULT_LANGFILE}/InfoPlist.strings")
     59
     60ENDFOREACH(_subdir)
    4861ENDIF(APPLE)
  • code/branches/mac_osx/src/CMakeLists.txt

    r8114 r8135  
    184184    TARGET orxonox-main
    185185    POST_BUILD
    186     # Copy the Orxonox.app from the dummy location to the correct one
    187     COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_BINARY_DIR}/${DEFAULT_BUNDLE_PATH}/Dummy/${PROJECT_NAME}.app" "${CMAKE_BINARY_DIR}/${DEFAULT_BUNDLE_PATH}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app"
    188186    # Copy the executable into the Orxonox.app
    189     COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${ORXONOX_EXECUTABLE_NAME}" "${CMAKE_BINARY_DIR}/${DEFAULT_BUNDLE_PATH}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app/Contents/MacOS"
     187    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${ORXONOX_EXECUTABLE_NAME}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app/Contents/MacOS"
    190188    # Copy the dev-build marker file to Orxonox.app
    191     COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/orxonox_dev_build.keep_me" "${CMAKE_BINARY_DIR}/${DEFAULT_BUNDLE_PATH}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app/Contents/MacOS"
    192     # Create a shortcut of the application to the Desktop
    193     COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/${DEFAULT_BUNDLE_PATH}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app" "$ENV{HOME}/Desktop/${PROJECT_NAME}.app"
     189    COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/orxonox_dev_build.keep_me" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app/Contents/MacOS"
     190    # Create a shortcut of the application to the root of the build tree
     191    COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app" "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.app"
    194192  )
    195193ENDIF(APPLE)
Note: See TracChangeset for help on using the changeset viewer.