mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
url
This commit is contained in:
parent
192df621bb
commit
699976da91
80
build.py
80
build.py
@ -25,6 +25,11 @@ curlFileName64 = "curl-8.7.1_7-win64-mingw.zip"
|
|||||||
ocrModelUrl = "https://github.com/HIllya51/RESOURCES/releases/download/ocr_models"
|
ocrModelUrl = "https://github.com/HIllya51/RESOURCES/releases/download/ocr_models"
|
||||||
availableLocales = ["cht", "en", "ja", "ko", "ru", "zh"]
|
availableLocales = ["cht", "en", "ja", "ko", "ru", "zh"]
|
||||||
|
|
||||||
|
LunaHook_latest = (
|
||||||
|
"https://github.com/HIllya51/LunaHook/releases/download/latest/Release_English.zip"
|
||||||
|
)
|
||||||
|
|
||||||
|
LocaleRe = "https://github.com/InWILL/Locale_Remulator/releases/download/v1.5.3-beta.1/Locale_Remulator.1.5.3-beta.1.zip"
|
||||||
|
|
||||||
# rootDir = os.path.dirname(os.path.abspath(__file__))
|
# rootDir = os.path.dirname(os.path.abspath(__file__))
|
||||||
# print(__file__)
|
# print(__file__)
|
||||||
@ -72,24 +77,20 @@ def downloadBrotli():
|
|||||||
|
|
||||||
def downloadlr():
|
def downloadlr():
|
||||||
|
|
||||||
for ass in get_url_as_json(
|
os.chdir(rootDir + "\\temp")
|
||||||
"https://api.github.com/repos/InWILL/Locale_Remulator/releases/latest"
|
subprocess.run(f"curl -LO {LocaleRe}")
|
||||||
)["assets"]:
|
subprocess.run(f"7z x {LocaleRe.split('/')[-1]} -oLR")
|
||||||
if "browser_download_url" in ass:
|
os.makedirs(
|
||||||
os.chdir(rootDir + "\\temp")
|
f"{rootDir}/LunaTranslator/files/plugins/Locale_Remulator",
|
||||||
subprocess.run(f"curl -LO {ass['browser_download_url']}")
|
exist_ok=True,
|
||||||
subprocess.run(f"7z x {ass['name']} -oLR")
|
)
|
||||||
os.makedirs(
|
for _dir, _, _fs in os.walk("LR"):
|
||||||
f"{rootDir}/LunaTranslator/files/plugins/Locale_Remulator",
|
for f in _fs:
|
||||||
exist_ok=True,
|
if f in ["LRHookx64.dll", "LRHookx32.dll"]:
|
||||||
)
|
shutil.move(
|
||||||
for _dir, _, _fs in os.walk("LR"):
|
os.path.join(_dir, f),
|
||||||
for f in _fs:
|
f"{rootDir}/LunaTranslator/files/plugins/Locale_Remulator",
|
||||||
if f in ["LRHookx64.dll", "LRHookx32.dll"]:
|
)
|
||||||
shutil.move(
|
|
||||||
os.path.join(_dir, f),
|
|
||||||
f"{rootDir}/LunaTranslator/files/plugins/Locale_Remulator",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def move_directory_contents(source_dir, destination_dir):
|
def move_directory_contents(source_dir, destination_dir):
|
||||||
@ -197,29 +198,26 @@ def get_url_as_json(url):
|
|||||||
|
|
||||||
|
|
||||||
def buildLunaHook():
|
def buildLunaHook():
|
||||||
for ass in get_url_as_json(
|
|
||||||
"https://api.github.com/repos/HIllya51/LunaHook/releases/latest"
|
os.chdir(rootDir + "\\temp")
|
||||||
)["assets"]:
|
subprocess.run(f"curl -LO {LunaHook_latest}")
|
||||||
if ass["name"] == "Release_English.zip":
|
subprocess.run(f"7z x {LunaHook_latest.split('/')[-1]}")
|
||||||
os.chdir(rootDir + "\\temp")
|
shutil.move(
|
||||||
subprocess.run(f"curl -LO {ass['browser_download_url']}")
|
"Release_English/LunaHook32.dll",
|
||||||
subprocess.run(f"7z x Release_English.zip")
|
f"{rootDir}/LunaTranslator/files/plugins/LunaHook",
|
||||||
shutil.move(
|
)
|
||||||
"Release_English/LunaHook32.dll",
|
shutil.move(
|
||||||
f"{rootDir}/LunaTranslator/files/plugins/LunaHook",
|
"Release_English/LunaHost32.dll",
|
||||||
)
|
f"{rootDir}/LunaTranslator/files/plugins/LunaHook",
|
||||||
shutil.move(
|
)
|
||||||
"Release_English/LunaHost32.dll",
|
shutil.move(
|
||||||
f"{rootDir}/LunaTranslator/files/plugins/LunaHook",
|
"Release_English/LunaHook64.dll",
|
||||||
)
|
f"{rootDir}/LunaTranslator/files/plugins/LunaHook",
|
||||||
shutil.move(
|
)
|
||||||
"Release_English/LunaHook64.dll",
|
shutil.move(
|
||||||
f"{rootDir}/LunaTranslator/files/plugins/LunaHook",
|
"Release_English/LunaHost64.dll",
|
||||||
)
|
f"{rootDir}/LunaTranslator/files/plugins/LunaHook",
|
||||||
shutil.move(
|
)
|
||||||
"Release_English/LunaHost64.dll",
|
|
||||||
f"{rootDir}/LunaTranslator/files/plugins/LunaHook",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def buildPlugins():
|
def buildPlugins():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user