mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 08:54:12 +08:00
use precompiled headers
This commit is contained in:
parent
386e09a81a
commit
d1887db2a5
@ -24,6 +24,9 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_FINAL_OUTPUT_DIRECTORY}>)
|
|||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_FINAL_OUTPUT_DIRECTORY}>)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_FINAL_OUTPUT_DIRECTORY}>)
|
||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
add_library(pch text.cpp)
|
||||||
|
target_precompile_headers(pch PUBLIC include/common.h)
|
||||||
|
|
||||||
file(GLOB ASSETS assets/*)
|
file(GLOB ASSETS assets/*)
|
||||||
file(COPY ${ASSETS} DESTINATION ${CMAKE_FINAL_OUTPUT_DIRECTORY})
|
file(COPY ${ASSETS} DESTINATION ${CMAKE_FINAL_OUTPUT_DIRECTORY})
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ add_executable(Textractor WIN32
|
|||||||
Textractor.rc
|
Textractor.rc
|
||||||
Textractor.ico
|
Textractor.ico
|
||||||
)
|
)
|
||||||
|
target_precompile_headers(Textractor REUSE_FROM pch)
|
||||||
target_link_libraries(${PROJECT_NAME} Qt5::Widgets shell32 winhttp)
|
target_link_libraries(${PROJECT_NAME} Qt5::Widgets shell32 winhttp)
|
||||||
|
|
||||||
if (NOT EXISTS ${CMAKE_FINAL_OUTPUT_DIRECTORY}/Qt5Core.dll)
|
if (NOT EXISTS ${CMAKE_FINAL_OUTPUT_DIRECTORY}/Qt5Core.dll)
|
||||||
|
@ -6,3 +6,4 @@ add_executable(TextractorCLI
|
|||||||
textthread.cpp
|
textthread.cpp
|
||||||
hookcode.cpp
|
hookcode.cpp
|
||||||
)
|
)
|
||||||
|
target_precompile_headers(TextractorCLI REUSE_FROM pch)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include "common.h"
|
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
namespace HookCode
|
namespace HookCode
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "textthread.h"
|
#include "textthread.h"
|
||||||
|
|
||||||
namespace Host
|
namespace Host
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
class TextThread
|
class TextThread
|
||||||
|
@ -19,6 +19,21 @@ add_library(Remove\ 30\ Repeated\ Sentences MODULE removerepeatsentence.cpp exte
|
|||||||
add_library(Replacer MODULE replacer.cpp extensionimpl.cpp)
|
add_library(Replacer MODULE replacer.cpp extensionimpl.cpp)
|
||||||
add_library(Thread\ Linker MODULE threadlinker.cpp extensionimpl.cpp)
|
add_library(Thread\ Linker MODULE threadlinker.cpp extensionimpl.cpp)
|
||||||
|
|
||||||
|
target_precompile_headers(Bing\ Translate REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Copy\ to\ Clipboard REUSE_FROM pch)
|
||||||
|
target_precompile_headers(DeepL\ Translate REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Extra\ Newlines REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Extra\ Window REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Google\ Translate REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Lua REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Regex\ Filter REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Remove\ Repeated\ Characters REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Remove\ Repeated\ Phrases REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Remove\ Repeated\ Phrases\ 2 REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Remove\ 30\ Repeated\ Sentences REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Replacer REUSE_FROM pch)
|
||||||
|
target_precompile_headers(Thread\ Linker REUSE_FROM pch)
|
||||||
|
|
||||||
target_link_libraries(Bing\ Translate winhttp Qt5::Widgets)
|
target_link_libraries(Bing\ Translate winhttp Qt5::Widgets)
|
||||||
target_link_libraries(DeepL\ Translate winhttp Qt5::Widgets)
|
target_link_libraries(DeepL\ Translate winhttp Qt5::Widgets)
|
||||||
target_link_libraries(Extra\ Window Qt5::Widgets)
|
target_link_libraries(Extra\ Window Qt5::Widgets)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include <istream>
|
#include <istream>
|
||||||
|
|
||||||
template <typename C, int delimiterCount, int blockSize = 0x1000 / sizeof(C)> // windows file block size
|
template <typename C, int delimiterCount, int blockSize = 0x1000 / sizeof(C)> // windows file block size
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
struct InfoForExtension
|
struct InfoForExtension
|
||||||
{
|
{
|
||||||
const char* name;
|
const char* name;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include <winhttp.h>
|
#include <winhttp.h>
|
||||||
|
|
||||||
using InternetHandle = AutoHandle<Functor<WinHttpCloseHandle>>;
|
using InternetHandle = AutoHandle<Functor<WinHttpCloseHandle>>;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include "common.h"
|
|
||||||
#include <Psapi.h>
|
#include <Psapi.h>
|
||||||
|
|
||||||
inline std::optional<std::wstring> GetModuleFilename(DWORD processId, HMODULE module = NULL)
|
inline std::optional<std::wstring> GetModuleFilename(DWORD processId, HMODULE module = NULL)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
|
|
||||||
class WinMutex // Like CMutex but works with scoped_lock
|
class WinMutex // Like CMutex but works with scoped_lock
|
||||||
|
@ -4,4 +4,6 @@ find_qt5(Core Widgets)
|
|||||||
|
|
||||||
add_executable(Test WIN32 main.cpp resource.rc)
|
add_executable(Test WIN32 main.cpp resource.rc)
|
||||||
|
|
||||||
|
target_precompile_headers(Test REUSE_FROM pch)
|
||||||
|
|
||||||
target_link_libraries(Test Qt5::Widgets)
|
target_link_libraries(Test Qt5::Widgets)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include "common.h"
|
#include "resource.h"
|
||||||
#include "resource.h"
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -28,5 +28,5 @@ set(texthook_src
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(texthook MODULE ${texthook_src})
|
add_library(texthook MODULE ${texthook_src})
|
||||||
|
target_precompile_headers(texthook REUSE_FROM pch)
|
||||||
target_link_libraries(texthook minhook)
|
target_link_libraries(texthook minhook)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
void SearchForText(wchar_t* text, UINT codepage);
|
void SearchForText(wchar_t* text, UINT codepage);
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
// 8/23/2013 jichi
|
// 8/23/2013 jichi
|
||||||
// Branch: ITH/IHF_DLL.h, rev 66
|
// Branch: ITH/IHF_DLL.h, rev 66
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
void TextOutput(ThreadParam tp, BYTE (*buffer)[PIPE_BUFFER_SIZE], int len);
|
void TextOutput(ThreadParam tp, BYTE (*buffer)[PIPE_BUFFER_SIZE], int len);
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
// 8/24/2013 TODO:
|
// 8/24/2013 TODO:
|
||||||
// - Clean up this file
|
// - Clean up this file
|
||||||
// - Reduce global variables. Use namespaces or singleton classes instead.
|
// - Reduce global variables. Use namespaces or singleton classes instead.
|
||||||
#include "common.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
// Artikash 6/17/2019 TODO: These have the wrong values on x64
|
// Artikash 6/17/2019 TODO: These have the wrong values on x64
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
// util.h
|
// util.h
|
||||||
// 8/23/2013 jichi
|
// 8/23/2013 jichi
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
namespace Util {
|
namespace Util {
|
||||||
|
|
||||||
bool unloadCurrentModule();
|
bool unloadCurrentModule();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user