程序更新功能

This commit is contained in:
2023-01-18 15:29:44 +08:00
parent ef0f359fa5
commit 3f756fd680
7 changed files with 58 additions and 16 deletions

View File

@@ -4,14 +4,16 @@ import PyQt5.QtWidgets as QtWidgets
def OpenTerminal(command):
if terminalEnd[terminal][1]:
os.system(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" \"{command}\"")
print(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" \"{command}\"")
return
os.system(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" {command}")
print(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" {command}")
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# 对终端的获取
# 优先为深度终端
terminal = ""
terminalList = [
"deepin-terminal",
"deepin-terminal1",
"mate-terminal",
"gnome-terminal",
"xfce4-terminal"