From 90b02bdd4cd012d21b64305bea1516f9eedcd3a3 Mon Sep 17 00:00:00 2001 From: dengrb1 <125752069+dengrb1@users.noreply.github.com> Date: Mon, 28 Aug 2023 11:00:35 +0800 Subject: [PATCH] 2023/8/28 update --- client.pyw | 6 +----- delete.pyw | 2 ++ install.pyw | 4 ++++ setting/update.pyw => update.pyw | 0 4 files changed, 7 insertions(+), 5 deletions(-) rename setting/update.pyw => update.pyw (100%) diff --git a/client.pyw b/client.pyw index 799b6da..d2d66c5 100644 --- a/client.pyw +++ b/client.pyw @@ -6,7 +6,6 @@ import os root = Tk() ml = os.getcwd() -setting_ml = f"{ml}\setting\\" file_error = '文件丢失,请重新安装' @@ -26,10 +25,7 @@ def delete(): def update(): - if os.path.exists(os.path.join(setting_ml, "update.pyw")): - subprocess.Popen(f"{setting_ml}update.pyw", shell=True) - else: - messagebox.showerror('system', file_error) + jc("update") def exit_exe(): diff --git a/delete.pyw b/delete.pyw index 65cdfd7..b6278a3 100644 --- a/delete.pyw +++ b/delete.pyw @@ -42,6 +42,8 @@ def computer_delete(): open_exe('computer_delete') def maths_delete(): open_exe('maths_delete') +def game_delete(): + open_exe("game_delete") def pyinstaller_remove(): os.system('pip uninstall pyinstaller') messagebox.showinfo('pip uninstall', ok) diff --git a/install.pyw b/install.pyw index bac34e7..4a1f7c4 100644 --- a/install.pyw +++ b/install.pyw @@ -45,6 +45,8 @@ def computer_install(): open_exe('computer_install') def maths_install(): open_exe('maths_install') +def game_install(): + open_exe("game_install") def pyinstaller(): os.system('pip install pyinstaller -i https://mirrors.aliyun.com/pypi/simple/') messagebox.showinfo('pip install', ok) @@ -72,6 +74,7 @@ pip_gui = Button(frame, text='GUI类安装', command=gui_install) pip_web = Button(frame, text='web类安装', command=web_install) pip_computer = Button(frame, text='机器学习类库安装', command=computer_install) pip_maths = Button(frame, text='maths类安装', command=maths_install) +pip_game = Button(frame, text='game类安装', command=game_install) pip_pyinstaller = Button(frame, text='pyinstaller安装', command=pyinstaller) pip_tqdm = Button(frame, text='tqdm安装', command=tqdm) pip_pygithub = Button(frame, text='pygithub安装', command=pygithub) @@ -86,6 +89,7 @@ pip_gui.pack() pip_web.pack() pip_computer.pack() pip_maths.pack() +pip_game.pack() Label(frame ,text='').pack() pip_pyinstaller.pack() pip_tqdm.pack() diff --git a/setting/update.pyw b/update.pyw similarity index 100% rename from setting/update.pyw rename to update.pyw