完成了

This commit is contained in:
gfdgd xi 2022-10-02 22:08:12 +08:00
parent f8678cea12
commit 0bdf0d2e2f
19 changed files with 229 additions and 41 deletions

View File

@ -1,5 +1,5 @@
Package: spark-deepin-wine-runner
Version: 2.3.0~alpha1
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、为什么您不喜欢熊出没和阿布呢

View File

@ -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

View File

@ -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]}'")

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 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("参数不足")

View File

@ -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 构建
#################################################################################################################
@ -1825,10 +1825,11 @@ updateThingsString = '''※1、自动配置解释器支持 bash 语法(新版
7、支持通过 exe 路径自动生成 Wine 容器路径
8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
9、支持设置 wine 容器代理
10、自动配置脚本支持使用 --help 参数查看帮助
'''
for i in information["Thank"]:
thankText += f"{i}\n"
updateTime = "2022年0930日"
updateTime = "2022年10月02日"
about = f'''<h1>关于</h1>
<p>一个能让Linux用户更加方便运行Windows应用的程序内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</p>
<p>同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具可以做到只需要用户下载系统镜像并点击安装即可无需顾及虚拟机安装、创建、虚拟机的分区等等</p>

View File

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

View File

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

Binary file not shown.

View File

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