From 778e338335f4323892b469971c057efc2845d822 Mon Sep 17 00:00:00 2001 From: Jan Date: Fri, 28 Jun 2024 00:44:59 +0200 Subject: Remove precompiled header from wsock proxy (#739) The wsock proxy is so small and self contained that it really does not benefit from a precompiled header. --- primedev/wsockproxy/CMakeLists.txt | 9 ++++----- primedev/wsockproxy/dllmain.cpp | 1 + primedev/wsockproxy/loader.cpp | 2 ++ primedev/wsockproxy/loader.h | 2 ++ primedev/wsockproxy/pch.h | 16 ---------------- 5 files changed, 9 insertions(+), 21 deletions(-) delete mode 100644 primedev/wsockproxy/pch.h (limited to 'primedev') diff --git a/primedev/wsockproxy/CMakeLists.txt b/primedev/wsockproxy/CMakeLists.txt index b1d03ce7..3f6bce45 100644 --- a/primedev/wsockproxy/CMakeLists.txt +++ b/primedev/wsockproxy/CMakeLists.txt @@ -32,14 +32,13 @@ target_link_libraries( odbccp32.lib ) -target_precompile_headers( +target_compile_definitions( loader_wsock32_proxy - PRIVATE - pch.h + PRIVATE UNICODE + _UNICODE + WIN32_LEAN_AND_MEAN ) -target_compile_definitions(loader_wsock32_proxy PRIVATE UNICODE _UNICODE) - set_target_properties( loader_wsock32_proxy PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${NS_BINARY_DIR}/bin/x64_retail diff --git a/primedev/wsockproxy/dllmain.cpp b/primedev/wsockproxy/dllmain.cpp index 5a606e45..9716c1b8 100644 --- a/primedev/wsockproxy/dllmain.cpp +++ b/primedev/wsockproxy/dllmain.cpp @@ -1,5 +1,6 @@ #include "loader.h" +#include #include FARPROC p[73]; diff --git a/primedev/wsockproxy/loader.cpp b/primedev/wsockproxy/loader.cpp index a3abf11c..4664c20c 100644 --- a/primedev/wsockproxy/loader.cpp +++ b/primedev/wsockproxy/loader.cpp @@ -7,6 +7,8 @@ #include #include +#include "MinHook.h" + namespace fs = std::filesystem; static wchar_t northstarPath[8192]; diff --git a/primedev/wsockproxy/loader.h b/primedev/wsockproxy/loader.h index 0c6fb053..6287e515 100644 --- a/primedev/wsockproxy/loader.h +++ b/primedev/wsockproxy/loader.h @@ -1,5 +1,7 @@ #pragma once +#include + extern wchar_t exePath[4096]; extern wchar_t buffer1[8192]; extern wchar_t buffer2[12288]; diff --git a/primedev/wsockproxy/pch.h b/primedev/wsockproxy/pch.h deleted file mode 100644 index ebc29547..00000000 --- a/primedev/wsockproxy/pch.h +++ /dev/null @@ -1,16 +0,0 @@ -// pch.h: This is a precompiled header file. -// Files listed below are compiled only once, improving build performance for future builds. -// This also affects IntelliSense performance, including code completion and many code browsing features. -// However, files listed here are ALL re-compiled if any one of them is updated between builds. -// Do not add files here that you will be updating frequently as this negates the performance advantage. - -#ifndef PCH_H -#define PCH_H - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -// Windows Header Files -#include - -#include "MinHook.h" - -#endif // PCH_H -- cgit v1.2.3