diff --git a/CMakeLists.txt b/CMakeLists.txt index cefa9376..d7e7bb7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,9 @@ IF (NOT DEFINED CEF_ROOT) set (CEF_ROOT "../../cef") ENDIF () -set (LOOT_SRC "${CMAKE_SOURCE_DIR}/src/backend/metadata/conditional_metadata.cpp" +set (LOOT_SRC "${CMAKE_SOURCE_DIR}/src/backend/app/loot_settings.cpp" + "${CMAKE_SOURCE_DIR}/src/backend/app/loot_state.cpp" + "${CMAKE_SOURCE_DIR}/src/backend/metadata/conditional_metadata.cpp" "${CMAKE_SOURCE_DIR}/src/backend/metadata/file.cpp" "${CMAKE_SOURCE_DIR}/src/backend/metadata/location.cpp" "${CMAKE_SOURCE_DIR}/src/backend/metadata/message.cpp" @@ -142,7 +144,9 @@ set (LOOT_SRC "${CMAKE_SOURCE_DIR}/src/backend/metadata/conditional_metadata.c "${CMAKE_SOURCE_DIR}/src/backend/plugin_sorter.cpp" "${CMAKE_BINARY_DIR}/generated/globals.cpp") -set (LOOT_HEADERS "${CMAKE_SOURCE_DIR}/src/backend/metadata/condition_grammar.h" +set (LOOT_HEADERS "${CMAKE_SOURCE_DIR}/src/backend/app/loot_settings.h" + "${CMAKE_SOURCE_DIR}/src/backend/app/loot_state.h" + "${CMAKE_SOURCE_DIR}/src/backend/metadata/condition_grammar.h" "${CMAKE_SOURCE_DIR}/src/backend/metadata/conditional_metadata.h" "${CMAKE_SOURCE_DIR}/src/backend/metadata/file.h" "${CMAKE_SOURCE_DIR}/src/backend/metadata/location.h" @@ -160,6 +164,7 @@ set (LOOT_HEADERS "${CMAKE_SOURCE_DIR}/src/backend/metadata/condition_grammar.h" "${CMAKE_SOURCE_DIR}/src/backend/plugin/plugin.h" "${CMAKE_SOURCE_DIR}/src/backend/helpers/git_helper.h" "${CMAKE_SOURCE_DIR}/src/backend/helpers/helpers.h" + "${CMAKE_SOURCE_DIR}/src/backend/helpers/json.h" "${CMAKE_SOURCE_DIR}/src/backend/helpers/language.h" "${CMAKE_SOURCE_DIR}/src/backend/helpers/version.h" "${CMAKE_SOURCE_DIR}/src/backend/helpers/yaml_set_helpers.h" @@ -172,20 +177,13 @@ set (LOOT_GUI_SRC ${LOOT_SRC} "${CMAKE_SOURCE_DIR}/src/gui/handler.cpp" "${CMAKE_SOURCE_DIR}/src/gui/loot_handler.cpp" "${CMAKE_SOURCE_DIR}/src/gui/loot_app.cpp" - "${CMAKE_SOURCE_DIR}/src/gui/loot_settings.cpp" - "${CMAKE_SOURCE_DIR}/src/gui/loot_state.cpp" "${CMAKE_SOURCE_DIR}/src/gui/scheme.cpp" "${CMAKE_SOURCE_DIR}/src/resource.rc") set (LOOT_GUI_HEADERS ${LOOT_HEADERS} - # Code the API doesn't need. - "${CMAKE_SOURCE_DIR}/src/backend/helpers/json.h" - # Actual GUI code. "${CMAKE_SOURCE_DIR}/src/gui/handler.h" "${CMAKE_SOURCE_DIR}/src/gui/loot_handler.h" "${CMAKE_SOURCE_DIR}/src/gui/loot_app.h" - "${CMAKE_SOURCE_DIR}/src/gui/loot_settings.h" - "${CMAKE_SOURCE_DIR}/src/gui/loot_state.h" "${CMAKE_SOURCE_DIR}/src/gui/scheme.h" "${CMAKE_SOURCE_DIR}/src/gui/resource.h") @@ -204,8 +202,6 @@ set (LOOT_VALIDATOR_HEADERS ${LOOT_HEADERS}) set (LOOT_TESTS_SRC ${LOOT_SRC} "${CMAKE_SOURCE_DIR}/src/api/loot_db.cpp" - "${CMAKE_SOURCE_DIR}/src/gui/loot_settings.cpp" - "${CMAKE_SOURCE_DIR}/src/gui/loot_state.cpp" "${CMAKE_SOURCE_DIR}/src/tests/main.cpp") set (LOOT_TESTS_HEADERS "${CMAKE_SOURCE_DIR}/src/tests/base_game_test.h" @@ -226,7 +222,9 @@ set (LOOT_TESTS_HEADERS "${CMAKE_SOURCE_DIR}/src/tests/base_game_test.h" "${CMAKE_SOURCE_DIR}/src/tests/api/loot_update_masterlist_test.h" "${CMAKE_SOURCE_DIR}/src/tests/api/loot_write_minimal_list_test.h" "${CMAKE_SOURCE_DIR}/src/tests/api/test_api.h" - + + "${CMAKE_SOURCE_DIR}/src/tests/backend/app/loot_settings_test.h" + "${CMAKE_SOURCE_DIR}/src/tests/backend/app/loot_state_test.h" "${CMAKE_SOURCE_DIR}/src/tests/backend/game/game_test.h" "${CMAKE_SOURCE_DIR}/src/tests/backend/game/game_cache_test.h" "${CMAKE_SOURCE_DIR}/src/tests/backend/game/game_settings_test.h" @@ -248,9 +246,7 @@ set (LOOT_TESTS_HEADERS "${CMAKE_SOURCE_DIR}/src/tests/base_game_test.h" "${CMAKE_SOURCE_DIR}/src/tests/backend/plugin/plugin_test.h" "${CMAKE_SOURCE_DIR}/src/tests/backend/masterlist_test.h" "${CMAKE_SOURCE_DIR}/src/tests/backend/metadata_list_test.h" - "${CMAKE_SOURCE_DIR}/src/tests/backend/plugin_sorter_test.h" - "${CMAKE_SOURCE_DIR}/src/tests/gui/loot_settings_test.h" - "${CMAKE_SOURCE_DIR}/src/tests/gui/loot_state_test.h") + "${CMAKE_SOURCE_DIR}/src/tests/backend/plugin_sorter_test.h") source_group("Header Files\\backend" FILES ${LOOT_HEADERS}) source_group("Header Files\\gui" FILES ${LOOT_GUI_HEADERS}) diff --git a/src/gui/loot_settings.cpp b/src/backend/app/loot_settings.cpp similarity index 100% rename from src/gui/loot_settings.cpp rename to src/backend/app/loot_settings.cpp diff --git a/src/gui/loot_settings.h b/src/backend/app/loot_settings.h similarity index 97% rename from src/gui/loot_settings.h rename to src/backend/app/loot_settings.h index 8583ee8c..a0c4575d 100644 --- a/src/gui/loot_settings.h +++ b/src/backend/app/loot_settings.h @@ -22,8 +22,8 @@ . */ -#ifndef LOOT_GUI_LOOT_SETTINGS -#define LOOT_GUI_LOOT_SETTINGS +#ifndef LOOT_BACKEND_LOOT_SETTINGS +#define LOOT_BACKEND_LOOT_SETTINGS #include "backend/game/game_settings.h" #include "backend/helpers/language.h" diff --git a/src/gui/loot_state.cpp b/src/backend/app/loot_state.cpp similarity index 98% rename from src/gui/loot_state.cpp rename to src/backend/app/loot_state.cpp index 35e9adec..4285a911 100644 --- a/src/gui/loot_state.cpp +++ b/src/backend/app/loot_state.cpp @@ -24,10 +24,10 @@ #include "loot_state.h" -#include "../backend/error.h" -#include "../backend/globals.h" -#include "../backend/helpers/helpers.h" -#include "../backend/helpers/language.h" +#include "backend/error.h" +#include "backend/globals.h" +#include "backend/helpers/helpers.h" +#include "backend/helpers/language.h" #include #include diff --git a/src/gui/loot_state.h b/src/backend/app/loot_state.h similarity index 97% rename from src/gui/loot_state.h rename to src/backend/app/loot_state.h index c3f2e3ca..73d8a9a5 100644 --- a/src/gui/loot_state.h +++ b/src/backend/app/loot_state.h @@ -22,8 +22,8 @@ . */ -#ifndef __LOOT_GUI_LOOT_STATE__ -#define __LOOT_GUI_LOOT_STATE__ +#ifndef LOOT_BACKEND_LOOT_STATE +#define LOOT_BACKEND_LOOT_STATE #include "loot_settings.h" #include "backend/game/game.h" diff --git a/src/gui/handler.h b/src/gui/handler.h index 82645189..ad933313 100644 --- a/src/gui/handler.h +++ b/src/gui/handler.h @@ -25,9 +25,9 @@ #ifndef __LOOT_GUI_HANDLER__ #define __LOOT_GUI_HANDLER__ -#include "loot_state.h" -#include "../backend/plugin/plugin.h" -#include "../backend/metadata/plugin_metadata.h" +#include "backend/app/loot_state.h" +#include "backend/plugin/plugin.h" +#include "backend/metadata/plugin_metadata.h" #include diff --git a/src/gui/loot_app.h b/src/gui/loot_app.h index 1dade811..cc98a74f 100644 --- a/src/gui/loot_app.h +++ b/src/gui/loot_app.h @@ -25,7 +25,7 @@ #ifndef __LOOT_GUI_LOOT_APP__ #define __LOOT_GUI_LOOT_APP__ -#include "loot_state.h" +#include "backend/app/loot_state.h" #include #include diff --git a/src/gui/loot_handler.h b/src/gui/loot_handler.h index 3e47bde3..560d3434 100644 --- a/src/gui/loot_handler.h +++ b/src/gui/loot_handler.h @@ -25,7 +25,7 @@ #ifndef __LOOT_GUI_LOOT_HANDLER__ #define __LOOT_GUI_LOOT_HANDLER__ -#include "loot_state.h" +#include "backend/app/loot_state.h" #include #include diff --git a/src/gui/main.cpp b/src/gui/main.cpp index a34ea8a9..2b7149c2 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -23,8 +23,8 @@ */ #include "loot_app.h" -#include "loot_state.h" -#include "../backend/globals.h" +#include "backend/app/loot_state.h" +#include "backend/globals.h" #ifdef _WIN32 #include diff --git a/src/tests/gui/loot_settings_test.h b/src/tests/backend/app/loot_settings_test.h similarity index 99% rename from src/tests/gui/loot_settings_test.h rename to src/tests/backend/app/loot_settings_test.h index 4602b5f6..8941db8a 100644 --- a/src/tests/gui/loot_settings_test.h +++ b/src/tests/backend/app/loot_settings_test.h @@ -25,7 +25,7 @@ along with LOOT. If not, see #ifndef LOOT_TEST_GUI_LOOT_SETTINGS #define LOOT_TEST_GUI_LOOT_SETTINGS -#include "gui/loot_settings.h" +#include "backend/app/loot_settings.h" #include "backend/globals.h" namespace loot { diff --git a/src/tests/gui/loot_state_test.h b/src/tests/backend/app/loot_state_test.h similarity index 98% rename from src/tests/gui/loot_state_test.h rename to src/tests/backend/app/loot_state_test.h index 441f460e..b780a81a 100644 --- a/src/tests/gui/loot_state_test.h +++ b/src/tests/backend/app/loot_state_test.h @@ -25,7 +25,7 @@ along with LOOT. If not, see #ifndef LOOT_TEST_GUI_LOOT_STATE #define LOOT_TEST_GUI_LOOT_STATE -#include "gui/loot_state.h" +#include "backend/app/loot_state.h" #include diff --git a/src/tests/main.cpp b/src/tests/main.cpp index a7db99bb..01c3e123 100644 --- a/src/tests/main.cpp +++ b/src/tests/main.cpp @@ -41,6 +41,8 @@ #include "api/loot_update_masterlist_test.h" #include "api/loot_write_minimal_list_test.h" #include "api/test_api.h" +#include "backend/app/loot_settings_test.h" +#include "backend/app/loot_state_test.h" #include "backend/game/game_test.h" #include "backend/game/game_cache_test.h" #include "backend/game/game_settings_test.h" @@ -63,8 +65,6 @@ #include "backend/masterlist_test.h" #include "backend/metadata_list_test.h" #include "backend/plugin_sorter_test.h" -#include "gui/loot_settings_test.h" -#include "gui/loot_state_test.h" #include