[colobot] 03/74: Moved system modules from app/ to common/system/
Didier Raboud
odyx at moszumanska.debian.org
Mon Nov 7 07:49:58 UTC 2016
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit 81b7bcc5bcac4778533f7753874bf83f6afc4254
Author: krzys-h <krzys_h at interia.pl>
Date: Sun Jul 24 14:38:49 2016 +0200
Moved system modules from app/ to common/system/
---
src/CMakeLists.txt | 12 ++++++------
src/app/app.cpp | 3 ++-
src/app/main.cpp | 9 +++++----
src/app/pathman.cpp | 10 ++++++----
src/app/signal_handlers.cpp | 4 ++--
src/common/config_file.cpp | 4 ++--
src/{app => common/system}/system.cpp | 10 +++++-----
src/{app => common/system}/system.h | 2 +-
src/{app => common/system}/system_linux.cpp | 2 +-
src/{app => common/system}/system_linux.h | 4 ++--
src/{app => common/system}/system_macosx.cpp | 2 +-
src/{app => common/system}/system_macosx.h | 6 +++---
src/{app => common/system}/system_other.cpp | 2 +-
src/{app => common/system}/system_other.h | 4 ++--
src/{app => common/system}/system_windows.cpp | 2 +-
src/{app => common/system}/system_windows.h | 4 ++--
src/graphics/engine/engine.cpp | 3 ++-
test/unit/CMakeLists.txt | 4 ++--
test/unit/app/app_test.cpp | 4 ++--
test/unit/common/config_file_test.cpp | 4 ++--
test/unit/{app => common/system}/system_linux_test.cpp | 4 ++--
test/unit/{app => common/system}/system_windows_test.cpp | 4 ++--
22 files changed, 54 insertions(+), 49 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bc6f12a..db4b9d9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -89,8 +89,6 @@ endif()
# Source files
set(BASE_SOURCES
${OPENAL_SRC}
- app/${SYSTEM_CPP_MODULE}
- app/${SYSTEM_H_MODULE}
app/app.cpp
app/app.h
app/controller.cpp
@@ -103,10 +101,6 @@ set(BASE_SOURCES
app/pausemanager.h
app/signal_handlers.cpp
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.h
common/error.h
@@ -143,6 +137,12 @@ set(BASE_SOURCES
common/resources/sndfile_wrapper.h
common/restext.cpp
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.h
common/singleton.h
diff --git a/src/app/app.cpp b/src/app/app.cpp
index d34532f..d9583d0 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -22,7 +22,6 @@
#include "app/controller.h"
#include "app/input.h"
#include "app/pathman.h"
-#include "app/system.h"
#include "common/config_file.h"
#include "common/image.h"
@@ -34,6 +33,8 @@
#include "common/resources/resourcemanager.h"
+#include "common/system/system.h"
+
#include "graphics/core/nulldevice.h"
#include "graphics/opengl/glutil.h"
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 88908f6..abf6566 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -26,10 +26,6 @@
#include "app/app.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/make_unique.h"
@@ -38,6 +34,11 @@
#include "common/resources/resourcemanager.h"
+#include "common/system/system.h"
+#if PLATFORM_WINDOWS
+ #include "common/system/system_windows.h"
+#endif
+
#if PLATFORM_WINDOWS
#include <windows.h>
#endif
diff --git a/src/app/pathman.cpp b/src/app/pathman.cpp
index 8f86211..a384828 100644
--- a/src/app/pathman.cpp
+++ b/src/app/pathman.cpp
@@ -23,15 +23,17 @@
#include "common/config.h"
#include "app/app.h"
-#include "app/system.h"
-#ifdef PLATFORM_WINDOWS
- #include "app/system_windows.h"
-#endif
+
#include "common/logger.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/filesystem.hpp>
diff --git a/src/app/signal_handlers.cpp b/src/app/signal_handlers.cpp
index 87dbb4a..223d7db 100644
--- a/src/app/signal_handlers.cpp
+++ b/src/app/signal_handlers.cpp
@@ -19,13 +19,13 @@
#include "app/signal_handlers.h"
-#include "app/system.h"
-
#include "common/stringutils.h"
#include "common/version.h"
#include "common/resources/resourcemanager.h"
+#include "common/system/system.h"
+
#include "level/robotmain.h"
#include <csignal>
diff --git a/src/common/config_file.cpp b/src/common/config_file.cpp
index 6286266..6148eae 100644
--- a/src/common/config_file.cpp
+++ b/src/common/config_file.cpp
@@ -20,14 +20,14 @@
#include "common/config_file.h"
-#include "app/system.h"
-
#include "common/logger.h"
#include "common/make_unique.h"
#include "common/resources/inputstream.h"
#include "common/resources/outputstream.h"
+#include "common/system/system.h"
+
#include <memory>
#include <utility>
#include <cstring>
diff --git a/src/app/system.cpp b/src/common/system/system.cpp
similarity index 95%
rename from src/app/system.cpp
rename to src/common/system/system.cpp
index fc55af2..210b4a7 100644
--- a/src/app/system.cpp
+++ b/src/common/system/system.cpp
@@ -18,18 +18,18 @@
*/
-#include "app/system.h"
+#include "common/system/system.h"
#include "common/config.h"
#if defined(PLATFORM_WINDOWS)
- #include "app/system_windows.h"
+ #include "common/system/system_windows.h"
#elif defined(PLATFORM_LINUX)
- #include "app/system_linux.h"
+ #include "common/system/system_linux.h"
#elif defined(PLATFORM_MACOSX)
- #include "app/system_macosx.h"
+ #include "common/system/system_macosx.h"
#else
- #include "app/system_other.h"
+ #include "common/system/system_other.h"
#endif
#include "common/make_unique.h"
diff --git a/src/app/system.h b/src/common/system/system.h
similarity index 99%
rename from src/app/system.h
rename to src/common/system/system.h
index ecb1de8..2be5ae1 100644
--- a/src/app/system.h
+++ b/src/common/system/system.h
@@ -18,7 +18,7 @@
*/
/**
- * \file app/system.h
+ * \file common/system/system.h
* \brief System functions: time stamps, info dialogs, etc.
*/
diff --git a/src/app/system_linux.cpp b/src/common/system/system_linux.cpp
similarity index 98%
rename from src/app/system_linux.cpp
rename to src/common/system/system_linux.cpp
index 8cb59ec..fd66391 100644
--- a/src/app/system_linux.cpp
+++ b/src/common/system/system_linux.cpp
@@ -17,7 +17,7 @@
* 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"
diff --git a/src/app/system_linux.h b/src/common/system/system_linux.h
similarity index 95%
rename from src/app/system_linux.h
rename to src/common/system/system_linux.h
index af2fde6..e451a93 100644
--- a/src/app/system_linux.h
+++ b/src/common/system/system_linux.h
@@ -18,11 +18,11 @@
*/
/**
- * \file app/system_linux.h
+ * \file common/system/system_linux.h
* \brief Linux-specific implementation of system functions
*/
-#include "app/system.h"
+#include "common/system/system.h"
#include <sys/time.h>
diff --git a/src/app/system_macosx.cpp b/src/common/system/system_macosx.cpp
similarity index 98%
rename from src/app/system_macosx.cpp
rename to src/common/system/system_macosx.cpp
index 8b99a47..4730487 100644
--- a/src/app/system_macosx.cpp
+++ b/src/common/system/system_macosx.cpp
@@ -17,7 +17,7 @@
* 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"
diff --git a/src/app/system_macosx.h b/src/common/system/system_macosx.h
similarity index 92%
rename from src/app/system_macosx.h
rename to src/common/system/system_macosx.h
index 99873f0..c8abba5 100644
--- a/src/app/system_macosx.h
+++ b/src/common/system/system_macosx.h
@@ -18,12 +18,12 @@
*/
/**
- * \file app/system_macosx.h
+ * \file common/system/system_macosx.h
* \brief MacOSX-specific implementation of system functions
*/
-#include "app/system.h"
-#include "app/system_other.h"
+#include "common/system/system.h"
+#include "common/system/system_other.h"
//@colobot-lint-exclude UndefinedFunctionRule
diff --git a/src/app/system_other.cpp b/src/common/system/system_other.cpp
similarity index 97%
rename from src/app/system_other.cpp
rename to src/common/system/system_other.cpp
index 5b8d15f..8547b82 100644
--- a/src/app/system_other.cpp
+++ b/src/common/system/system_other.cpp
@@ -17,7 +17,7 @@
* 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()
diff --git a/src/app/system_other.h b/src/common/system/system_other.h
similarity index 95%
rename from src/app/system_other.h
rename to src/common/system/system_other.h
index 37e61e6..caac018 100644
--- a/src/app/system_other.h
+++ b/src/common/system/system_other.h
@@ -18,11 +18,11 @@
*/
/**
- * \file app/system_other.h
+ * \file common/system/system_other.h
* \brief Fallback code for other systems
*/
-#include "app/system.h"
+#include "common/system/system.h"
#include <SDL.h>
diff --git a/src/app/system_windows.cpp b/src/common/system/system_windows.cpp
similarity index 99%
rename from src/app/system_windows.cpp
rename to src/common/system/system_windows.cpp
index a9ae154..4c6d13e 100644
--- a/src/app/system_windows.cpp
+++ b/src/common/system/system_windows.cpp
@@ -17,7 +17,7 @@
* 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"
diff --git a/src/app/system_windows.h b/src/common/system/system_windows.h
similarity index 95%
rename from src/app/system_windows.h
rename to src/common/system/system_windows.h
index 4379b3e..dae9e0f 100644
--- a/src/app/system_windows.h
+++ b/src/common/system/system_windows.h
@@ -18,11 +18,11 @@
*/
/**
- * \file app/system_windows.h
+ * \file common/system/system_windows.h
* \brief Windows-specific implementation of system functions
*/
-#include "app/system.h"
+#include "common/system/system.h"
//@colobot-lint-exclude UndefinedFunctionRule
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 27d2db7..74a473a 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -22,7 +22,6 @@
#include "app/app.h"
#include "app/input.h"
-#include "app/system.h"
#include "common/image.h"
#include "common/key.h"
@@ -30,6 +29,8 @@
#include "common/make_unique.h"
#include "common/stringutils.h"
+#include "common/system/system.h"
+
#include "common/thread/resource_owning_thread.h"
#include "graphics/core/device.h"
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
index 446834f..c21fb60 100644
--- a/test/unit/CMakeLists.txt
+++ b/test/unit/CMakeLists.txt
@@ -1,8 +1,8 @@
# Platform-dependent tests
if(PLATFORM_WINDOWS)
- set(PLATFORM_TESTS app/system_windows_test.cpp)
+ set(PLATFORM_TESTS common/system/system_windows_test.cpp)
elseif(PLATFORM_LINUX)
- set(PLATFORM_TESTS app/system_linux_test.cpp)
+ set(PLATFORM_TESTS common/system/system_linux_test.cpp)
endif()
# Sources
diff --git a/test/unit/app/app_test.cpp b/test/unit/app/app_test.cpp
index 13a3caa..073dd89 100644
--- a/test/unit/app/app_test.cpp
+++ b/test/unit/app/app_test.cpp
@@ -19,10 +19,10 @@
#include "app/app.h"
-#include "app/system_other.h"
-
#include "common/make_unique.h"
+#include "common/system/system_other.h"
+
#include <functional>
#include <memory>
diff --git a/test/unit/common/config_file_test.cpp b/test/unit/common/config_file_test.cpp
index b95b6b0..4a00137 100644
--- a/test/unit/common/config_file_test.cpp
+++ b/test/unit/common/config_file_test.cpp
@@ -17,11 +17,11 @@
* along with this program. If not, see http://gnu.org/licenses
*/
-#include "app/system.h"
-
#include "common/config_file.h"
#include "common/logger.h"
+#include "common/system/system.h"
+
#include <iostream>
#include <string>
#include <vector>
diff --git a/test/unit/app/system_linux_test.cpp b/test/unit/common/system/system_linux_test.cpp
similarity index 96%
rename from test/unit/app/system_linux_test.cpp
rename to test/unit/common/system/system_linux_test.cpp
index d69b3fb..9d51d88 100644
--- a/test/unit/app/system_linux_test.cpp
+++ b/test/unit/common/system/system_linux_test.cpp
@@ -17,8 +17,8 @@
* along with this program. If not, see http://gnu.org/licenses
*/
-#include "app/system.h"
-#include "app/system_linux.h"
+#include "common/system/system.h"
+#include "common/system/system_linux.h"
#include <gtest/gtest.h>
diff --git a/test/unit/app/system_windows_test.cpp b/test/unit/common/system/system_windows_test.cpp
similarity index 96%
rename from test/unit/app/system_windows_test.cpp
rename to test/unit/common/system/system_windows_test.cpp
index 46a729e..1c2d853 100644
--- a/test/unit/app/system_windows_test.cpp
+++ b/test/unit/common/system/system_windows_test.cpp
@@ -17,8 +17,8 @@
* along with this program. If not, see http://gnu.org/licenses
*/
-#include "app/system.h"
-#include "app/system_windows.h"
+#include "common/system/system.h"
+#include "common/system/system_windows.h"
#include <gtest/gtest.h>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list