diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b0ae85..5a34146 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,7 +95,9 @@ add_executable(${PROJECT_BINARY_NAME} ${SOURCES}) target_precompile_headers(${PROJECT_BINARY_NAME} PRIVATE src/pch.h) if (NOT WIN32) - set(APPDEPENDS wx::base wx::core wx::xrc wx::aui wx::richtext) + +set(APPDEPENDS wx::base wx::core wx::xrc wx::aui wx::richtext) + else() set(APPDEPENDS wxWidgets::wxWidgets) if (MSVC) diff --git a/extprocess/CMakeLists.txt b/extprocess/CMakeLists.txt index 3bc3a16..882a6f9 100644 --- a/extprocess/CMakeLists.txt +++ b/extprocess/CMakeLists.txt @@ -8,6 +8,7 @@ message(STATUS "STACK_SIZE: ${STACK_SIZE}") configure_file(src/config.hpp.in config.hpp) + set(SOURCES "src/main.cpp") if (MSVC) @@ -16,6 +17,7 @@ endif() add_executable(${EPROCESS_BINARY_NAME} ${SOURCES} ${CMAKE_SOURCE_DIR}/src/libs/SharedLibrary.cpp ${CMAKE_SOURCE_DIR}/src/libs/SharedMemoryManager.cpp src/ApplicationLogic.cpp) +target_precompile_headers(${EPROCESS_BINARY_NAME} PRIVATE src/pch.h) if (MSVC) target_link_options(${EPROCESS_BINARY_NAME} PRIVATE /STACK:${STACK_SIZE}) diff --git a/extprocess/src/ApplicationLogic.cpp b/extprocess/src/ApplicationLogic.cpp index 39ed4d8..829ec7f 100644 --- a/extprocess/src/ApplicationLogic.cpp +++ b/extprocess/src/ApplicationLogic.cpp @@ -1,17 +1,5 @@ #include "ApplicationLogic.h" -#include -#include -#include -#include -#include -#include -#include "config.hpp" -#include "helpers/sd.hpp" -#include "helpers/sslUtils.hpp" -#include "ui/QueueManager.h" -#include "ver.hpp" -#include "wx/strvararg.h" -#include "wx/translation.h" + #ifndef STBI_NO_FAILURE_STRINGS #define STBI_NO_FAILURE_STRINGS #endif diff --git a/extprocess/src/ApplicationLogic.h b/extprocess/src/ApplicationLogic.h index c276cbc..8cc5d4d 100644 --- a/extprocess/src/ApplicationLogic.h +++ b/extprocess/src/ApplicationLogic.h @@ -4,11 +4,13 @@ #include #include #include +#include #include "helpers/sd.hpp" #include "ver.hpp" #include "wx/event.h" #include "wx/translation.h" +#include "config.hpp" #include "helpers/sslUtils.hpp" #include "libs/SharedLibrary.h" #include "libs/SharedMemoryManager.h" diff --git a/extprocess/src/main.cpp b/extprocess/src/main.cpp index 419aa80..a47e81b 100644 --- a/extprocess/src/main.cpp +++ b/extprocess/src/main.cpp @@ -1,36 +1,3 @@ -#include -#include -#include -#include -#include -#include - -#if defined(_WIN32) || defined(_WIN64) -#include -#else -#include -#include -#include -#include -#endif -#include - -#include "ver.hpp" - -#include -#include -#include -#include -#include "helpers/sd.hpp" - -//#include "../../src/ui/utils.hpp" -#include "libs/SharedMemoryManager.h" -#include "libs/json.hpp" -#include "ui/QueueManager.h" - -#include "ApplicationLogic.h" -#include "config.hpp" -#include "helpers/sd.hpp" int main(int argc, char* argv[]) { if (argc != 2) { diff --git a/extprocess/src/pch.h b/extprocess/src/pch.h new file mode 100644 index 0000000..5aceeae --- /dev/null +++ b/extprocess/src/pch.h @@ -0,0 +1,32 @@ +#include +#include +#include +#include +#include +#include +#if defined(_WIN32) || defined(_WIN64) +#include +#else +#include +#include +#include +#include +#endif +#include + +#include "ver.hpp" + +#include +#include +#include +#include +#include "helpers/sd.hpp" + +//#include "../../src/ui/utils.hpp" +#include "libs/SharedMemoryManager.h" +#include "libs/json.hpp" +#include "ui/QueueManager.h" + +#include "ApplicationLogic.h" +#include "config.hpp" +#include "helpers/sd.hpp" \ No newline at end of file diff --git a/src/pch.h b/src/pch.h index 01b1629..93a302f 100644 --- a/src/pch.h +++ b/src/pch.h @@ -38,7 +38,7 @@ #include "wx/sstream.h" #include "wx/txtstrm.h" - +#include "extprocess/config.hpp" #include "exiv2/exiv2.hpp" #include "helpers/cpuinfo_x86.hpp" diff --git a/src/ui/MainWindowUI.cpp b/src/ui/MainWindowUI.cpp index 6f4298c..d5c5158 100644 --- a/src/ui/MainWindowUI.cpp +++ b/src/ui/MainWindowUI.cpp @@ -1,22 +1,7 @@ #include "MainWindowUI.h" - -#include "../helpers/simplecurl.h" -#include "../helpers/sslUtils.hpp" -#include "MainWindowAboutDialog.h" -#include "MainWindowImageDialog.h" - -#include "QueueManager.h" #include "embedded_files/app_icon.h" #include "embedded_files/blankimage.png.h" -#include "extprocess/config.hpp" -#include "imageUtils.h" -#include "utils.hpp" -#include "ver.hpp" -#include "wx/dir.h" -#include "wx/file.h" -#include "wx/filename.h" -#include "wx/string.h" -#include "wx/stringimpl.h" + MainWindowUI::MainWindowUI(wxWindow* parent, const std::string dllName, const std::string& usingBackend, bool disableExternalProcessHandling, MainApp* mapp) : mainUI(parent), usingBackend(usingBackend), disableExternalProcessHandling(disableExternalProcessHandling), mapp(mapp) { diff --git a/src/ui/MainWindowUI.h b/src/ui/MainWindowUI.h index 8968f97..3d5fb89 100644 --- a/src/ui/MainWindowUI.h +++ b/src/ui/MainWindowUI.h @@ -6,12 +6,11 @@ Subclass of UI, which is generated by wxFormBuilder. */ -#include "QueueManager.h" -#include "utils.hpp" -#include "wx/dataview.h" -#include "wx/datetime.h" -#include "wx/file.h" -#include "wx/gtk/stattext.h" +#include "MainWindowAboutDialog.h" +#include "MainWindowImageDialog.h" +#include "../helpers/sslUtils.hpp" +#include "../helpers/simplecurl.h" + class MainApp; /** Implementing UI */ diff --git a/src/ui/QueueManager.cpp b/src/ui/QueueManager.cpp index dce858f..1635fb4 100644 --- a/src/ui/QueueManager.cpp +++ b/src/ui/QueueManager.cpp @@ -1,5 +1,4 @@ #include "QueueManager.h" -#include "ver.hpp" QM::QueueManager::QueueManager(wxEvtHandler* eventHandler, std::string jobsdir) { // need to send events into the mainwindow by the threads...