diff --git a/InstallFont.py b/InstallFont.py index dfaa03d..5030229 100755 --- a/InstallFont.py +++ b/InstallFont.py @@ -32,7 +32,7 @@ except: ["msyhbd.ttc", "https://gitlink.org.cn/api/attachments/392183", "msyhbd.ttc", "msyhbd.ttc"] ] def Download(wineBotton: str, id: int) -> int: - return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/Fonts/{fontList[id][2]}' -o '{fontList[id][0]}' \"{fontList[id][1]}\"") + return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/Fonts/' -o '{fontList[id][0]}' \"{fontList[id][1]}\"") if __name__ == "__main__": if "--help" in sys.argv: diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmsi b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmsi new file mode 100755 index 0000000..b766ea2 --- /dev/null +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/installmsi @@ -0,0 +1,14 @@ +#!/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")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/AutoShell/command/programforum b/deb/opt/apps/deepin-wine-runner/AutoShell/command/programforum new file mode 100755 index 0000000..b766ea2 --- /dev/null +++ b/deb/opt/apps/deepin-wine-runner/AutoShell/command/programforum @@ -0,0 +1,14 @@ +#!/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")) +sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner-help.json b/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner-help.json index 10517d4..e7f594c 100755 --- a/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner-help.json +++ b/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner-help.json @@ -38,5 +38,9 @@ "control": "打开控制面板\n参数数量:0\n参数介绍:无", "taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无", "killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无", - "installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6" + "installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6", + "installother": "安装未归类的运行库到指定容器\n参数数量:1\n参数介绍:在安装其它运行库工具的编号,如 2 MFC运行库", + "decompressionbottle": "解压用 wine 打包的 deb 包内的容器到指定路径\n参数数量:2\n参数介绍:deb 包路径+要解压到的路径", + "programforum": "打开程序论坛\n参数数量:0\n参数介绍:无", + "installmsi": "安装 MSI 文件到指定容器\n参数数量:1\n参数介绍:msi 文件路径" } \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py b/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py index c505a74..61e4cfd 100755 --- a/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py +++ b/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py @@ -128,7 +128,8 @@ class Command(): "installvb", "installother", "decompressionbottle", - "programforum" + "programforum", + "installmsi" ] def __init__(self, commandString: str) -> None: @@ -435,6 +436,10 @@ class Command(): def ProgramForum(self): webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/") + def InstallMSI(self): + self.command = ["bat", "msiexec", "/i", self.command[1]] + return self.Bat() + # 可以运行的命令的映射关系 # 可以被使用的命令的映射 commandList = { @@ -479,7 +484,8 @@ class Command(): "installvb": InstallVB, "installother": InstallOther, "decompressionbottle": DecompressionBottle, - "programforum": ProgramForum + "programforum": ProgramForum, + "installmsi": InstallMSI } # 参数数列表 @@ -526,7 +532,8 @@ class Command(): "installvb": [1], "installother": [1], "decompressionbottle": [2], - "programforum": [0] + "programforum": [0], + "installmsi": [1] } windowsUnrun = [ "createbotton", diff --git a/deb/opt/apps/deepin-wine-runner/InstallFont.py b/deb/opt/apps/deepin-wine-runner/InstallFont.py index dfaa03d..5030229 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallFont.py +++ b/deb/opt/apps/deepin-wine-runner/InstallFont.py @@ -32,7 +32,7 @@ except: ["msyhbd.ttc", "https://gitlink.org.cn/api/attachments/392183", "msyhbd.ttc", "msyhbd.ttc"] ] def Download(wineBotton: str, id: int) -> int: - return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/Fonts/{fontList[id][2]}' -o '{fontList[id][0]}' \"{fontList[id][1]}\"") + return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/Fonts/' -o '{fontList[id][0]}' \"{fontList[id][1]}\"") if __name__ == "__main__": if "--help" in sys.argv: diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner index 099161b..2b15db2 100755 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner +++ b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner @@ -2341,10 +2341,14 @@ exe路径\' 参数 \' 以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示; N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。''') updateThingsString = transla.transe("U", '''※1、不基于生态适配脚本打包器支持禁用 Mono/Gecko 打包器; -※2、自动容器配置脚本新增命令 decompressionbottle、programforum,新增评论功能; -※3、安装 Windows 虚拟机功能更换应答镜像图标并添加常用 Windows 组件安装功能; -※4、安装 Windows 虚拟机功能提供镜像下载的网盘链接; -※5、修复提交日志功能在提交成功时依旧提示提交失败问题。 +※2、自动容器配置脚本新增命令 decompressionbottle、programforum、installmsi 以及上述命令的帮助; +※3、自动容器配置脚本新增评论功能; +※4、自动容器配置脚本新增许多应用安装脚本; +※5、安装 Windows 虚拟机功能更换应答镜像图标并添加常用 Windows 组件安装功能; +※6、安装 Windows 虚拟机功能提供镜像下载的网盘链接; +※7、简易打包器支持自动添加宋体; +8、修复 installfont 命令下载的字体目录错误问题; +9、修复提交日志功能在提交成功时依旧提示提交失败问题。 ''') for i in information["Thank"]: thankText += f"{i}\n" diff --git a/mainwindow.py b/mainwindow.py index cc77040..2b15db2 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -2346,7 +2346,9 @@ updateThingsString = transla.transe("U", '''※1、不基于生态适配脚本 ※4、自动容器配置脚本新增许多应用安装脚本; ※5、安装 Windows 虚拟机功能更换应答镜像图标并添加常用 Windows 组件安装功能; ※6、安装 Windows 虚拟机功能提供镜像下载的网盘链接; -7、修复提交日志功能在提交成功时依旧提示提交失败问题。 +※7、简易打包器支持自动添加宋体; +8、修复 installfont 命令下载的字体目录错误问题; +9、修复提交日志功能在提交成功时依旧提示提交失败问题。 ''') for i in information["Thank"]: thankText += f"{i}\n"