diff --git a/Makefile b/Makefile index d39f456..e505ca6 100755 --- a/Makefile +++ b/Makefile @@ -16,6 +16,8 @@ build: cp -rv AllInstall.py deb/opt/apps/deepin-wine-runner cp -rv kill.sh deb/opt/apps/deepin-wine-runner cp -rv InstallWineOnDeepin23Alpha.py deb/opt/apps/deepin-wine-runner + echo "[]" > deb/opt/apps/deepin-wine-runner/wine/winelist.json + rm -rfv deb/opt/apps/deepin-wine-runner/wine/winelist.json cp -rv req deb/opt/apps/deepin-wine-runner cp -rv BuildDesktop.py deb/opt/apps/deepin-wine-runner cp -rv RegShot deb/opt/apps/deepin-wine-runner diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control index 99a144b..7f12e7a 100755 --- a/deb/DEBIAN/control +++ b/deb/DEBIAN/control @@ -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 包 diff --git a/deb/opt/apps/deepin-wine-runner/AllInstall.py b/deb/opt/apps/deepin-wine-runner/AllInstall.py index ad61ad8..cf43bae 100755 --- a/deb/opt/apps/deepin-wine-runner/AllInstall.py +++ b/deb/opt/apps/deepin-wine-runner/AllInstall.py @@ -57,30 +57,37 @@ print("请问是否要更新操作系统?[Y/N]", end=' ') choose = input().upper() if not choose == "N": os.system("sudo apt upgrade -y") -print("请问是否要安装原版 wine(wine64)?[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("请问是否要安装原版 wine(wine64)?[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("全部完成!") \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/BuildDesktop.py b/deb/opt/apps/deepin-wine-runner/BuildDesktop.py new file mode 100755 index 0000000..ec766ca --- /dev/null +++ b/deb/opt/apps/deepin-wine-runner/BuildDesktop.py @@ -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_() \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23Alpha.py b/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23Alpha.py new file mode 100755 index 0000000..61d074b --- /dev/null +++ b/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23Alpha.py @@ -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() diff --git a/deb/opt/apps/deepin-wine-runner/Test/net.exe b/deb/opt/apps/deepin-wine-runner/Test/net.exe new file mode 100755 index 0000000..0be1c09 Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/Test/net.exe differ diff --git a/deb/opt/apps/deepin-wine-runner/Test/netandie.exe b/deb/opt/apps/deepin-wine-runner/Test/netandie.exe new file mode 100755 index 0000000..22d0920 Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/Test/netandie.exe differ diff --git a/deb/opt/apps/deepin-wine-runner/Test/vb.exe b/deb/opt/apps/deepin-wine-runner/Test/vb.exe new file mode 100755 index 0000000..1945430 Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/Test/vb.exe differ diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner index 3d10555..cbef656 100755 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner +++ b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner @@ -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'''
一个能让Linux用户更加方便运行Windows应用的程序,内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等
-同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具,可以做到只需要用户下载系统镜像并点击安装即可,无需顾及虚拟机安装、创建、虚拟机的分区等等
+Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序,内置了对Wine图形化的支持、各种Wine工具、自制的Wine程序打包器和运行库安装工具等。
+它同时还内置了基于VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作。
本程序依照 GPLV3 协议开源
@@ -2119,7 +2121,8 @@ Qt 版本:{QtCore.qVersion()}友谊链接
星火应用商店:https://spark-app.store/ Deepin 官网:https://www.deepin.org -Deepin 论坛:https://bbs.deepin.org+Deepin 论坛:https://bbs.deepin.org +非官方论坛:https://gfdgdxi.flarum.cloud/
N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。
'''
-updateThingsString = '''※1、容器自动配置脚本 GUI 查看介绍使用 QWebEngineWidget,支持图片(非强制依赖,只做推荐)
-※2、不基于生态适配活动脚本打包器跟进 arm 架构 2022年11月11日的 Wine 微信打包方式
-※3、支持多图标的程序打包
-※4、修复了安装更多 Wine 换源换了个寂寞的问题
-※5、修复安装更多 Wine 重新安装后列表丢失的问题
-※6、新增了对 Deepin 23 Alpha 优化的 Wine 安装器
-※7、新增 Dll 名称查询功能,可以查询对应 Dll 的作用
-※8、支持静态获取可执行文件可以调用的 Dll 并提供解决方案
-※9、支持移除指定的 .desktop 快捷方式
-10、修复了不基于生态适配活动脚本打包器在选择 arm 打包架构下容器自动删除脚本取消勾选无用的问题
-11、优化文案
+updateThingsString = '''※1、容器自动配置脚本 GUI 查看介绍使用 QWebEngineWidget,支持图片(非强制依赖,只做推荐);
+※2、不基于生态适配活动脚本打包器跟进 arm 架构 2022年11月11日的 Wine 微信打包方式;
+※3、支持多图标的程序打包;
+※4、修复了安装更多 Wine 换源换了个寂寞的问题;
+※5、修复安装更多 Wine 重新安装后列表丢失的问题;
+※6、新增了对 Deepin 23 Alpha 优化的 Wine 安装器;
+※7、新增 Dll 名称查询功能,可以查询对应 Dll 的作用;
+※8、支持静态获取可执行文件可以调用的 Dll 并提供解决方案;
+※9、支持移除指定的 .desktop 快捷方式;
+10、修复了不基于生态适配活动脚本打包器在选择 arm 打包架构下容器自动删除脚本取消勾选无用的问题;
+11、优化文案、新增友链;
+12、提供了部分组件的测试功能。
'''
for i in information["Thank"]:
thankText += f"{i}\n"
-updateTime = "2022年11月22日"
+updateTime = "2022年11月23日"
about = f'''