forked from mirror/openmw-tes3mp
.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
|
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
|
||||||
"${OpenMW_BINARY_DIR}/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
|
# Compiler settings
|
||||||
if (CMAKE_COMPILER_IS_GNUCC)
|
if (CMAKE_COMPILER_IS_GNUCC)
|
||||||
#add_definitions (-Wall -Werror)
|
#add_definitions (-Wall -Werror)
|
||||||
|
@ -297,13 +290,14 @@ if (APPLE)
|
||||||
${OpenMW_BINARY_DIR}/openmw.cfg
|
${OpenMW_BINARY_DIR}/openmw.cfg
|
||||||
${OpenMW_BINARY_DIR}/plugins.cfg)
|
${OpenMW_BINARY_DIR}/plugins.cfg)
|
||||||
install(FILES ${MISC_FILES} DESTINATION ../MacOS)
|
install(FILES ${MISC_FILES} DESTINATION ../MacOS)
|
||||||
|
install(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION ../Resources)
|
||||||
set(CPACK_GENERATOR "Bundle")
|
set(CPACK_GENERATOR "Bundle")
|
||||||
set(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/files/mac/Info.plist")
|
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_ICON "${CMAKE_SOURCE_DIR}/files/mac/openmw.icns")
|
||||||
set(CPACK_BUNDLE_NAME "OpenMW")
|
set(CPACK_BUNDLE_NAME "OpenMW")
|
||||||
set(CPACK_PACKAGE_VERSION "0.10")
|
set(CPACK_PACKAGE_VERSION "0.10")
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR "0")
|
set(CPACK_PACKAGE_VERSION_MAJOR "0")
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR "09")
|
set(CPACK_PACKAGE_VERSION_MINOR "10")
|
||||||
set(CPACK_PACKAGE_VERSION_PATCH "")
|
set(CPACK_PACKAGE_VERSION_PATCH "")
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
|
@ -39,6 +39,10 @@
|
||||||
|
|
||||||
#include <OgreRoot.h>
|
#include <OgreRoot.h>
|
||||||
|
|
||||||
|
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
||||||
|
#include <OSX/macUtils.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <MyGUI_WidgetManager.h>
|
#include <MyGUI_WidgetManager.h>
|
||||||
#include "mwgui/class.hpp"
|
#include "mwgui/class.hpp"
|
||||||
#include "path.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)
|
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);
|
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
|
// Set resource dir
|
||||||
void OMW::Engine::setResourceDir (const boost::filesystem::path& parResDir)
|
void OMW::Engine::setResourceDir (const boost::filesystem::path& parResDir)
|
||||||
{
|
{
|
||||||
mResDir = boost::filesystem::system_complete(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)
|
// Set start cell name (only interiors for now)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>0.07</string>
|
<string>0.10</string>
|
||||||
<key>CSResourcesFileMapped</key>
|
<key>CSResourcesFileMapped</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>LSRequiresCarbon</key>
|
<key>LSRequiresCarbon</key>
|
||||||
|
|
Loading…
Reference in a new issue