diff --git a/CMakeLists.txt b/CMakeLists.txt index d9134f524..61c973fd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,16 +58,6 @@ if (ANDROID) set(CMAKE_FIND_ROOT_PATH ${OPENMW_DEPENDENCIES_DIR} "${CMAKE_FIND_ROOT_PATH}") endif (ANDROID) -if (NOT ANDROID) - ADD_DEFINITIONS(-DNOT_ANDROID) -endif() - - -if (ANDROID) - ADD_DEFINITIONS(-DANDROID) -endif() - - # doxygen main page configure_file ("${OpenMW_SOURCE_DIR}/docs/mainpage.hpp.cmake" "${OpenMW_SOURCE_DIR}/docs/mainpage.hpp") diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 1124079ce..60fd65865 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -1,5 +1,4 @@ # local files - if (NOT ANDROID) set(GAME main.cpp @@ -12,13 +11,9 @@ set(GAME engine.cpp ) endif() - - if(NOT WIN32 AND NOT ANDROID) set(GAME ${GAME} crashcatcher.cpp) endif() - - set(GAME_HEADER engine.hpp ) @@ -115,7 +110,8 @@ add_executable(openmw ${APPLE_BUNDLE_RESOURCES} ) else () -add_library(openmw SHARED +add_library(openmw + SHARED ${OPENMW_LIBS} ${OPENMW_LIBS_HEADER} ${OPENMW_FILES} ${GAME} ${GAME_HEADER} diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index e47fbce7d..f343ca8ed 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -50,7 +50,7 @@ add_component_dir (misc ) add_component_dir (files - linuxpath androidpath windowspath macospath fixedpath multidircollection collections configurationmanager + linuxpath androidpath windowspath macospath fixedpath multidircollection collections configurationmanager constrainedfiledatastream lowlevelfile ) diff --git a/components/files/androidpath.cpp b/components/files/androidpath.cpp index aac49485e..52ae73803 100644 --- a/components/files/androidpath.cpp +++ b/components/files/androidpath.cpp @@ -83,6 +83,11 @@ boost::filesystem::path AndroidPath::getGlobalDataPath() const return globalDataPath / mName; } +boost::filesystem::path AndroidPath::getInstallPath() const +{ + return boost::filesystem::path(); +} + } /* namespace Files */ diff --git a/components/files/androidpath.hpp b/components/files/androidpath.hpp index 3d7fdf247..792462fc6 100644 --- a/components/files/androidpath.hpp +++ b/components/files/androidpath.hpp @@ -42,6 +42,8 @@ struct AndroidPath */ boost::filesystem::path getCachePath() const; + boost::filesystem::path getInstallPath() const; + std::string mName; }; diff --git a/components/files/fixedpath.hpp b/components/files/fixedpath.hpp index 637b840a0..794c5a7bc 100644 --- a/components/files/fixedpath.hpp +++ b/components/files/fixedpath.hpp @@ -5,7 +5,7 @@ #include #if defined(__linux__) || defined(__FreeBSD__) -#ifdef NOT_ANDROID +#ifndef ANDROID #include namespace Files { typedef LinuxPath TargetPathType; } #else @@ -50,7 +50,7 @@ struct FixedPath * * \param [in] application_name - Name of the application */ -#ifdef NOT_ADNROID + FixedPath(const std::string& application_name) : mPath(application_name + "/") , mUserConfigPath(mPath.getUserConfigPath()) @@ -62,17 +62,7 @@ struct FixedPath , mCachePath(mPath.getCachePath()) { } -#else - FixedPath(const std::string& application_name) - : mPath(application_name + "/") - , mUserConfigPath(mPath.getUserConfigPath()) - , mUserDataPath(mPath.getUserDataPath()) - , mGlobalConfigPath(mPath.getGlobalConfigPath()) - , mLocalPath(mPath.getLocalPath()) - , mGlobalDataPath(mPath.getGlobalDataPath()) - , mCachePath(mPath.getCachePath()) - { - } + #endif /** * \brief Return path pointing to the user local configuration directory. @@ -103,12 +93,12 @@ struct FixedPath return mLocalPath; } -#ifdef NOT_ANDROID + const boost::filesystem::path& getInstallPath() const { return mInstallPath; } -#endif + const boost::filesystem::path& getGlobalDataPath() const { return mGlobalDataPath; diff --git a/components/files/linuxpath.hpp b/components/files/linuxpath.hpp index cde29a7b2..b710165b4 100644 --- a/components/files/linuxpath.hpp +++ b/components/files/linuxpath.hpp @@ -4,6 +4,7 @@ #if defined(__linux__) || defined(__FreeBSD__) #include + /** * \namespace Files */ diff --git a/components/ogreinit/ogreinit.cpp b/components/ogreinit/ogreinit.cpp index 696ded6e0..cd3723354 100644 --- a/components/ogreinit/ogreinit.cpp +++ b/components/ogreinit/ogreinit.cpp @@ -95,7 +95,7 @@ namespace OgreInit Ogre::Root* OgreInit::init(const std::string &logPath) { - #ifdef NOT_ANDROID + #ifndef ANDROID // Set up logging first new Ogre::LogManager; Ogre::Log *log = Ogre::LogManager::getSingleton().createLog(logPath); diff --git a/libs/openengine/gui/manager.cpp b/libs/openengine/gui/manager.cpp index 41b0fcff8..ca4067ca1 100644 --- a/libs/openengine/gui/manager.cpp +++ b/libs/openengine/gui/manager.cpp @@ -653,7 +653,7 @@ void MyGUIManager::updateWindow (Ogre::RenderWindow *wnd) void MyGUIManager::windowResized() { -#ifdef NOT_ANDROID +#ifndef ANDROID mRenderManager->setActiveViewport(0); #endif }