mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-15 03:22:04 +08:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fbfd5bbe7b | |||
| 0bdf0d2e2f | |||
| f8678cea12 | |||
| 0e6883d927 | |||
| f9f8180c60 | |||
| 5edb8188b9 | |||
| 2b3374e30b | |||
| 3ffe532779 | |||
| ed638a2002 | |||
| 0c2242b1f0 |
@@ -64,7 +64,7 @@ class Connect:
|
||||
return
|
||||
# 判断版本以启动对应的解释器
|
||||
# 做到新旧兼容
|
||||
if "$(" in things:
|
||||
if "($" in things:
|
||||
print("a")
|
||||
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()
|
||||
# 判断版本以启动对应的解释器
|
||||
# 做到新旧兼容
|
||||
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}/AutoShell/main.py' '{path[0]}'")
|
||||
|
||||
13
AutoShell/command/disbledWinebottlecreatelink
Executable file
13
AutoShell/command/disbledWinebottlecreatelink
Executable 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/disbledhttpproxy
Executable file
13
AutoShell/command/disbledhttpproxy
Executable 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/disbledwinecrashdialog
Executable file
13
AutoShell/command/disbledwinecrashdialog
Executable 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/enabledWinebottlecreatelink
Executable file
13
AutoShell/command/enabledWinebottlecreatelink
Executable 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/enabledhttpproxy
Executable file
13
AutoShell/command/enabledhttpproxy
Executable 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/enabledwinecrashdialog
Executable file
13
AutoShell/command/enabledwinecrashdialog
Executable 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/killallwineserver
Executable file
13
AutoShell/command/killallwineserver
Executable 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
13
AutoShell/command/taskmgr
Executable 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"))
|
||||
41
ConfigLanguareRunner-help.json
Normal file
41
ConfigLanguareRunner-help.json
Normal 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参数介绍:无"
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import time
|
||||
import json
|
||||
import platform
|
||||
import traceback
|
||||
import subprocess
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
# 读取文本文档
|
||||
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"))
|
||||
version = information["Version"]
|
||||
thankText = ""
|
||||
helpList = json.loads(readtxt(f"{programPath}/ConfigLanguareRunner-help.json"))
|
||||
for i in information["Thank"]:
|
||||
thankText += f"{i}\n"
|
||||
programEnv = [
|
||||
@@ -97,7 +99,17 @@ class Command():
|
||||
"winver",
|
||||
"changeversion",
|
||||
"stopdll",
|
||||
"cat"
|
||||
"cat",
|
||||
"taskmgr",
|
||||
"control",
|
||||
"killall",
|
||||
"killallwineserver",
|
||||
"enabledhttpproxy",
|
||||
"disbledhttpproxy",
|
||||
"enabledwinecrashdialog",
|
||||
"disbledwinecrashdialog",
|
||||
"disbledWinebottlecreatelink",
|
||||
"enabledWinebottlecreatelink"
|
||||
]
|
||||
|
||||
def __init__(self, commandString: str) -> None:
|
||||
@@ -321,6 +333,64 @@ class Command():
|
||||
print("文件读取错误")
|
||||
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 = {
|
||||
@@ -352,11 +422,21 @@ class Command():
|
||||
"winver": Winver,
|
||||
"changeversion": ChangeVersion,
|
||||
"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 = {
|
||||
"killall": [1],
|
||||
"installdll": [1],
|
||||
"installfont": [1],
|
||||
"installsparkcorefont": [0],
|
||||
@@ -385,7 +465,16 @@ class Command():
|
||||
"winver": [0],
|
||||
"changeversion": [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 = [
|
||||
"createbotton",
|
||||
@@ -432,6 +521,13 @@ class Command():
|
||||
print("此命令不支持在 Windows 上运行")
|
||||
programEnv[9][1] = "-5"
|
||||
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]:
|
||||
print("参数不足")
|
||||
|
||||
21
README.md
21
README.md
@@ -1,5 +1,5 @@
|
||||
<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>
|
||||
|
||||
## 介绍
|
||||
@@ -8,10 +8,10 @@
|
||||
env WINEPREFIX=容器路径 wine(wine的路径) 可执行文件路径
|
||||
```
|
||||
让你可以简易方便的使用 wine
|
||||
是使用 Python3 的 tkinter 构建的
|
||||
是使用 Python3 的 PyQt5 构建的
|
||||
(自己美术功底太差,图标只能在网络上找了)
|
||||
(测试平台:deepin 20.7;UOS 家庭版 21.3.1;Ubuntu 22.04;UOS 专业版 1050)
|
||||

|
||||
(测试平台:deepin 20.7;UOS 家庭版 21.3.1;Ubuntu 22.04;Ubuntu 20.04;UOS 专业版 1050)
|
||||

|
||||
而打包器可以方便的把您的 wine 容器打包成 deb 包供他人使用,程序创建的 deb 构建临时文件夹目录树如下:
|
||||
```bash
|
||||
/XXX
|
||||
@@ -102,6 +102,19 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
|
||||

|
||||
|
||||
## 更新日志
|
||||
### 2.3.0(2022年10月02日)
|
||||
**※1、自动配置解释器支持 bash 语法(新版底层调用 bash,旧版任然使用旧版解析引擎)**
|
||||
**※2、修复缺失 wimtools 依赖导致无法正常安装的问题**
|
||||
**※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题,并支持指定不同的包名和容器名**
|
||||
**※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题**
|
||||
**※5、修复安装更多 Wine 终端调用问题和图标问题**
|
||||
**※6、支持 openkylin**
|
||||
7、支持通过 exe 路径自动生成 Wine 容器路径
|
||||
8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
|
||||
9、支持设置 wine 容器代理
|
||||
10、自动配置脚本支持使用 `--help` 参数查看帮助
|
||||

|
||||
|
||||
### 2.2.0(2022年09月24日)
|
||||
**※1、Dll 提取工具支持 NT 6.X 及以上版本的 Dll 提取并优化了提示文本**
|
||||
**※2、支持卸载后自动删除缓存/配置文件(删除配置文件只限 purge 参数删除)**
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
Package: spark-deepin-wine-runner
|
||||
Version: 2.2.1
|
||||
Version: 2.3.0
|
||||
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
|
||||
Architecture: all
|
||||
@@ -9,31 +9,18 @@ Recommends: winbind, wimtools
|
||||
Section: utils
|
||||
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
|
||||
Installed-Size: 26500
|
||||
Installed-Size: 26576
|
||||
Description: gfdgd xi、为什么您不喜欢熊出没和阿布呢 制作的 wine 运行器
|
||||
2.2.0 更新内容:
|
||||
※1、Dll 提取工具支持 NT 6.X 及以上版本的 Dll 提取并优化了提示文本
|
||||
※2、支持卸载后自动删除缓存/配置文件(删除配置文件只限 purge 参数删除)
|
||||
※3、DEBUG 模式输出更多信息以方便调试(原本只输出 pid、Err)
|
||||
※4、支持安装 msi 文件
|
||||
※5、修复无法正常评分的问题
|
||||
※6、修复 QQ、TIM 安装后无法正常生成快捷方式的问题
|
||||
※7、基于生态适配活动的打包器更换为 spark-wine-helper 以及添加自动删除残留脚本
|
||||
※8、打包器支持从 deb 文件读取信息
|
||||
※9、修复在 UOS 专业版(鲲鹏)无法正常运行的问题以及组件安装功能无法正常执行安装命令的问题
|
||||
※10、修复出现星火应用商店和官方应用商店反复提示更新死循环的问题
|
||||
※11、新增评分分数预测功能(不准)
|
||||
※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日
|
||||
2.3.0 更新内容:
|
||||
※1、自动配置解释器支持 bash 语法(新版底层调用 bash,旧版任然使用旧版解析引擎)
|
||||
※2、修复缺失 wimtools 依赖导致无法正常安装的问题
|
||||
※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题,并支持指定不同的包名和容器名
|
||||
※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题
|
||||
※5、修复安装更多 Wine 终端调用问题和图标问题
|
||||
※6、支持 openkylin
|
||||
7、支持通过 exe 路径自动生成 Wine 容器路径
|
||||
8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
|
||||
9、支持设置 wine 容器代理
|
||||
10、自动配置脚本支持使用 --help 参数查看帮助
|
||||
更新时间:2022年10月02日
|
||||
作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# 使用系统默认的 sh 运行
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.2.1
|
||||
# 更新时间:2022年09月29日
|
||||
# 版本:2.3.0
|
||||
# 更新时间:2022年10月02日
|
||||
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
|
||||
# 基于 sh
|
||||
#################################################################################################################
|
||||
@@ -32,4 +32,4 @@ fi
|
||||
# 设置目录权限,让用户可读可写,方便后续删除组件
|
||||
chmod 777 -R /opt/apps/deepin-wine-runner
|
||||
# 向服务器返回安装数加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
|
||||
|
||||
@@ -64,7 +64,7 @@ class Connect:
|
||||
return
|
||||
# 判断版本以启动对应的解释器
|
||||
# 做到新旧兼容
|
||||
if "$(" in things:
|
||||
if "($" in things:
|
||||
print("a")
|
||||
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()
|
||||
# 判断版本以启动对应的解释器
|
||||
# 做到新旧兼容
|
||||
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}/AutoShell/main.py' '{path[0]}'")
|
||||
|
||||
@@ -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
deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledhttpproxy
Executable file
13
deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledhttpproxy
Executable 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
deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledwinecrashdialog
Executable file
13
deb/opt/apps/deepin-wine-runner/AutoShell/command/disbledwinecrashdialog
Executable 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"))
|
||||
@@ -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
deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledhttpproxy
Executable file
13
deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledhttpproxy
Executable 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
deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledwinecrashdialog
Executable file
13
deb/opt/apps/deepin-wine-runner/AutoShell/command/enabledwinecrashdialog
Executable 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
deb/opt/apps/deepin-wine-runner/AutoShell/command/killallwineserver
Executable file
13
deb/opt/apps/deepin-wine-runner/AutoShell/command/killallwineserver
Executable 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
deb/opt/apps/deepin-wine-runner/AutoShell/command/taskmgr
Executable file
13
deb/opt/apps/deepin-wine-runner/AutoShell/command/taskmgr
Executable 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,6 +13,7 @@ import time
|
||||
import json
|
||||
import platform
|
||||
import traceback
|
||||
import subprocess
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
# 读取文本文档
|
||||
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"))
|
||||
version = information["Version"]
|
||||
thankText = ""
|
||||
helpList = json.loads(readtxt(f"{programPath}/ConfigLanguareRunner-help.json"))
|
||||
for i in information["Thank"]:
|
||||
thankText += f"{i}\n"
|
||||
programEnv = [
|
||||
@@ -97,7 +99,17 @@ class Command():
|
||||
"winver",
|
||||
"changeversion",
|
||||
"stopdll",
|
||||
"cat"
|
||||
"cat",
|
||||
"taskmgr",
|
||||
"control",
|
||||
"killall",
|
||||
"killallwineserver",
|
||||
"enabledhttpproxy",
|
||||
"disbledhttpproxy",
|
||||
"enabledwinecrashdialog",
|
||||
"disbledwinecrashdialog",
|
||||
"disbledWinebottlecreatelink",
|
||||
"enabledWinebottlecreatelink"
|
||||
]
|
||||
|
||||
def __init__(self, commandString: str) -> None:
|
||||
@@ -321,6 +333,64 @@ class Command():
|
||||
print("文件读取错误")
|
||||
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 = {
|
||||
@@ -352,11 +422,21 @@ class Command():
|
||||
"winver": Winver,
|
||||
"changeversion": ChangeVersion,
|
||||
"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 = {
|
||||
"killall": [1],
|
||||
"installdll": [1],
|
||||
"installfont": [1],
|
||||
"installsparkcorefont": [0],
|
||||
@@ -385,7 +465,16 @@ class Command():
|
||||
"winver": [0],
|
||||
"changeversion": [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 = [
|
||||
"createbotton",
|
||||
@@ -432,6 +521,13 @@ class Command():
|
||||
print("此命令不支持在 Windows 上运行")
|
||||
programEnv[9][1] = "-5"
|
||||
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]:
|
||||
print("参数不足")
|
||||
|
||||
@@ -818,28 +818,29 @@ fi
|
||||
# 设置容器
|
||||
###############
|
||||
self.label.emit("正在设置 wine 容器")
|
||||
os.chdir(programPath)
|
||||
if cleanBottonByUOS.isChecked():
|
||||
self.run_command(f"WINE='{debInformation[debArch.currentIndex()]['Wine']}' '{programPath}/cleanbottle.sh' '{b}'")
|
||||
os.chdir(b)
|
||||
# 对用户目录进行处理
|
||||
self.run_command("sed -i \"s#$USER#@current_user@#\" ./*.reg")
|
||||
os.chdir(f"{b}/drive_c/users")
|
||||
if os.path.exists(f"{b}/drive_c/users/@current_user@"):
|
||||
self.run_command(f"rm -rfv '{b}/drive_c/users/@current_user@'")
|
||||
self.run_command(f"mv -fv '{os.getlogin()}' @current_user@")
|
||||
# 如果缩放文件 scale.txt 存在,需要移除以便用户自行调节缩放设置
|
||||
if os.path.exists(f"{b}/scale.txt"):
|
||||
os.remove(f"{b}/scale.txt")
|
||||
# 删除因为脚本失误导致用户目录嵌套(如果存在)
|
||||
if os.path.exists(f"{b}{b}/drive_c/users/@current_user@/@current_user@"):
|
||||
shutil.rmtree(f"{b}{b}/drive_c/users/@current_user@/@current_user@")
|
||||
# 删除无用的软链
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/我的'*")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/My '*")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Desktop'")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Downloads'")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Templates'")
|
||||
if e6_text.text()[-3: ] != ".7z":
|
||||
os.chdir(programPath)
|
||||
if cleanBottonByUOS.isChecked():
|
||||
self.run_command(f"WINE='{debInformation[debArch.currentIndex()]['Wine']}' '{programPath}/cleanbottle.sh' '{b}'")
|
||||
os.chdir(b)
|
||||
# 对用户目录进行处理
|
||||
self.run_command("sed -i \"s#$USER#@current_user@#\" ./*.reg")
|
||||
os.chdir(f"{b}/drive_c/users")
|
||||
if os.path.exists(f"{b}/drive_c/users/@current_user@"):
|
||||
self.run_command(f"rm -rfv '{b}/drive_c/users/@current_user@'")
|
||||
self.run_command(f"mv -fv '{os.getlogin()}' @current_user@")
|
||||
# 如果缩放文件 scale.txt 存在,需要移除以便用户自行调节缩放设置
|
||||
if os.path.exists(f"{b}/scale.txt"):
|
||||
os.remove(f"{b}/scale.txt")
|
||||
# 删除因为脚本失误导致用户目录嵌套(如果存在)
|
||||
if os.path.exists(f"{b}{b}/drive_c/users/@current_user@/@current_user@"):
|
||||
shutil.rmtree(f"{b}{b}/drive_c/users/@current_user@/@current_user@")
|
||||
# 删除无用的软链
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/我的'*")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/My '*")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Desktop'")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Downloads'")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Templates'")
|
||||
os.chdir(programPath)
|
||||
###############
|
||||
# 压缩 Wine
|
||||
@@ -858,8 +859,8 @@ fi
|
||||
###############
|
||||
self.label.emit("正在打包 wine 容器")
|
||||
# 都有 7z 了为什么要打包呢?
|
||||
if e1_text.text()[-3: ] == ".7z":
|
||||
shutil.copy(e1_text.text(), f"{debPackagePath}/opt/apps/{e1_text.text()}/files/files.7z")
|
||||
if e6_text.text()[-3: ] == ".7z":
|
||||
shutil.copy(e6_text.text(), f"{debPackagePath}/opt/apps/{e1_text.text()}/files/files.7z")
|
||||
else:
|
||||
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]
|
||||
print(debPath)
|
||||
if debPath == "":
|
||||
return
|
||||
# 分类讨论
|
||||
path = f"/tmp/deb-unzip-{random.randint(0, 1000)}"
|
||||
# 新建文件夹
|
||||
@@ -1234,6 +1237,66 @@ def ReadDeb(unzip = False):
|
||||
wineVersion.setCurrentText(wineValue[dependsItem])
|
||||
except:
|
||||
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}")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.2.0
|
||||
# 更新时间:2022年09月24日
|
||||
# 版本:2.3.0
|
||||
# 更新时间:2022年10月02日
|
||||
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 的 PyQt5 构建
|
||||
#################################################################################################################
|
||||
@@ -165,12 +165,12 @@ class Runexebutton_threading(QtCore.QThread):
|
||||
else:
|
||||
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
|
||||
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 = ""
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dlls-arm.7z")
|
||||
if setting["TerminalOpen"]:
|
||||
@@ -288,13 +288,13 @@ def make_desktop_on_launcher():
|
||||
else:
|
||||
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
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 = ""
|
||||
value = ""
|
||||
if e2.currentText()[:2].upper() == "C:":
|
||||
@@ -348,12 +348,12 @@ def make_desktop_on_desktop():
|
||||
else:
|
||||
wineBottonPath = e1.currentText()
|
||||
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 = ""
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dlls-arm.7z")
|
||||
if not os.path.exists(get_desktop_path()):
|
||||
@@ -423,9 +423,14 @@ def ReStartProgram():
|
||||
python = sys.executable
|
||||
os.execl(python, python, * sys.argv)
|
||||
|
||||
def KillAllProgram():
|
||||
pass
|
||||
|
||||
def KillProgram():
|
||||
os.system(f"killall {wine[o1.currentText()]} -9")
|
||||
os.system("killall winedbg -9")
|
||||
exeName = os.path.basename(e2.currentText())
|
||||
os.system(f"killall {exeName} -9")
|
||||
|
||||
def InstallWine():
|
||||
threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start()
|
||||
@@ -475,12 +480,12 @@ class RunWineProgramThread(QtCore.QThread):
|
||||
wineUsingOption = ""
|
||||
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
|
||||
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 = ""
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dlls-arm.7z")
|
||||
if setting["TerminalOpen"]:
|
||||
@@ -514,7 +519,7 @@ runProgram = None
|
||||
def RunWineProgram(wineProgram, history = False, Disbled = True):
|
||||
global runProgram
|
||||
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:
|
||||
DisableButton(False)
|
||||
return
|
||||
@@ -539,12 +544,12 @@ class RunWinetricksThread(QtCore.QThread):
|
||||
if not setting["Debug"]:
|
||||
option += "WINEDEBUG=-all "
|
||||
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 = ""
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dlls-arm.7z")
|
||||
if setting["TerminalOpen"]:
|
||||
@@ -570,14 +575,14 @@ runWinetricks = None
|
||||
def RunWinetricks():
|
||||
global runWinetricks
|
||||
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:
|
||||
DisableButton(False)
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dlls-arm.7z")
|
||||
returnText.setText("")
|
||||
@@ -643,8 +648,8 @@ def InstallMSXML():
|
||||
|
||||
def InstallDXVK():
|
||||
if not os.path.exists(f"{programPath}/dxvk"):
|
||||
if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dxvk.7z")
|
||||
if e1.currentText() == "":
|
||||
@@ -659,8 +664,8 @@ def InstallDXVK():
|
||||
|
||||
def UninstallDXVK():
|
||||
if not os.path.exists(f"{programPath}/dxvk"):
|
||||
if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dxvk.7z")
|
||||
if e1.currentText() == "":
|
||||
@@ -759,6 +764,18 @@ def InstallWineFont():
|
||||
def WineRunnerBugUpload():
|
||||
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():
|
||||
screenInformation = []
|
||||
# 使用 xrandr 进行筛选
|
||||
@@ -1594,7 +1611,7 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
# 如果要添加其他 wine,请在字典添加其名称和执行路径
|
||||
try:
|
||||
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 ",
|
||||
"deepin-wine6 stable": "deepin-wine6-stable",
|
||||
"deepin-wine5 stable": "deepin-wine5-stable",
|
||||
@@ -1606,10 +1623,10 @@ try:
|
||||
"ukylin-wine": "ukylin-wine",
|
||||
"基于 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 = []
|
||||
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"):
|
||||
canUseWine.append("基于 exagear 的 deepin-wine6-stable")
|
||||
for i in wine.keys():
|
||||
@@ -1634,8 +1651,14 @@ try:
|
||||
value = ""
|
||||
try:
|
||||
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 "
|
||||
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"):
|
||||
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 -- "
|
||||
@@ -1793,36 +1816,20 @@ exe路径\' 参数 \'
|
||||
<b>千万不要中断后不删除源的情况下 apt upgrade !!!</b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可
|
||||
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示
|
||||
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>'''
|
||||
updateThingsString = '''<h2>2.2.0-1 更新内容</h2>
|
||||
※1、修复基于生态适配活动打包器对话框过多并修改了小提示内容
|
||||
<h2>2.2.0 更新内容</h2>
|
||||
※1、Dll 提取工具支持 NT 6.X 及以上版本的 Dll 提取并优化了提示文本
|
||||
※2、支持卸载后自动删除缓存/配置文件(删除配置文件只限 purge 参数删除)
|
||||
※3、DEBUG 模式输出更多信息以方便调试(原本只输出 pid、Err)
|
||||
※4、支持安装 msi 文件
|
||||
※5、修复无法正常评分的问题
|
||||
※6、修复 QQ、TIM 安装后无法正常生成快捷方式的问题
|
||||
※7、基于生态适配活动的打包器更换为 spark-wine-helper 以及添加自动删除残留脚本
|
||||
※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 运行库安装工具新增运行库
|
||||
updateThingsString = '''※1、自动配置解释器支持 bash 语法(新版底层调用 bash,旧版任然使用旧版解析引擎)
|
||||
※2、修复缺失 wimtools 依赖导致无法正常安装的问题
|
||||
※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题,并支持指定不同的包名和容器名
|
||||
※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题
|
||||
※5、修复安装更多 Wine 终端调用问题和图标问题
|
||||
※6、支持 openkylin
|
||||
7、支持通过 exe 路径自动生成 Wine 容器路径
|
||||
8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
|
||||
9、支持设置 wine 容器代理
|
||||
10、自动配置脚本支持使用 --help 参数查看帮助
|
||||
'''
|
||||
for i in information["Thank"]:
|
||||
thankText += f"{i}\n"
|
||||
updateTime = "2022年09月24日"
|
||||
updateTime = "2022年10月02日"
|
||||
about = f'''<h1>关于</h1>
|
||||
<p>一个能让Linux用户更加方便运行Windows应用的程序,内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</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"))
|
||||
dxvkMenu.addAction(installDxvk)
|
||||
dxvkMenu.addAction(uninstallDxvk)
|
||||
wineOption.addSeparator()
|
||||
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)
|
||||
w2.triggered.connect(InstallWineFont)
|
||||
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)
|
||||
uninstallDxvk.triggered.connect(UninstallDXVK)
|
||||
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)"))
|
||||
v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"Version": "2.2.1",
|
||||
"Version": "2.3.0",
|
||||
"Thank": [
|
||||
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
|
||||
"感谢 @zhangs https://bbs.deepin.org/post/227948",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -15,8 +15,11 @@ import sys
|
||||
import json
|
||||
import traceback
|
||||
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
|
||||
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
# UI 布局(自动生成)
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
@@ -175,17 +178,18 @@ class DownloadThread(QtCore.QThread):
|
||||
if self.downloadUnzip:
|
||||
path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}"
|
||||
shellCommand += f"""mkdir -p \"{path}\"
|
||||
7z x \"{savePath}\" -o\"{path}\"
|
||||
7z x -y \"{savePath}\" -o\"{path}\"
|
||||
"""
|
||||
if self.downloadDeleteZip:
|
||||
shellCommand += f"rm -rf \"{savePath}\"\n"
|
||||
shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w")
|
||||
shellFile.write(shellCommand)
|
||||
shellFile.close()
|
||||
process = QtCore.QProcess()
|
||||
command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"]
|
||||
process.start(f"{programPath}/../launch.sh", command)
|
||||
process.waitForFinished()
|
||||
#process = QtCore.QProcess()
|
||||
#command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"]
|
||||
#process.start(f"{programPath}/../launch.sh", command)
|
||||
#process.waitForFinished()
|
||||
OpenTerminal("bash /tmp/depein-wine-runner-wine-install.sh")
|
||||
self.Finish.emit()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
@@ -274,7 +278,6 @@ if __name__ == "__main__":
|
||||
localJsonList = []
|
||||
internetJsonList = []
|
||||
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)
|
||||
# 读取翻译
|
||||
if not get_now_lang() == "zh_CN.UTF-8":
|
||||
@@ -284,6 +287,7 @@ if __name__ == "__main__":
|
||||
# 窗口构建
|
||||
window = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
|
||||
ui.setupUi(window)
|
||||
window.show()
|
||||
# 连接信号
|
||||
|
||||
@@ -818,28 +818,29 @@ fi
|
||||
# 设置容器
|
||||
###############
|
||||
self.label.emit("正在设置 wine 容器")
|
||||
os.chdir(programPath)
|
||||
if cleanBottonByUOS.isChecked():
|
||||
self.run_command(f"WINE='{debInformation[debArch.currentIndex()]['Wine']}' '{programPath}/cleanbottle.sh' '{b}'")
|
||||
os.chdir(b)
|
||||
# 对用户目录进行处理
|
||||
self.run_command("sed -i \"s#$USER#@current_user@#\" ./*.reg")
|
||||
os.chdir(f"{b}/drive_c/users")
|
||||
if os.path.exists(f"{b}/drive_c/users/@current_user@"):
|
||||
self.run_command(f"rm -rfv '{b}/drive_c/users/@current_user@'")
|
||||
self.run_command(f"mv -fv '{os.getlogin()}' @current_user@")
|
||||
# 如果缩放文件 scale.txt 存在,需要移除以便用户自行调节缩放设置
|
||||
if os.path.exists(f"{b}/scale.txt"):
|
||||
os.remove(f"{b}/scale.txt")
|
||||
# 删除因为脚本失误导致用户目录嵌套(如果存在)
|
||||
if os.path.exists(f"{b}{b}/drive_c/users/@current_user@/@current_user@"):
|
||||
shutil.rmtree(f"{b}{b}/drive_c/users/@current_user@/@current_user@")
|
||||
# 删除无用的软链
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/我的'*")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/My '*")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Desktop'")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Downloads'")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Templates'")
|
||||
if e6_text.text()[-3: ] != ".7z":
|
||||
os.chdir(programPath)
|
||||
if cleanBottonByUOS.isChecked():
|
||||
self.run_command(f"WINE='{debInformation[debArch.currentIndex()]['Wine']}' '{programPath}/cleanbottle.sh' '{b}'")
|
||||
os.chdir(b)
|
||||
# 对用户目录进行处理
|
||||
self.run_command("sed -i \"s#$USER#@current_user@#\" ./*.reg")
|
||||
os.chdir(f"{b}/drive_c/users")
|
||||
if os.path.exists(f"{b}/drive_c/users/@current_user@"):
|
||||
self.run_command(f"rm -rfv '{b}/drive_c/users/@current_user@'")
|
||||
self.run_command(f"mv -fv '{os.getlogin()}' @current_user@")
|
||||
# 如果缩放文件 scale.txt 存在,需要移除以便用户自行调节缩放设置
|
||||
if os.path.exists(f"{b}/scale.txt"):
|
||||
os.remove(f"{b}/scale.txt")
|
||||
# 删除因为脚本失误导致用户目录嵌套(如果存在)
|
||||
if os.path.exists(f"{b}{b}/drive_c/users/@current_user@/@current_user@"):
|
||||
shutil.rmtree(f"{b}{b}/drive_c/users/@current_user@/@current_user@")
|
||||
# 删除无用的软链
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/我的'*")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/My '*")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Desktop'")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Downloads'")
|
||||
self.run_command(f"rm -fv '{b}/drive_c/users/@current_user@/Templates'")
|
||||
os.chdir(programPath)
|
||||
###############
|
||||
# 压缩 Wine
|
||||
@@ -858,8 +859,8 @@ fi
|
||||
###############
|
||||
self.label.emit("正在打包 wine 容器")
|
||||
# 都有 7z 了为什么要打包呢?
|
||||
if e1_text.text()[-3: ] == ".7z":
|
||||
shutil.copy(e1_text.text(), f"{debPackagePath}/opt/apps/{e1_text.text()}/files/files.7z")
|
||||
if e6_text.text()[-3: ] == ".7z":
|
||||
shutil.copy(e6_text.text(), f"{debPackagePath}/opt/apps/{e1_text.text()}/files/files.7z")
|
||||
else:
|
||||
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]
|
||||
print(debPath)
|
||||
if debPath == "":
|
||||
return
|
||||
# 分类讨论
|
||||
path = f"/tmp/deb-unzip-{random.randint(0, 1000)}"
|
||||
# 新建文件夹
|
||||
@@ -1234,6 +1237,66 @@ def ReadDeb(unzip = False):
|
||||
wineVersion.setCurrentText(wineValue[dependsItem])
|
||||
except:
|
||||
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}")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"Version": "2.2.1",
|
||||
"Version": "2.3.0",
|
||||
"Thank": [
|
||||
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
|
||||
"感谢 @zhangs https://bbs.deepin.org/post/227948",
|
||||
|
||||
153
mainwindow.py
153
mainwindow.py
@@ -2,8 +2,8 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.2.0
|
||||
# 更新时间:2022年09月24日
|
||||
# 版本:2.3.0
|
||||
# 更新时间:2022年10月02日
|
||||
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 的 PyQt5 构建
|
||||
#################################################################################################################
|
||||
@@ -165,12 +165,12 @@ class Runexebutton_threading(QtCore.QThread):
|
||||
else:
|
||||
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
|
||||
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 = ""
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dlls-arm.7z")
|
||||
if setting["TerminalOpen"]:
|
||||
@@ -288,13 +288,13 @@ def make_desktop_on_launcher():
|
||||
else:
|
||||
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
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 = ""
|
||||
value = ""
|
||||
if e2.currentText()[:2].upper() == "C:":
|
||||
@@ -348,12 +348,12 @@ def make_desktop_on_desktop():
|
||||
else:
|
||||
wineBottonPath = e1.currentText()
|
||||
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 = ""
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dlls-arm.7z")
|
||||
if not os.path.exists(get_desktop_path()):
|
||||
@@ -423,9 +423,14 @@ def ReStartProgram():
|
||||
python = sys.executable
|
||||
os.execl(python, python, * sys.argv)
|
||||
|
||||
def KillAllProgram():
|
||||
pass
|
||||
|
||||
def KillProgram():
|
||||
os.system(f"killall {wine[o1.currentText()]} -9")
|
||||
os.system("killall winedbg -9")
|
||||
exeName = os.path.basename(e2.currentText())
|
||||
os.system(f"killall {exeName} -9")
|
||||
|
||||
def InstallWine():
|
||||
threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start()
|
||||
@@ -475,12 +480,12 @@ class RunWineProgramThread(QtCore.QThread):
|
||||
wineUsingOption = ""
|
||||
if o1.currentText() == "基于 exagear 的 deepin-wine6-stable":
|
||||
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 = ""
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dlls-arm.7z")
|
||||
if setting["TerminalOpen"]:
|
||||
@@ -514,7 +519,7 @@ runProgram = None
|
||||
def RunWineProgram(wineProgram, history = False, Disbled = True):
|
||||
global runProgram
|
||||
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:
|
||||
DisableButton(False)
|
||||
return
|
||||
@@ -539,12 +544,12 @@ class RunWinetricksThread(QtCore.QThread):
|
||||
if not setting["Debug"]:
|
||||
option += "WINEDEBUG=-all "
|
||||
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 = ""
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dlls-arm.7z")
|
||||
if setting["TerminalOpen"]:
|
||||
@@ -570,14 +575,14 @@ runWinetricks = None
|
||||
def RunWinetricks():
|
||||
global runWinetricks
|
||||
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:
|
||||
DisableButton(False)
|
||||
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 os.system(f"7z x \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dlls-arm.7z")
|
||||
returnText.setText("")
|
||||
@@ -643,8 +648,8 @@ def InstallMSXML():
|
||||
|
||||
def InstallDXVK():
|
||||
if not os.path.exists(f"{programPath}/dxvk"):
|
||||
if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dxvk.7z")
|
||||
if e1.currentText() == "":
|
||||
@@ -659,8 +664,8 @@ def InstallDXVK():
|
||||
|
||||
def UninstallDXVK():
|
||||
if not os.path.exists(f"{programPath}/dxvk"):
|
||||
if os.system(f"7z x \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox(widget, "错误", "无法解压资源")
|
||||
if os.system(f"7z x -y \"{programPath}/dxvk.7z\" -o\"{programPath}\""):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源")
|
||||
return
|
||||
os.remove(f"{programPath}/dxvk.7z")
|
||||
if e1.currentText() == "":
|
||||
@@ -759,6 +764,18 @@ def InstallWineFont():
|
||||
def WineRunnerBugUpload():
|
||||
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():
|
||||
screenInformation = []
|
||||
# 使用 xrandr 进行筛选
|
||||
@@ -1594,7 +1611,7 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
# 如果要添加其他 wine,请在字典添加其名称和执行路径
|
||||
try:
|
||||
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 ",
|
||||
"deepin-wine6 stable": "deepin-wine6-stable",
|
||||
"deepin-wine5 stable": "deepin-wine5-stable",
|
||||
@@ -1606,10 +1623,10 @@ try:
|
||||
"ukylin-wine": "ukylin-wine",
|
||||
"基于 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 = []
|
||||
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"):
|
||||
canUseWine.append("基于 exagear 的 deepin-wine6-stable")
|
||||
for i in wine.keys():
|
||||
@@ -1634,8 +1651,14 @@ try:
|
||||
value = ""
|
||||
try:
|
||||
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 "
|
||||
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"):
|
||||
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 -- "
|
||||
@@ -1793,36 +1816,20 @@ exe路径\' 参数 \'
|
||||
<b>千万不要中断后不删除源的情况下 apt upgrade !!!</b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可
|
||||
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示
|
||||
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>'''
|
||||
updateThingsString = '''<h2>2.2.0-1 更新内容</h2>
|
||||
※1、修复基于生态适配活动打包器对话框过多并修改了小提示内容
|
||||
<h2>2.2.0 更新内容</h2>
|
||||
※1、Dll 提取工具支持 NT 6.X 及以上版本的 Dll 提取并优化了提示文本
|
||||
※2、支持卸载后自动删除缓存/配置文件(删除配置文件只限 purge 参数删除)
|
||||
※3、DEBUG 模式输出更多信息以方便调试(原本只输出 pid、Err)
|
||||
※4、支持安装 msi 文件
|
||||
※5、修复无法正常评分的问题
|
||||
※6、修复 QQ、TIM 安装后无法正常生成快捷方式的问题
|
||||
※7、基于生态适配活动的打包器更换为 spark-wine-helper 以及添加自动删除残留脚本
|
||||
※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 运行库安装工具新增运行库
|
||||
updateThingsString = '''※1、自动配置解释器支持 bash 语法(新版底层调用 bash,旧版任然使用旧版解析引擎)
|
||||
※2、修复缺失 wimtools 依赖导致无法正常安装的问题
|
||||
※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题,并支持指定不同的包名和容器名
|
||||
※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题
|
||||
※5、修复安装更多 Wine 终端调用问题和图标问题
|
||||
※6、支持 openkylin
|
||||
7、支持通过 exe 路径自动生成 Wine 容器路径
|
||||
8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
|
||||
9、支持设置 wine 容器代理
|
||||
10、自动配置脚本支持使用 --help 参数查看帮助
|
||||
'''
|
||||
for i in information["Thank"]:
|
||||
thankText += f"{i}\n"
|
||||
updateTime = "2022年09月24日"
|
||||
updateTime = "2022年10月02日"
|
||||
about = f'''<h1>关于</h1>
|
||||
<p>一个能让Linux用户更加方便运行Windows应用的程序,内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</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"))
|
||||
dxvkMenu.addAction(installDxvk)
|
||||
dxvkMenu.addAction(uninstallDxvk)
|
||||
wineOption.addSeparator()
|
||||
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)
|
||||
w2.triggered.connect(InstallWineFont)
|
||||
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)
|
||||
uninstallDxvk.triggered.connect(UninstallDXVK)
|
||||
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)"))
|
||||
v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))
|
||||
|
||||
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"Version": "2.2.1"
|
||||
"Version": "2.3.0"
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -15,8 +15,11 @@ import sys
|
||||
import json
|
||||
import traceback
|
||||
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
|
||||
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
# UI 布局(自动生成)
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
@@ -175,17 +178,18 @@ class DownloadThread(QtCore.QThread):
|
||||
if self.downloadUnzip:
|
||||
path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}"
|
||||
shellCommand += f"""mkdir -p \"{path}\"
|
||||
7z x \"{savePath}\" -o\"{path}\"
|
||||
7z x -y \"{savePath}\" -o\"{path}\"
|
||||
"""
|
||||
if self.downloadDeleteZip:
|
||||
shellCommand += f"rm -rf \"{savePath}\"\n"
|
||||
shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w")
|
||||
shellFile.write(shellCommand)
|
||||
shellFile.close()
|
||||
process = QtCore.QProcess()
|
||||
command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"]
|
||||
process.start(f"{programPath}/../launch.sh", command)
|
||||
process.waitForFinished()
|
||||
#process = QtCore.QProcess()
|
||||
#command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"]
|
||||
#process.start(f"{programPath}/../launch.sh", command)
|
||||
#process.waitForFinished()
|
||||
OpenTerminal("bash /tmp/depein-wine-runner-wine-install.sh")
|
||||
self.Finish.emit()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
@@ -274,7 +278,6 @@ if __name__ == "__main__":
|
||||
localJsonList = []
|
||||
internetJsonList = []
|
||||
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)
|
||||
# 读取翻译
|
||||
if not get_now_lang() == "zh_CN.UTF-8":
|
||||
@@ -284,6 +287,7 @@ if __name__ == "__main__":
|
||||
# 窗口构建
|
||||
window = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
|
||||
ui.setupUi(window)
|
||||
window.show()
|
||||
# 连接信号
|
||||
|
||||
Reference in New Issue
Block a user