Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Location:
code/branches/kicklib
Files:
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib

  • 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.