mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-15 08:53:53 +08:00
.
This commit is contained in:
parent
54670ea45c
commit
ddb4e75cfd
87
.github/scripts/build_lunatranslator.py
vendored
87
.github/scripts/build_lunatranslator.py
vendored
@ -84,30 +84,6 @@ def downloadBrotli():
|
|||||||
shutil.move("brotli64/brotlidec.dll", f"{rootDir}/files/plugins/DLL64")
|
shutil.move("brotli64/brotlidec.dll", f"{rootDir}/files/plugins/DLL64")
|
||||||
|
|
||||||
|
|
||||||
def downloadlr():
|
|
||||||
|
|
||||||
os.chdir(rootDir + "\\temp")
|
|
||||||
subprocess.run(f"curl -LO {LocaleRe}")
|
|
||||||
subprocess.run(f"7z x {LocaleRe.split('/')[-1]} -oLR")
|
|
||||||
os.makedirs(
|
|
||||||
rf"{rootDir}\files\plugins\Locale\Locale_Remulator.1.5.4",
|
|
||||||
exist_ok=True,
|
|
||||||
)
|
|
||||||
for _dir, _, _fs in os.walk("LR"):
|
|
||||||
for f in _fs:
|
|
||||||
if f in [
|
|
||||||
"LRHookx64.dll",
|
|
||||||
"LRHookx32.dll",
|
|
||||||
"LRConfig.xml",
|
|
||||||
"LRProc.exe",
|
|
||||||
"LRSubMenus.dll",
|
|
||||||
]:
|
|
||||||
shutil.move(
|
|
||||||
os.path.join(_dir, f),
|
|
||||||
rf"{rootDir}\files\plugins\Locale\Locale_Remulator.1.5.4",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def move_directory_contents(source_dir, destination_dir):
|
def move_directory_contents(source_dir, destination_dir):
|
||||||
contents = os.listdir(source_dir)
|
contents = os.listdir(source_dir)
|
||||||
|
|
||||||
@ -145,28 +121,63 @@ def downloadmapie():
|
|||||||
move_directory_contents("ALL/ALL", f"{rootDir}/files/plugins")
|
move_directory_contents("ALL/ALL", f"{rootDir}/files/plugins")
|
||||||
|
|
||||||
|
|
||||||
|
def downloadlr():
|
||||||
|
|
||||||
|
os.chdir(rootDir + "\\temp")
|
||||||
|
subprocess.run(f"curl -LO {LocaleRe}")
|
||||||
|
subprocess.run(f"7z x {LocaleRe.split('/')[-1]} -oLR")
|
||||||
|
os.makedirs(
|
||||||
|
rf"{rootDir}\files\plugins\Locale\Locale_Remulator",
|
||||||
|
exist_ok=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
p = subprocess.Popen("LR/LRProc.exe")
|
||||||
|
while 1:
|
||||||
|
if os.path.exists("LR/LRConfig.xml"):
|
||||||
|
break
|
||||||
|
time.sleep(0.1)
|
||||||
|
p.kill()
|
||||||
|
for f in [
|
||||||
|
"LRHookx64.dll",
|
||||||
|
"LRHookx32.dll",
|
||||||
|
"LRConfig.xml",
|
||||||
|
"LRProc.exe",
|
||||||
|
"LRSubMenus.dll",
|
||||||
|
]:
|
||||||
|
shutil.move(
|
||||||
|
os.path.join("LR", f),
|
||||||
|
rf"{rootDir}\files\plugins\Locale\Locale_Remulator",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def downloadLocaleEmulator():
|
def downloadLocaleEmulator():
|
||||||
os.chdir(rootDir + "\\temp")
|
os.chdir(rootDir + "\\temp")
|
||||||
subprocess.run(f"curl -LO {localeEmulatorFile}")
|
subprocess.run(f"curl -LO {localeEmulatorFile}")
|
||||||
subprocess.run(f"7z x {localeEmulatorFile.split('/')[-1]} -oLocaleEmulator")
|
subprocess.run(f"7z x {localeEmulatorFile.split('/')[-1]} -oLocaleEmulator")
|
||||||
|
|
||||||
os.makedirs(
|
os.makedirs(
|
||||||
rf"{rootDir}\files\plugins\Locale\Locale.Emulator.2.5.0.1",
|
rf"{rootDir}\files\plugins\Locale\Locale.Emulator",
|
||||||
exist_ok=True,
|
exist_ok=True,
|
||||||
)
|
)
|
||||||
for _dir, _, _fs in os.walk("LocaleEmulator"):
|
p = subprocess.Popen("LocaleEmulator/LEInstaller.exe")
|
||||||
for f in _fs:
|
while 1:
|
||||||
if f in [
|
if os.path.exists("LocaleEmulator/LECommonLibrary.dll") and os.path.exists(
|
||||||
"LoaderDll.dll",
|
"LocaleEmulator/LEConfig.xml"
|
||||||
"LocaleEmulator.dll",
|
):
|
||||||
"LEProc.exe",
|
break
|
||||||
"LEConfig.xml",
|
time.sleep(0.1)
|
||||||
"LECommonLibrary.dll",
|
p.kill()
|
||||||
]:
|
for f in [
|
||||||
shutil.move(
|
"LoaderDll.dll",
|
||||||
os.path.join(_dir, f),
|
"LocaleEmulator.dll",
|
||||||
rf"{rootDir}\files\plugins\Locale\Locale.Emulator.2.5.0.1",
|
"LEProc.exe",
|
||||||
)
|
"LEConfig.xml",
|
||||||
|
"LECommonLibrary.dll",
|
||||||
|
]:
|
||||||
|
shutil.move(
|
||||||
|
os.path.join("LocaleEmulator", f),
|
||||||
|
rf"{rootDir}\files\plugins\Locale\Locale.Emulator",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def downloadNtlea():
|
def downloadNtlea():
|
||||||
|
@ -54,7 +54,7 @@ class le_internal(LEbase):
|
|||||||
LEProc = globalconfig.get("le_extra_path", "")
|
LEProc = globalconfig.get("le_extra_path", "")
|
||||||
if not (LEProc and os.path.exists(LEProc)):
|
if not (LEProc and os.path.exists(LEProc)):
|
||||||
LEProc = os.path.abspath(
|
LEProc = os.path.abspath(
|
||||||
"files/plugins/Locale/Locale.Emulator.2.5.0.1/LEProc.exe"
|
"files/plugins/Locale/Locale.Emulator/LEProc.exe"
|
||||||
)
|
)
|
||||||
return LEProc
|
return LEProc
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ class lr_internal(LEbase):
|
|||||||
LEProc = globalconfig.get("lr_extra_path", "")
|
LEProc = globalconfig.get("lr_extra_path", "")
|
||||||
if not (LEProc and os.path.exists(LEProc)):
|
if not (LEProc and os.path.exists(LEProc)):
|
||||||
LEProc = os.path.abspath(
|
LEProc = os.path.abspath(
|
||||||
"files/plugins/Locale/Locale_Remulator.1.5.4/LRProc.exe"
|
"files/plugins/Locale/Locale_Remulator/LRProc.exe"
|
||||||
)
|
)
|
||||||
return LEProc
|
return LEProc
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user