This commit is contained in:
恍兮惚兮 2024-10-20 00:37:51 +08:00
parent ce8395f6a4
commit b976c5ab32
5 changed files with 26 additions and 13 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -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(
data, target=_OCR_f,
len(data), args=(
lang, data,
space, len(data),
CFUNCTYPE(None, c_uint, c_uint, c_uint, c_uint, c_wchar_p)(cb), lang,
space,
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

View File

@ -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
View File

@ -0,0 +1,5 @@
{
"files.associations": {
"valarray": "cpp"
}
}

View File

@ -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)