diff --git a/cpp/LunaOCR/CMakeLists.txt b/cpp/LunaOCR/CMakeLists.txt index 87734ac0..a5f34d40 100644 --- a/cpp/LunaOCR/CMakeLists.txt +++ b/cpp/LunaOCR/CMakeLists.txt @@ -16,9 +16,3 @@ find_package(OpenCV REQUIRED) add_library(LunaOCR SHARED OCR.cpp ${versioninfo}) target_link_libraries(LunaOCR ${OnnxRuntime_LIBS} ${OpenCV_LIBS} Clipper2Lib) target_precompile_headers(LunaOCR REUSE_FROM pch) - -if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) - set_target_properties(LunaOCR PROPERTIES OUTPUT_NAME "LunaOCR64") -else() - set_target_properties(LunaOCR PROPERTIES OUTPUT_NAME "LunaOCR32") -endif() \ No newline at end of file diff --git a/cpp/winrtutils/CMakeLists.txt b/cpp/winrtutils/CMakeLists.txt index 6dca040b..90f484af 100644 --- a/cpp/winrtutils/CMakeLists.txt +++ b/cpp/winrtutils/CMakeLists.txt @@ -12,10 +12,4 @@ generate_product_version( add_library(winrtutils MODULE winrtsnapshot.cpp winrtocr.cpp ${versioninfo}) target_precompile_headers(winrtutils REUSE_FROM pch) -target_link_libraries(winrtutils wil dwmapi) -if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) - set_target_properties(winrtutils PROPERTIES OUTPUT_NAME "winrtutils64") -else() - set_target_properties(winrtutils PROPERTIES OUTPUT_NAME "winrtutils32") -endif() - +target_link_libraries(winrtutils wil dwmapi) \ No newline at end of file diff --git a/cpp/winsharedutils/CMakeLists.txt b/cpp/winsharedutils/CMakeLists.txt index 6b3db89f..943be92d 100644 --- a/cpp/winsharedutils/CMakeLists.txt +++ b/cpp/winsharedutils/CMakeLists.txt @@ -19,9 +19,4 @@ target_link_libraries(winsharedutils rapidfuzz wil webview2 Mfplat mfuuid Mmdeva target_link_options(winsharedutils PRIVATE "/DELAYLOAD:Mmdevapi.dll") target_link_options(winsharedutils PRIVATE "/DELAYLOAD:Mfplat.dll") else() -endif() -if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) - set_target_properties(winsharedutils PROPERTIES OUTPUT_NAME "winsharedutils64") -else() - set_target_properties(winsharedutils PROPERTIES OUTPUT_NAME "winsharedutils32") -endif() +endif() \ No newline at end of file diff --git a/py/LunaTranslator/ocrengines/local.py b/py/LunaTranslator/ocrengines/local.py index 1e9c0175..b9811e32 100644 --- a/py/LunaTranslator/ocrengines/local.py +++ b/py/LunaTranslator/ocrengines/local.py @@ -36,7 +36,7 @@ class ocrpoints(Structure): class ocrwrapper: def __init__(self, det, rec, key) -> None: - self.dll = CDLL(gobject.GetDllpath(("LunaOCR32.dll", "LunaOCR64.dll"))) + self.dll = CDLL(gobject.GetDllpath("LunaOCR.dll")) self.pOcrObj = None self.__OcrInit(det, rec, key) diff --git a/py/LunaTranslator/ocrengines/weixinocr.py b/py/LunaTranslator/ocrengines/weixinocr.py index 64b33d6c..d0fdab14 100644 --- a/py/LunaTranslator/ocrengines/weixinocr.py +++ b/py/LunaTranslator/ocrengines/weixinocr.py @@ -8,7 +8,7 @@ from traceback import print_exc class wcocr: def __init__(self): - self.wcocr = CDLL(gobject.GetDllpath(("wcocr.dll"))) + self.wcocr = CDLL(gobject.GetDllpath("wcocr.dll")) wcocr_init = self.wcocr.wcocr_init wcocr_init.argtypes = ( c_wchar_p, diff --git a/py/LunaTranslator/winrtutils.py b/py/LunaTranslator/winrtutils.py index d11763b5..a5095ae4 100644 --- a/py/LunaTranslator/winrtutils.py +++ b/py/LunaTranslator/winrtutils.py @@ -15,7 +15,7 @@ import platform, gobject, threading try: if platform.system() != "Windows" or int(platform.version().split(".")[0]) <= 6: raise Exception() - winrtutilsdll = CDLL(gobject.GetDllpath(("winrtutils32.dll", "winrtutils64.dll"))) + winrtutilsdll = CDLL(gobject.GetDllpath("winrtutils.dll")) except: winrtutilsdll = 0 diff --git a/py/LunaTranslator/winsharedutils.py b/py/LunaTranslator/winsharedutils.py index 9b792bfe..01521d1b 100644 --- a/py/LunaTranslator/winsharedutils.py +++ b/py/LunaTranslator/winsharedutils.py @@ -19,7 +19,7 @@ from ctypes import ( from ctypes.wintypes import WORD, HWND, DWORD, RECT, HANDLE import gobject, windows, functools -utilsdll = CDLL(gobject.GetDllpath(("winsharedutils32.dll", "winsharedutils64.dll"))) +utilsdll = CDLL(gobject.GetDllpath("winsharedutils.dll")) SetProcessMute = utilsdll.SetProcessMute diff --git a/py/files/defaultconfig/static_data.json b/py/files/defaultconfig/static_data.json index 49f9c472..9b8df0f6 100644 --- a/py/files/defaultconfig/static_data.json +++ b/py/files/defaultconfig/static_data.json @@ -1387,7 +1387,7 @@ "./files/plugins/shareddllproxy32.exe", "./files/plugins/LunaHook/LunaHook32.dll", "./files/plugins/LunaHook/LunaHost32.dll", - "./files/plugins/DLL32/winsharedutils32.dll", + "./files/plugins/DLL32/winsharedutils.dll", "./files/plugins/DLL32/libmecab.dll", "./files/plugins/DLL32/bass.dll", "./files/plugins/DLL32/bass_spx.dll", @@ -1403,9 +1403,9 @@ "./files/plugins/LunaHook/LunaHost64.dll" ], "64": [ - "./files/plugins/DLL64/winsharedutils64.dll", - "./files/plugins/DLL64/winrtutils64.dll", - "./files/plugins/DLL64/LunaOCR64.dll", + "./files/plugins/DLL64/winsharedutils.dll", + "./files/plugins/DLL64/winrtutils.dll", + "./files/plugins/DLL64/LunaOCR.dll", "./files/plugins/DLL64/libmecab.dll", "./files/plugins/DLL64/libcurl-x64.dll", "./files/plugins/DLL64/bass.dll", @@ -1415,9 +1415,9 @@ "./files/plugins/DLL64/brotlidec.dll" ], "32": [ - "./files/plugins/DLL32/winsharedutils32.dll", - "./files/plugins/DLL32/winrtutils32.dll", - "./files/plugins/DLL32/LunaOCR32.dll", + "./files/plugins/DLL32/winsharedutils.dll", + "./files/plugins/DLL32/winrtutils.dll", + "./files/plugins/DLL32/LunaOCR.dll", "./files/plugins/DLL32/libmecab.dll", "./files/plugins/DLL32/libcurl.dll", "./files/plugins/DLL32/bass.dll",