1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-22 12:39:59 +00:00

Merge remote-tracking branch 'upstream/master' into newlauncher

This commit is contained in:
Pieter van der Kloet 2011-07-23 23:25:05 +02:00
commit 24a07eef05
6 changed files with 17 additions and 27 deletions

View File

@ -17,9 +17,8 @@ if(DPKG_PROGRAM)
set(MORROWIND_RESOURCE_FILES "/usr/share/games/openmw/resources/" CACHE PATH "location of OpenMW resources files") set(MORROWIND_RESOURCE_FILES "/usr/share/games/openmw/resources/" CACHE PATH "location of OpenMW resources files")
else() else()
if (APPLE) if (APPLE)
# set path inside bundle set(MORROWIND_DATA_FILES "./data" CACHE PATH "location of Morrowind data files")
set(MORROWIND_DATA_FILES "../data" CACHE PATH "location of Morrowind data files") set(MORROWIND_RESOURCE_FILES "./resources" CACHE PATH "location of OpenMW resources files")
set(MORROWIND_RESOURCE_FILES "Contents/Resources/resources" CACHE PATH "location of OpenMW resources files")
else() else()
set(MORROWIND_DATA_FILES "data" CACHE PATH "location of Morrowind data files") set(MORROWIND_DATA_FILES "data" CACHE PATH "location of Morrowind data files")
set(MORROWIND_RESOURCE_FILES "resources" CACHE PATH "location of OpenMW resources files") set(MORROWIND_RESOURCE_FILES "resources" CACHE PATH "location of OpenMW resources files")
@ -366,7 +365,7 @@ endif()
if (APPLE) if (APPLE)
configure_file(${OpenMW_SOURCE_DIR}/files/plugins.cfg.mac configure_file(${OpenMW_SOURCE_DIR}/files/plugins.cfg.mac
"${APP_BUNDLE_DIR}/Contents/MacOS/plugins.cfg") "${OpenMW_BINARY_DIR}/plugins.cfg")
configure_file(${OpenMW_SOURCE_DIR}/files/mac/Info.plist configure_file(${OpenMW_SOURCE_DIR}/files/mac/Info.plist
"${APP_BUNDLE_DIR}/Contents/Info.plist" COPYONLY) "${APP_BUNDLE_DIR}/Contents/Info.plist" COPYONLY)
@ -385,9 +384,6 @@ if (APPLE)
configure_file(${OGRE_PLUGIN_DIR}/Plugin_ParticleFX.dylib configure_file(${OGRE_PLUGIN_DIR}/Plugin_ParticleFX.dylib
"${APP_BUNDLE_DIR}/Contents/Plugins/Plugin_ParticleFX.dylib" COPYONLY) "${APP_BUNDLE_DIR}/Contents/Plugins/Plugin_ParticleFX.dylib" COPYONLY)
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
"${APP_BUNDLE_DIR}/Contents/MacOS/openmw.cfg")
endif (APPLE) endif (APPLE)
@ -398,6 +394,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
endif (CMAKE_COMPILER_IS_GNUCC) endif (CMAKE_COMPILER_IS_GNUCC)
# Apple bundling # Apple bundling
# TODO REWRITE!
if (APPLE) if (APPLE)
set(MISC_FILES set(MISC_FILES
${APP_BUNDLE_DIR}/Contents/MacOS/openmw.cfg ${APP_BUNDLE_DIR}/Contents/MacOS/openmw.cfg

View File

@ -44,10 +44,6 @@
#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"

View File

@ -26,6 +26,11 @@
#endif #endif
// for Ogre::macBundlePath
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
#include <OSX/macUtils.h>
#endif
using namespace std; using namespace std;
/// Parse command line options and openmw.cfg file (if one exists). Results are directly /// Parse command line options and openmw.cfg file (if one exists). Results are directly
@ -177,7 +182,7 @@ int main(int argc, char**argv)
{ {
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
// set current dir to bundle path // set current dir to bundle path
boost::filesystem::path bundlePath = boost::filesystem::path(Ogre::macBundlePath()); boost::filesystem::path bundlePath = boost::filesystem::path(Ogre::macBundlePath()).parent_path();
boost::filesystem::current_path(bundlePath); boost::filesystem::current_path(bundlePath);
#endif #endif

View File

@ -9,7 +9,7 @@
#include <OSX/macUtils.h> #include <OSX/macUtils.h>
#endif #endif
#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE
#include <stdlib.h> //getenv #include <stdlib.h> //getenv
#endif #endif
@ -19,7 +19,9 @@ std::string Files::getPath (PathTypeEnum parType, const std::string parApp, cons
if (parType==Path_ConfigGlobal) if (parType==Path_ConfigGlobal)
{ {
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
theBasePath = Ogre::macBundlePath() + "/Contents/MacOS/"; //FIXME do we have global/local with OSX? boost::filesystem::path path(Ogre::macBundlePath());
path = path.parent_path();
theBasePath = path.string() + "/";
#elif OGRE_PLATFORM == OGRE_PLATFORM_LINUX #elif OGRE_PLATFORM == OGRE_PLATFORM_LINUX
theBasePath = "/etc/"+parApp+"/"; theBasePath = "/etc/"+parApp+"/";
#else #else
@ -29,9 +31,7 @@ std::string Files::getPath (PathTypeEnum parType, const std::string parApp, cons
} }
else if (parType==Path_ConfigUser) else if (parType==Path_ConfigUser)
{ {
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE
theBasePath = Ogre::macBundlePath() + "/Contents/MacOS/"; //FIXME do we have global/local with OSX?
#elif OGRE_PLATFORM == OGRE_PLATFORM_LINUX
const char* theDir; const char* theDir;
if ((theDir = getenv("OPENMW_HOME")) != NULL) if ((theDir = getenv("OPENMW_HOME")) != NULL)
{ {

View File

@ -19,11 +19,7 @@ add_library(caelum STATIC ${SOURCES})
# #
# Resources # Resources
# #
if (APPLE) SET(CAELUM_RES_DEST "${OpenMW_BINARY_DIR}")
SET(CAELUM_RES_DEST "${APP_BUNDLE_DIR}/Contents/Resources")
else (APPLE)
SET(CAELUM_RES_DEST "${OpenMW_BINARY_DIR}")
endif (APPLE)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/AtmosphereDepth.png "${CAELUM_RES_DEST}/resources/caelum/AtmosphereDepth.png" COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/AtmosphereDepth.png "${CAELUM_RES_DEST}/resources/caelum/AtmosphereDepth.png" COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumGroundFog.cg "${CAELUM_RES_DEST}/resources/caelum/CaelumGroundFog.cg" COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumGroundFog.cg "${CAELUM_RES_DEST}/resources/caelum/CaelumGroundFog.cg" COPYONLY)

View File

@ -22,11 +22,7 @@ add_subdirectory(OgrePlatform)
# Copy resource files into the build directory # Copy resource files into the build directory
set(SDIR ${CMAKE_CURRENT_SOURCE_DIR}/openmw_resources) set(SDIR ${CMAKE_CURRENT_SOURCE_DIR}/openmw_resources)
if (APPLE) set(DDIR ${OpenMW_BINARY_DIR}/resources/mygui)
set(DDIR ${APP_BUNDLE_DIR}/Contents/Resources/resources/mygui)
else (APPLE)
set(DDIR ${OpenMW_BINARY_DIR}/resources/mygui)
endif (APPLE)
configure_file("${SDIR}/bigbars.png" "${DDIR}/bigbars.png" COPYONLY) configure_file("${SDIR}/bigbars.png" "${DDIR}/bigbars.png" COPYONLY)
configure_file("${SDIR}/black.png" "${DDIR}/black.png" COPYONLY) configure_file("${SDIR}/black.png" "${DDIR}/black.png" COPYONLY)