新增修改的helper

This commit is contained in:
2022-11-15 22:11:25 +08:00
parent dc660bb1f1
commit 9d330cd147
4 changed files with 799 additions and 7 deletions

View File

@@ -2,8 +2,8 @@
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.4.2
# 更新时间2022年11月13
# 版本2.5.0
# 更新时间2022年11月15
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 构建
###########################################################################################
@@ -18,8 +18,18 @@ def YesOrNo():
return False
return True
def InstallWineSpark(wine):
print(f"开始安装 {wine}")
#os.system("pkexec apt update")
if not os.system(f"pkexec aptss install {wine} -y"):
print(f"{wine} 安装失败!")
PressEnter()
else:
print("安装完成")
def InstallWine(wine):
print(f"开始安装 {wine}")
os.system("pkexec apt update")
if not os.system(f"pkexec apt install {wine} -y"):
print(f"{wine} 安装失败!")
PressEnter()
@@ -73,21 +83,26 @@ m m "
print("后续操作需要有 root 权限")
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# 敢这样浪不还是 Alpha 源有官方应用商店
if not os.system("which deepin-home-appstore-client > /dev/null"):
if os.system("which deepin-home-appstore-client > /dev/null"):
print("暂未安装官方应用商店,安装后才能继续,是否安装?[Y/N]")
if YesOrNo:
InstallDeepinAppStore()
deepinWineList = [
#"deepin-wine",
#"deepin-wine5-stable",
"deepin-wine6-stable"
]
for i in deepinWineList:
if not os.system(f"which {i} > /dev/null"):
print(f"{i} 已安装")
continue
print(f"是否安装 {i}[Y/N]")
if YesOrNo:
InstallWine(i)
sparkWineList = [
#"deepin-wine",
#"deepin-wine5",
#"spark-wine7-devel"
]
for i in sparkWineList:
if not os.system(f"which {i} > /dev/null"):
@@ -95,7 +110,7 @@ m m "
print(f"是否安装 {i}[Y/N]")
if YesOrNo:
InstallSparkStore()
InstallWine(i)
InstallWineSpark(i)
print("按回车键退出")
PressEnter()
exit()