Skip to content

Commit

Permalink
remove includes, added pch to the extprocess too
Browse files Browse the repository at this point in the history
  • Loading branch information
fszontagh committed Dec 2, 2024
1 parent a0883df commit f57ac79
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 71 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions extprocess/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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})
Expand Down
14 changes: 1 addition & 13 deletions extprocess/src/ApplicationLogic.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#include "ApplicationLogic.h"
#include <chrono>
#include <cstddef>
#include <cstdlib>
#include <iostream>
#include <ostream>
#include <thread>
#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
Expand Down
2 changes: 2 additions & 0 deletions extprocess/src/ApplicationLogic.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
#include <memory>
#include <random>
#include <string>
#include <thread>
#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"
Expand Down
33 changes: 0 additions & 33 deletions extprocess/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
#include <chrono>
#include <iostream>
#include <memory>
#include <ostream>
#include <string>
#include <thread>

#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
#else
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <cstring>
#endif
#include <random>

#include "ver.hpp"

#include <wx/event.h>
#include <wx/string.h>
#include <wx/translation.h>
#include <wx/filename.h>
#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) {
Expand Down
32 changes: 32 additions & 0 deletions extprocess/src/pch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <chrono>
#include <iostream>
#include <memory>
#include <ostream>
#include <string>
#include <thread>
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
#else
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <cstring>
#endif
#include <random>

#include "ver.hpp"

#include <wx/event.h>
#include <wx/string.h>
#include <wx/translation.h>
#include <wx/filename.h>
#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"
2 changes: 1 addition & 1 deletion src/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 1 addition & 16 deletions src/ui/MainWindowUI.cpp
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
11 changes: 5 additions & 6 deletions src/ui/MainWindowUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 0 additions & 1 deletion src/ui/QueueManager.cpp
Original file line number Diff line number Diff line change
@@ -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...
Expand Down

0 comments on commit f57ac79

Please sign in to comment.