forked from ramjke/Translumo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinaries_extract.bat
More file actions
27 lines (21 loc) · 884 Bytes
/
binaries_extract.bat
File metadata and controls
27 lines (21 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@echo off
setlocal EnableDelayedExpansion
set "componentsPath=%~dp0ext_components"
if NOT exist %componentsPath% (
powershell Invoke-WebRequest https://github.com/Danily07/Translumo/releases/download/v.0.8.5/_Components-v.0.8.0.zip -OutFile components.zip
powershell Expand-Archive "%~dp0components.zip" -DestinationPath !componentsPath!
del "%~dp0components.zip"
)
set "targetPaths[0]=%1python\"
set "targetPaths[1]=%1models\easyocr\"
set "targetPaths[2]=%1models\tessdata\"
set "targetPaths[3]=%1models\prediction\"
set "inputBinariesPaths[0]=%componentsPath%\python"
set "inputBinariesPaths[1]=%componentsPath%\models\easyocr"
set "inputBinariesPaths[2]=%componentsPath%\models\tessdata"
set "inputBinariesPaths[3]=%componentsPath%\models\prediction"
for %%i in (0,1,2,3) do (
if NOT exist !targetPaths[%%i]! (
xcopy /s !inputBinariesPaths[%%i]! !targetPaths[%%i]!
)
)