Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8129


Ignore:
Timestamp:
Mar 26, 2011, 9:41:28 PM (13 years ago)
Author:
rgrieder
Message:

Merged new revisions (8083 - 8125) from mac_osx to kicklib branch.

Location:
code/branches/kicklib
Files:
7 edited
16 copied

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib

  • code/branches/kicklib/CMakeLists.txt

    r8098 r8129  
    5757SET(DEFAULT_CONFIG_PATH  config)
    5858SET(DEFAULT_LOG_PATH     log)
     59SET(DEFAULT_BUNDLE_PATH  bundle)
    5960
    6061# Set output directories
     
    143144# Last but not least: Try to make a doc target with Doxygen
    144145ADD_SUBDIRECTORY(doc)
     146
     147########### CPack Packaging ###########
     148
     149# Currently only testing on Apple
     150#IF(APPLE)
     151#  INCLUDE(BundleConfig)
     152#ENDIF(APPLE)
  • code/branches/kicklib/cmake/PackageConfigOSX.cmake

    r8126 r8129  
    3030IF(NOT _INTERNAL_PACKAGE_MESSAGE)
    3131  MESSAGE(STATUS "Using library package for the dependencies.")
     32 
     33  # The following shell script sets the appropriate install_names for our libraries
     34  # and therefore it must be run before anything else is set, dep-package-wise.
     35  EXECUTE_PROCESS(
     36    COMMAND ${DEPENDENCY_PACKAGE_DIR}/install_dependencies.sh
     37    WORKING_DIRECTORY ${DEPENDENCY_PACKAGE_DIR}
     38    OUTPUT_FILE ${CMAKE_BINARY_DIR}/dep_pack_install_log.keep_me
     39  )
    3240  SET(_INTERNAL_PACKAGE_MESSAGE 1 CACHE INTERNAL "Do not edit!" FORCE)
    3341ENDIF()
     
    5866ENDIF()
    5967
    60 # Xcode won't be able to run the toluabind code generation if we're using the dependency package
    61 #IF(DEPENDENCY_PACKAGE_ENABLE)
    62 #  IF(${CMAKE_GENERATOR} STREQUAL "Xcode")
    63 #    SET(ENV{DYLD_LIBRARY_PATH}               ${DEPENDENCY_PACKAGE_DIR}/lib)
    64 #    SET(ENV{DYLD_FRAMEWORK_PATH}             ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks)
    65 #  ENDIF(${CMAKE_GENERATOR} STREQUAL "Xcode")
    66 #ENDIF(DEPENDENCY_PACKAGE_ENABLE)
    67 
    6868### INSTALL ###
    6969
    7070# Tcl script library
    7171# TODO: How does this work on OS X?
     72# Concerning all OS X install procedures: use CPACK
    7273#INSTALL(
    7374#  DIRECTORY ${DEP_LIBRARY_DIR}/tcl/
  • code/branches/kicklib/src/CMakeLists.txt

    r8095 r8129  
    145145  SOURCE_FILES
    146146    Orxonox.cc
     147    OrxonoxMac.mm
    147148  OUTPUT_NAME orxonox
    148149)
     
    178179ENDIF(MSVC)
    179180
     181# Apple Mac OS X specific build settings
     182IF(APPLE)
     183  # On Apple we need to link to AppKit and Foundation frameworks
     184  TARGET_LINK_LIBRARIES(orxonox-main
     185    "-framework AppKit"
     186    "-framework Foundation"
     187  )
     188
     189  # Post-build step for the creation of the Dev-App bundle
     190  INCLUDE(PrepareDevBundle)
     191  ADD_CUSTOM_COMMAND(
     192    TARGET orxonox-main
     193    POST_BUILD
     194    # Copy the Orxonox.app from the dummy location to the correct one
     195    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"
     196    # Copy the executable into the Orxonox.app
     197    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"
     198    # Copy the dev-build marker file to Orxonox.app
     199    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"
     200    # Create a shortcut of the application to the Desktop
     201    COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/${DEFAULT_BUNDLE_PATH}/${CMAKE_CFG_INTDIR}/${PROJECT_NAME}.app" "$ENV{HOME}/Desktop/${PROJECT_NAME}.app"
     202  )
     203ENDIF(APPLE)
     204
    180205#################### Doxygen ####################
    181206
  • code/branches/kicklib/src/Orxonox.cc

    r6417 r8129  
    5353#ifdef ORXONOX_USE_WINMAIN
    5454INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
     55#elif defined(ORXONOX_PLATFORM_APPLE)
     56int main_mac(int argc, char** argv)
    5557#else
    5658int main(int argc, char** argv)
     
    6062    {
    6163#ifndef ORXONOX_USE_WINMAIN
     64
     65// On Apples, the kernel supplies a second argument, which we have to circumvent
     66#ifdef ORXONOX_PLATFORM_APPLE
     67# define MAC_ARGC_HACK 2
     68#else
     69# define MAC_ARGC_HACK 1
     70#endif
     71   
    6272        std::string strCmdLine;
    63         for (int i = 1; i < argc; ++i)
     73        for (int i = MAC_ARGC_HACK; i < argc; ++i)
    6474            strCmdLine = strCmdLine + argv[i] + ' ';
    6575#endif
  • code/branches/kicklib/src/libraries/core/GraphicsManager.cc

    r8073 r8129  
    270270        Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, ogreWindowEventListener_.get());
    271271
    272 // HACK
    273 #ifdef ORXONOX_PLATFORM_APPLE
    274         //INFO: This will give our window focus, and not lock it to the terminal
    275         ProcessSerialNumber psn = {0, kCurrentProcess};
    276         TransformProcessType(&psn, kProcessTransformToForegroundApplication);
    277         SetFrontProcess(&psn);
    278 #endif
    279 // End of HACK
    280 
    281272        // create a full screen default viewport
    282273        // Note: This may throw when adding a viewport with an existing z-order!
  • code/branches/kicklib/src/orxonox/sound/SoundManager.cc

    r8073 r8129  
    330330        ALenum error = alGetError();
    331331        if (error == AL_INVALID_VALUE)
     332            // @TODO: Follow this constantly appearing, nerve-racking warning
    332333            COUT(2) << "Sound: OpenAL: Invalid listener position" << std::endl;
    333334    }
Note: See TracChangeset for help on using the changeset viewer.