mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-13 18:42:03 +08:00
新增命令与帮助
This commit is contained in:
14
AutoShell/command/installmsi
Executable file
14
AutoShell/command/installmsi
Executable file
@@ -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]))
|
||||||
14
AutoShell/command/programforum
Executable file
14
AutoShell/command/programforum
Executable file
@@ -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]))
|
||||||
@@ -38,5 +38,9 @@
|
|||||||
"control": "打开控制面板\n参数数量:0\n参数介绍:无",
|
"control": "打开控制面板\n参数数量:0\n参数介绍:无",
|
||||||
"taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无",
|
"taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无",
|
||||||
"killallwineserver": "杀死所有 Wine 程序\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 文件路径"
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,8 @@ class Command():
|
|||||||
"installvb",
|
"installvb",
|
||||||
"installother",
|
"installother",
|
||||||
"decompressionbottle",
|
"decompressionbottle",
|
||||||
"programforum"
|
"programforum",
|
||||||
|
"installmsi"
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, commandString: str) -> None:
|
def __init__(self, commandString: str) -> None:
|
||||||
@@ -435,6 +436,10 @@ class Command():
|
|||||||
def ProgramForum(self):
|
def ProgramForum(self):
|
||||||
webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/")
|
webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/")
|
||||||
|
|
||||||
|
def InstallMSI(self):
|
||||||
|
self.command = ["bat", "msiexec", "/i", self.command[1]]
|
||||||
|
return self.Bat()
|
||||||
|
|
||||||
# 可以运行的命令的映射关系
|
# 可以运行的命令的映射关系
|
||||||
# 可以被使用的命令的映射
|
# 可以被使用的命令的映射
|
||||||
commandList = {
|
commandList = {
|
||||||
@@ -479,7 +484,8 @@ class Command():
|
|||||||
"installvb": InstallVB,
|
"installvb": InstallVB,
|
||||||
"installother": InstallOther,
|
"installother": InstallOther,
|
||||||
"decompressionbottle": DecompressionBottle,
|
"decompressionbottle": DecompressionBottle,
|
||||||
"programforum": ProgramForum
|
"programforum": ProgramForum,
|
||||||
|
"installmsi": InstallMSI
|
||||||
}
|
}
|
||||||
|
|
||||||
# 参数数列表
|
# 参数数列表
|
||||||
@@ -526,7 +532,8 @@ class Command():
|
|||||||
"installvb": [1],
|
"installvb": [1],
|
||||||
"installother": [1],
|
"installother": [1],
|
||||||
"decompressionbottle": [2],
|
"decompressionbottle": [2],
|
||||||
"programforum": [0]
|
"programforum": [0],
|
||||||
|
"installmsi": [1]
|
||||||
}
|
}
|
||||||
windowsUnrun = [
|
windowsUnrun = [
|
||||||
"createbotton",
|
"createbotton",
|
||||||
|
|||||||
Binary file not shown.
@@ -15,6 +15,7 @@ import sys
|
|||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
import traceback
|
import traceback
|
||||||
|
import urllib.request
|
||||||
import req as requests
|
import req as requests
|
||||||
import PyQt5.QtWidgets as QtWidgets
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
from UI.AutoConfig import *
|
from UI.AutoConfig import *
|
||||||
@@ -38,8 +39,6 @@ urlSourcesList = [
|
|||||||
urlSources = urlSourcesList[0]
|
urlSources = urlSourcesList[0]
|
||||||
lists = []
|
lists = []
|
||||||
|
|
||||||
#print(requests.post("http://120.25.153.144:30250/PingLun", {"PinLun": "测试文本", "Version": "purgeexepro.sh"}).text)
|
|
||||||
|
|
||||||
class ProgramRunStatusUpload():
|
class ProgramRunStatusUpload():
|
||||||
msgWindow = None
|
msgWindow = None
|
||||||
starLayout = None
|
starLayout = None
|
||||||
@@ -139,7 +138,7 @@ class InformationWindow():
|
|||||||
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
|
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
|
||||||
try:
|
try:
|
||||||
import requests as r
|
import requests as r
|
||||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
|
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
|
||||||
tipsInfo = ""
|
tipsInfo = ""
|
||||||
except:
|
except:
|
||||||
fenlists = [0, 0, 0, 0, 0]
|
fenlists = [0, 0, 0, 0, 0]
|
||||||
@@ -253,7 +252,7 @@ class ProgramRunStatusShow():
|
|||||||
fileName = i[1]
|
fileName = i[1]
|
||||||
break
|
break
|
||||||
try:
|
try:
|
||||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
|
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
|
||||||
tipsInfo = ""
|
tipsInfo = ""
|
||||||
except:
|
except:
|
||||||
#traceback.print_exc()
|
#traceback.print_exc()
|
||||||
@@ -311,7 +310,7 @@ class ProgramRunStatusShow():
|
|||||||
else:
|
else:
|
||||||
# 显示最新的3条评论
|
# 显示最新的3条评论
|
||||||
try:
|
try:
|
||||||
all = int(requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{fileName}/data.txt").text)
|
all = int(requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{urllib.request.quote(fileName)}/data.txt").text)
|
||||||
now = all - 3
|
now = all - 3
|
||||||
print(all)
|
print(all)
|
||||||
if all < 3:
|
if all < 3:
|
||||||
@@ -322,7 +321,7 @@ class ProgramRunStatusShow():
|
|||||||
uploadList = []
|
uploadList = []
|
||||||
for i in range(all - 1, start - 1, -1):
|
for i in range(all - 1, start - 1, -1):
|
||||||
print(f"第 {i + 1} 条评论:")
|
print(f"第 {i + 1} 条评论:")
|
||||||
info = requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{fileName}/pf-{i}.txt").text.strip()
|
info = requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
|
||||||
print(info)
|
print(info)
|
||||||
uploadList.append([f"用户{i + 1}", i + 1, info])
|
uploadList.append([f"用户{i + 1}", i + 1, info])
|
||||||
Add(uploadList)
|
Add(uploadList)
|
||||||
@@ -380,7 +379,7 @@ def UpdateFen():
|
|||||||
uploadList = []
|
uploadList = []
|
||||||
for i in range(now + 2, now - 1, -1):
|
for i in range(now + 2, now - 1, -1):
|
||||||
print(f"第 {i + 1} 条评论:")
|
print(f"第 {i + 1} 条评论:")
|
||||||
info = requests.get(f"https://code.gitlink.org.cn/gfdgd-xi-org/bashpinlun/raw/branch/master/{fileName}/pf-{i}.txt").text.strip()
|
info = requests.get(f"https://code.gitlink.org.cn/gfdgd-xi-org/bashpinlun/raw/branch/master/{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
|
||||||
print(info)
|
print(info)
|
||||||
uploadList.append([f"用户{i + 1}", i + 1, info])
|
uploadList.append([f"用户{i + 1}", i + 1, info])
|
||||||
#ProgramRunStatusShow.pingLunLayout.removeItem(ProgramRunStatusShow.pingLunLayout.itemAt(2))
|
#ProgramRunStatusShow.pingLunLayout.removeItem(ProgramRunStatusShow.pingLunLayout.itemAt(2))
|
||||||
@@ -572,7 +571,7 @@ if __name__ == "__main__":
|
|||||||
#pass
|
#pass
|
||||||
# 连接信号和槽
|
# 连接信号和槽
|
||||||
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
|
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
|
||||||
ui.uploadFen.clicked.connect(UploadFen)
|
#ui.uploadFen.clicked.connect(UploadFen)
|
||||||
ui.getInfoButton.clicked.connect(InformationWindow.ShowWindow)
|
ui.getInfoButton.clicked.connect(InformationWindow.ShowWindow)
|
||||||
ui.runBotton.clicked.connect(Connect.RunBotton_Clicked)
|
ui.runBotton.clicked.connect(Connect.RunBotton_Clicked)
|
||||||
ui.openFile.triggered.connect(Connect.OpenFile_Triggered)
|
ui.openFile.triggered.connect(Connect.OpenFile_Triggered)
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ class Ui_MainWindow(object):
|
|||||||
self.getFen = QtWidgets.QPushButton(self.centralwidget)
|
self.getFen = QtWidgets.QPushButton(self.centralwidget)
|
||||||
self.getFen.setObjectName("getFen")
|
self.getFen.setObjectName("getFen")
|
||||||
self.horizontalLayout_2.addWidget(self.getFen)
|
self.horizontalLayout_2.addWidget(self.getFen)
|
||||||
self.uploadFen = QtWidgets.QPushButton(self.centralwidget)
|
|
||||||
self.uploadFen.setObjectName("uploadFen")
|
|
||||||
self.horizontalLayout_2.addWidget(self.uploadFen)
|
|
||||||
self.runBotton = QtWidgets.QPushButton(self.centralwidget)
|
self.runBotton = QtWidgets.QPushButton(self.centralwidget)
|
||||||
self.runBotton.setObjectName("runBotton")
|
self.runBotton.setObjectName("runBotton")
|
||||||
self.horizontalLayout_2.addWidget(self.runBotton)
|
self.horizontalLayout_2.addWidget(self.runBotton)
|
||||||
@@ -110,8 +107,7 @@ class Ui_MainWindow(object):
|
|||||||
self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
|
self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
|
||||||
self.saerchBotton.setText(_translate("MainWindow", "搜索"))
|
self.saerchBotton.setText(_translate("MainWindow", "搜索"))
|
||||||
self.getInfoButton.setText(_translate("MainWindow", "获取选中项介绍"))
|
self.getInfoButton.setText(_translate("MainWindow", "获取选中项介绍"))
|
||||||
self.getFen.setText(_translate("MainWindow", "获取选中项的评分"))
|
self.getFen.setText(_translate("MainWindow", "获取/提交选中项的评分和评论"))
|
||||||
self.uploadFen.setText(_translate("MainWindow", "提交选中项的评分"))
|
|
||||||
self.runBotton.setText(_translate("MainWindow", "部署此方案"))
|
self.runBotton.setText(_translate("MainWindow", "部署此方案"))
|
||||||
self.menu.setTitle(_translate("MainWindow", "程序"))
|
self.menu.setTitle(_translate("MainWindow", "程序"))
|
||||||
self.menu_2.setTitle(_translate("MainWindow", "切换源"))
|
self.menu_2.setTitle(_translate("MainWindow", "切换源"))
|
||||||
|
|||||||
@@ -64,14 +64,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="getFen">
|
<widget class="QPushButton" name="getFen">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>获取选中项的评分</string>
|
<string>获取/提交选中项的评分和评论</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="uploadFen">
|
|
||||||
<property name="text">
|
|
||||||
<string>提交选中项的评分</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -1852,7 +1852,7 @@ def UploadLog():
|
|||||||
"Log": returnText.toPlainText(),
|
"Log": returnText.toPlainText(),
|
||||||
"Wine": wine[o1.currentText()],
|
"Wine": wine[o1.currentText()],
|
||||||
"Tips": text
|
"Tips": text
|
||||||
}).json
|
}).json()
|
||||||
if returnList["ExitCode"] == 0:
|
if returnList["ExitCode"] == 0:
|
||||||
QtWidgets.QMessageBox.information(window, "提示", "上传成功!")
|
QtWidgets.QMessageBox.information(window, "提示", "上传成功!")
|
||||||
else:
|
else:
|
||||||
@@ -2343,7 +2343,8 @@ exe路径\' 参数 \'
|
|||||||
updateThingsString = transla.transe("U", '''※1、不基于生态适配脚本打包器支持禁用 Mono/Gecko 打包器;
|
updateThingsString = transla.transe("U", '''※1、不基于生态适配脚本打包器支持禁用 Mono/Gecko 打包器;
|
||||||
※2、自动容器配置脚本新增命令 decompressionbottle、programforum,新增评论功能;
|
※2、自动容器配置脚本新增命令 decompressionbottle、programforum,新增评论功能;
|
||||||
※3、安装 Windows 虚拟机功能更换应答镜像图标并添加常用 Windows 组件安装功能;
|
※3、安装 Windows 虚拟机功能更换应答镜像图标并添加常用 Windows 组件安装功能;
|
||||||
※4、安装 Windows 虚拟机功能提供镜像下载的网盘链接。
|
※4、安装 Windows 虚拟机功能提供镜像下载的网盘链接;
|
||||||
|
※5、修复提交日志功能在提交成功时依旧提示提交失败问题。
|
||||||
''')
|
''')
|
||||||
for i in information["Thank"]:
|
for i in information["Thank"]:
|
||||||
thankText += f"{i}\n"
|
thankText += f"{i}\n"
|
||||||
|
|||||||
Binary file not shown.
@@ -1852,7 +1852,7 @@ def UploadLog():
|
|||||||
"Log": returnText.toPlainText(),
|
"Log": returnText.toPlainText(),
|
||||||
"Wine": wine[o1.currentText()],
|
"Wine": wine[o1.currentText()],
|
||||||
"Tips": text
|
"Tips": text
|
||||||
}).json
|
}).json()
|
||||||
if returnList["ExitCode"] == 0:
|
if returnList["ExitCode"] == 0:
|
||||||
QtWidgets.QMessageBox.information(window, "提示", "上传成功!")
|
QtWidgets.QMessageBox.information(window, "提示", "上传成功!")
|
||||||
else:
|
else:
|
||||||
@@ -2341,9 +2341,12 @@ exe路径\' 参数 \'
|
|||||||
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示;
|
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示;
|
||||||
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>''')
|
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>''')
|
||||||
updateThingsString = transla.transe("U", '''※1、不基于生态适配脚本打包器支持禁用 Mono/Gecko 打包器;
|
updateThingsString = transla.transe("U", '''※1、不基于生态适配脚本打包器支持禁用 Mono/Gecko 打包器;
|
||||||
※2、自动容器配置脚本新增命令 decompressionbottle、programforum,新增评论功能;
|
※2、自动容器配置脚本新增命令 decompressionbottle、programforum、installmsi 以及上述命令的帮助;
|
||||||
※3、安装 Windows 虚拟机功能更换应答镜像图标并添加常用 Windows 组件安装功能;
|
※3、自动容器配置脚本新增评论功能;
|
||||||
※4、安装 Windows 虚拟机功能提供镜像下载的网盘链接。
|
※4、自动容器配置脚本新增许多应用安装脚本;
|
||||||
|
※5、安装 Windows 虚拟机功能更换应答镜像图标并添加常用 Windows 组件安装功能;
|
||||||
|
※6、安装 Windows 虚拟机功能提供镜像下载的网盘链接;
|
||||||
|
7、修复提交日志功能在提交成功时依旧提示提交失败问题。
|
||||||
''')
|
''')
|
||||||
for i in information["Thank"]:
|
for i in information["Thank"]:
|
||||||
thankText += f"{i}\n"
|
thankText += f"{i}\n"
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user