diff options
author | Jan <sentrycraft123@gmail.com> | 2024-06-28 00:44:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-28 00:44:59 +0200 |
commit | 778e338335f4323892b469971c057efc2845d822 (patch) | |
tree | e6974070551128c5e2a5283647780ccea5b054b5 | |
parent | 4d8798e5ccc01d10bb7109a3ca19f4f5b54471c6 (diff) | |
download | NorthstarLauncher-778e338335f4323892b469971c057efc2845d822.tar.gz NorthstarLauncher-778e338335f4323892b469971c057efc2845d822.zip |
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.
-rw-r--r-- | primedev/wsockproxy/CMakeLists.txt | 9 | ||||
-rw-r--r-- | primedev/wsockproxy/dllmain.cpp | 1 | ||||
-rw-r--r-- | primedev/wsockproxy/loader.cpp | 2 | ||||
-rw-r--r-- | primedev/wsockproxy/loader.h | 2 | ||||
-rw-r--r-- | primedev/wsockproxy/pch.h | 16 |
5 files changed, 9 insertions, 21 deletions
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 <windows.h> #include <filesystem> 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 <filesystem> #include <iostream> +#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 <windows.h> + 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 <windows.h> - -#include "MinHook.h" - -#endif // PCH_H |