更新打包器

This commit is contained in:
2022-11-23 21:35:01 +08:00
parent f84ff6c809
commit cacc3ac5af
15 changed files with 332 additions and 62 deletions

View File

@@ -9,7 +9,7 @@ Recommends: winbind, wimtools
Section: utils
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
Installed-Size: 23776
Installed-Size: 21844
Description: gfdgd xi、为什么您不喜欢熊出没和阿布呢 制作的 wine 运行器
2.4.1 更新内容:
※1、不基于生态适配活动脚本的打包器支持只生成制作容器的 7z 包

View File

@@ -57,30 +57,37 @@ print("请问是否要更新操作系统?[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo apt upgrade -y")
print("请问是否要安装原版 winewine64[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo apt install wine -y")
print("请问是否要安装 deepin-wine[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo apt install deepin-wine -y")
print("请问是否要安装 deepin-wine5需要安装最新版星火应用商店[Y/N]", end=' ')
choose = input().upper()
print("请问是否要安装 deepin-wine5-stable[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo apt install deepin-wine5-stable -y")
print("请问是否要安装 deepin-wine6-stable[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo apt install deepin-wine6-stable -y")
print("请问是否要安装 spark-wine7-devel需要安装最新版星火应用商店[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
InstallSparkWine("spark-wine7-devel")
print("请问是否要安装 ukylin-wine需要添加 ukylin 源,但因为可能会导致系统问题,将不会自动添加)?[Y/N]", end=" ")
choose = input().upper()
if not choose == "N":
os.system("sudo apt install ukylin-wine -y")
if os.system("which wine > /dev/null"):
print("请问是否要安装原版 winewine64[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo apt install wine -y")
if os.system("which deepin-wine > /dev/null"):
print("请问是否要安装 deepin-wine[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo apt install deepin-wine -y")
if os.system("which deepin-wine5 > /dev/null"):
print("请问是否要安装 deepin-wine5需要安装最新版星火应用商店[Y/N]", end=' ')
choose = input().upper()
if os.system("which deepin-wine5-stable > /dev/null"):
print("请问是否要安装 deepin-wine5-stable[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo apt install deepin-wine5-stable -y")
if os.system("which deepin-wine6-stable > /dev/null"):
print("请问是否要安装 deepin-wine6-stable[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo apt install deepin-wine6-stable -y")
if os.system("which spark-wine7-devel > /dev/null"):
print("请问是否要安装 spark-wine7-devel需要安装最新版星火应用商店[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
InstallSparkWine("spark-wine7-devel")
if os.system("which ukylin-wine > /dev/null"):
print("请问是否要安装 ukylin-wine需要添加 ukylin 源,但因为可能会导致系统问题,将不会自动添加)?[Y/N]", end=" ")
choose = input().upper()
if not choose == "N":
os.system("sudo apt install ukylin-wine -y")
print("全部完成!")

View File

@@ -0,0 +1,122 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
#################################################################################################################
# 作者gfdgd xi
# 版本2.5.0
# 更新时间2022年11月20日
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
# 基于 Python3 的 PyQt5 构建
#################################################################################################################
#################
# 引入所需的库
#################
import os
import sys
import traceback
import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore
import PyQt5.QtWidgets as QtWidgets
desktopList = []
desktopUsrList = []
def GetDesktopList(path):
for i in os.listdir(path):
if os.path.isdir(f"{path}/{i}"):
GetDesktopList(f"{path}/{i}")
if os.path.isfile(f"{path}/{i}"):
try:
desktop = {}
with open(f"{path}/{i}") as file:
things = file.read()
for k in things.splitlines():
if not "=" in k:
continue
desktop[k[:k.index("=")].lower()] = k[k.index("=") + 1:]
desktopList.append([desktop["Name".lower()], desktop["Icon".lower()], desktop["Exec".lower()], f"{path}/{i}"])
except:
traceback.print_exc()
delButton.setEnabled(len(desktopList))
class DesktopList(QtCore.QThread):
show = QtCore.pyqtSignal(int)
def __init__(self) -> None:
super().__init__()
def run(self):
if os.path.exists(f"{homePath}/.local/share/applications"):
GetDesktopList(f"{homePath}/.local/share/applications")
self.show.emit(0)
def ShowDesktop(temp):
nmodel = QtGui.QStandardItemModel(window)
if not len(desktopList):
item = QtGui.QStandardItem("")
nmodel.appendRow(item)
y = 0
for i in desktopList:
#item = QtGui.QStandardItem(QtGui.QIcon(i[1]), i[0])
#nmodel.appendRow(item)
if os.path.exists(i[1]):
nmodel.setItem(y, 0, QtGui.QStandardItem(QtGui.QIcon(i[1]), i[0]))
else:
nmodel.setItem(y, 0, QtGui.QStandardItem(QtGui.QIcon.fromTheme(i[1]), i[0]))
nmodel.setItem(y, 1, QtGui.QStandardItem(i[2]))
nmodel.setItem(y, 2, QtGui.QStandardItem(i[3]))
y += 1
nmodel.setHeaderData(0, QtCore.Qt.Horizontal, "程序名")
nmodel.setHeaderData(1, QtCore.Qt.Horizontal, "运行路径")
nmodel.setHeaderData(2, QtCore.Qt.Horizontal, ".desktop 文件所在路径")
nmodel.setColumnCount(3)
desktopListView.setModel(nmodel)
def GetDesktopThread():
global desktop
desktop = DesktopList()
desktop.show.connect(ShowDesktop)
desktop.start()
def DeleteButton():
index = desktopListView.currentIndex().row()
if index < 0:
QtWidgets.QMessageBox.critical(window, "错误", "未选中任何项")
return
print(index)
print(desktopList[index][3])
#desktopListView.rowMoved(index)
#desktopListView.removeRow(index)
try:
os.remove(desktopList[index][3])
del desktopList[index]
ShowDesktop(0)
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
homePath = os.getenv("HOME")
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
#GetDesktopList(f"{homePath}/.local/share/applications")
#print(desktopList)
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QMainWindow()
widget = QtWidgets.QWidget()
layout = QtWidgets.QGridLayout()
delButton = QtWidgets.QPushButton("删除指定图标")
delButton.clicked.connect(DeleteButton)
#desktopListView = QtWidgets.QListView()
desktopListView = QtWidgets.QTableView()
desktopListView.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
desktopListView.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)#(QAbstractItemView::SelectRows)
layout.addWidget(desktopListView, 0, 0, 1, 4)
layout.addWidget(delButton, 1, 3, 1, 1)
widget.setLayout(layout)
window.setCentralWidget(widget)
window.setWindowTitle("图标管理")
window.resize(int(window.frameGeometry().width() * 1.5), int(window.frameGeometry().height() * 1.2))
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
window.show()
GetDesktopThread()
app.exec_()

View File

@@ -0,0 +1,116 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.5.0
# 更新时间2022年11月15日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 构建
###########################################################################################
#################
# 引入所需的库
#################
import os
import webbrowser
def YesOrNo():
if input().replace(" ", "").upper() == "N":
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()
else:
print("安装完成")
def CheckSparkStore():
return os.system("which spark-store > /dev/null") + os.system("which aptss > /dev/null")
def InstallSparkStore():
if not CheckSparkStore:
return
print("按下回车键后打开星火应用商店官网,手动安装完星火应用商店后再次按下回车以继续")
webbrowser.open_new_tab("https://spark-app.store/")
PressEnter()
print("安装星火应用商店后按下回车……")
PressEnter()
while True:
if not os.system("which spark-store > /dev/null"):
if not os.system("which aptss > /dev/null"):
break
print("您暂未安装最新版本的星火应用商店,请更新版本后按下回车")
PressEnter()
continue
print("您暂未安装星火应用商店,请在安装后按下回车")
PressEnter()
continue
def InstallDeepinAppStore():
print("开始安装官方应用商店")
if not os.system("pkexec apt install deepin-app-store -y"):
print("安装失败!按回车键后退出")
PressEnter()
exit()
else:
print("安装完成")
def PressEnter():
input("按回车键后继续……")
if __name__ == "__main__":
print('''
m m "
# # # mmm m mm mmm
" #"# # # #" # #" #
## ##" # # # #""""
# # mm#mm # # "#mm"
''')
print("后续操作需要有 root 权限")
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# 敢这样浪不还是 Alpha 源有官方应用商店
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"):
continue
print(f"是否安装 {i}[Y/N]")
if YesOrNo:
InstallSparkStore()
InstallWineSpark(i)
print("按回车键退出")
PressEnter()
exit()

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -2080,18 +2080,20 @@ updateThingsString = '''※1、容器自动配置脚本 GUI 查看介绍使用 Q
※8、支持静态获取可执行文件可以调用的 Dll 并提供解决方案
※9、支持移除指定的 .desktop 快捷方式
10、修复了不基于生态适配活动脚本打包器在选择 arm 打包架构下容器自动删除脚本取消勾选无用的问题
11、优化文案、新增友链
12、提供了部分组件的测试功能
'''
for i in information["Thank"]:
thankText += f"{i}\n"
updateTime = "2022年11月19日"
updateTime = "2022年11月23日"
about = f'''<style>
a:link, a:active {{
text-decoration: none;
}}
</style>
<h1>关于</h1>
<p>一个能让Linux用户更加方便运行Windows应用的程序内置了对wine图形化的支持各种Wine工具自制Wine程序打包器运行库安装工具等</p>
<p>同时内置了基于VirtualBox制作的小白Windows虚拟机安装工具可以做到只需要用户下载系统镜像并点击安装即可,无需顾及虚拟机安装、创建、虚拟机的分区等等</p>
<p>Wine运行器是一个能让Linux用户更加方便运行Windows应用的程序内置了对Wine图形化的支持各种Wine工具自制Wine程序打包器运行库安装工具等</p>
<p>同时内置了基于VirtualBox制作的、专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机安装、创建、分区等操作。</p>
<p>本程序依照 GPLV3 协议开源</p>
<pre>
@@ -2119,7 +2121,8 @@ Qt 版本:{QtCore.qVersion()}
<h1>友谊链接</h1>
<pre>星火应用商店https://spark-app.store/
Deepin 官网https://www.deepin.org
Deepin 论坛https://bbs.deepin.org</pre>
Deepin 论坛https://bbs.deepin.org
非官方论坛https://gfdgdxi.flarum.cloud/</pre>
<hr>
<h1>©2020~{time.strftime("%Y")} gfdgd xi、为什么您不喜欢熊出没和阿布呢</h1>'''
title = "Wine 运行器 {}".format(version)
@@ -2428,17 +2431,26 @@ wineOption.addAction(w10)
wineOption.addSeparator()
wineOption.addAction(w11)
wineOption.addSeparator()
wm3 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用 opengl"))
optionCheckDemo = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "组件功能测试"))
vbDemo = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "测试 Visual Basic 6 程序"))
netDemo = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "测试 .net framework 程序"))
netIEDemo = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "测试 .net framework + Internet Explorer 程序"))
optionCheckDemo.addAction(vbDemo)
optionCheckDemo.addAction(netDemo)
optionCheckDemo.addAction(netIEDemo)
wineOption.addSeparator()
wm3 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用功能"))
ed1 = wm3.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用 opengl"))
wm3_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "开启 opengl"))
wm3_2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用 opengl"))
wm3.addAction(wm3_1)
wm3.addAction(wm3_2)
wm4 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "安装/卸载 winbind"))
ed1.addAction(wm3_1)
ed1.addAction(wm3_2)
ed2 = wm3.addMenu(QtCore.QCoreApplication.translate("U", "安装/卸载 winbind"))
wm4_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 winbind"))
wm4_2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "卸载 winbind"))
wm4.addAction(wm4_1)
wm4.addAction(wm4_2)
dxvkMenu = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "安装/卸载 DXVK"))
ed2.addAction(wm4_1)
ed2.addAction(wm4_2)
dxvkMenu = wm3.addMenu(QtCore.QCoreApplication.translate("U", "安装/卸载 DXVK"))
installDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 DXVK"))
uninstallDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "卸载 DXVK"))
dxvkMenu.addAction(installDxvk)
@@ -2514,6 +2526,9 @@ disbledHttpProxy.triggered.connect(DisbledHttpProxy)
saveDllOver.triggered.connect(SaveDllList)
addDllOver.triggered.connect(AddReg)
editDllOver.triggered.connect(lambda: RunWineProgram("winecfg"))
vbDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/vb.exe"))
netDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/net.exe"))
netIEDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/netandie.exe"))
virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)"))
v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))

View File

@@ -1,6 +1,8 @@
{
"Version": "2.5.0",
"Thank": [
"感谢 @雁舞白沙 优化了程序文案",
"感谢 @豪 制作的非官方论坛 https://gfdgdxi.flarum.cloud/",
"感谢 @185******67 反馈的 2.4.0 无法打开 Visual Basic 组件安装工具的问题",
"感谢 @shenmo 提供的 在打包器的 postrm 脚本添加 kill.sh、追加参数改为 --uri xxxxxxx、独立生成容器 7z 文件的功能",
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",