Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Jun 8, 2024
1 parent cc485ab commit 089601f
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,14 @@ def buildMecab():
def buildLunaOCR():
os.chdir(rootDir + "\\temp")
subprocess.run(f"git clone {lunaOCRUrl}")
os.chdir("LunaOCR")
os.chdir("onnxruntime-static")
os.chdir(rootDir +"\\temp\\LunaOCR")
os.chdir(rootDir +"\\temp\\LunaOCR\\onnxruntime-static")
subprocess.run(f"curl -LO {onnxruntimeFile}")
subprocess.run(f"7z x {onnxruntimeFileName}")
os.chdir("..")
os.chdir("opencv-static")
os.chdir(rootDir +"\\temp\\LunaOCR\\opencv-static")
subprocess.run(f"curl -LO {opencvFile}")
subprocess.run(f"7z x {opencvFileName}")
os.chdir("..")
os.chdir(rootDir +"\\temp\\LunaOCR")

buildType = "Release"
buildOutput = "CLIB"
Expand All @@ -66,8 +65,8 @@ def buildLunaOCR():
arch32 = "Win32"
arch64 = "x64"

os.makedirs(f"build/win-{buildOutput}-{onnxType}-{arch32}")
os.chdir(f"build/win-{buildOutput}-{onnxType}-{arch32}")
os.makedirs(rootDir+"\\temp\\LunaOCR"+ f"/build/win-{buildOutput}-{onnxType}-{arch32}")
os.chdir(rootDir+"\\temp\\LunaOCR"+ f"/build/win-{buildOutput}-{onnxType}-{arch32}")
subprocess.run(
f'cmake -T "{toolset},host=x64" -A {arch32} '
f"-DCMAKE_INSTALL_PREFIX=install "
Expand All @@ -79,8 +78,8 @@ def buildLunaOCR():

os.chdir(f"{rootDir}/temp/LunaOCR")

os.makedirs(f"build/win-{buildOutput}-{onnxType}-{arch64}")
os.chdir(f"build/win-{buildOutput}-{onnxType}-{arch64}")
os.makedirs(rootDir+"\\temp\\LunaOCR"+ f"/build/win-{buildOutput}-{onnxType}-{arch64}")
os.chdir(rootDir+"\\temp\\LunaOCR"+ f"/build/win-{buildOutput}-{onnxType}-{arch64}")
subprocess.run(
f'cmake -T "{toolset},host=x64" -A {arch64} '
f"-DCMAKE_INSTALL_PREFIX=install "
Expand Down

0 comments on commit 089601f

Please sign in to comment.