mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 10:15:33 +00:00
.app bundle finally works
This commit is contained in:
parent
3d75eea377
commit
943eea8104
3 changed files with 25 additions and 10 deletions
|
@ -278,13 +278,6 @@ endif (APPLE)
|
|||
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
|
||||
"${OpenMW_BINARY_DIR}/openmw.cfg")
|
||||
|
||||
#if (APPLE)
|
||||
# set(APPLE_BUNDLE_RESOURCES
|
||||
# ${OpenMW_BINARY_DIR}/openmw.cfg
|
||||
# ${OpenMW_BINARY_DIR}/plugins.cfg
|
||||
# )
|
||||
#endif (APPLE)
|
||||
|
||||
# Compiler settings
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
#add_definitions (-Wall -Werror)
|
||||
|
@ -297,13 +290,14 @@ if (APPLE)
|
|||
${OpenMW_BINARY_DIR}/openmw.cfg
|
||||
${OpenMW_BINARY_DIR}/plugins.cfg)
|
||||
install(FILES ${MISC_FILES} DESTINATION ../MacOS)
|
||||
install(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ../Resources)
|
||||
set(CPACK_GENERATOR "Bundle")
|
||||
set(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/files/mac/Info.plist")
|
||||
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/files/mac/openmw.icns")
|
||||
set(CPACK_BUNDLE_NAME "OpenMW")
|
||||
set(CPACK_PACKAGE_VERSION "0.10")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "0")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "09")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "10")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "")
|
||||
|
||||
include(CPack)
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
|
||||
#include <OgreRoot.h>
|
||||
|
||||
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
||||
#include <OSX/macUtils.h>
|
||||
#endif
|
||||
|
||||
#include <MyGUI_WidgetManager.h>
|
||||
#include "mwgui/class.hpp"
|
||||
#include "path.hpp"
|
||||
|
@ -249,13 +253,30 @@ void OMW::Engine::addResourcesDirectory (const boost::filesystem::path& path)
|
|||
|
||||
void OMW::Engine::setDataDir (const boost::filesystem::path& dataDir)
|
||||
{
|
||||
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
||||
// FIXME possibly hack, should use Carbon methods to get resource path
|
||||
mDataDir = boost::filesystem::path(Ogre::macBundlePath() + "/Contents/Resources");
|
||||
mDataDir = mDataDir / dataDir;
|
||||
#else
|
||||
mDataDir = boost::filesystem::system_complete (dataDir);
|
||||
#endif
|
||||
std::cout << "mDataDir: " << mDataDir << std::endl;
|
||||
std::cout << "dataDir: " << dataDir << std::endl;
|
||||
std::cout << "initial path: " << boost::filesystem::initial_path() << std::endl;
|
||||
std::cout << "mac bundle path: " << Ogre::macBundlePath() << std::endl;
|
||||
}
|
||||
|
||||
// Set resource dir
|
||||
void OMW::Engine::setResourceDir (const boost::filesystem::path& parResDir)
|
||||
{
|
||||
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
||||
// FIXME possibly hack, should use Carbon methods to get resource path
|
||||
mResDir = boost::filesystem::path(Ogre::macBundlePath() + "/Contents/Resources");
|
||||
mResDir = mResDir / parResDir;
|
||||
#else
|
||||
mResDir = boost::filesystem::system_complete(parResDir);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// Set start cell name (only interiors for now)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.07</string>
|
||||
<string>0.10</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSRequiresCarbon</key>
|
||||
|
|
Loading…
Reference in a new issue