2023-04-07 23:17:25 +08:00
|
|
|
from tkinter import *
|
|
|
|
from tkinter import messagebox
|
2023-05-04 17:30:35 +08:00
|
|
|
import webbrowser
|
2023-04-07 23:17:25 +08:00
|
|
|
|
|
|
|
update = Tk()
|
2023-05-04 17:38:12 +08:00
|
|
|
url_update = 'https://kgithub.com/dengrb1/pip-helper/releases'
|
2023-04-07 23:17:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
la_1 = Label(update, text='更新日志').pack()
|
2023-05-04 17:30:35 +08:00
|
|
|
la_2 = Label(update, text='''0.1.0 版本为beta and demo version''').pack()
|
2023-05-04 17:38:12 +08:00
|
|
|
la_3 = Label(update, text='当前版本:0.1.0 (beta verison)')
|
2023-04-07 23:17:25 +08:00
|
|
|
|
|
|
|
# 定义按钮
|
2023-05-04 17:30:35 +08:00
|
|
|
def update_now():
|
|
|
|
webbrowser.open(url_update)
|
2023-05-04 17:38:12 +08:00
|
|
|
messagebox.showinfo('update', '请选择最新版本并下载运行安装程序,然后就可以更新了!')
|
2023-05-04 17:30:35 +08:00
|
|
|
pass
|
2023-04-07 23:17:25 +08:00
|
|
|
def quit_update():
|
|
|
|
update.destroy()
|
|
|
|
pass
|
|
|
|
# 按钮设置
|
|
|
|
quit_window_bt = Button(update, text='返回', command=quit_update)
|
2023-05-04 17:38:12 +08:00
|
|
|
update_now_bt = Button(update, text='更新到最新版本', command=update_now)
|
|
|
|
|
|
|
|
# Button pack
|
|
|
|
update_now_bt.pack()
|
|
|
|
quit_window_bt.pack()
|
2023-04-07 23:17:25 +08:00
|
|
|
|
|
|
|
# 初始化程序
|
|
|
|
update.title('更新日志')
|
2023-05-03 00:32:10 +00:00
|
|
|
update.geometry('330x250+50+50')
|
2023-04-07 23:17:25 +08:00
|
|
|
update.mainloop()
|