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)