mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-14 16:33:54 +08:00
...
This commit is contained in:
parent
ce8395f6a4
commit
b976c5ab32
2
.gitignore
vendored
2
.gitignore
vendored
@ -31,3 +31,5 @@ src/files/plugins
|
|||||||
src/files/themes
|
src/files/themes
|
||||||
src/run37.bat
|
src/run37.bat
|
||||||
src/run3732.bat
|
src/run3732.bat
|
||||||
|
src/plugins/builds
|
||||||
|
src/plugins/libs/webview2
|
@ -10,7 +10,7 @@ from ctypes import (
|
|||||||
POINTER,
|
POINTER,
|
||||||
c_char,
|
c_char,
|
||||||
)
|
)
|
||||||
import platform, gobject
|
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:
|
||||||
@ -43,13 +43,19 @@ if winrtutilsdll:
|
|||||||
def cb(x1, y1, x2, y2, text):
|
def cb(x1, y1, x2, y2, text):
|
||||||
ret.append((text, x1, y1, x2, y2))
|
ret.append((text, x1, y1, x2, y2))
|
||||||
|
|
||||||
_OCR_f(
|
t = threading.Thread(
|
||||||
|
target=_OCR_f,
|
||||||
|
args=(
|
||||||
data,
|
data,
|
||||||
len(data),
|
len(data),
|
||||||
lang,
|
lang,
|
||||||
space,
|
space,
|
||||||
CFUNCTYPE(None, c_uint, c_uint, c_uint, c_uint, c_wchar_p)(cb),
|
CFUNCTYPE(None, c_uint, c_uint, c_uint, c_uint, c_wchar_p)(cb),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
t.start()
|
||||||
|
t.join()
|
||||||
|
# 如果不这样,就会在在ui线程执行时,BitmapDecoder::CreateAsync(memoryStream).get()等Async函数会导致阻塞卡住。
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
_winrt_capture_window = winrtutilsdll.winrt_capture_window
|
_winrt_capture_window = winrtutilsdll.winrt_capture_window
|
||||||
|
@ -23,7 +23,7 @@ mylinks = {
|
|||||||
"mecab.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/mecab.zip",
|
"mecab.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/mecab.zip",
|
||||||
"ocr.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/ocr.zip",
|
"ocr.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/ocr.zip",
|
||||||
"magpie.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/magpie.zip",
|
"magpie.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/magpie.zip",
|
||||||
"stylesheets-main.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/stylesheets-main.zip",
|
"themes.zip": "https://github.com/HIllya51/RESOURCES/releases/download/common/themes.zip",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -233,9 +233,9 @@ def buildPlugins():
|
|||||||
|
|
||||||
def downloadsomething():
|
def downloadsomething():
|
||||||
os.chdir(rootDir + "\\temp")
|
os.chdir(rootDir + "\\temp")
|
||||||
subprocess.run(f"curl -LO {mylinks['stylesheets-main.zip']}")
|
subprocess.run(f"curl -LO {mylinks['themes.zip']}")
|
||||||
subprocess.run(f"7z x stylesheets-main.zip -oALL")
|
subprocess.run(f"7z x themes.zip -oALL")
|
||||||
move_directory_contents("ALL/stylesheets-main", rootDir + "\\files\\themes")
|
move_directory_contents("ALL/themes", rootDir + "\\files\\themes")
|
||||||
|
|
||||||
|
|
||||||
def downloadbass():
|
def downloadbass():
|
||||||
|
5
src/plugins/.vscode/settings.json
vendored
Normal file
5
src/plugins/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"valarray": "cpp"
|
||||||
|
}
|
||||||
|
}
|
@ -28,8 +28,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/version)
|
|||||||
include(generate_product_version)
|
include(generate_product_version)
|
||||||
|
|
||||||
set(VERSION_MAJOR 5)
|
set(VERSION_MAJOR 5)
|
||||||
set(VERSION_MINOR 43)
|
set(VERSION_MINOR 45)
|
||||||
set(VERSION_PATCH 2)
|
set(VERSION_PATCH 0)
|
||||||
|
|
||||||
add_library(pch pch.cpp)
|
add_library(pch pch.cpp)
|
||||||
target_precompile_headers(pch PUBLIC pch.h)
|
target_precompile_headers(pch PUBLIC pch.h)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user