mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-12-24 20:24:13 +08:00
中文界面
This commit is contained in:
parent
476918a846
commit
b35ba81487
@ -28,9 +28,15 @@ else()
|
||||
set(bitappendix "32")
|
||||
endif()
|
||||
|
||||
set(CMAKE_FINAL_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/builds/${CMAKE_BUILD_TYPE}_x${bitappendix})
|
||||
set(binary_out_putpath ${CMAKE_SOURCE_DIR}/builds/${CMAKE_BUILD_TYPE})
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY $<1:${CMAKE_FINAL_OUTPUT_DIRECTORY}>)
|
||||
if(NOT DEFINED LANGUAGE)
|
||||
set(LANGUAGE English)
|
||||
endif()
|
||||
|
||||
add_definitions(-DLANGUAGE=${LANGUAGE})
|
||||
|
||||
set(CMAKE_FINAL_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/builds/${CMAKE_BUILD_TYPE}_x${bitappendix}_${LANGUAGE})
|
||||
set(binary_out_putpath ${CMAKE_SOURCE_DIR}/builds/${CMAKE_BUILD_TYPE}_${LANGUAGE})
|
||||
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY $<1:${CMAKE_FINAL_OUTPUT_DIRECTORY}>)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY $<1:${binary_out_putpath}>)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${binary_out_putpath}>)
|
||||
|
||||
|
12
Lang/Lang.h
12
Lang/Lang.h
@ -1,2 +1,14 @@
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4005)
|
||||
|
||||
#define English 0
|
||||
#define Chinese 1
|
||||
|
||||
#include"en.h"
|
||||
|
||||
#if (LANGUAGE == Chinese)
|
||||
#include"zh.h"
|
||||
#endif
|
||||
|
||||
|
||||
#pragma warning(pop)
|
@ -3,8 +3,6 @@
|
||||
#define NEED_32_BIT L"architecture mismatch: only x86 can inject this process"
|
||||
#define NEED_64_BIT L"architecture mismatch: only x64 can inject this process"
|
||||
#define INJECT_FAILED L"couldn't inject"
|
||||
#define LAUNCH_FAILED L"couldn't launch"
|
||||
#define INVALID_CODE L"invalid code"
|
||||
#define INVALID_CODEPAGE L"couldn't convert text (invalid codepage?)"
|
||||
#define PIPE_CONNECTED u8"pipe connected"
|
||||
#define INSERTING_HOOK u8"inserting hook: %s"
|
||||
@ -31,13 +29,11 @@
|
||||
#define InsertHookFailed u8"failed to insert hook %s"
|
||||
#define Match_Error u8"ERROR happened when matching engine %s "
|
||||
#define Attach_Error u8"ERROR happened when attaching engine %s ERROR"
|
||||
#define Attach_Continue u8"Attach engine %s success and continue"
|
||||
#define MatchedEngine u8"Matched engine %s"
|
||||
#define ConfirmStop "Confirmed engine %s, stop checking"
|
||||
#define Attach_Stop "Attach engine %s success and stop"
|
||||
#define ProcessRange "hijacking process located from 0x%p to 0x%p"
|
||||
#define WarningDummy "WARNING injected process is very small, possibly a dummy!"
|
||||
#define HijackERROR "Hijack ERROR"
|
||||
#define WndSelectProcess L"SelectProcess"
|
||||
#define WndLunaHostGui L"LunaHost Gui"
|
||||
#define WndSetting L"Setting"
|
||||
|
64
Lang/zh.h
Normal file
64
Lang/zh.h
Normal file
@ -0,0 +1,64 @@
|
||||
|
||||
#define ALREADY_INJECTED L"已经注入"
|
||||
#define NEED_32_BIT L"架构不匹配: 请尝试使用32位注入此进程"
|
||||
#define NEED_64_BIT L"架构不匹配: 请尝试使用64位注入此进程"
|
||||
#define INJECT_FAILED L"注入失败"
|
||||
#define INVALID_CODEPAGE L"无法转换文本 (无效的代码页?)"
|
||||
#define PIPE_CONNECTED u8"管道已连接"
|
||||
#define INSERTING_HOOK u8"注入钩子: %s"
|
||||
#define REMOVING_HOOK u8"移除钩子: %s"
|
||||
#define TOO_MANY_HOOKS u8"钩子数量已达上限: 无法注入"
|
||||
#define HOOK_SEARCH_STARTING u8"开始搜索钩子"
|
||||
#define HOOK_SEARCH_INITIALIZING u8"初始化钩子搜索 (%f%%)"
|
||||
#define NOT_ENOUGH_TEXT u8"文本长度不足, 无法精确搜索"
|
||||
#define HOOK_SEARCH_INITIALIZED u8"搜索初始化完成, 创建了 %zd 个钩子"
|
||||
#define MAKE_GAME_PROCESS_TEXT u8"请点击游戏区域, 在接下来的 %d 秒内使游戏强制处理文本"
|
||||
#define HOOK_SEARCH_FINISHED u8"钩子搜索完毕, 找到了 %d 条结果"
|
||||
#define OUT_OF_RECORDS_RETRY u8"搜索结果已达上限, 如果结果不理想, 请重试(默认最大记录数增加)"
|
||||
#define FUNC_MISSING u8"函数不存在"
|
||||
#define MODULE_MISSING u8"模块不存在"
|
||||
#define GARBAGE_MEMORY u8"内存一直在改变,无法有效读取"
|
||||
#define SEND_ERROR u8"Sender 错误 (可能是由于错误或不稳定的 H-code) : %s"
|
||||
#define READ_ERROR u8"Reader 错误 (可能是由于错误或不稳定的 R-code) : %s"
|
||||
#define SearchForHooks_ERROR u8"搜索钩子错误 : 内存移除,尝试重新分配 %d"
|
||||
#define ResultsNum u8"%d 个结果被找到"
|
||||
#define HIJACK_ERROR u8"Hijack 错误"
|
||||
#define COULD_NOT_FIND u8"无法找到文本"
|
||||
#define CONSOLE L"控制台"
|
||||
#define InvalidLength u8"可能存在错误 (无效的文本长度 %d 出现在Hook地址 %I64d)"
|
||||
#define InsertHookFailed u8"钩子注入失败 %s"
|
||||
#define Match_Error u8"匹配 %s 引擎时发生错误"
|
||||
#define Attach_Error u8"连接到 %s 引擎时发送错误"
|
||||
#define MatchedEngine u8"匹配到 %s 引擎"
|
||||
#define ConfirmStop u8"确认是 %s 引擎, 停止匹配"
|
||||
#define Attach_Stop u8"成功连接到 %s 引擎"
|
||||
#define ProcessRange u8"获取到进程内存地址范围 0x%p 到 0x%p"
|
||||
#define WarningDummy u8"警告,注入的进程内存很小,可能是无用进程!"
|
||||
#define WndSelectProcess L"选择进程"
|
||||
#define WndLunaHostGui L"LunaHost Gui"
|
||||
#define WndSetting L"设置"
|
||||
#define WndPlugins L"插件"
|
||||
#define NotifyInvalidHookCode L"特殊码无效"
|
||||
#define BtnSelectProcess L"选择进程"
|
||||
#define BtnShowSettingWindow L"设置"
|
||||
#define BtnAttach L"注入进程"
|
||||
#define BtnRefresh L"刷新"
|
||||
#define BtnToClipboard L"复制到剪贴板"
|
||||
#define BtnInsertUserHook L"插入特殊码"
|
||||
#define BtnPlugin L"插件"
|
||||
#define LblFlushDelay L"刷新延迟"
|
||||
#define LblFilterRepeat L"过滤重复"
|
||||
#define LblCodePage L"默认代码页"
|
||||
#define MenuCopyHookCode L"复制特殊码"
|
||||
#define MenuRemoveHook L"移除钩子"
|
||||
#define MenuDetachProcess L"离开进程"
|
||||
#define MenuAddPlugin L"添加插件"
|
||||
#define MenuAddQtPlugin L"添加依赖Qt的插件"
|
||||
#define MenuRemovePlugin L"移除插件"
|
||||
#define MenuPluginRankUp L"上移"
|
||||
#define MenuPluginRankDown L"下移"
|
||||
#define DefaultFont L"微软雅黑"
|
||||
#define InVaildPlugin L"无效的插件"
|
||||
#define CantLoadQtLoader L"无法加载QtLoader.dll"
|
||||
#define LblPluginNotify L"依赖于Qt的插件仅会在启动时载入。"
|
||||
#define LblPluginRemove L"移除插件要在重启后生效。"
|
@ -92,7 +92,6 @@ bool checkengine(){
|
||||
if(matched==false)continue;
|
||||
ConsoleOutput(MatchedEngine,m->getenginename());
|
||||
if(m->dontstop){
|
||||
ConsoleOutput(Attach_Continue,m->getenginename());
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -132,7 +131,7 @@ void Hijack(){
|
||||
__try {
|
||||
result = checkengine();
|
||||
}
|
||||
__except (EXCEPTION_EXECUTE_HANDLER) { ConsoleOutput(HijackERROR); }
|
||||
__except (EXCEPTION_EXECUTE_HANDLER) { ConsoleOutput(HIJACK_ERROR); }
|
||||
|
||||
|
||||
if(result==false){
|
||||
|
@ -29,7 +29,8 @@ void LunaHost::on_close(){
|
||||
for(auto pid:attachedprocess){
|
||||
Host::DetachProcess(pid);
|
||||
}
|
||||
Sleep(100);
|
||||
if(attachedprocess.size())
|
||||
Sleep(100);
|
||||
}
|
||||
void LunaHost::on_size(int w,int h){
|
||||
int height = h-140;
|
||||
|
@ -1,2 +1,5 @@
|
||||
cmake ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86
|
||||
cmake --build ../build/x86 --config Release --target ALL_BUILD -j 14
|
||||
|
||||
cmake -DLANGUAGE=Chinese ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86_zh
|
||||
cmake --build ../build/x86_zh --config Release --target ALL_BUILD -j 14
|
@ -1,2 +1,5 @@
|
||||
cmake ../CMakeLists.txt -G "Visual Studio 17 2022" -A x64 -T host=x64 -B ../build/x64
|
||||
cmake --build ../build/x64 --config Release --target ALL_BUILD -j 14
|
||||
|
||||
cmake -DLANGUAGE=Chinese ../CMakeLists.txt -G "Visual Studio 17 2022" -A x64 -T host=x64 -B ../build/x64_zh
|
||||
cmake --build ../build/x64_zh --config Release --target ALL_BUILD -j 14
|
||||
|
Loading…
x
Reference in New Issue
Block a user