mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
..
This commit is contained in:
parent
0c01e7d92c
commit
a33eec13f3
10
.github/scripts/build_lunatranslator.py
vendored
10
.github/scripts/build_lunatranslator.py
vendored
@ -36,6 +36,7 @@ mylinks = {
|
|||||||
|
|
||||||
|
|
||||||
pluginDirs = ["DLL32", "DLL64", "Locale_Remulator", "Magpie", "NTLEAS"]
|
pluginDirs = ["DLL32", "DLL64", "Locale_Remulator", "Magpie", "NTLEAS"]
|
||||||
|
pluginDirs_1 = ["DLL32", "NTLEAS"]
|
||||||
|
|
||||||
vcltlFile = "https://github.com/Chuyu-Team/VC-LTL5/releases/download/v5.0.9/VC-LTL-5.0.9-Binary.7z"
|
vcltlFile = "https://github.com/Chuyu-Team/VC-LTL5/releases/download/v5.0.9/VC-LTL-5.0.9-Binary.7z"
|
||||||
|
|
||||||
@ -52,12 +53,12 @@ curlFile64 = "https://curl.se/windows/dl-8.8.0_3/curl-8.8.0_3-win64-mingw.zip"
|
|||||||
availableLocales = ["cht", "en", "ja", "ko", "ru", "zh"]
|
availableLocales = ["cht", "en", "ja", "ko", "ru", "zh"]
|
||||||
|
|
||||||
|
|
||||||
def createPluginDirs():
|
def createPluginDirs(which):
|
||||||
os.chdir(rootDir + "\\files")
|
os.chdir(rootDir + "\\files")
|
||||||
if not os.path.exists("plugins"):
|
if not os.path.exists("plugins"):
|
||||||
os.mkdir("plugins")
|
os.mkdir("plugins")
|
||||||
os.chdir("plugins")
|
os.chdir("plugins")
|
||||||
for pluginDir in pluginDirs:
|
for pluginDir in [pluginDirs_1, pluginDirs][which]:
|
||||||
if not os.path.exists(pluginDir):
|
if not os.path.exists(pluginDir):
|
||||||
os.mkdir(pluginDir)
|
os.mkdir(pluginDir)
|
||||||
|
|
||||||
@ -127,8 +128,6 @@ def downloadmapie():
|
|||||||
subprocess.run(f"curl -LO {mylinks['magpie.zip']}")
|
subprocess.run(f"curl -LO {mylinks['magpie.zip']}")
|
||||||
subprocess.run(f"7z x magpie.zip -oALL")
|
subprocess.run(f"7z x magpie.zip -oALL")
|
||||||
|
|
||||||
move_directory_contents("ALL/ALL", f"{rootDir}/files/plugins")
|
|
||||||
|
|
||||||
|
|
||||||
def downloadLocaleEmulator():
|
def downloadLocaleEmulator():
|
||||||
os.chdir(rootDir + "\\temp")
|
os.chdir(rootDir + "\\temp")
|
||||||
@ -274,7 +273,7 @@ if __name__ == "__main__":
|
|||||||
f"{py37Path} {os.path.join(rootthisfiledir,'collectpyruntime.py')}"
|
f"{py37Path} {os.path.join(rootthisfiledir,'collectpyruntime.py')}"
|
||||||
)
|
)
|
||||||
elif sys.argv[1] == "merge":
|
elif sys.argv[1] == "merge":
|
||||||
createPluginDirs()
|
createPluginDirs(0 if arch == "xp" else 1)
|
||||||
downloadNtlea()
|
downloadNtlea()
|
||||||
downloadmecab()
|
downloadmecab()
|
||||||
downloadbass()
|
downloadbass()
|
||||||
@ -305,6 +304,7 @@ if __name__ == "__main__":
|
|||||||
downloadOCRModel()
|
downloadOCRModel()
|
||||||
downloadmapie()
|
downloadmapie()
|
||||||
downloadlr()
|
downloadlr()
|
||||||
|
move_directory_contents("ALL/ALL", f"{rootDir}/files/plugins")
|
||||||
|
|
||||||
os.chdir(rootDir)
|
os.chdir(rootDir)
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user