Moved system modules from app/ to common/system/

dev-new-models
krzys-h 2016-07-24 14:38:49 +02:00
parent aa6345ab5e
commit 81b7bcc5bc
22 changed files with 54 additions and 49 deletions

View File

@ -89,8 +89,6 @@ endif()
# Source files # Source files
set(BASE_SOURCES set(BASE_SOURCES
${OPENAL_SRC} ${OPENAL_SRC}
app/${SYSTEM_CPP_MODULE}
app/${SYSTEM_H_MODULE}
app/app.cpp app/app.cpp
app/app.h app/app.h
app/controller.cpp app/controller.cpp
@ -103,10 +101,6 @@ set(BASE_SOURCES
app/pausemanager.h app/pausemanager.h
app/signal_handlers.cpp app/signal_handlers.cpp
app/signal_handlers.h app/signal_handlers.h
app/system.cpp
app/system.h
app/system_other.cpp
app/system_other.h
common/config_file.cpp common/config_file.cpp
common/config_file.h common/config_file.h
common/error.h common/error.h
@ -143,6 +137,12 @@ set(BASE_SOURCES
common/resources/sndfile_wrapper.h common/resources/sndfile_wrapper.h
common/restext.cpp common/restext.cpp
common/restext.h common/restext.h
common/system/system.cpp
common/system/system.h
common/system/system_other.cpp
common/system/system_other.h
common/system/${SYSTEM_CPP_MODULE}
common/system/${SYSTEM_H_MODULE}
common/settings.cpp common/settings.cpp
common/settings.h common/settings.h
common/singleton.h common/singleton.h

View File

@ -22,7 +22,6 @@
#include "app/controller.h" #include "app/controller.h"
#include "app/input.h" #include "app/input.h"
#include "app/pathman.h" #include "app/pathman.h"
#include "app/system.h"
#include "common/config_file.h" #include "common/config_file.h"
#include "common/image.h" #include "common/image.h"
@ -34,6 +33,8 @@
#include "common/resources/resourcemanager.h" #include "common/resources/resourcemanager.h"
#include "common/system/system.h"
#include "graphics/core/nulldevice.h" #include "graphics/core/nulldevice.h"
#include "graphics/opengl/glutil.h" #include "graphics/opengl/glutil.h"

View File

@ -26,10 +26,6 @@
#include "app/app.h" #include "app/app.h"
#include "app/signal_handlers.h" #include "app/signal_handlers.h"
#include "app/system.h"
#if PLATFORM_WINDOWS
#include "app/system_windows.h"
#endif
#include "common/logger.h" #include "common/logger.h"
#include "common/make_unique.h" #include "common/make_unique.h"
@ -38,6 +34,11 @@
#include "common/resources/resourcemanager.h" #include "common/resources/resourcemanager.h"
#include "common/system/system.h"
#if PLATFORM_WINDOWS
#include "common/system/system_windows.h"
#endif
#if PLATFORM_WINDOWS #if PLATFORM_WINDOWS
#include <windows.h> #include <windows.h>
#endif #endif

View File

@ -23,15 +23,17 @@
#include "common/config.h" #include "common/config.h"
#include "app/app.h" #include "app/app.h"
#include "app/system.h"
#ifdef PLATFORM_WINDOWS
#include "app/system_windows.h"
#endif
#include "common/logger.h" #include "common/logger.h"
#include "common/resources/resourcemanager.h" #include "common/resources/resourcemanager.h"
#include "common/system/system.h"
#ifdef PLATFORM_WINDOWS
#include "common/system/system_windows.h"
#endif
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>

View File

@ -19,13 +19,13 @@
#include "app/signal_handlers.h" #include "app/signal_handlers.h"
#include "app/system.h"
#include "common/stringutils.h" #include "common/stringutils.h"
#include "common/version.h" #include "common/version.h"
#include "common/resources/resourcemanager.h" #include "common/resources/resourcemanager.h"
#include "common/system/system.h"
#include "level/robotmain.h" #include "level/robotmain.h"
#include <csignal> #include <csignal>

View File

@ -20,14 +20,14 @@
#include "common/config_file.h" #include "common/config_file.h"
#include "app/system.h"
#include "common/logger.h" #include "common/logger.h"
#include "common/make_unique.h" #include "common/make_unique.h"
#include "common/resources/inputstream.h" #include "common/resources/inputstream.h"
#include "common/resources/outputstream.h" #include "common/resources/outputstream.h"
#include "common/system/system.h"
#include <memory> #include <memory>
#include <utility> #include <utility>
#include <cstring> #include <cstring>

View File

@ -18,18 +18,18 @@
*/ */
#include "app/system.h" #include "common/system/system.h"
#include "common/config.h" #include "common/config.h"
#if defined(PLATFORM_WINDOWS) #if defined(PLATFORM_WINDOWS)
#include "app/system_windows.h" #include "common/system/system_windows.h"
#elif defined(PLATFORM_LINUX) #elif defined(PLATFORM_LINUX)
#include "app/system_linux.h" #include "common/system/system_linux.h"
#elif defined(PLATFORM_MACOSX) #elif defined(PLATFORM_MACOSX)
#include "app/system_macosx.h" #include "common/system/system_macosx.h"
#else #else
#include "app/system_other.h" #include "common/system/system_other.h"
#endif #endif
#include "common/make_unique.h" #include "common/make_unique.h"

View File

@ -18,7 +18,7 @@
*/ */
/** /**
* \file app/system.h * \file common/system/system.h
* \brief System functions: time stamps, info dialogs, etc. * \brief System functions: time stamps, info dialogs, etc.
*/ */

View File

@ -17,7 +17,7 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
#include "app/system_linux.h" #include "common/system/system_linux.h"
#include "common/logger.h" #include "common/logger.h"

View File

@ -18,11 +18,11 @@
*/ */
/** /**
* \file app/system_linux.h * \file common/system/system_linux.h
* \brief Linux-specific implementation of system functions * \brief Linux-specific implementation of system functions
*/ */
#include "app/system.h" #include "common/system/system.h"
#include <sys/time.h> #include <sys/time.h>

View File

@ -17,7 +17,7 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
#include "app/system_macosx.h" #include "common/system/system_macosx.h"
#include "common/logger.h" #include "common/logger.h"

View File

@ -18,12 +18,12 @@
*/ */
/** /**
* \file app/system_macosx.h * \file common/system/system_macosx.h
* \brief MacOSX-specific implementation of system functions * \brief MacOSX-specific implementation of system functions
*/ */
#include "app/system.h" #include "common/system/system.h"
#include "app/system_other.h" #include "common/system/system_other.h"
//@colobot-lint-exclude UndefinedFunctionRule //@colobot-lint-exclude UndefinedFunctionRule

View File

@ -17,7 +17,7 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
#include "app/system_other.h" #include "common/system/system_other.h"
void CSystemUtilsOther::Init() void CSystemUtilsOther::Init()

View File

@ -18,11 +18,11 @@
*/ */
/** /**
* \file app/system_other.h * \file common/system/system_other.h
* \brief Fallback code for other systems * \brief Fallback code for other systems
*/ */
#include "app/system.h" #include "common/system/system.h"
#include <SDL.h> #include <SDL.h>

View File

@ -17,7 +17,7 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
#include "app/system_windows.h" #include "common/system/system_windows.h"
#include "common/logger.h" #include "common/logger.h"

View File

@ -18,11 +18,11 @@
*/ */
/** /**
* \file app/system_windows.h * \file common/system/system_windows.h
* \brief Windows-specific implementation of system functions * \brief Windows-specific implementation of system functions
*/ */
#include "app/system.h" #include "common/system/system.h"
//@colobot-lint-exclude UndefinedFunctionRule //@colobot-lint-exclude UndefinedFunctionRule

View File

@ -22,7 +22,6 @@
#include "app/app.h" #include "app/app.h"
#include "app/input.h" #include "app/input.h"
#include "app/system.h"
#include "common/image.h" #include "common/image.h"
#include "common/key.h" #include "common/key.h"
@ -30,6 +29,8 @@
#include "common/make_unique.h" #include "common/make_unique.h"
#include "common/stringutils.h" #include "common/stringutils.h"
#include "common/system/system.h"
#include "common/thread/resource_owning_thread.h" #include "common/thread/resource_owning_thread.h"
#include "graphics/core/device.h" #include "graphics/core/device.h"

View File

@ -1,8 +1,8 @@
# Platform-dependent tests # Platform-dependent tests
if(PLATFORM_WINDOWS) if(PLATFORM_WINDOWS)
set(PLATFORM_TESTS app/system_windows_test.cpp) set(PLATFORM_TESTS common/system/system_windows_test.cpp)
elseif(PLATFORM_LINUX) elseif(PLATFORM_LINUX)
set(PLATFORM_TESTS app/system_linux_test.cpp) set(PLATFORM_TESTS common/system/system_linux_test.cpp)
endif() endif()
# Sources # Sources

View File

@ -19,10 +19,10 @@
#include "app/app.h" #include "app/app.h"
#include "app/system_other.h"
#include "common/make_unique.h" #include "common/make_unique.h"
#include "common/system/system_other.h"
#include <functional> #include <functional>
#include <memory> #include <memory>

View File

@ -17,11 +17,11 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
#include "app/system.h"
#include "common/config_file.h" #include "common/config_file.h"
#include "common/logger.h" #include "common/logger.h"
#include "common/system/system.h"
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <vector> #include <vector>

View File

@ -17,8 +17,8 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
#include "app/system.h" #include "common/system/system.h"
#include "app/system_linux.h" #include "common/system/system_linux.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>

View File

@ -17,8 +17,8 @@
* along with this program. If not, see http://gnu.org/licenses * along with this program. If not, see http://gnu.org/licenses
*/ */
#include "app/system.h" #include "common/system/system.h"
#include "app/system_windows.h" #include "common/system/system_windows.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>