mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-12 23:23:54 +08:00
.
This commit is contained in:
parent
26366fdb88
commit
6c1c024804
@ -16,9 +16,3 @@ find_package(OpenCV REQUIRED)
|
|||||||
add_library(LunaOCR SHARED OCR.cpp ${versioninfo})
|
add_library(LunaOCR SHARED OCR.cpp ${versioninfo})
|
||||||
target_link_libraries(LunaOCR ${OnnxRuntime_LIBS} ${OpenCV_LIBS} Clipper2Lib)
|
target_link_libraries(LunaOCR ${OnnxRuntime_LIBS} ${OpenCV_LIBS} Clipper2Lib)
|
||||||
target_precompile_headers(LunaOCR REUSE_FROM pch)
|
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()
|
|
@ -12,10 +12,4 @@ generate_product_version(
|
|||||||
|
|
||||||
add_library(winrtutils MODULE winrtsnapshot.cpp winrtocr.cpp ${versioninfo})
|
add_library(winrtutils MODULE winrtsnapshot.cpp winrtocr.cpp ${versioninfo})
|
||||||
target_precompile_headers(winrtutils REUSE_FROM pch)
|
target_precompile_headers(winrtutils REUSE_FROM pch)
|
||||||
target_link_libraries(winrtutils wil dwmapi)
|
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()
|
|
||||||
|
|
@ -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:Mmdevapi.dll")
|
||||||
target_link_options(winsharedutils PRIVATE "/DELAYLOAD:Mfplat.dll")
|
target_link_options(winsharedutils PRIVATE "/DELAYLOAD:Mfplat.dll")
|
||||||
else()
|
else()
|
||||||
endif()
|
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()
|
|
@ -36,7 +36,7 @@ class ocrpoints(Structure):
|
|||||||
|
|
||||||
class ocrwrapper:
|
class ocrwrapper:
|
||||||
def __init__(self, det, rec, key) -> None:
|
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.pOcrObj = None
|
||||||
self.__OcrInit(det, rec, key)
|
self.__OcrInit(det, rec, key)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ from traceback import print_exc
|
|||||||
|
|
||||||
class wcocr:
|
class wcocr:
|
||||||
def __init__(self):
|
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 = self.wcocr.wcocr_init
|
||||||
wcocr_init.argtypes = (
|
wcocr_init.argtypes = (
|
||||||
c_wchar_p,
|
c_wchar_p,
|
||||||
|
@ -15,7 +15,7 @@ import platform, gobject, threading
|
|||||||
try:
|
try:
|
||||||
if platform.system() != "Windows" or int(platform.version().split(".")[0]) <= 6:
|
if platform.system() != "Windows" or int(platform.version().split(".")[0]) <= 6:
|
||||||
raise Exception()
|
raise Exception()
|
||||||
winrtutilsdll = CDLL(gobject.GetDllpath(("winrtutils32.dll", "winrtutils64.dll")))
|
winrtutilsdll = CDLL(gobject.GetDllpath("winrtutils.dll"))
|
||||||
except:
|
except:
|
||||||
winrtutilsdll = 0
|
winrtutilsdll = 0
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ from ctypes import (
|
|||||||
from ctypes.wintypes import WORD, HWND, DWORD, RECT, HANDLE
|
from ctypes.wintypes import WORD, HWND, DWORD, RECT, HANDLE
|
||||||
import gobject, windows, functools
|
import gobject, windows, functools
|
||||||
|
|
||||||
utilsdll = CDLL(gobject.GetDllpath(("winsharedutils32.dll", "winsharedutils64.dll")))
|
utilsdll = CDLL(gobject.GetDllpath("winsharedutils.dll"))
|
||||||
|
|
||||||
|
|
||||||
SetProcessMute = utilsdll.SetProcessMute
|
SetProcessMute = utilsdll.SetProcessMute
|
||||||
|
@ -1387,7 +1387,7 @@
|
|||||||
"./files/plugins/shareddllproxy32.exe",
|
"./files/plugins/shareddllproxy32.exe",
|
||||||
"./files/plugins/LunaHook/LunaHook32.dll",
|
"./files/plugins/LunaHook/LunaHook32.dll",
|
||||||
"./files/plugins/LunaHook/LunaHost32.dll",
|
"./files/plugins/LunaHook/LunaHost32.dll",
|
||||||
"./files/plugins/DLL32/winsharedutils32.dll",
|
"./files/plugins/DLL32/winsharedutils.dll",
|
||||||
"./files/plugins/DLL32/libmecab.dll",
|
"./files/plugins/DLL32/libmecab.dll",
|
||||||
"./files/plugins/DLL32/bass.dll",
|
"./files/plugins/DLL32/bass.dll",
|
||||||
"./files/plugins/DLL32/bass_spx.dll",
|
"./files/plugins/DLL32/bass_spx.dll",
|
||||||
@ -1403,9 +1403,9 @@
|
|||||||
"./files/plugins/LunaHook/LunaHost64.dll"
|
"./files/plugins/LunaHook/LunaHost64.dll"
|
||||||
],
|
],
|
||||||
"64": [
|
"64": [
|
||||||
"./files/plugins/DLL64/winsharedutils64.dll",
|
"./files/plugins/DLL64/winsharedutils.dll",
|
||||||
"./files/plugins/DLL64/winrtutils64.dll",
|
"./files/plugins/DLL64/winrtutils.dll",
|
||||||
"./files/plugins/DLL64/LunaOCR64.dll",
|
"./files/plugins/DLL64/LunaOCR.dll",
|
||||||
"./files/plugins/DLL64/libmecab.dll",
|
"./files/plugins/DLL64/libmecab.dll",
|
||||||
"./files/plugins/DLL64/libcurl-x64.dll",
|
"./files/plugins/DLL64/libcurl-x64.dll",
|
||||||
"./files/plugins/DLL64/bass.dll",
|
"./files/plugins/DLL64/bass.dll",
|
||||||
@ -1415,9 +1415,9 @@
|
|||||||
"./files/plugins/DLL64/brotlidec.dll"
|
"./files/plugins/DLL64/brotlidec.dll"
|
||||||
],
|
],
|
||||||
"32": [
|
"32": [
|
||||||
"./files/plugins/DLL32/winsharedutils32.dll",
|
"./files/plugins/DLL32/winsharedutils.dll",
|
||||||
"./files/plugins/DLL32/winrtutils32.dll",
|
"./files/plugins/DLL32/winrtutils.dll",
|
||||||
"./files/plugins/DLL32/LunaOCR32.dll",
|
"./files/plugins/DLL32/LunaOCR.dll",
|
||||||
"./files/plugins/DLL32/libmecab.dll",
|
"./files/plugins/DLL32/libmecab.dll",
|
||||||
"./files/plugins/DLL32/libcurl.dll",
|
"./files/plugins/DLL32/libcurl.dll",
|
||||||
"./files/plugins/DLL32/bass.dll",
|
"./files/plugins/DLL32/bass.dll",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user