From 78e24cd734192e194a00e4fcc08214cc5c081be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Sat, 30 Nov 2024 09:53:14 +0800 Subject: [PATCH] . --- .github/scripts/build_lunatranslator.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/scripts/build_lunatranslator.py b/.github/scripts/build_lunatranslator.py index f4cfb641..b4c90a51 100644 --- a/.github/scripts/build_lunatranslator.py +++ b/.github/scripts/build_lunatranslator.py @@ -125,15 +125,17 @@ def downloadlr(): os.chdir(rootDir + "\\temp") subprocess.run(f"curl -LO {LocaleRe}") - subprocess.run(f"7z x {LocaleRe.split('/')[-1]} -oLR") + base = LocaleRe.split("/")[-1] + fn = os.path.splitext(base)[0] + subprocess.run(f"7z x {base}") os.makedirs( rf"{rootDir}\files\plugins\Locale\Locale_Remulator", exist_ok=True, ) - p = subprocess.Popen("LR/LRProc.exe") + p = subprocess.Popen(f"{fn}/LRProc.exe") while 1: - if os.path.exists("LR/LRConfig.xml"): + if os.path.exists(f"{fn}/LRConfig.xml"): break time.sleep(0.1) p.kill() @@ -145,7 +147,7 @@ def downloadlr(): "LRSubMenus.dll", ]: shutil.move( - os.path.join("LR", f), + os.path.join(fn, f), rf"{rootDir}\files\plugins\Locale\Locale_Remulator", )