rearrange build for less confusion and to build CLI faster

This commit is contained in:
Akash Mozumdar 2021-11-13 13:38:32 -07:00
parent 46bc6ec84b
commit 15db478e62
22 changed files with 30 additions and 34 deletions

View File

@ -39,11 +39,8 @@ add_library(text text.cpp)
target_compile_definitions(text PRIVATE ${TEXT_LANGUAGE}) target_compile_definitions(text PRIVATE ${TEXT_LANGUAGE})
link_libraries(text) link_libraries(text)
add_subdirectory(GUI) add_subdirectory(host)
add_subdirectory(texthook) add_subdirectory(texthook)
add_subdirectory(GUI)
add_subdirectory(extensions) add_subdirectory(extensions)
add_subdirectory(test) add_subdirectory(test)
if (DEFINED VERSION)
add_subdirectory(GUI/host)
endif()
#add_subdirectory(GUI/host)

View File

@ -23,7 +23,7 @@ If you're on this list and want your link changed let me know.
- Korean translation by [O SK](mailto:afkl11@outlook.kr) - Korean translation by [O SK](mailto:afkl11@outlook.kr)
- Italian translation by [StarFang208](https://github.com/StarFang208) - Italian translation by [StarFang208](https://github.com/StarFang208)
- ITHVNR updated by [mireado](https://github.com/mireado), [Eguni](https://github.com/Eguni), and [IJEMIN](https://github.com/IJEMIN) - ITHVNR updated by [mireado](https://github.com/mireado), [Eguni](https://github.com/Eguni), and [IJEMIN](https://github.com/IJEMIN)
- ITHVNR originally made by [Stomp](https://web.archive.org/web/20160202084144/http://www.hongfire.com/forum/showthread.php/438331-ITHVNR-ITH-with-the-VNR-engine) - ITHVNR originally made by [Stomp](mailto:zorkzero@hotmail.com)
- VNR engine made by [jichi](https://github.com/jichifly) - VNR engine made by [jichi](https://github.com/jichifly)
- ITH updated by [Andys](https://github.com/AndyScull) - ITH updated by [Andys](https://github.com/AndyScull)
- ITH originally made by [kaosu](https://code.google.com/archive/p/interactive-text-hooker) - ITH originally made by [kaosu](https://code.google.com/archive/p/interactive-text-hooker)

View File

@ -7,15 +7,11 @@ add_executable(Textractor WIN32
mainwindow.cpp mainwindow.cpp
extenwindow.cpp extenwindow.cpp
attachprocessdialog.cpp attachprocessdialog.cpp
host/exception.cpp
host/host.cpp
host/textthread.cpp
host/hookcode.cpp
Textractor.rc Textractor.rc
Textractor.ico Textractor.ico
) )
target_precompile_headers(Textractor REUSE_FROM pch) target_precompile_headers(Textractor REUSE_FROM pch)
target_link_libraries(Textractor Qt5::Widgets Qt5::WinExtras shell32 winhttp) target_link_libraries(Textractor host Qt5::Widgets Qt5::WinExtras shell32 winhttp)
if (NOT EXISTS ${CMAKE_FINAL_OUTPUT_DIRECTORY}/Qt5Core.dll AND NOT EXISTS ${CMAKE_FINAL_OUTPUT_DIRECTORY}/Qt5Cored.dll) if (NOT EXISTS ${CMAKE_FINAL_OUTPUT_DIRECTORY}/Qt5Core.dll AND NOT EXISTS ${CMAKE_FINAL_OUTPUT_DIRECTORY}/Qt5Cored.dll)
add_custom_command(TARGET Textractor add_custom_command(TARGET Textractor

View File

@ -3,8 +3,8 @@
#include "defs.h" #include "defs.h"
#include "module.h" #include "module.h"
#include "extenwindow.h" #include "extenwindow.h"
#include "host/host.h" #include "../host/host.h"
#include "host/hookcode.h" #include "../host/hookcode.h"
#include "attachprocessdialog.h" #include "attachprocessdialog.h"
#include <shellapi.h> #include <shellapi.h>
#include <process.h> #include <process.h>

View File

@ -4,7 +4,7 @@
[English](README.md) ● [Español](README_ES.md) ● [简体中文](README_SC.md) ● [Русский](README_RU.md) ● [한국어](README_KR.md) ● [ภาษาไทย](README_TH.md) ● [Français](README_FR.md) ● [Italiano](README_IT.md) ● [日本語](README_JP.md) ● [Bahasa](README_ID.md) ● [Português](README_PT.md) [English](README.md) ● [Español](README_ES.md) ● [简体中文](README_SC.md) ● [Русский](README_RU.md) ● [한국어](README_KR.md) ● [ภาษาไทย](README_TH.md) ● [Français](README_FR.md) ● [Italiano](README_IT.md) ● [日本語](README_JP.md) ● [Bahasa](README_ID.md) ● [Português](README_PT.md)
**Textractor** (a.k.a. NextHooker) is an open-source x86/x64 video game text hooker for Windows/Wine based off of [ITHVNR](https://web.archive.org/web/20160202084144/http://www.hongfire.com/forum/showthread.php/438331-ITHVNR-ITH-with-the-VNR-engine).<br> **Textractor** (a.k.a. NextHooker) is an open-source x86/x64 video game text hooker for Windows 7+ (and Wine) based off of [ITHVNR](https://web.archive.org/web/20160202084144/http://www.hongfire.com/forum/showthread.php/438331-ITHVNR-ITH-with-the-VNR-engine).<br>
Watch the [tutorial video](https://tinyurl.com/textractor-tutorial) for a quick rundown on using it. Watch the [tutorial video](https://tinyurl.com/textractor-tutorial) for a quick rundown on using it.
## Download ## Download
@ -23,8 +23,8 @@ Try running vcredist if you get an error when starting Textractor or if nothing
## Support ## Support
Please let me know of any bugs, games that Textractor has trouble hooking, feature requests, or other suggestions.<br> Let me know of any bugs, games that Textractor has trouble hooking, feature requests, or other suggestions by posting an issue.<br>
If you have trouble hooking a game, give me a place where I can freely download it, or gift it to me on [Steam](https://steamcommunity.com/profiles/76561198097566313/). If you have trouble hooking a game, please show me a way to freely download it or gift it to me on [Steam](https://steamcommunity.com/profiles/76561198097566313/).
## Extensions ## Extensions
@ -44,8 +44,7 @@ You should then be able to just open the source folder in Visual Studio and buil
## Project Architecture ## Project Architecture
The host (see GUI/host folder) injects texthook.dll (created from the texthook folder) into the target process and connects to it via 2 pipe files.<br> The host injects texthook into the target process and connects to it via 2 pipe files.
Host writes to hostPipe, texthook writes to hookPipe.<br>
texthook waits for the pipe to be connected, then injects a few instructions into any text outputting functions (e.g. TextOut, GetGlyphOutline) that cause their input to be sent through the pipe.<br> texthook waits for the pipe to be connected, then injects a few instructions into any text outputting functions (e.g. TextOut, GetGlyphOutline) that cause their input to be sent through the pipe.<br>
Additional information about hooks is exchanged via shared memory.<br> Additional information about hooks is exchanged via shared memory.<br>
The text that the host receives through the pipe is then processed a little before being dispatched back to the GUI.<br> The text that the host receives through the pipe is then processed a little before being dispatched back to the GUI.<br>

View File

@ -47,7 +47,7 @@ Lalu kamu dapat membuka folder di Visual Studio, dan build. Run Textractor.exe.
## Arsitektur Project ## Arsitektur Project
Host (lihat folder GUI/host) menginject texthook.dll (dibuat dari folder texthook) kedalam target process dan disambungkan lewat 2 file pipe.<br> Host (lihat folder host) menginject texthook.dll (dibuat dari folder texthook) kedalam target process dan disambungkan lewat 2 file pipe.<br>
Host menulis ke hostPipe, texthook menulis ke hookPipe.<br> Host menulis ke hostPipe, texthook menulis ke hookPipe.<br>
texthook menunggu pipe tersambung, lalu menginject beberapa instruksi ke teks yang menghasilkan fungsi (contoh: TextOut, GetGlyphOutline) yang membuat input dikirim melewati pipa.<br> texthook menunggu pipe tersambung, lalu menginject beberapa instruksi ke teks yang menghasilkan fungsi (contoh: TextOut, GetGlyphOutline) yang membuat input dikirim melewati pipa.<br>
Informasi tambahan tentang hook dipindahkan melewati shared memory.<br> Informasi tambahan tentang hook dipindahkan melewati shared memory.<br>

View File

@ -43,7 +43,7 @@ Dovresti essere in grado di aprire la cartella in Visual Studio, e costruire. Av
## Architettura del progetto ## Architettura del progetto
L'host (guarda la cartella GUI/host) innietta texthook.dll (creato dalla cartella texthook) nel processo e lo connette attraverso due file pipe.<br> L'host (guarda la cartella host) innietta texthook.dll (creato dalla cartella texthook) nel processo e lo connette attraverso due file pipe.<br>
L'host scrive a hostPipe, texthook scrive a hookPipe.<br> L'host scrive a hostPipe, texthook scrive a hookPipe.<br>
Texthook aspetta per il pipe di essere connesso, poi innietta alcune istruzione in qualunque funzione di immissione del testo (es. TextOut, GetGlyphOutline) che causa il loro input di essere inviato attraverso il pipe.<br> Texthook aspetta per il pipe di essere connesso, poi innietta alcune istruzione in qualunque funzione di immissione del testo (es. TextOut, GetGlyphOutline) che causa il loro input di essere inviato attraverso il pipe.<br>
Informazioni aggiuntive sui ganci soo scambiati attraverso la memorio condivisa.<br> Informazioni aggiuntive sui ganci soo scambiati attraverso la memorio condivisa.<br>

View File

@ -41,7 +41,7 @@ Textractor 실행오류를 겪는다면 vcredist를 실행해 보시기 바랍
## 프로젝트 아키텍쳐 ## 프로젝트 아키텍쳐
The host (see GUI/host folder) injects texthook.dll (created from the texthook folder) into the target process and connects to it via 2 pipe files.<br> The host (see host folder) injects texthook.dll (created from the texthook folder) into the target process and connects to it via 2 pipe files.<br>
Host writes to hostPipe, texthook writes to hookPipe.<br> Host writes to hostPipe, texthook writes to hookPipe.<br>
texthook waits for the pipe to be connected, then injects a few instructions into any text outputting functions (e.g. TextOut, GetGlyphOutline) that cause their input to be sent through the pipe.<br> texthook waits for the pipe to be connected, then injects a few instructions into any text outputting functions (e.g. TextOut, GetGlyphOutline) that cause their input to be sent through the pipe.<br>
Additional information about hooks is exchanged via shared memory.<br> Additional information about hooks is exchanged via shared memory.<br>

View File

@ -43,7 +43,7 @@ Você deverá então ser capaz de simplesmente abrir uma pasta no Visual Studio
## Arquitetura do Projeto ## Arquitetura do Projeto
O host (veja a pasta GUI/host) injeta o texthook.dll (criado a partir da pasta texthook) dentro do processo-alvo e se conecta a ele por meio de 2 arquivos pipe.<br> O host (veja a pasta host) injeta o texthook.dll (criado a partir da pasta texthook) dentro do processo-alvo e se conecta a ele por meio de 2 arquivos pipe.<br>
O Host escreve para hostPipe, o texthook escreve para hookPipe.<br> O Host escreve para hostPipe, o texthook escreve para hookPipe.<br>
O texthook espera pelo pipe estar conectado e então injeta algumas intruções dentro de quaisquer funções que produzam texto (por exemplo: TextOut, GetGlyphOutline) o que faz com que seu produto seja mandado por meio do pipe.<br> O texthook espera pelo pipe estar conectado e então injeta algumas intruções dentro de quaisquer funções que produzam texto (por exemplo: TextOut, GetGlyphOutline) o que faz com que seu produto seja mandado por meio do pipe.<br>
Informação adicional sobre os hooks é trocada por meio da memória compartilhada.<br> Informação adicional sobre os hooks é trocada por meio da memória compartilhada.<br>

View File

@ -43,7 +43,7 @@
## Архитектура проекта ## Архитектура проекта
Хост (смотрите папку GUI/host) внедряет texthook.dll (созданной из папки texthook) в целевой процесс и подключается к нему через два файла-канала (pipe).<br> Хост (смотрите папку host) внедряет texthook.dll (созданной из папки texthook) в целевой процесс и подключается к нему через два файла-канала (pipe).<br>
Хост пишет в hostPipe, texthook пишет в hookPipe.<br> Хост пишет в hostPipe, texthook пишет в hookPipe.<br>
texthook ждет присоединения канала, тогда внедряет некоторые инструкции в любые выводящие текст функции (такие как TextOut, GetGlyphOutline), что вызывает пересылку поступающего в них текста через канал.<br> texthook ждет присоединения канала, тогда внедряет некоторые инструкции в любые выводящие текст функции (такие как TextOut, GetGlyphOutline), что вызывает пересылку поступающего в них текста через канал.<br>
Дополнительная информация о хуках размещена через файл просмотра (a.k.a. section object), который сопоставлен с ссылкой на класс TextHook.<br> Дополнительная информация о хуках размещена через файл просмотра (a.k.a. section object), который сопоставлен с ссылкой на класс TextHook.<br>

View File

@ -39,7 +39,7 @@ Textractor 的发行版可以在[这里](https://github.com/Artikash/Textractor/
## 项目架构 ## 项目架构
宿主 (位于 GUI/host 文件夹) 向目标进程注入 texthook.dll (由 texthook 文件夹创建) 并通过两个管道文件互联.<br> 宿主 (位于 host 文件夹) 向目标进程注入 texthook.dll (由 texthook 文件夹创建) 并通过两个管道文件互联.<br>
宿主向 hostPipe 写入, texthook 向 hookPipe 写入.<br> 宿主向 hostPipe 写入, texthook 向 hookPipe 写入.<br>
texthook 等待管道连接, 之后向一些文本输出函数 (如 TextOut, GetGlyphOutline) 注入一系列指令, 使得它们的输入被沿着管道发送.<br> texthook 等待管道连接, 之后向一些文本输出函数 (如 TextOut, GetGlyphOutline) 注入一系列指令, 使得它们的输入被沿着管道发送.<br>
其它关于钩子的信息通过一个被 TextHook 类保有引用的文件视图 (曾用名: 段对象) 共享.<br> 其它关于钩子的信息通过一个被 TextHook 类保有引用的文件视图 (曾用名: 段对象) 共享.<br>

View File

@ -38,7 +38,7 @@ ITHVNR รุ่นสุดท้ายสามารถดาวน์โห
## โครงสร้างโปรแกรม ## โครงสร้างโปรแกรม
ฐานของโปรแกรม (โฟลเดอร์ GUI/host) ส่งข้อมูลจาก texthook.dll (ที่ถูกสร้างจาก texthook โฟลเดอร์) ไปยังเกมเป้าหมาย และ เชื่อมทั่งสองอย่างเข้าด้วยกัน<br> ฐานของโปรแกรม (โฟลเดอร์ host) ส่งข้อมูลจาก texthook.dll (ที่ถูกสร้างจาก texthook โฟลเดอร์) ไปยังเกมเป้าหมาย และ เชื่อมทั่งสองอย่างเข้าด้วยกัน<br>
ฐานโปรแกรมเขียนผ่านฝั่ง hostPipe(ท่อเชื่อมฝั่งฐานข้อมูล) ในขณะที่ตัวดึงตัวอักษรที่ทางฝั่ง hookPipe(ท่อเชื่อมฝั่งดึงข้อมูล).<br> ฐานโปรแกรมเขียนผ่านฝั่ง hostPipe(ท่อเชื่อมฝั่งฐานข้อมูล) ในขณะที่ตัวดึงตัวอักษรที่ทางฝั่ง hookPipe(ท่อเชื่อมฝั่งดึงข้อมูล).<br>
ตัวดึงตัวอักษรรอการเชื่อมเข้ากับของทั่งสองท่อ หลังจากนั่นส่งคำสั่งไปยังข้อมูลนั่น (เช่น แสดงผลข้อมูล เป็นต้น) และทำให้ข้อมูลส่งผ่านต่อมาออกมาได้ถูกต้อง<br> ตัวดึงตัวอักษรรอการเชื่อมเข้ากับของทั่งสองท่อ หลังจากนั่นส่งคำสั่งไปยังข้อมูลนั่น (เช่น แสดงผลข้อมูล เป็นต้น) และทำให้ข้อมูลส่งผ่านต่อมาออกมาได้ถูกต้อง<br>
ข้อมูลบางอย่างเกี่ยวกับการเชื่อมจะถูกแลกเปลี่ยนผ่านความทรงจำของระบบ (shared memory) ข้อมูลบางอย่างเกี่ยวกับการเชื่อมจะถูกแลกเปลี่ยนผ่านความทรงจำของระบบ (shared memory)

9
host/CMakeLists.txt Normal file
View File

@ -0,0 +1,9 @@
add_library(host
exception.cpp
host.cpp
textthread.cpp
hookcode.cpp
)
target_precompile_headers(host REUSE_FROM pch)
add_subdirectory(cli)

View File

@ -1,9 +1,4 @@
# The CLI isn't used by Textractor itself, but is here for other people that want to build projects on top of Textractor # The CLI isn't used by Textractor itself, but is here for other people that want to build projects on top of Textractor
add_executable(TextractorCLI add_executable(TextractorCLI main.cpp)
cli.cpp
exception.cpp
host.cpp
textthread.cpp
hookcode.cpp
)
target_precompile_headers(TextractorCLI REUSE_FROM pch) target_precompile_headers(TextractorCLI REUSE_FROM pch)
target_link_libraries(TextractorCLI host)

View File

@ -1,5 +1,5 @@
#include "host.h" #include "../host.h"
#include "hookcode.h" #include "../hookcode.h"
#include <io.h> #include <io.h>
#include <fcntl.h> #include <fcntl.h>
#include <iostream> #include <iostream>