From 89c4121f61c98e9b443db6220f06be379f7b75e8 Mon Sep 17 00:00:00 2001 From: li-xiaochen <397721316@qq.com> Date: Thu, 12 Dec 2024 13:14:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=9A=E5=8E=BB=E9=99=A4=E6=B2=A1=E6=9C=89=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=BC=95=E7=94=A8=E7=9A=84=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E7=9A=84f=E5=89=8D=E7=BC=80=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=B8=BA=E4=B8=8B=E5=88=92=E7=BA=BF=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- launcher.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/launcher.py b/launcher.py index 2e633a9..59d6059 100644 --- a/launcher.py +++ b/launcher.py @@ -283,16 +283,16 @@ class Api: folder_path = os.path.join(os.getcwd(), "_internal") exe_path = os.path.join(os.getcwd(), "launcher.exe") with open(script_path, "w") as b: - TempList = f"@echo off\n" - TempList += f"timeout /t 3 /nobreak\n" # 等待进程退出 - TempList += f"rmdir {folder_path}\n" # 删除_internal - TempList += f"del {exe_path}\n" # 删除exe - TempList += f"tar -xf {download_path} -C ..\n" # 解压压缩包 - TempList += f"timeout /t 1 /nobreak\n" # 等待解压 - TempList += f"start {exe_path}\n" # 启动新程序 - TempList += f"del {download_path}\n" # 删除压缩包 - TempList += f"exit" - b.write(TempList) + temp_list = "@echo off\n" + temp_list += "timeout /t 3 /nobreak\n" # 等待进程退出 + temp_list += f"rmdir {folder_path}\n" # 删除_internal + temp_list += f"del {exe_path}\n" # 删除exe + temp_list += f"tar -xf {download_path} -C ..\n" # 解压压缩包 + temp_list += "timeout /t 1 /nobreak\n" # 等待解压 + temp_list += f"start {exe_path}\n" # 启动新程序 + temp_list += f"del {download_path}\n" # 删除压缩包 + temp_list += "exit" + b.write(temp_list) # 不显示cmd窗口 Popen([script_path], creationflags=CREATE_NO_WINDOW) os._exit(0)