Compare commits

...

10 Commits
Alpha ... 2.3.0

Author SHA1 Message Date
fbfd5bbe7b 更新 README 2022-10-02 22:17:00 +08:00
0bdf0d2e2f 完成了 2022-10-02 22:08:12 +08:00
f8678cea12 更新自动配置脚本命令 2022-10-02 21:59:53 +08:00
0e6883d927 删除: spark-deepin-wine-runner.deb 2022-10-02 14:59:30 +08:00
f9f8180c60 ?
修改:     deb/DEBIAN/control
	修改:     deb/opt/apps/deepin-wine-runner/deepin-wine-packager.py
	修改:     deb/opt/apps/deepin-wine-runner/deepin-wine-runner
	修改:     deb/opt/apps/deepin-wine-runner/information.json
	修改:     deb/opt/apps/deepin-wine-runner/package-script.zip
	修改:     deb/opt/apps/deepin-wine-runner/wine/installwine
	修改:     information.json
	修改:     mainwindow.py
	修改:     package-script.zip
	修改:     package-script/information.json
	修改:     wine/installwine
2022-10-02 14:54:23 +08:00
5edb8188b9 优化内容 2022-10-01 20:53:50 +08:00
2b3374e30b 更新更新内容 2022-09-29 22:13:22 +08:00
3ffe532779 修复7z解压问题 2022-09-29 22:08:06 +08:00
ed638a2002 Merge branch 'Alpha' into main 2022-09-29 21:48:46 +08:00
0c2242b1f0 支持禁用/启用 wine 容器是否生成快捷方式的功能 2022-09-28 21:55:54 +08:00
39 changed files with 864 additions and 235 deletions

View File

@@ -64,7 +64,7 @@ class Connect:
return return
# 判断版本以启动对应的解释器 # 判断版本以启动对应的解释器
# 做到新旧兼容 # 做到新旧兼容
if "$(" in things: if "($" in things:
print("a") print("a")
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '/tmp/wine-runner-auto-config.wsh' --system") OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '/tmp/wine-runner-auto-config.wsh' --system")
# 执行脚本 # 执行脚本
@@ -86,7 +86,7 @@ class Connect:
traceback.print_exc() traceback.print_exc()
# 判断版本以启动对应的解释器 # 判断版本以启动对应的解释器
# 做到新旧兼容 # 做到新旧兼容
if "$(" in things: if "($" in things:
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '{path[0]}' --system") OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '{path[0]}' --system")
# 执行脚本 # 执行脚本
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'") OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'")

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

13
AutoShell/command/taskmgr Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,41 @@
{
"installdll": "安装指定 dll 在指定容器\n参数数量1\n参数介绍dll名称或在从互联网获取DLL工具的编号如 7012 xolehlp.dll 平台2003 架构64 的 7012",
"stopdll": "不允许指定 dll/exe 运行\n参数数量1\n参数介绍dll/exe 名称,如 example.exe",
"installfont": "安装指定字体到指定容器\n参数数量1\n在字体商店的编号如 5 msyhbd.ttc 的 5",
"installsparkcorefont": "安装星火应用商店的“微软核心字体”\n参数数量0\n参数介绍无",
"installmono": "安装最新版本的 mono 到指定容器\n参数数量0\n参数介绍无",
"installgecko": "安装最新版本的 gecko 到指定容器\n参数数量0\n参数介绍无",
"installvcpp": "安装指定的 VCPP 运行库到指定容器\n参数数量1\n参数介绍在安装 Visual Studio C++ 工具的编号,如 10 Visual Studio C++ 2015、2017、2019 和 2022 X64 的 10",
"installnet": "安装指定的 .net framework 运行库到指定容器\n参数数量1\n参数介绍在安装 .net framework 工具的编号,如 3 .net framework 4.5.1 Offline Installer 的 3",
"installmsxml": "安装指定的 MSXML 运行库到指定容器\n参数数量1\n参数介绍在安装 MSXML 工具的编号,如 1、MSXML 4.0 SP3 的 1",
"echo": "显示内容\n参数数量≥1\n参数介绍接要显示的内容",
"info": "显示提示对话框\n参数数量2\n参数介绍标题+显示内容",
"error": "显示错误对话框\n参数数量2\n参数介绍标题+显示内容",
"warning": "显示警告对话框\n参数数量2\n参数介绍标题+显示内容",
"exit": "退出程序\n参数数量0\n参数介绍无",
"bat": "执行 cmd 命令在 Wine 容器内(在 Windows 将在系统执行命令)\n参数数量≥1\n参数介绍接要执行的命令",
"bash": "执行 bash 命令(在 Windows 系统将执行 cmd 命令)\n参数数量≥1\n参数介绍接要执行的命令",
"version": "显示解释器版本Wine 运行器版本)\n参数数量0\n参数介绍无",
"thank": "显示谢明列表\n参数数量0\n参数介绍无",
"pause": "按回车键后继续\n参数数量0\n参数介绍无",
"download": "使用 aria2 下载文件\n参数数量≥1 && ≤3\n参数介绍下载URL+保存在的文件夹+保存的文件名",
"installdxvk": "安装 dxvk 到指定容器\n参数数量0\n参数介绍无",
"createbotton": "在指定目录创建容器\n参数数量0\n参数介绍无",
"reg": "导入 .reg 文件\n参数数量0\n参数介绍reg 文件路径",
"enabledopengl": "开启 OpenGL\n参数数量0\n参数介绍无",
"disbledopengl": "关闭 OpenGL\n参数数量0\n参数介绍无",
"winecfg": "显示“Wine 设置”\n参数数量0\n参数介绍无",
"winver": "显示“关于 Wine”\n参数数量0\n参数介绍无",
"changeversion": "更改 Wine 容器系统版本(未实现)\n参数数量无\n参数介绍无",
"cat": "显示指定文件只支持显示编码为UTF-8的文件\n参数数量1\n参数介绍无",
"enabledhttpproxy": "设置指定容器代理\n参数数量2\n参数介绍代理服务器地址+端口",
"disbledhttpproxy": "禁用指定容器代理\n参数数量0\n参数介绍无",
"enabledwinecrashdialog": "启用 Wine 容器程序崩溃提示窗口\n参数数量0\n参数介绍无",
"disbledwinecrashdialog": "启用 Wine 容器程序崩溃提示窗口\n参数数量0\n参数介绍无",
"disbledWinebottlecreatelink": "禁止 Wine 容器生成快捷方式\n参数数量0\n参数介绍无",
"enabledWinebottlecreatelink": "允许 Wine 容器生成快捷方式\n参数数量0\n参数介绍无",
"killall": "杀死指定进程\n参数数量1\n参数介绍进程名",
"control": "打开控制面板\n参数数量0\n参数介绍无",
"taskmgr": "打开任务管理器\n参数数量0\n参数介绍无",
"killallwineserver": "杀死所有 Wine 程序\n参数数量0\n参数介绍无"
}

View File

@@ -13,6 +13,7 @@ import time
import json import json
import platform import platform
import traceback import traceback
import subprocess
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets
# 读取文本文档 # 读取文本文档
def readtxt(path): def readtxt(path):
@@ -25,6 +26,7 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
information = json.loads(readtxt(f"{programPath}/information.json")) information = json.loads(readtxt(f"{programPath}/information.json"))
version = information["Version"] version = information["Version"]
thankText = "" thankText = ""
helpList = json.loads(readtxt(f"{programPath}/ConfigLanguareRunner-help.json"))
for i in information["Thank"]: for i in information["Thank"]:
thankText += f"{i}\n" thankText += f"{i}\n"
programEnv = [ programEnv = [
@@ -97,7 +99,17 @@ class Command():
"winver", "winver",
"changeversion", "changeversion",
"stopdll", "stopdll",
"cat" "cat",
"taskmgr",
"control",
"killall",
"killallwineserver",
"enabledhttpproxy",
"disbledhttpproxy",
"enabledwinecrashdialog",
"disbledwinecrashdialog",
"disbledWinebottlecreatelink",
"enabledWinebottlecreatelink"
] ]
def __init__(self, commandString: str) -> None: def __init__(self, commandString: str) -> None:
@@ -321,6 +333,64 @@ class Command():
print("文件读取错误") print("文件读取错误")
Debug() Debug()
def Taskmgr(self):
self.command = ["bat", "taskmgr"]
return self.Bat()
def Control(self):
self.command = ["bat", "control"]
return self.Bat()
def Killall(self):
os.system(f"killall -9 {self.command[1]}")
def KillallWineServer(self):
command = ["WINEPREFIX='($WINEPREFIX)'", "($WINE)", "-k"]
for i in programEnv:
for k in range(len(command)):
command[k] = command[k].replace(i[0], i[1])
if "box86" in command[1] or "exagear" in command[1] or "box64" in command[1]:
print("不支持此 Wine")
return 1
if os.path.exists(command[1]):
# 文件存在
command[1] = f"{os.path.dirname(command[1])}/wineserver"
else:
# 读 which
command[1] = f"{os.path.dirname(subprocess.getoutput(f'which {command[1]}').strip())}/wineserver"
commandStr = command[0] + " "
for i in command[1:]:
commandStr += f"'{i}' "
return os.system(commandStr)
def EnabledWineBottleCreateLink(self):
self.command = ["bat", "reg", "delete", "HKEY_CURRENT_USER\Software\Wine\DllOverrides", "/v", "winemenubuilder.exe", "/f"]
self.Bat()
def DisbledWineBottleCreateLink(self):
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\DllOverrides", "/v", "winemenubuilder.exe", "/f"]
self.Bat()
def DisbledWineCrashDialog(self):
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\WineDbg", "/v", "ShowCrashDialog", "/t", "REG_DWORD", "/d", "00000000", "/f"]
self.Bat()
def EnabledWineCrashDialog(self):
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\WineDbg", "/v", "ShowCrashDialog", "/t", "REG_DWORD", "/d", "00000001", "/f"]
self.Bat()
def EnabledHttpProxy(self):
proxyServerAddress = self.command[1]
port = self.command[2]
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000001", "/f"]
self.Bat()
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyServer", "/d", f"{proxyServerAddress}:{port}", "/f"]
self.Bat()
def DisbledHttpProxy(self):
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000000", "/f"]
self.Bat()
# 可以运行的命令的映射关系 # 可以运行的命令的映射关系
# 可以被使用的命令的映射 # 可以被使用的命令的映射
commandList = { commandList = {
@@ -352,11 +422,21 @@ class Command():
"winver": Winver, "winver": Winver,
"changeversion": ChangeVersion, "changeversion": ChangeVersion,
"stopdll": StopDll, "stopdll": StopDll,
"cat": Cat "cat": Cat,
"taskmgr": Taskmgr,
"control": Control,
"killallwineserver": KillallWineServer,
"enabledhttpproxy": EnabledHttpProxy,
"disbledhttpproxy": DisbledHttpProxy,
"enabledwinecrashdialog": EnabledWineCrashDialog,
"disbledwinecrashdialog": DisbledWineCrashDialog,
"disbledWinebottlecreatelink": DisbledWineBottleCreateLink,
"enabledWinebottlecreatelink": EnabledWineBottleCreateLink
} }
# 参数数列表 # 参数数列表
commandInfo = { commandInfo = {
"killall": [1],
"installdll": [1], "installdll": [1],
"installfont": [1], "installfont": [1],
"installsparkcorefont": [0], "installsparkcorefont": [0],
@@ -385,7 +465,16 @@ class Command():
"winver": [0], "winver": [0],
"changeversion": [1], "changeversion": [1],
"stopdll": [1], "stopdll": [1],
"cat": [1] "cat": [1],
"taskmgr": [0],
"control": [0],
"killallwineserver": [0],
"enabledhttpproxy": [2],
"disbledhttpproxy": [0],
"enabledwinecrashdialog": [0],
"disbledwinecrashdialog": [0],
"disbledWinebottlecreatelink": [0],
"enabledWinebottlecreatelink": [0]
} }
windowsUnrun = [ windowsUnrun = [
"createbotton", "createbotton",
@@ -432,6 +521,13 @@ class Command():
print("此命令不支持在 Windows 上运行") print("此命令不支持在 Windows 上运行")
programEnv[9][1] = "-5" programEnv[9][1] = "-5"
continue continue
# 获取程序帮助信息
try:
if i[1] == "--help":
print(helpList[i[0]].replace("\\n", "\n"))
continue
except:
pass
# 正常命令解析 # 正常命令解析
if len(i) -1 < self.commandInfo[i[0]][0]: if len(i) -1 < self.commandInfo[i[0]][0]:
print("参数不足") print("参数不足")

View File

@@ -1,5 +1,5 @@
<p width=100px align="center"><img src="https://storage.deepin.org/thread/202208031419283599_deepin-wine-runner.png"></p> <p width=100px align="center"><img src="https://storage.deepin.org/thread/202208031419283599_deepin-wine-runner.png"></p>
<h1 align="center">Wine 运行器 2.2.0</h1> <h1 align="center">Wine 运行器 2.3.0</h1>
<hr> <hr>
## 介绍 ## 介绍
@@ -8,10 +8,10 @@
env WINEPREFIX=容器路径 winewine的路径 可执行文件路径 env WINEPREFIX=容器路径 winewine的路径 可执行文件路径
``` ```
让你可以简易方便的使用 wine 让你可以简易方便的使用 wine
是使用 Python3 的 tkinter 构建的 是使用 Python3 的 PyQt5 构建的
(自己美术功底太差,图标只能在网络上找了) (自己美术功底太差,图标只能在网络上找了)
测试平台deepin 20.7UOS 家庭版 21.3.1Ubuntu 22.04UOS 专业版 1050 测试平台deepin 20.7UOS 家庭版 21.3.1Ubuntu 22.04Ubuntu 20.04UOS 专业版 1050
![image.png](https://storage.deepin.org/thread/202209242126366137_image.png) ![截图_选择区域_20221002221112.png](https://storage.deepin.org/thread/202210022215217037_截图_选择区域_20221002221112.png)
而打包器可以方便的把您的 wine 容器打包成 deb 包供他人使用,程序创建的 deb 构建临时文件夹目录树如下: 而打包器可以方便的把您的 wine 容器打包成 deb 包供他人使用,程序创建的 deb 构建临时文件夹目录树如下:
```bash ```bash
/XXX /XXX
@@ -102,6 +102,19 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
![image.png](https://storage.deepin.org/thread/202207190822204627_image.png) ![image.png](https://storage.deepin.org/thread/202207190822204627_image.png)
## 更新日志 ## 更新日志
### 2.3.02022年10月02日
**※1、自动配置解释器支持 bash 语法(新版底层调用 bash旧版任然使用旧版解析引擎**
**※2、修复缺失 wimtools 依赖导致无法正常安装的问题**
**※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题并支持指定不同的包名和容器名**
**※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题**
**※5、修复安装更多 Wine 终端调用问题和图标问题**
**※6、支持 openkylin**
7、支持通过 exe 路径自动生成 Wine 容器路径
8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
9、支持设置 wine 容器代理
10、自动配置脚本支持使用 `--help` 参数查看帮助
![截图_选择区域_20221002221112.png](https://storage.deepin.org/thread/202210022215217037_截图_选择区域_20221002221112.png)
### 2.2.02022年09月24日 ### 2.2.02022年09月24日
**※1、Dll 提取工具支持 NT 6.X 及以上版本的 Dll 提取并优化了提示文本** **※1、Dll 提取工具支持 NT 6.X 及以上版本的 Dll 提取并优化了提示文本**
**※2、支持卸载后自动删除缓存/配置文件(删除配置文件只限 purge 参数删除)** **※2、支持卸载后自动删除缓存/配置文件(删除配置文件只限 purge 参数删除)**

View File

@@ -1,5 +1,5 @@
Package: spark-deepin-wine-runner Package: spark-deepin-wine-runner
Version: 2.2.1 Version: 2.3.0
Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢 Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢
Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner, https://github.com/gfdgd-xi/deep-wine-runner, https://gitlink.org.cn/gfdgd_xi/deep-wine-runner Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner, https://github.com/gfdgd-xi/deep-wine-runner, https://gitlink.org.cn/gfdgd_xi/deep-wine-runner
Architecture: all Architecture: all
@@ -9,31 +9,18 @@ Recommends: winbind, wimtools
Section: utils Section: utils
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52 Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52 Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
Installed-Size: 26500 Installed-Size: 26576
Description: gfdgd xi、为什么您不喜欢熊出没和阿布呢 制作的 wine 运行器 Description: gfdgd xi、为什么您不喜欢熊出没和阿布呢 制作的 wine 运行器
2.2.0 更新内容: 2.3.0 更新内容:
※1、Dll 提取工具支持 NT 6.X 及以上版本的 Dll 提取并优化了提示文本 ※1、自动配置解释器支持 bash 语法(新版底层调用 bash旧版任然使用旧版解析引擎
※2、支持卸载后自动删除缓存/配置文件(删除配置文件只限 purge 参数删除) ※2、修复缺失 wimtools 依赖导致无法正常安装的问题
※3、DEBUG 模式输出更多信息以方便调试(原本只输出 pid、Err ※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题,并支持指定不同的包名和容器名
※4、支持安装 msi 文件 ※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题
※5、修复无法正常评分的问题 ※5、修复安装更多 Wine 终端调用问题和图标问题
※6、修复 QQ、TIM 安装后无法正常生成快捷方式的问题 ※6、支持 openkylin
7、基于生态适配活动的打包器更换为 spark-wine-helper 以及添加自动删除残留脚本 7、支持通过 exe 路径自动生成 Wine 容器路径
8、打包器支持从 deb 文件读取信息 8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
9、修复在 UOS 专业版(鲲鹏)无法正常运行的问题以及组件安装功能无法正常执行安装命令的问题 9、支持设置 wine 容器代理
10、修复出现星火应用商店和官方应用商店反复提示更新死循环的问题 10、自动配置脚本支持使用 --help 参数查看帮助
※11、新增评分分数预测功能不准 更新时间2022年10月02日
※12、更换程序接口
※13、将 WineHQ 的源换为国内源
14、更新组件安装的离线列表
15、不再强制依赖深度终端只做推荐安装
16、基于生态活动适配脚本的打包器在打包完成后会弹出对话框提示打包完成
17、优化打包器的 spark wine helper 依赖设置方式
18、新增 RegShot注册表比对工具
19、添加 Wine 运行器评分数据的搜索功能
以下更新内容旧版本也适用(只限 2.1.0 及以上版本):
※1、在“安装更多Wine”的Wine安装工具中上新 Wine
※2、云 Dll 工具上新 Dll
※3、VCPP、net 运行库安装工具新增运行库
更新时间2022年09月24日
作者gfdgd xi、为什么您不喜欢熊出没和阿布呢 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢

View File

@@ -2,8 +2,8 @@
# 使用系统默认的 sh 运行 # 使用系统默认的 sh 运行
################################################################################################################# #################################################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢 # 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.2.1 # 版本2.3.0
# 更新时间2022年09月29 # 更新时间2022年10月02
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 # 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
# 基于 sh # 基于 sh
################################################################################################################# #################################################################################################################
@@ -32,4 +32,4 @@ fi
# 设置目录权限,让用户可读可写,方便后续删除组件 # 设置目录权限,让用户可读可写,方便后续删除组件
chmod 777 -R /opt/apps/deepin-wine-runner chmod 777 -R /opt/apps/deepin-wine-runner
# 向服务器返回安装数加1不显示内容且忽略错误 # 向服务器返回安装数加1不显示内容且忽略错误
curl https://304626p927.goho.co/spark-deepin-wine-runner/Install.php?Version=2.2.1 -s > /dev/null | true curl https://304626p927.goho.co/spark-deepin-wine-runner/Install.php?Version=2.3.0 -s > /dev/null | true

View File

@@ -64,7 +64,7 @@ class Connect:
return return
# 判断版本以启动对应的解释器 # 判断版本以启动对应的解释器
# 做到新旧兼容 # 做到新旧兼容
if "$(" in things: if "($" in things:
print("a") print("a")
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '/tmp/wine-runner-auto-config.wsh' --system") OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '/tmp/wine-runner-auto-config.wsh' --system")
# 执行脚本 # 执行脚本
@@ -86,7 +86,7 @@ class Connect:
traceback.print_exc() traceback.print_exc()
# 判断版本以启动对应的解释器 # 判断版本以启动对应的解释器
# 做到新旧兼容 # 做到新旧兼容
if "$(" in things: if "($" in things:
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '{path[0]}' --system") OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '{path[0]}' --system")
# 执行脚本 # 执行脚本
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'") OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'")

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# 加入路径
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
import ConfigLanguareRunner
# 符号转移
argv = []
for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))

View File

@@ -13,6 +13,7 @@ import time
import json import json
import platform import platform
import traceback import traceback
import subprocess
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets
# 读取文本文档 # 读取文本文档
def readtxt(path): def readtxt(path):
@@ -25,6 +26,7 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
information = json.loads(readtxt(f"{programPath}/information.json")) information = json.loads(readtxt(f"{programPath}/information.json"))
version = information["Version"] version = information["Version"]
thankText = "" thankText = ""
helpList = json.loads(readtxt(f"{programPath}/ConfigLanguareRunner-help.json"))
for i in information["Thank"]: for i in information["Thank"]:
thankText += f"{i}\n" thankText += f"{i}\n"
programEnv = [ programEnv = [
@@ -97,7 +99,17 @@ class Command():
"winver", "winver",
"changeversion", "changeversion",
"stopdll", "stopdll",
"cat" "cat",
"taskmgr",
"control",
"killall",
"killallwineserver",
"enabledhttpproxy",
"disbledhttpproxy",
"enabledwinecrashdialog",
"disbledwinecrashdialog",
"disbledWinebottlecreatelink",
"enabledWinebottlecreatelink"
] ]
def __init__(self, commandString: str) -> None: def __init__(self, commandString: str) -> None:
@@ -321,6 +333,64 @@ class Command():
print("文件读取错误") print("文件读取错误")
Debug() Debug()
def Taskmgr(self):
self.command = ["bat", "taskmgr"]
return self.Bat()
def Control(self):
self.command = ["bat", "control"]
return self.Bat()
def Killall(self):
os.system(f"killall -9 {self.command[1]}")
def KillallWineServer(self):
command = ["WINEPREFIX='($WINEPREFIX)'", "($WINE)", "-k"]
for i in programEnv:
for k in range(len(command)):
command[k] = command[k].replace(i[0], i[1])
if "box86" in command[1] or "exagear" in command[1] or "box64" in command[1]:
print("不支持此 Wine")
return 1
if os.path.exists(command[1]):
# 文件存在
command[1] = f"{os.path.dirname(command[1])}/wineserver"
else:
# 读 which
command[1] = f"{os.path.dirname(subprocess.getoutput(f'which {command[1]}').strip())}/wineserver"
commandStr = command[0] + " "
for i in command[1:]:
commandStr += f"'{i}' "
return os.system(commandStr)
def EnabledWineBottleCreateLink(self):
self.command = ["bat", "reg", "delete", "HKEY_CURRENT_USER\Software\Wine\DllOverrides", "/v", "winemenubuilder.exe", "/f"]
self.Bat()
def DisbledWineBottleCreateLink(self):
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\DllOverrides", "/v", "winemenubuilder.exe", "/f"]
self.Bat()
def DisbledWineCrashDialog(self):
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\WineDbg", "/v", "ShowCrashDialog", "/t", "REG_DWORD", "/d", "00000000", "/f"]
self.Bat()
def EnabledWineCrashDialog(self):
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Wine\WineDbg", "/v", "ShowCrashDialog", "/t", "REG_DWORD", "/d", "00000001", "/f"]
self.Bat()
def EnabledHttpProxy(self):
proxyServerAddress = self.command[1]
port = self.command[2]
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000001", "/f"]
self.Bat()
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyServer", "/d", f"{proxyServerAddress}:{port}", "/f"]
self.Bat()
def DisbledHttpProxy(self):
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000000", "/f"]
self.Bat()
# 可以运行的命令的映射关系 # 可以运行的命令的映射关系
# 可以被使用的命令的映射 # 可以被使用的命令的映射
commandList = { commandList = {
@@ -352,11 +422,21 @@ class Command():
"winver": Winver, "winver": Winver,
"changeversion": ChangeVersion, "changeversion": ChangeVersion,
"stopdll": StopDll, "stopdll": StopDll,
"cat": Cat "cat": Cat,
"taskmgr": Taskmgr,
"control": Control,
"killallwineserver": KillallWineServer,
"enabledhttpproxy": EnabledHttpProxy,
"disbledhttpproxy": DisbledHttpProxy,
"enabledwinecrashdialog": EnabledWineCrashDialog,
"disbledwinecrashdialog": DisbledWineCrashDialog,
"disbledWinebottlecreatelink": DisbledWineBottleCreateLink,
"enabledWinebottlecreatelink": EnabledWineBottleCreateLink
} }
# 参数数列表 # 参数数列表
commandInfo = { commandInfo = {
"killall": [1],
"installdll": [1], "installdll": [1],
"installfont": [1], "installfont": [1],
"installsparkcorefont": [0], "installsparkcorefont": [0],
@@ -385,7 +465,16 @@ class Command():
"winver": [0], "winver": [0],
"changeversion": [1], "changeversion": [1],
"stopdll": [1], "stopdll": [1],
"cat": [1] "cat": [1],
"taskmgr": [0],
"control": [0],
"killallwineserver": [0],
"enabledhttpproxy": [2],
"disbledhttpproxy": [0],
"enabledwinecrashdialog": [0],
"disbledwinecrashdialog": [0],
"disbledWinebottlecreatelink": [0],
"enabledWinebottlecreatelink": [0]
} }
windowsUnrun = [ windowsUnrun = [
"createbotton", "createbotton",
@@ -432,6 +521,13 @@ class Command():
print("此命令不支持在 Windows 上运行") print("此命令不支持在 Windows 上运行")
programEnv[9][1] = "-5" programEnv[9][1] = "-5"
continue continue
# 获取程序帮助信息
try:
if i[1] == "--help":
print(helpList[i[0]].replace("\\n", "\n"))
continue
except:
pass
# 正常命令解析 # 正常命令解析
if len(i) -1 < self.commandInfo[i[0]][0]: if len(i) -1 < self.commandInfo[i[0]][0]:
print("参数不足") print("参数不足")

View File

@@ -818,6 +818,7 @@ fi
# 设置容器 # 设置容器
############### ###############
self.label.emit("正在设置 wine 容器") self.label.emit("正在设置 wine 容器")
if e6_text.text()[-3: ] != ".7z":
os.chdir(programPath) os.chdir(programPath)
if cleanBottonByUOS.isChecked(): if cleanBottonByUOS.isChecked():
self.run_command(f"WINE='{debInformation[debArch.currentIndex()]['Wine']}' '{programPath}/cleanbottle.sh' '{b}'") self.run_command(f"WINE='{debInformation[debArch.currentIndex()]['Wine']}' '{programPath}/cleanbottle.sh' '{b}'")
@@ -858,8 +859,8 @@ fi
############### ###############
self.label.emit("正在打包 wine 容器") self.label.emit("正在打包 wine 容器")
# 都有 7z 了为什么要打包呢? # 都有 7z 了为什么要打包呢?
if e1_text.text()[-3: ] == ".7z": if e6_text.text()[-3: ] == ".7z":
shutil.copy(e1_text.text(), f"{debPackagePath}/opt/apps/{e1_text.text()}/files/files.7z") shutil.copy(e6_text.text(), f"{debPackagePath}/opt/apps/{e1_text.text()}/files/files.7z")
else: else:
self.run_command("7z a {}/opt/apps/{}/files/files.7z {}/*".format(debPackagePath, e1_text.text(), b)) self.run_command("7z a {}/opt/apps/{}/files/files.7z {}/*".format(debPackagePath, e1_text.text(), b))
############### ###############
@@ -1076,6 +1077,8 @@ def ReadDeb(unzip = False):
# 获取路径 # 获取路径
debPath = QtWidgets.QFileDialog.getOpenFileName(window, "读取 deb 包", get_home(), "deb包(*.deb);;所有文件(*.*)")[0] debPath = QtWidgets.QFileDialog.getOpenFileName(window, "读取 deb 包", get_home(), "deb包(*.deb);;所有文件(*.*)")[0]
print(debPath) print(debPath)
if debPath == "":
return
# 分类讨论 # 分类讨论
path = f"/tmp/deb-unzip-{random.randint(0, 1000)}" path = f"/tmp/deb-unzip-{random.randint(0, 1000)}"
# 新建文件夹 # 新建文件夹
@@ -1234,6 +1237,66 @@ def ReadDeb(unzip = False):
wineVersion.setCurrentText(wineValue[dependsItem]) wineVersion.setCurrentText(wineValue[dependsItem])
except: except:
print(f"忽略行:{i}") print(f"忽略行:{i}")
elif os.path.exists(f"{path}/opt/apps/{package}/files/run_with_box86.sh"):
file = open(f"{path}/opt/apps/{package}/files/run_with_box86.sh", "r")
items = file.read().splitlines()
file.close()
for i in items:
# 按行解析
if i.replace(" ", "").replace("\n", "") == "":
# 空行,忽略
continue
# 忽略 export
line = i.replace("export ", "")
# 忽略注释
if "#" in line:
line = line[:line.index("#")]
# 判断是否合法
try:
name = line[:line.index("=")].strip()
value = line[line.index("=") + 1:].replace("\"", "").strip()
#lnkMap[name].setText(value)
if name in lnkMap:
lnkMap[name].setText(value)
continue
# 其它的特殊情况判断
if name == "START_SHELL_PATH" and value == "/opt/deepinwine/tools/spark_run_v4.sh":
# helper
chooseWineHelperValue.setChecked(True)
if name == "APPRUN_CMD" and value in wineValue:
wineVersion.setCurrentText(wineValue[dependsItem])
except:
print(f"忽略行:{i}")
elif os.path.exists(f"{path}/opt/apps/{package}/files/run_with_exagear.sh"):
file = open(f"{path}/opt/apps/{package}/files/run_with_exagear.sh", "r")
items = file.read().splitlines()
file.close()
for i in items:
# 按行解析
if i.replace(" ", "").replace("\n", "") == "":
# 空行,忽略
continue
# 忽略 export
line = i.replace("export ", "")
# 忽略注释
if "#" in line:
line = line[:line.index("#")]
# 判断是否合法
try:
name = line[:line.index("=")].strip()
value = line[line.index("=") + 1:].replace("\"", "").strip()
#lnkMap[name].setText(value)
if name in lnkMap:
lnkMap[name].setText(value)
continue
# 其它的特殊情况判断
if name == "START_SHELL_PATH" and value == "/opt/deepinwine/tools/spark_run_v4.sh":
# helper
chooseWineHelperValue.setChecked(True)
if name == "APPRUN_CMD" and value in wineValue:
wineVersion.setCurrentText(wineValue[dependsItem])
except:
print(f"忽略行:{i}")

View File

@@ -2,8 +2,8 @@
# 使用系统默认的 python3 运行 # 使用系统默认的 python3 运行
################################################################################################################# #################################################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢 # 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.2.0 # 版本2.3.0
# 更新时间2022年09月24 # 更新时间2022年10月02
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 # 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
# 基于 Python3 的 PyQt5 构建 # 基于 Python3 的 PyQt5 构建
################################################################################################################# #################################################################################################################
@@ -165,12 +165,12 @@ class Runexebutton_threading(QtCore.QThread):
else: else:
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if setting["TerminalOpen"]: if setting["TerminalOpen"]:
@@ -288,13 +288,13 @@ def make_desktop_on_launcher():
else: else:
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
value = "" value = ""
if e2.currentText()[:2].upper() == "C:": if e2.currentText()[:2].upper() == "C:":
@@ -348,12 +348,12 @@ def make_desktop_on_desktop():
else: else:
wineBottonPath = e1.currentText() wineBottonPath = e1.currentText()
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if not os.path.exists(get_desktop_path()): if not os.path.exists(get_desktop_path()):
@@ -423,9 +423,14 @@ def ReStartProgram():
python = sys.executable python = sys.executable
os.execl(python, python, * sys.argv) os.execl(python, python, * sys.argv)
def KillAllProgram():
pass
def KillProgram(): def KillProgram():
os.system(f"killall {wine[o1.currentText()]} -9") os.system(f"killall {wine[o1.currentText()]} -9")
os.system("killall winedbg -9") os.system("killall winedbg -9")
exeName = os.path.basename(e2.currentText())
os.system(f"killall {exeName} -9")
def InstallWine(): def InstallWine():
threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start() threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start()
@@ -475,12 +480,12 @@ class RunWineProgramThread(QtCore.QThread):
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
os.system(f"'{programPath}/deepin-wine-runner-create-botton.py' '{wineBottonPath}'") os.system(f"'{programPath}/deepin-wine-runner-create-botton.py' '{wineBottonPath}'")
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if setting["TerminalOpen"]: if setting["TerminalOpen"]:
@@ -514,7 +519,7 @@ runProgram = None
def RunWineProgram(wineProgram, history = False, Disbled = True): def RunWineProgram(wineProgram, history = False, Disbled = True):
global runProgram global runProgram
DisableButton(True) DisableButton(True)
if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 box86 的 deepin-wine6-stable": if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable":
if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine:
DisableButton(False) DisableButton(False)
return return
@@ -539,12 +544,12 @@ class RunWinetricksThread(QtCore.QThread):
if not setting["Debug"]: if not setting["Debug"]:
option += "WINEDEBUG=-all " option += "WINEDEBUG=-all "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if setting["TerminalOpen"]: if setting["TerminalOpen"]:
@@ -570,14 +575,14 @@ runWinetricks = None
def RunWinetricks(): def RunWinetricks():
global runWinetricks global runWinetricks
DisableButton(True) DisableButton(True)
if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 box86 的 deepin-wine6-stable": if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable":
if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine:
DisableButton(False) DisableButton(False)
return return
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
returnText.setText("") returnText.setText("")
@@ -643,8 +648,8 @@ def InstallMSXML():
def InstallDXVK(): def InstallDXVK():
if not os.path.exists(f"{programPath}/dxvk"): if not os.path.exists(f"{programPath}/dxvk"):
if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dxvk.7z") os.remove(f"{programPath}/dxvk.7z")
if e1.currentText() == "": if e1.currentText() == "":
@@ -659,8 +664,8 @@ def InstallDXVK():
def UninstallDXVK(): def UninstallDXVK():
if not os.path.exists(f"{programPath}/dxvk"): if not os.path.exists(f"{programPath}/dxvk"):
if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dxvk.7z") os.remove(f"{programPath}/dxvk.7z")
if e1.currentText() == "": if e1.currentText() == "":
@@ -759,6 +764,18 @@ def InstallWineFont():
def WineRunnerBugUpload(): def WineRunnerBugUpload():
threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-runner-update-bug'"]).start() threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-runner-update-bug'"]).start()
def SetHttpProxy():
QtWidgets.QMessageBox.information(window, "提示", "请在下面的对话框正确输入内容以便设置代理")
proxyServerAddress = QtWidgets.QInputDialog.getText(window, "提示", "请输入代理服务器地址")[0]
port = QtWidgets.QInputDialog.getText(window, "提示", "请输入代理服务器端口")[0]
if proxyServerAddress == "" or port == "":
return
RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyEnable /t REG_DWORD /d 00000001 '/f")
RunWineProgram(f"reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyServer /d '{proxyServerAddress}:{port}' '/f")
def DisbledHttpProxy():
RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyEnable /t REG_DWORD /d 00000000 '/f")
def GetScreenSize(): def GetScreenSize():
screenInformation = [] screenInformation = []
# 使用 xrandr 进行筛选 # 使用 xrandr 进行筛选
@@ -1594,7 +1611,7 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# 如果要添加其他 wine请在字典添加其名称和执行路径 # 如果要添加其他 wine请在字典添加其名称和执行路径
try: try:
wine = { wine = {
"基于 box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ", "基于 UOS box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ",
"基于 exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ", "基于 exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ",
"deepin-wine6 stable": "deepin-wine6-stable", "deepin-wine6 stable": "deepin-wine6-stable",
"deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine5 stable": "deepin-wine5-stable",
@@ -1606,10 +1623,10 @@ try:
"ukylin-wine": "ukylin-wine", "ukylin-wine": "ukylin-wine",
"基于 linglong 的 deepin-wine6-stable不推荐": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'" "基于 linglong 的 deepin-wine6-stable不推荐": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'"
} }
untipsWine = ["基于 box86 的 deepin-wine6-stable", "基于 exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable不推荐"] untipsWine = ["基于 UOS box86 的 deepin-wine6-stable", "基于 exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable不推荐"]
canUseWine = [] canUseWine = []
if os.path.exists("/opt/deepin-box86/box86"): if os.path.exists("/opt/deepin-box86/box86"):
canUseWine.append("基于 box86 的 deepin-wine6-stable") canUseWine.append("基于 UOS box86 的 deepin-wine6-stable")
if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"): if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"):
canUseWine.append("基于 exagear 的 deepin-wine6-stable") canUseWine.append("基于 exagear 的 deepin-wine6-stable")
for i in wine.keys(): for i in wine.keys():
@@ -1634,8 +1651,14 @@ try:
value = "" value = ""
try: try:
if os.path.exists("/opt/deepin-box86/box86"): if os.path.exists("/opt/deepin-box86/box86"):
name = "基于 box86 的 " name = "基于 UOS box86 的 "
value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 " value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 "
if os.system("which box86") == 0:
name = "基于 box86 的 "
value = f"box86 "
if os.system("which box64") == 0:
name = "基于 box64 的 "
value = f"box64 "
if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"): if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"):
name = "基于 exagear 的 " name = "基于 exagear 的 "
value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- " value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- "
@@ -1793,36 +1816,20 @@ exe路径\' 参数 \'
<b>千万不要中断后不删除源的情况下 apt upgrade </b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine会自动执行恢复操作即可 <b>千万不要中断后不删除源的情况下 apt upgrade </b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine会自动执行恢复操作即可
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示 以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>''' <code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>'''
updateThingsString = '''<h2>2.2.0-1 更新内容</h2> updateThingsString = '''※1、自动配置解释器支持 bash 语法(新版底层调用 bash旧版任然使用旧版解析引擎
1、修复基于生态适配活动打包器对话框过多并修改了小提示内容 2、修复缺失 wimtools 依赖导致无法正常安装的问题
<h2>2.2.0 更新内容</h2> ※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题并支持指定不同的包名和容器名
1、Dll 提取工具支持 NT 6.X 及以上版本的 Dll 提取并优化了提示文本 4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题
2、支持卸载后自动删除缓存/配置文件(删除配置文件只限 purge 参数删除) 5、修复安装更多 Wine 终端调用问题和图标问题
3、DEBUG 模式输出更多信息以方便调试(原本只输出 pid、Err 6、支持 openkylin
※4、支持安装 msi 文件 7、支持通过 exe 路径自动生成 Wine 容器路径
※5、修复无法正常评分的问题 8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
※6、修复 QQ、TIM 安装后无法正常生成快捷方式的问题 9、支持设置 wine 容器代理
※7、基于生态适配活动的打包器更换为 spark-wine-helper 以及添加自动删除残留脚本 10、自动配置脚本支持使用 --help 参数查看帮助
※8、打包器支持从 deb 文件读取信息
※9、修复在 UOS 专业版(鲲鹏)无法正常运行的问题以及组件安装功能无法正常执行安装命令的问题
※10、修复出现星火应用商店和官方应用商店反复提示更新死循环的问题
※11、新增评分分数预测功能不准
※12、更换程序接口
※13、将 WineHQ 的源换为国内源
14、更新组件安装的离线列表
15、不再强制依赖深度终端只做推荐安装
16、基于生态活动适配脚本的打包器在打包完成后会弹出对话框提示打包完成
17、优化打包器的 spark wine helper 依赖设置方式
18、新增 RegShot注册表比对工具
19、添加 Wine 运行器评分数据的搜索功能
<b>以下更新内容旧版本也适用(只限 2.1.0 及以上版本)</b>
※1、在“安装更多Wine”的Wine安装工具中上新 Wine
※2、云 Dll 工具上新 Dll
※3、VCPP、net 运行库安装工具新增运行库
''' '''
for i in information["Thank"]: for i in information["Thank"]:
thankText += f"{i}\n" thankText += f"{i}\n"
updateTime = "2022年09月24日" updateTime = "2022年10月02日"
about = f'''<h1>关于</h1> about = f'''<h1>关于</h1>
<p>一个能让Linux用户更加方便运行Windows应用的程序内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</p> <p>一个能让Linux用户更加方便运行Windows应用的程序内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</p>
<p>同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具可以做到只需要用户下载系统镜像并点击安装即可无需顾及虚拟机安装、创建、虚拟机的分区等等</p> <p>同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具可以做到只需要用户下载系统镜像并点击安装即可无需顾及虚拟机安装、创建、虚拟机的分区等等</p>
@@ -2146,8 +2153,22 @@ installDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 D
uninstallDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "卸载 DXVK")) uninstallDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "卸载 DXVK"))
dxvkMenu.addAction(installDxvk) dxvkMenu.addAction(installDxvk)
dxvkMenu.addAction(uninstallDxvk) dxvkMenu.addAction(uninstallDxvk)
wineOption.addSeparator()
wineOption.addAction(deleteDesktopIcon) wineOption.addAction(deleteDesktopIcon)
settingWineBottleCreateLink = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "允许/禁止指定 wine 容器生成快捷方式"))
enabledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "允许指定 wine 容器生成快捷方式"))
disbledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁止指定 wine 容器生成快捷方式"))
settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink)
settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink)
settingWineCrashDialog = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用指定 wine 容器崩溃提示窗口"))
disbledWineCrashDialog = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器崩溃提示窗口"))
enabledWineCrashDialog = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "启用指定 wine 容器崩溃提示窗口"))
settingWineCrashDialog.addAction(disbledWineCrashDialog)
settingWineCrashDialog.addAction(enabledWineCrashDialog)
settingHttpProxy = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "设置指定 Wine 容器代理"))
enabledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设置指定 wine 容器的代理"))
disbledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器的代理"))
settingHttpProxy.addAction(enabledHttpProxy)
settingHttpProxy.addAction(disbledHttpProxy)
w1.triggered.connect(OpenWineBotton) w1.triggered.connect(OpenWineBotton)
w2.triggered.connect(InstallWineFont) w2.triggered.connect(InstallWineFont)
w3.triggered.connect(OpenWineFontPath) w3.triggered.connect(OpenWineFontPath)
@@ -2181,6 +2202,12 @@ wm4_2.triggered.connect(lambda: os.system(f"'{programPath}/launch.sh' deepin-ter
installDxvk.triggered.connect(InstallDXVK) installDxvk.triggered.connect(InstallDXVK)
uninstallDxvk.triggered.connect(UninstallDXVK) uninstallDxvk.triggered.connect(UninstallDXVK)
deleteDesktopIcon.triggered.connect(DeleteDesktopIcon) deleteDesktopIcon.triggered.connect(DeleteDesktopIcon)
enabledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f"))
disbledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f"))
disbledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000000 '/f"))
enabledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000001 '/f"))
enabledHttpProxy.triggered.connect(SetHttpProxy)
disbledHttpProxy.triggered.connect(DisbledHttpProxy)
virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)")) virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)"))
v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用")) v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))

View File

@@ -1,5 +1,5 @@
{ {
"Version": "2.2.1", "Version": "2.3.0",
"Thank": [ "Thank": [
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301", "感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
"感谢 @zhangs https://bbs.deepin.org/post/227948", "感谢 @zhangs https://bbs.deepin.org/post/227948",

View File

@@ -15,8 +15,11 @@ import sys
import json import json
import traceback import traceback
import requests import requests
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../")
from Model import *
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# UI 布局(自动生成) # UI 布局(自动生成)
class Ui_MainWindow(object): class Ui_MainWindow(object):
def setupUi(self, MainWindow): def setupUi(self, MainWindow):
@@ -175,17 +178,18 @@ class DownloadThread(QtCore.QThread):
if self.downloadUnzip: if self.downloadUnzip:
path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}" path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}"
shellCommand += f"""mkdir -p \"{path}\" shellCommand += f"""mkdir -p \"{path}\"
7z x \"{savePath}\" -o\"{path}\" 7z x -y \"{savePath}\" -o\"{path}\"
""" """
if self.downloadDeleteZip: if self.downloadDeleteZip:
shellCommand += f"rm -rf \"{savePath}\"\n" shellCommand += f"rm -rf \"{savePath}\"\n"
shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w") shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w")
shellFile.write(shellCommand) shellFile.write(shellCommand)
shellFile.close() shellFile.close()
process = QtCore.QProcess() #process = QtCore.QProcess()
command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"] #command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"]
process.start(f"{programPath}/../launch.sh", command) #process.start(f"{programPath}/../launch.sh", command)
process.waitForFinished() #process.waitForFinished()
OpenTerminal("bash /tmp/depein-wine-runner-wine-install.sh")
self.Finish.emit() self.Finish.emit()
except: except:
traceback.print_exc() traceback.print_exc()
@@ -274,7 +278,6 @@ if __name__ == "__main__":
localJsonList = [] localJsonList = []
internetJsonList = [] internetJsonList = []
internetWineSource = "https://code.gitlink.org.cn/gfdgd_xi/wine-mirrors/raw/branch/master/" internetWineSource = "https://code.gitlink.org.cn/gfdgd_xi/wine-mirrors/raw/branch/master/"
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
# 读取翻译 # 读取翻译
if not get_now_lang() == "zh_CN.UTF-8": if not get_now_lang() == "zh_CN.UTF-8":
@@ -284,6 +287,7 @@ if __name__ == "__main__":
# 窗口构建 # 窗口构建
window = QtWidgets.QMainWindow() window = QtWidgets.QMainWindow()
ui = Ui_MainWindow() ui = Ui_MainWindow()
window.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
ui.setupUi(window) ui.setupUi(window)
window.show() window.show()
# 连接信号 # 连接信号

View File

@@ -818,6 +818,7 @@ fi
# 设置容器 # 设置容器
############### ###############
self.label.emit("正在设置 wine 容器") self.label.emit("正在设置 wine 容器")
if e6_text.text()[-3: ] != ".7z":
os.chdir(programPath) os.chdir(programPath)
if cleanBottonByUOS.isChecked(): if cleanBottonByUOS.isChecked():
self.run_command(f"WINE='{debInformation[debArch.currentIndex()]['Wine']}' '{programPath}/cleanbottle.sh' '{b}'") self.run_command(f"WINE='{debInformation[debArch.currentIndex()]['Wine']}' '{programPath}/cleanbottle.sh' '{b}'")
@@ -858,8 +859,8 @@ fi
############### ###############
self.label.emit("正在打包 wine 容器") self.label.emit("正在打包 wine 容器")
# 都有 7z 了为什么要打包呢? # 都有 7z 了为什么要打包呢?
if e1_text.text()[-3: ] == ".7z": if e6_text.text()[-3: ] == ".7z":
shutil.copy(e1_text.text(), f"{debPackagePath}/opt/apps/{e1_text.text()}/files/files.7z") shutil.copy(e6_text.text(), f"{debPackagePath}/opt/apps/{e1_text.text()}/files/files.7z")
else: else:
self.run_command("7z a {}/opt/apps/{}/files/files.7z {}/*".format(debPackagePath, e1_text.text(), b)) self.run_command("7z a {}/opt/apps/{}/files/files.7z {}/*".format(debPackagePath, e1_text.text(), b))
############### ###############
@@ -1076,6 +1077,8 @@ def ReadDeb(unzip = False):
# 获取路径 # 获取路径
debPath = QtWidgets.QFileDialog.getOpenFileName(window, "读取 deb 包", get_home(), "deb包(*.deb);;所有文件(*.*)")[0] debPath = QtWidgets.QFileDialog.getOpenFileName(window, "读取 deb 包", get_home(), "deb包(*.deb);;所有文件(*.*)")[0]
print(debPath) print(debPath)
if debPath == "":
return
# 分类讨论 # 分类讨论
path = f"/tmp/deb-unzip-{random.randint(0, 1000)}" path = f"/tmp/deb-unzip-{random.randint(0, 1000)}"
# 新建文件夹 # 新建文件夹
@@ -1234,6 +1237,66 @@ def ReadDeb(unzip = False):
wineVersion.setCurrentText(wineValue[dependsItem]) wineVersion.setCurrentText(wineValue[dependsItem])
except: except:
print(f"忽略行:{i}") print(f"忽略行:{i}")
elif os.path.exists(f"{path}/opt/apps/{package}/files/run_with_box86.sh"):
file = open(f"{path}/opt/apps/{package}/files/run_with_box86.sh", "r")
items = file.read().splitlines()
file.close()
for i in items:
# 按行解析
if i.replace(" ", "").replace("\n", "") == "":
# 空行,忽略
continue
# 忽略 export
line = i.replace("export ", "")
# 忽略注释
if "#" in line:
line = line[:line.index("#")]
# 判断是否合法
try:
name = line[:line.index("=")].strip()
value = line[line.index("=") + 1:].replace("\"", "").strip()
#lnkMap[name].setText(value)
if name in lnkMap:
lnkMap[name].setText(value)
continue
# 其它的特殊情况判断
if name == "START_SHELL_PATH" and value == "/opt/deepinwine/tools/spark_run_v4.sh":
# helper
chooseWineHelperValue.setChecked(True)
if name == "APPRUN_CMD" and value in wineValue:
wineVersion.setCurrentText(wineValue[dependsItem])
except:
print(f"忽略行:{i}")
elif os.path.exists(f"{path}/opt/apps/{package}/files/run_with_exagear.sh"):
file = open(f"{path}/opt/apps/{package}/files/run_with_exagear.sh", "r")
items = file.read().splitlines()
file.close()
for i in items:
# 按行解析
if i.replace(" ", "").replace("\n", "") == "":
# 空行,忽略
continue
# 忽略 export
line = i.replace("export ", "")
# 忽略注释
if "#" in line:
line = line[:line.index("#")]
# 判断是否合法
try:
name = line[:line.index("=")].strip()
value = line[line.index("=") + 1:].replace("\"", "").strip()
#lnkMap[name].setText(value)
if name in lnkMap:
lnkMap[name].setText(value)
continue
# 其它的特殊情况判断
if name == "START_SHELL_PATH" and value == "/opt/deepinwine/tools/spark_run_v4.sh":
# helper
chooseWineHelperValue.setChecked(True)
if name == "APPRUN_CMD" and value in wineValue:
wineVersion.setCurrentText(wineValue[dependsItem])
except:
print(f"忽略行:{i}")

View File

@@ -1,5 +1,5 @@
{ {
"Version": "2.2.1", "Version": "2.3.0",
"Thank": [ "Thank": [
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301", "感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
"感谢 @zhangs https://bbs.deepin.org/post/227948", "感谢 @zhangs https://bbs.deepin.org/post/227948",

View File

@@ -2,8 +2,8 @@
# 使用系统默认的 python3 运行 # 使用系统默认的 python3 运行
################################################################################################################# #################################################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢 # 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.2.0 # 版本2.3.0
# 更新时间2022年09月24 # 更新时间2022年10月02
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 # 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
# 基于 Python3 的 PyQt5 构建 # 基于 Python3 的 PyQt5 构建
################################################################################################################# #################################################################################################################
@@ -165,12 +165,12 @@ class Runexebutton_threading(QtCore.QThread):
else: else:
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if setting["TerminalOpen"]: if setting["TerminalOpen"]:
@@ -288,13 +288,13 @@ def make_desktop_on_launcher():
else: else:
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
value = "" value = ""
if e2.currentText()[:2].upper() == "C:": if e2.currentText()[:2].upper() == "C:":
@@ -348,12 +348,12 @@ def make_desktop_on_desktop():
else: else:
wineBottonPath = e1.currentText() wineBottonPath = e1.currentText()
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if not os.path.exists(get_desktop_path()): if not os.path.exists(get_desktop_path()):
@@ -423,9 +423,14 @@ def ReStartProgram():
python = sys.executable python = sys.executable
os.execl(python, python, * sys.argv) os.execl(python, python, * sys.argv)
def KillAllProgram():
pass
def KillProgram(): def KillProgram():
os.system(f"killall {wine[o1.currentText()]} -9") os.system(f"killall {wine[o1.currentText()]} -9")
os.system("killall winedbg -9") os.system("killall winedbg -9")
exeName = os.path.basename(e2.currentText())
os.system(f"killall {exeName} -9")
def InstallWine(): def InstallWine():
threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start() threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start()
@@ -475,12 +480,12 @@ class RunWineProgramThread(QtCore.QThread):
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
os.system(f"'{programPath}/deepin-wine-runner-create-botton.py' '{wineBottonPath}'") os.system(f"'{programPath}/deepin-wine-runner-create-botton.py' '{wineBottonPath}'")
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if setting["TerminalOpen"]: if setting["TerminalOpen"]:
@@ -514,7 +519,7 @@ runProgram = None
def RunWineProgram(wineProgram, history = False, Disbled = True): def RunWineProgram(wineProgram, history = False, Disbled = True):
global runProgram global runProgram
DisableButton(True) DisableButton(True)
if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 box86 的 deepin-wine6-stable": if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable":
if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine:
DisableButton(False) DisableButton(False)
return return
@@ -539,12 +544,12 @@ class RunWinetricksThread(QtCore.QThread):
if not setting["Debug"]: if not setting["Debug"]:
option += "WINEDEBUG=-all " option += "WINEDEBUG=-all "
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 box86 的 deepin-wine6-stable": if o1.currentText() == "基于 exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = "" wineUsingOption = ""
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
if setting["TerminalOpen"]: if setting["TerminalOpen"]:
@@ -570,14 +575,14 @@ runWinetricks = None
def RunWinetricks(): def RunWinetricks():
global runWinetricks global runWinetricks
DisableButton(True) DisableButton(True)
if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 box86 的 deepin-wine6-stable": if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable":
if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine:
DisableButton(False) DisableButton(False)
return return
if o1.currentText() == "基于 box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable": if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
if not os.path.exists(f"{programPath}/dlls-arm"): if not os.path.exists(f"{programPath}/dlls-arm"):
if os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dlls-arm.7z") os.remove(f"{programPath}/dlls-arm.7z")
returnText.setText("") returnText.setText("")
@@ -643,8 +648,8 @@ def InstallMSXML():
def InstallDXVK(): def InstallDXVK():
if not os.path.exists(f"{programPath}/dxvk"): if not os.path.exists(f"{programPath}/dxvk"):
if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dxvk.7z") os.remove(f"{programPath}/dxvk.7z")
if e1.currentText() == "": if e1.currentText() == "":
@@ -659,8 +664,8 @@ def InstallDXVK():
def UninstallDXVK(): def UninstallDXVK():
if not os.path.exists(f"{programPath}/dxvk"): if not os.path.exists(f"{programPath}/dxvk"):
if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""): if os.system(f"7z x -y \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
QtWidgets.QMessageBox(widget, "错误", "无法解压资源") QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
return return
os.remove(f"{programPath}/dxvk.7z") os.remove(f"{programPath}/dxvk.7z")
if e1.currentText() == "": if e1.currentText() == "":
@@ -759,6 +764,18 @@ def InstallWineFont():
def WineRunnerBugUpload(): def WineRunnerBugUpload():
threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-runner-update-bug'"]).start() threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-runner-update-bug'"]).start()
def SetHttpProxy():
QtWidgets.QMessageBox.information(window, "提示", "请在下面的对话框正确输入内容以便设置代理")
proxyServerAddress = QtWidgets.QInputDialog.getText(window, "提示", "请输入代理服务器地址")[0]
port = QtWidgets.QInputDialog.getText(window, "提示", "请输入代理服务器端口")[0]
if proxyServerAddress == "" or port == "":
return
RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyEnable /t REG_DWORD /d 00000001 '/f")
RunWineProgram(f"reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyServer /d '{proxyServerAddress}:{port}' '/f")
def DisbledHttpProxy():
RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyEnable /t REG_DWORD /d 00000000 '/f")
def GetScreenSize(): def GetScreenSize():
screenInformation = [] screenInformation = []
# 使用 xrandr 进行筛选 # 使用 xrandr 进行筛选
@@ -1594,7 +1611,7 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# 如果要添加其他 wine请在字典添加其名称和执行路径 # 如果要添加其他 wine请在字典添加其名称和执行路径
try: try:
wine = { wine = {
"基于 box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ", "基于 UOS box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ",
"基于 exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ", "基于 exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ",
"deepin-wine6 stable": "deepin-wine6-stable", "deepin-wine6 stable": "deepin-wine6-stable",
"deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine5 stable": "deepin-wine5-stable",
@@ -1606,10 +1623,10 @@ try:
"ukylin-wine": "ukylin-wine", "ukylin-wine": "ukylin-wine",
"基于 linglong 的 deepin-wine6-stable不推荐": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'" "基于 linglong 的 deepin-wine6-stable不推荐": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'"
} }
untipsWine = ["基于 box86 的 deepin-wine6-stable", "基于 exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable不推荐"] untipsWine = ["基于 UOS box86 的 deepin-wine6-stable", "基于 exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable不推荐"]
canUseWine = [] canUseWine = []
if os.path.exists("/opt/deepin-box86/box86"): if os.path.exists("/opt/deepin-box86/box86"):
canUseWine.append("基于 box86 的 deepin-wine6-stable") canUseWine.append("基于 UOS box86 的 deepin-wine6-stable")
if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"): if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"):
canUseWine.append("基于 exagear 的 deepin-wine6-stable") canUseWine.append("基于 exagear 的 deepin-wine6-stable")
for i in wine.keys(): for i in wine.keys():
@@ -1634,8 +1651,14 @@ try:
value = "" value = ""
try: try:
if os.path.exists("/opt/deepin-box86/box86"): if os.path.exists("/opt/deepin-box86/box86"):
name = "基于 box86 的 " name = "基于 UOS box86 的 "
value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 " value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 "
if os.system("which box86") == 0:
name = "基于 box86 的 "
value = f"box86 "
if os.system("which box64") == 0:
name = "基于 box64 的 "
value = f"box64 "
if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"): if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"):
name = "基于 exagear 的 " name = "基于 exagear 的 "
value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- " value = f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- "
@@ -1793,36 +1816,20 @@ exe路径\' 参数 \'
<b>千万不要中断后不删除源的情况下 apt upgrade </b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine会自动执行恢复操作即可 <b>千万不要中断后不删除源的情况下 apt upgrade </b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine会自动执行恢复操作即可
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示 以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>''' <code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>'''
updateThingsString = '''<h2>2.2.0-1 更新内容</h2> updateThingsString = '''※1、自动配置解释器支持 bash 语法(新版底层调用 bash旧版任然使用旧版解析引擎
1、修复基于生态适配活动打包器对话框过多并修改了小提示内容 2、修复缺失 wimtools 依赖导致无法正常安装的问题
<h2>2.2.0 更新内容</h2> ※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题并支持指定不同的包名和容器名
1、Dll 提取工具支持 NT 6.X 及以上版本的 Dll 提取并优化了提示文本 4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题
2、支持卸载后自动删除缓存/配置文件(删除配置文件只限 purge 参数删除) 5、修复安装更多 Wine 终端调用问题和图标问题
3、DEBUG 模式输出更多信息以方便调试(原本只输出 pid、Err 6、支持 openkylin
※4、支持安装 msi 文件 7、支持通过 exe 路径自动生成 Wine 容器路径
※5、修复无法正常评分的问题 8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
※6、修复 QQ、TIM 安装后无法正常生成快捷方式的问题 9、支持设置 wine 容器代理
※7、基于生态适配活动的打包器更换为 spark-wine-helper 以及添加自动删除残留脚本 10、自动配置脚本支持使用 --help 参数查看帮助
※8、打包器支持从 deb 文件读取信息
※9、修复在 UOS 专业版(鲲鹏)无法正常运行的问题以及组件安装功能无法正常执行安装命令的问题
※10、修复出现星火应用商店和官方应用商店反复提示更新死循环的问题
※11、新增评分分数预测功能不准
※12、更换程序接口
※13、将 WineHQ 的源换为国内源
14、更新组件安装的离线列表
15、不再强制依赖深度终端只做推荐安装
16、基于生态活动适配脚本的打包器在打包完成后会弹出对话框提示打包完成
17、优化打包器的 spark wine helper 依赖设置方式
18、新增 RegShot注册表比对工具
19、添加 Wine 运行器评分数据的搜索功能
<b>以下更新内容旧版本也适用(只限 2.1.0 及以上版本)</b>
※1、在“安装更多Wine”的Wine安装工具中上新 Wine
※2、云 Dll 工具上新 Dll
※3、VCPP、net 运行库安装工具新增运行库
''' '''
for i in information["Thank"]: for i in information["Thank"]:
thankText += f"{i}\n" thankText += f"{i}\n"
updateTime = "2022年09月24" updateTime = "2022年10月02"
about = f'''<h1>关于</h1> about = f'''<h1>关于</h1>
<p>一个能让Linux用户更加方便运行Windows应用的程序内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</p> <p>一个能让Linux用户更加方便运行Windows应用的程序内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</p>
<p>同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具可以做到只需要用户下载系统镜像并点击安装即可无需顾及虚拟机安装、创建、虚拟机的分区等等</p> <p>同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具可以做到只需要用户下载系统镜像并点击安装即可无需顾及虚拟机安装、创建、虚拟机的分区等等</p>
@@ -2146,8 +2153,22 @@ installDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 D
uninstallDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "卸载 DXVK")) uninstallDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "卸载 DXVK"))
dxvkMenu.addAction(installDxvk) dxvkMenu.addAction(installDxvk)
dxvkMenu.addAction(uninstallDxvk) dxvkMenu.addAction(uninstallDxvk)
wineOption.addSeparator()
wineOption.addAction(deleteDesktopIcon) wineOption.addAction(deleteDesktopIcon)
settingWineBottleCreateLink = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "允许/禁止指定 wine 容器生成快捷方式"))
enabledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "允许指定 wine 容器生成快捷方式"))
disbledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁止指定 wine 容器生成快捷方式"))
settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink)
settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink)
settingWineCrashDialog = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用指定 wine 容器崩溃提示窗口"))
disbledWineCrashDialog = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器崩溃提示窗口"))
enabledWineCrashDialog = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "启用指定 wine 容器崩溃提示窗口"))
settingWineCrashDialog.addAction(disbledWineCrashDialog)
settingWineCrashDialog.addAction(enabledWineCrashDialog)
settingHttpProxy = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "设置指定 Wine 容器代理"))
enabledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设置指定 wine 容器的代理"))
disbledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器的代理"))
settingHttpProxy.addAction(enabledHttpProxy)
settingHttpProxy.addAction(disbledHttpProxy)
w1.triggered.connect(OpenWineBotton) w1.triggered.connect(OpenWineBotton)
w2.triggered.connect(InstallWineFont) w2.triggered.connect(InstallWineFont)
w3.triggered.connect(OpenWineFontPath) w3.triggered.connect(OpenWineFontPath)
@@ -2181,6 +2202,12 @@ wm4_2.triggered.connect(lambda: os.system(f"'{programPath}/launch.sh' deepin-ter
installDxvk.triggered.connect(InstallDXVK) installDxvk.triggered.connect(InstallDXVK)
uninstallDxvk.triggered.connect(UninstallDXVK) uninstallDxvk.triggered.connect(UninstallDXVK)
deleteDesktopIcon.triggered.connect(DeleteDesktopIcon) deleteDesktopIcon.triggered.connect(DeleteDesktopIcon)
enabledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f"))
disbledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f"))
disbledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000000 '/f"))
enabledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000001 '/f"))
enabledHttpProxy.triggered.connect(SetHttpProxy)
disbledHttpProxy.triggered.connect(DisbledHttpProxy)
virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)")) virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)"))
v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用")) v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))

Binary file not shown.

View File

@@ -1,3 +1,3 @@
{ {
"Version": "2.2.1" "Version": "2.3.0"
} }

View File

@@ -15,8 +15,11 @@ import sys
import json import json
import traceback import traceback
import requests import requests
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../")
from Model import *
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# UI 布局(自动生成) # UI 布局(自动生成)
class Ui_MainWindow(object): class Ui_MainWindow(object):
def setupUi(self, MainWindow): def setupUi(self, MainWindow):
@@ -175,17 +178,18 @@ class DownloadThread(QtCore.QThread):
if self.downloadUnzip: if self.downloadUnzip:
path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}" path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}"
shellCommand += f"""mkdir -p \"{path}\" shellCommand += f"""mkdir -p \"{path}\"
7z x \"{savePath}\" -o\"{path}\" 7z x -y \"{savePath}\" -o\"{path}\"
""" """
if self.downloadDeleteZip: if self.downloadDeleteZip:
shellCommand += f"rm -rf \"{savePath}\"\n" shellCommand += f"rm -rf \"{savePath}\"\n"
shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w") shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w")
shellFile.write(shellCommand) shellFile.write(shellCommand)
shellFile.close() shellFile.close()
process = QtCore.QProcess() #process = QtCore.QProcess()
command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"] #command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"]
process.start(f"{programPath}/../launch.sh", command) #process.start(f"{programPath}/../launch.sh", command)
process.waitForFinished() #process.waitForFinished()
OpenTerminal("bash /tmp/depein-wine-runner-wine-install.sh")
self.Finish.emit() self.Finish.emit()
except: except:
traceback.print_exc() traceback.print_exc()
@@ -274,7 +278,6 @@ if __name__ == "__main__":
localJsonList = [] localJsonList = []
internetJsonList = [] internetJsonList = []
internetWineSource = "https://code.gitlink.org.cn/gfdgd_xi/wine-mirrors/raw/branch/master/" internetWineSource = "https://code.gitlink.org.cn/gfdgd_xi/wine-mirrors/raw/branch/master/"
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
# 读取翻译 # 读取翻译
if not get_now_lang() == "zh_CN.UTF-8": if not get_now_lang() == "zh_CN.UTF-8":
@@ -284,6 +287,7 @@ if __name__ == "__main__":
# 窗口构建 # 窗口构建
window = QtWidgets.QMainWindow() window = QtWidgets.QMainWindow()
ui = Ui_MainWindow() ui = Ui_MainWindow()
window.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
ui.setupUi(window) ui.setupUi(window)
window.show() window.show()
# 连接信号 # 连接信号