This commit is contained in:
恍兮惚兮 2024-04-28 21:06:01 +08:00
parent 7f3408147e
commit fedb98b089
3 changed files with 13 additions and 6 deletions

View File

@ -10,13 +10,24 @@ if x86:
downlevel=r'C:\Windows\SysWOW64\downlevel'
target='LunaTranslator_x86'
baddll='DLL64'
gooddll='DLL32'
py37Path = "C:\\hostedtoolcache\\windows\\Python\\3.7.9\\x86\\python.exe"
py37Pathlocal=os.environ['LOCALAPPDATA']+r'\Programs\Python\Python37-32\python.exe'
webviewappendix=r'Lib\site-packages\webviewpy\platform\win32\x86\webview.dll'
else:
baddll='DLL32'
gooddll='DLL64'
target='LunaTranslator'
launch=r'..\plugins\builds\_x64'
nuitkadist=r'..\build\x64\LunaTranslator_main.dist'
targetdir=r'..\build\LunaTranslator'
downlevel=r'C:\Windows\system32\downlevel'
py37Path = "C:\\hostedtoolcache\\windows\\Python\\3.7.9\\x64\\python.exe"
py37Pathlocal=os.environ['LOCALAPPDATA']+r'\Programs\Python\Python37\python.exe'
webviewappendix=r'Lib\site-packages\webviewpy\platform\win32\x64\webview.dll'
if os.path.exists(py37Path)==False:
py37Path=py37Pathlocal
py37Pathwebview=os.path.join(os.path.dirname(py37Path),webviewappendix)
if isdebug:
targetdir+=r'_debug'
target+='_debug'
@ -44,7 +55,7 @@ for f in ['LunaTranslator_admin.exe','LunaTranslator.exe']:
shutil.copy(os.path.join(launch,f),targetdir)
shutil.copytree(r'.\files',rf'{targetdir}\files')
shutil.copy(r'..\LICENSE',targetdir)
shutil.copy(py37Pathwebview,rf'{targetdir}\files\plugins\{gooddll}')
for f in ['transoptimi','hiraparse','ocrengines','translator','cishu','tts','network','textoutput','scalemethod']:
shutil.copytree(rf'.\LunaTranslator\{f}',rf'{targetdir_in}\{f}')

View File

@ -1,6 +1,6 @@
PyQt5==5.15.10
PyQt5-Qt5==5.15.2
webviewpy==0.0.3
webviewpy==0.0.4
nuitka==2.0.5
imageio
pefile

View File

@ -81,10 +81,6 @@ def downloadcommon():
f"curl -LO https://github.com/HIllya51/RESOURCES/releases/download/common/ocr.zip"
)
subprocess.run(f"7z x ocr.zip -oALL")
subprocess.run(
f"curl -LO https://github.com/HIllya51/RESOURCES/releases/download/common/webview.zip"
)
subprocess.run(f"7z x webview.zip -oALL")
subprocess.run(
f"curl -LO https://github.com/HIllya51/RESOURCES/releases/download/common/magpie.zip"
)