mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
url
This commit is contained in:
parent
192df621bb
commit
699976da91
22
build.py
22
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,13 +77,9 @@ def downloadBrotli():
|
|||||||
|
|
||||||
def downloadlr():
|
def downloadlr():
|
||||||
|
|
||||||
for ass in get_url_as_json(
|
|
||||||
"https://api.github.com/repos/InWILL/Locale_Remulator/releases/latest"
|
|
||||||
)["assets"]:
|
|
||||||
if "browser_download_url" in ass:
|
|
||||||
os.chdir(rootDir + "\\temp")
|
os.chdir(rootDir + "\\temp")
|
||||||
subprocess.run(f"curl -LO {ass['browser_download_url']}")
|
subprocess.run(f"curl -LO {LocaleRe}")
|
||||||
subprocess.run(f"7z x {ass['name']} -oLR")
|
subprocess.run(f"7z x {LocaleRe.split('/')[-1]} -oLR")
|
||||||
os.makedirs(
|
os.makedirs(
|
||||||
f"{rootDir}/LunaTranslator/files/plugins/Locale_Remulator",
|
f"{rootDir}/LunaTranslator/files/plugins/Locale_Remulator",
|
||||||
exist_ok=True,
|
exist_ok=True,
|
||||||
@ -197,13 +198,10 @@ 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"
|
|
||||||
)["assets"]:
|
|
||||||
if ass["name"] == "Release_English.zip":
|
|
||||||
os.chdir(rootDir + "\\temp")
|
os.chdir(rootDir + "\\temp")
|
||||||
subprocess.run(f"curl -LO {ass['browser_download_url']}")
|
subprocess.run(f"curl -LO {LunaHook_latest}")
|
||||||
subprocess.run(f"7z x Release_English.zip")
|
subprocess.run(f"7z x {LunaHook_latest.split('/')[-1]}")
|
||||||
shutil.move(
|
shutil.move(
|
||||||
"Release_English/LunaHook32.dll",
|
"Release_English/LunaHook32.dll",
|
||||||
f"{rootDir}/LunaTranslator/files/plugins/LunaHook",
|
f"{rootDir}/LunaTranslator/files/plugins/LunaHook",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user