Compare commits

...

41 Commits
Alpha ... 2.4.0

Author SHA1 Message Date
509cf86d76 2.4.0 end 2022-10-26 21:50:59 +08:00
bd945e5b86 base64 2022-10-25 21:54:56 +08:00
834ea19a39 打包器box86+exagear 2022-10-25 21:23:35 +08:00
59e6da0652 2.4.0基本结束 2022-10-24 22:11:03 +08:00
7b83c7ef5f 优化文案 2022-10-23 22:28:26 +08:00
4a095393d8 ※7、容器自动配置脚本支持评分功能 2022-10-23 22:19:23 +08:00
e3d944e448 ※6、修复了容器自动配置脚本 GUI 解析器无法指定 Wine、容器以及位数的功能 2022-10-23 21:26:47 +08:00
cb6fd9e202 新增友谊链接 2022-10-22 20:05:49 +08:00
9cca4f2def 更新快捷键功能 2022-10-22 20:03:27 +08:00
db1acefe26 API 2022-10-22 14:11:26 +08:00
d9c17e2470 修复右键无打开方式+添加wine功能 2022-10-17 21:58:25 +08:00
e6a9d1feb1 初步修复2.3.0在exagear资源的解包问题 2022-10-16 22:07:48 +08:00
6d7cfc87bd 快捷键功能GUI初步 2022-10-15 18:56:14 +08:00
7a56a66f6c Python 2022-10-15 17:31:48 +08:00
aa6743cd3e 注释 2022-10-14 22:11:05 +08:00
e41ed6dd7b 修改: deb/usr/share/applications/spark-deepin-wine-package-builder.desktop
修改:     deb/usr/share/applications/spark-deepin-wine-runner.desktop
2022-10-13 19:57:35 +08:00
8c363d546a 快捷键编辑 2022-10-11 21:28:26 +08:00
c1d30e6e4d 学校
Signed-off-by: gfdgd xi <3025613752@qq.com>
2022-10-11 10:25:24 +00:00
a003a718b0 新建 系统打卡 2022-10-11 10:24:32 +00:00
1fe731d860 立下 Flag
Signed-off-by: gfdgd xi <3025613752@qq.com>
2022-10-11 10:15:14 +00:00
567045d287 重命名 key/start-server.sh 为 key/start-auto-server.sh 2022-10-11 10:14:39 +00:00
ecba3a8c32 新增Flag
Signed-off-by: gfdgd xi <3025613752@qq.com>
2022-10-11 10:14:11 +00:00
1fa1e9e523 更新README
Signed-off-by: gfdgd xi <3025613752@qq.com>
2022-10-11 10:06:17 +00:00
5e7e567a18 完成Deepin/UOS快捷键添加功能 2022-10-09 21:43:56 +08:00
ea7c456620 初步完成了快捷键添加的GUI 2022-10-08 21:54:02 +08:00
99cdec7ad6 快捷键读取完成 2022-10-07 21:42:03 +08:00
dbb152d9eb 初步实现按键获取 2022-10-07 21:27:27 +08:00
5764ad09e6 优化自动配置容器搜索功能,搜索不区分大小写 2022-10-05 22:13:48 +08:00
47b3dddfbc 新增 VB Runtime 组件安装工具 2022-10-05 17:54:12 +08:00
8bb60a1be9 更新README 2022-10-04 18:17:57 +08:00
4c6283b817 修复些小问题 2022-10-03 10:26:44 +08:00
fbfd5bbe7b 更新 README 2022-10-02 22:17:00 +08:00
0bdf0d2e2f 完成了 2022-10-02 22:08:12 +08:00
f8678cea12 更新自动配置脚本命令 2022-10-02 21:59:53 +08:00
0e6883d927 删除: spark-deepin-wine-runner.deb 2022-10-02 14:59:30 +08:00
f9f8180c60 ?
修改:     deb/DEBIAN/control
	修改:     deb/opt/apps/deepin-wine-runner/deepin-wine-packager.py
	修改:     deb/opt/apps/deepin-wine-runner/deepin-wine-runner
	修改:     deb/opt/apps/deepin-wine-runner/information.json
	修改:     deb/opt/apps/deepin-wine-runner/package-script.zip
	修改:     deb/opt/apps/deepin-wine-runner/wine/installwine
	修改:     information.json
	修改:     mainwindow.py
	修改:     package-script.zip
	修改:     package-script/information.json
	修改:     wine/installwine
2022-10-02 14:54:23 +08:00
5edb8188b9 优化内容 2022-10-01 20:53:50 +08:00
2b3374e30b 更新更新内容 2022-09-29 22:13:22 +08:00
3ffe532779 修复7z解压问题 2022-09-29 22:08:06 +08:00
ed638a2002 Merge branch 'Alpha' into main 2022-09-29 21:48:46 +08:00
0c2242b1f0 支持禁用/启用 wine 容器是否生成快捷方式的功能 2022-09-28 21:55:54 +08:00
171 changed files with 4826 additions and 525 deletions

54
API/Python/__init__.py Normal file
View File

@@ -0,0 +1,54 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.4.0
# 更新时间2022年10月15日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 构建
###########################################################################################
#################
# 加入路径
#################
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
#################
# 引入所需的库(正式内容)
#################
import os
import sys
import ConfigLanguareRunner
class Old:
wine = ""
wineprefix = ""
def __init__(self, wine = "", wineprefix = "") -> None:
self.wine = os.getenv("WINE") if wine == "" else wine
self.wineprefix = os.getenv("WINEPREFIX") if wine == "" else wineprefix
def runCommand(self, command: str) -> None:
com = ConfigLanguareRunner.Command(command)
print(com.GetCommandList())
return com.Run(com.GetCommandList(), self.wineprefix, self.wine)
def runList(self, command: list) -> None:
return ConfigLanguareRunner.Command("").Run(command, self.wineprefix, self.wine)
class Bash:
wine = ""
wineprefix = ""
def __init__(self, wine = "", wineprefix = "") -> None:
self.wine = os.getenv("WINE") if wine == "" else wine
self.wineprefix = os.getenv("WINEPREFIX") if wine == "" else wineprefix
def runCommand(self, command: str) -> int:
return os.system(f"'{programPath}/../../AutoShell/main.py' -c \"{command}\"")
def runList(self, command: list) -> int:
commandStr = ""
for k in command:
for i in k:
commandStr += f"'{i}' "
commandStr += ";"
return os.system(f"'{programPath}/../../AutoShell/main.py' -c \"{commandStr}\"")

Binary file not shown.

3
API/demo/a.py Normal file
View File

@@ -0,0 +1,3 @@
import WineRunner
WineRunner.Bash("a").runList([["thank"], ["version"]])
#WineRunner.Bash("a").runCommand("thank")

View File

@@ -2,8 +2,8 @@
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.1.0
# 更新时间2022年08月25日
# 版本2.4.0
# 更新时间2022年10月25日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 构建
###########################################################################################
@@ -12,6 +12,7 @@
#################
import os
import sys
import base64
import json
import traceback
import req as requests
@@ -21,6 +22,223 @@ from Model import *
urlSources = "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/auto"
lists = []
class ProgramRunStatusUpload():
msgWindow = None
starLayout = None
fen = None
starList = []
sha1Value = ""
programName = None
def ChangeStar():
if ProgramRunStatusUpload.fen.currentIndex() > 5:
for i in ProgramRunStatusUpload.starList:
i.setText(f"<img src='{programPath}/Icon/BadStar.svg' width=25>")
return
for i in range(ProgramRunStatusUpload.fen.currentIndex()):
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/Star.svg' width=25>")
head = ProgramRunStatusUpload.fen.currentIndex()
end = len(ProgramRunStatusUpload.starList)
for i in range(head, end):
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/UnStar.svg' width=25>")
def ShowWindow(sha="", title=""):
ProgramRunStatusUpload.starList = []
ProgramRunStatusUpload.sha1Value = sha
ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow()
msgWidget = QtWidgets.QWidget()
msgWidgetLayout = QtWidgets.QGridLayout()
ProgramRunStatusUpload.programName = QtWidgets.QLineEdit()
ProgramRunStatusUpload.fen = QtWidgets.QComboBox()
ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout()
upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传"))
upload.clicked.connect(ProgramRunStatusUpload.Upload)
if title != "":
ProgramRunStatusUpload.programName.setText(title)
ProgramRunStatusUpload.programName.setDisabled(True)
# 生成星星列表
for i in [1, 1, 1, 1, 0]:
ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>"))
ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1])
ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
ProgramRunStatusUpload.programName.setPlaceholderText(QtCore.QCoreApplication.translate("U", "如果这个程序和程序名确实是合法还是检测到敏感词改为“NULL”即可"))
ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"])
ProgramRunStatusUpload.fen.setCurrentIndex(4)
ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar)
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序名:")), 0, 0)
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0)
msgWidgetLayout.addWidget(ProgramRunStatusUpload.programName, 0, 1)
msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1)
msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1)
msgWidgetLayout.addWidget(upload, 3, 1)
msgWidget.setLayout(msgWidgetLayout)
ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget)
ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况"))
ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
ProgramRunStatusUpload.msgWindow.show()
def Upload():
try:
#if ProgramRunStatusUpload.sha1Value == "":
#ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText())
QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL2Jhc2g=").decode("utf-8"), {
"BashName": ProgramRunStatusUpload.sha1Value,
"Fen": ProgramRunStatusUpload.fen.currentIndex()
}).json()["Error"])
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
class InformationWindow():
def ShowWindow():
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
try:
get = requests.get(f"{urlSources}/information/{fileName}.txt")
if get.status_code / 100 != 2 and get.status_code / 100 != 3:
int("Bad")
about = get.text
if not "<" in about:
# 非 Html 标签
for i in about.splitlines():
about += f"<p>{i}</p>\n"
#about = f"<pre>{about}</pre>"
about = f"<h1>关于“{choose}”的介绍</h1>\n{about}"
except:
traceback.print_exc()
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
try:
import requests as r
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
tipsInfo = ""
except:
fenlists = [0, 0, 0, 0, 0]
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
maxHead = fenlists.index(max(fenlists))
allNumber = 0
for i in fenlists:
allNumber += i
try:
maxNumber = max(fenlists) / allNumber * 100
if tipsInfo == "":
tipsInfo = f"{maxNumber}%的用户选择了这个评分"
except:
pass
end = 5
starHtml = ""
if maxHead > 5:
for i in range(end):
starHtml += f"<img src='{programPath}/Icon/BadStar.svg' width=50>\n"
else:
for i in range(maxHead):
starHtml += f"<img src='{programPath}/Icon/Star.svg' width=50>\n"
head = maxHead
for i in range(head, end):
starHtml += f"<img src='{programPath}/Icon/UnStar.svg' width=50>"
about += f"\n<hr/><h1>评分情况</h1>\n<p align='center'>{starHtml}</p>\n<p align='center'>{tipsInfo}</p>"
message = QtWidgets.QDialog()
messageLayout = QtWidgets.QVBoxLayout()
informationText = QtWidgets.QTextBrowser()
uploadFen = QtWidgets.QPushButton("提交评分")
uploadFen.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
informationText.setHtml(about)
messageLayout.addWidget(informationText)
messageLayout.addWidget(uploadFen)
message.setWindowTitle(f"关于“{choose}”的介绍")
message.resize(int(message.frameSize().width() * 1.5), int(message.frameSize().height()))
message.setLayout(messageLayout)
#message.setWindowModality(ApplicationModal);
message.show()
message.exec_()
class ProgramRunStatusShow():
msgWindow = None
def ShowWindow():
global lists
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
try:
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
#r = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8"))
#r.encoding = "utf-8"
#title = r.text
tipsInfo = ""
except:
#traceback.print_exc()
fenlists = [0, 0, 0, 0, 0]
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
maxHead = fenlists.index(max(fenlists))
allNumber = 0
for i in fenlists:
allNumber += i
try:
maxNumber = max(fenlists) / allNumber * 100
if tipsInfo == "":
tipsInfo = f"{maxNumber}%的用户选择了这个评分"
except:
pass
ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow()
msgWidget = QtWidgets.QWidget()
msgWidgetLayout = QtWidgets.QGridLayout()
starLayout = QtWidgets.QHBoxLayout()
uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况"))
uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0)
msgWidgetLayout.addLayout(starLayout, 0, 1)
msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 1, 0, 1, 2)
#msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2)
msgWidgetLayout.addWidget(uploadButton, 3, 0, 1, 2)
end = 5
if maxHead > 5:
for i in range(end):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/BadStar.svg' width=50>"))
else:
for i in range(maxHead):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/Star.svg' width=50>"))
head = maxHead
for i in range(head, end):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/UnStar.svg' width=50>"))
msgWidget.setLayout(msgWidgetLayout)
ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget)
ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
ProgramRunStatusShow.msgWindow.setWindowTitle(f"脚本“{choose}”运行情况")
ProgramRunStatusShow.msgWindow.show()
def UploadFen():
global lists
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
ProgramRunStatusUpload.ShowWindow(fileName, choose)
class Connect:
def SearchBotton_Clicked():
@@ -33,7 +251,7 @@ class Connect:
return
for i in lists:
# 显示筛选的内容
if ui.searchThings.text() in i[0]:
if ui.searchThings.text().upper() in i[0].upper():
nmodel.appendRow(QtGui.QStandardItem(i[0]))
ui.searchList.setModel(nmodel)
@@ -64,7 +282,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,10 +304,10 @@ 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]}'")
OpenTerminal(f"env WINEARCH='{os.getenv('WINEARCH')}' WINEDEBUG='{os.getenv('WINEDEBUG')}' WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'")
#process = QtCore.QProcess()
#process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", path[0], "--system"])
#process.waitForFinished()
@@ -119,12 +337,16 @@ if __name__ == "__main__":
ui.setupUi(window)
window.setWindowTitle(f"Wine 运行器 {version}——容器自动配置部署脚本")
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
window.show()
# 连接信号和槽
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
ui.uploadFen.clicked.connect(UploadFen)
ui.getInfoButton.clicked.connect(InformationWindow.ShowWindow)
ui.runBotton.clicked.connect(Connect.RunBotton_Clicked)
ui.openFile.triggered.connect(Connect.OpenFile_Triggered)
ui.exitProgram.triggered.connect(window.close)
ui.getFen.clicked.connect(ProgramRunStatusShow.ShowWindow)
# 解析云列表
try:
# 获取列表
@@ -137,4 +359,5 @@ if __name__ == "__main__":
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
app.exec_()

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View 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]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View 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]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

14
AutoShell/command/installvb Executable file
View 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]))

View File

@@ -11,3 +11,5 @@ 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]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

14
AutoShell/command/taskmgr Executable file
View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -0,0 +1,42 @@
{
"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参数介绍无",
"installvb": "安装指定的 VB 运行库到指定容器\n参数数量1\n参数介绍在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6"
}

View File

@@ -3,7 +3,7 @@
###########################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.1.0
# 更新时间2022年08月25日
# 更新时间2022年10月05日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 构建
###########################################################################################
@@ -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,18 @@ class Command():
"winver",
"changeversion",
"stopdll",
"cat"
"cat",
"taskmgr",
"control",
"killall",
"killallwineserver",
"enabledhttpproxy",
"disbledhttpproxy",
"enabledwinecrashdialog",
"disbledwinecrashdialog",
"disbledWinebottlecreatelink",
"enabledWinebottlecreatelink",
"installvb"
]
def __init__(self, commandString: str) -> None:
@@ -321,6 +334,68 @@ 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()
def InstallVB(self):
import InstallVisualBasicRuntime
return InstallVisualBasicRuntime.Download(self.wineBottonPath, int(self.command[1]), self.wine)
# 可以运行的命令的映射关系
# 可以被使用的命令的映射
commandList = {
@@ -352,11 +427,22 @@ 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,
"installvb": InstallVB
}
# 参数数列表
commandInfo = {
"killall": [1],
"installdll": [1],
"installfont": [1],
"installsparkcorefont": [0],
@@ -385,7 +471,17 @@ 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],
"installvb": [1]
}
windowsUnrun = [
"createbotton",
@@ -432,6 +528,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("参数不足")
@@ -450,6 +553,10 @@ class Command():
break
app = QtWidgets.QApplication(sys.argv)
if os.getenv("WINE") != None:
programEnv[1][1] = os.getenv("WINE")
if os.getenv("WINEPREFIX") != None:
programEnv[0][1] = os.getenv("WINEPREFIX")
if __name__ == "__main__":
optionAll = 0
if "--debug" in sys.argv:
@@ -457,10 +564,6 @@ if __name__ == "__main__":
if "--system" in sys.argv:
programEnv[2][1] = "1"
optionAll += 1
if os.getenv("WINE") != None:
programEnv[1][1] = os.getenv("WINE")
if os.getenv("WINEPREFIX") != None:
programEnv[0][1] = os.getenv("WINEPREFIX")
if len(sys.argv) - optionAll < 2:
print("Wine 运行器自动配置文件解析器交互环境")
print(f"版本:{version}")
@@ -472,7 +575,7 @@ if __name__ == "__main__":
break
com = Command(commandLine)
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
exit()
sys.exit(int(programEnv[9][1]))
# 读取文件
try:
file = open(sys.argv[1], "r")
@@ -485,4 +588,5 @@ if __name__ == "__main__":
print(f"版本:{version}")
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
print("--------------------------------------------------------------")
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
sys.exit(int(programEnv[9][1]))

86
InstallVisualBasicRuntime.py Executable file
View File

@@ -0,0 +1,86 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.1.0
# 更新时间2022年10月05日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 构建
###########################################################################################
#################
# 引入所需的库
#################
import os
import sys
import json
import req as requests
try:
netList = json.loads(requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/list.json").text)
except:
netList = [
["Visual Basic 1(DOS application)", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vbrun100.exe", "vbrun100.exe"],
["Visual Basic 2(DOS application)", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vbrun200.exe", "vbrun200.exe"],
["Visual Basic 3", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vb3run.exe", "vb3run.exe"],
["Visual Basic 4", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vb4run.exe", "vb4run.exe"],
["Visual Basic 6", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vbrun60sp4.exe", "vbrun60sp4.exe"]
]
def Download(wineBotton: str, id: int, wine: str) -> int:
try:
os.remove(f"/tmp/deepin-wine-runner-vb/{netList[id][2]}")
except:
pass
os.system(f"aria2c -x 16 -s 16 -d '/tmp/deepin-wine-runner-vb' -o '{netList[id][2]}' \"{netList[id][1]}\"")
os.system(f"WINEPREFIX='{wineBotton}' {wine} '/tmp/deepin-wine-runner-vb/{netList[id][2]}'")
if __name__ == "__main__":
if "--help" in sys.argv:
print("作者gfdgd xi、为什么您不喜欢熊出没和阿布呢")
print("版本1.0.0")
print("本程序可以更方便的在 wine 容器中安装 Visual Basic Runtime")
sys.exit()
if len(sys.argv) <= 2 or sys.argv[1] == "" or sys.argv[2] == "":
print("您未指定需要安装 Visual Basic Runtime 的容器和使用的 wine无法继续")
print("参数:")
print("XXX 参数一 参数二 参数三(可略)")
print("参数一为需要安装的容器参数二为需要使用的wine参数三为是否缓存可略三个参数位置不能颠倒")
sys.exit()
homePath = os.path.expanduser('~')
print('''
m m mmmmm
"m m" # #
# # #mmmm"
"mm" # #
## #mmmm"
''')
print("请选择以下的 Visual Basic Runtime 进行安装(不保证能正常安装运行)")
for i in range(0, len(netList)):
print(f"{i} Visual Basic Runtime {netList[i][0]}")
while True:
try:
choose = input("请输入要选择的 Visual Basic Runtime 版本输入“exit”退出").lower()
if choose == "exit":
break
choose = int(choose)
except:
print("输入错误,请重新输入")
continue
if 0 <= choose and choose < len(netList):
break
if choose == "exit":
exit()
print(f"您选择了 Visual Basic Runtime {netList[choose][0]}")
if os.path.exists(f"{homePath}/.cache/deepin-wine-runner/vb/{netList[choose][2]}"):
print("已经缓存,使用本地版本")
os.system(f"WINEPREFIX='{sys.argv[1]}' {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/vb/{netList[choose][2]}'")
input("安装结束,按回车键退出")
exit()
print("开始下载")
os.system(f"rm -rf '{homePath}/.cache/deepin-wine-runner/vb/{netList[choose][2]}'")
os.system(f"mkdir -p '{homePath}/.cache/deepin-wine-runner/vb'")
os.system(f"aria2c -x 16 -s 16 -d '{homePath}/.cache/deepin-wine-runner/vb' -o '{netList[choose][2]}' \"{netList[choose][1]}\"")
os.system(f"WINEPREFIX='{sys.argv[1]}' {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/vb/{netList[choose][2]}'")
input("安装结束,按回车键退出")

View File

@@ -2,6 +2,7 @@ build:
#cd VM-source && qmake
#cd VM-source && make
#cd wine && make
cp -rv helperset deb/opt/apps/deepin-wine-runner/
cp -rv VM-source/VirtualMachine VM
cp -rv VM-source/deepin-wine-runner.svg VM
cp -rv VM-source/api VM
@@ -47,21 +48,25 @@ build:
cp -rv dlls-arm.7z deb/opt/apps/deepin-wine-runner
cp -rv deepin.list deb/opt/apps/deepin-wine-runner
cp -rv sparkstore.list deb/opt/apps/deepin-wine-runner
cp -rv wined3d.dll.so.7z deb/opt/apps/deepin-wine-runner
cp -rv arm-package.7z deb/opt/apps/deepin-wine-runner
cp -rv exa.7z deb/opt/apps/deepin-wine-runner
cp -rv clean-unuse-program.py deb/opt/apps/deepin-wine-runner
cp -rv InstallNewWineHQ.sh deb/opt/apps/deepin-wine-runner
cp -rv cleanbottle.sh deb/opt/apps/deepin-wine-runner
cp -rv StartVM.sh deb/opt/apps/deepin-wine-runner
#cp -rv deepin-wine-runner-create-botton.py deb/opt/apps/deepin-wine-runner
cp -rv Icon deb/opt/apps/deepin-wine-runner
cp -rv ConfigLanguareRunner-help.json deb/opt/apps/deepin-wine-runner
cp -rv gtkGetFileNameDlg deb/opt/apps/deepin-wine-runner
cp -rv LANG/*.qm deb/opt/apps/deepin-wine-runner/LANG
cp -rv InstallDll.py deb/opt/apps/deepin-wine-runner/LANG
cp -rv ConfigLanguareRunner.py deb/opt/apps/deepin-wine-runner
cp -rv AutoConfig.py deb/opt/apps/deepin-wine-runner
cp -rv UI/*.py deb/opt/apps/deepin-wine-runner/UI
cp -rv UI deb/opt/apps/deepin-wine-runner/
cp -rv InstallDll.py deb/opt/apps/deepin-wine-runner
cp -rv Model deb/opt/apps/deepin-wine-runner
cp -rv API deb/opt/apps/deepin-wine-runner
cp -rv key deb/opt/apps/deepin-wine-runner
dpkg -b deb spark-deepin-wine-runner.deb

View File

@@ -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=容器路径 winewine的路径 可执行文件路径
```
让你可以简易方便的使用 wine
是使用 Python3 的 tkinter 构建的
是使用 Python3 的 PyQt5 构建的
(自己美术功底太差,图标只能在网络上找了)
测试平台deepin 20.7UOS 家庭版 21.3.1Ubuntu 22.04UOS 专业版 1050
![image.png](https://storage.deepin.org/thread/202209242126366137_image.png)
测试平台deepin 20.7UOS 家庭版 21.3.1Ubuntu 22.04Ubuntu 20.04UOS 专业版 1050
![截图_选择区域_20221002221112.png](https://storage.deepin.org/thread/202210022215217037_截图_选择区域_20221002221112.png)
而打包器可以方便的把您的 wine 容器打包成 deb 包供他人使用,程序创建的 deb 构建临时文件夹目录树如下:
```bash
/XXX
@@ -102,6 +102,19 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
![image.png](https://storage.deepin.org/thread/202207190822204627_image.png)
## 更新日志
### 2.3.02022年10月02日
**※1、自动配置解释器支持 bash 语法(新版底层调用 bash旧版任然使用旧版解析引擎**
**※2、修复缺失 wimtools 依赖导致无法正常安装的问题**
**※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题并支持指定不同的包名和容器名**
**※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题**
**※5、修复安装更多 Wine 终端调用问题和图标问题**
**※6、支持 openkylin**
7、支持通过 exe 路径自动生成 Wine 容器路径
8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
9、支持设置 wine 容器代理
10、自动配置脚本支持使用 `--help` 参数查看帮助
![截图_选择区域_20221002221112.png](https://storage.deepin.org/thread/202210022215217037_截图_选择区域_20221002221112.png)
### 2.2.02022年09月24日
**※1、Dll 提取工具支持 NT 6.X 及以上版本的 Dll 提取并优化了提示文本**
**※2、支持卸载后自动删除缓存/配置文件(删除配置文件只限 purge 参数删除)**
@@ -327,6 +340,21 @@ make run
```bash
make install
```
## Openkylin 如何安装这个 Wine 运行器?
首先添加作者的源:
Gitlink 源(国内推荐):
```bash
wget https://code.gitlink.org.cn/gfdgd_xi/gfdgd-xi-apt-mirrors/raw/branch/master/sources/gitlink.sh && bash gitlink.sh && rm gitlink.sh
```
Github 源(国外推荐):
```bash
wget https://gfdgd-xi.github.io/gfdgd-xi-apt-mirrors/sources/github.sh && bash github.sh && rm github.sh
```
上面二选一,添加完后执行
```bash
sudo apt install spark-deepin-wine-runner
```
即可自动补全依赖安装(说实话 openkylin 缺的依赖好多)
## 对于 Deepin/UOSAMD64 平台)小白如何使用该程序?
下面是送给小白的 wine 运行器简单使用方法先声明wine 并***不能完美的运行所有 exe 文件***,利用此 wine 运行器简易安装可执行文件的方法如下:
@@ -384,6 +412,9 @@ Gitlinkhttps://www.gitlink.org.cn/gfdgd_xi/deep-wine-runner
+ https://github.com/gfdgd-xi/deep-wine-runner
+ https://www.gitlink.org.cn/gfdgd_xi/deep-wine-runner
## 程序下载量
![](https://gfdgd-xi.github.io/images/wine-runner.svg)
## Star 一下吧
开发不易,原创艰难,给一个 Star 吧,你的 Star 是我继续开发的动力
[![star](https://gitee.com/gfdgd-xi/deep-wine-runner/badge/star.svg?theme=dark)](https://gitee.com/gfdgd-xi/deep-wine-runner/stargazers)

View File

@@ -35,13 +35,22 @@ class Ui_MainWindow(object):
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem)
self.getInfoButton = QtWidgets.QPushButton(self.centralwidget)
self.getInfoButton.setObjectName("getInfoButton")
self.horizontalLayout_2.addWidget(self.getInfoButton)
self.getFen = QtWidgets.QPushButton(self.centralwidget)
self.getFen.setObjectName("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.setObjectName("runBotton")
self.horizontalLayout_2.addWidget(self.runBotton)
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 36))
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 33))
self.menubar.setObjectName("menubar")
self.menu = QtWidgets.QMenu(self.menubar)
self.menu.setObjectName("menu")
@@ -67,6 +76,9 @@ class Ui_MainWindow(object):
MainWindow.setWindowTitle(_translate("MainWindow", "自动部署脚本"))
self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
self.saerchBotton.setText(_translate("MainWindow", "搜索"))
self.getInfoButton.setText(_translate("MainWindow", "获取选中项介绍"))
self.getFen.setText(_translate("MainWindow", "获取选中项的评分"))
self.uploadFen.setText(_translate("MainWindow", "提交选中项的评分"))
self.runBotton.setText(_translate("MainWindow", "部署此方案"))
self.menu.setTitle(_translate("MainWindow", "程序"))
self.about.setText(_translate("MainWindow", "关于"))

View File

@@ -54,6 +54,27 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="getInfoButton">
<property name="text">
<string>获取选中项介绍</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="getFen">
<property name="text">
<string>获取选中项的评分</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="uploadFen">
<property name="text">
<string>提交选中项的评分</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="runBotton">
<property name="text">
@@ -71,7 +92,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>36</height>
<height>33</height>
</rect>
</property>
<widget class="QMenu" name="menu">

85
UI/KeyAddGui.py Normal file
View File

@@ -0,0 +1,85 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'KeyAddGui.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(692, 314)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName("verticalLayout")
self.tips = QtWidgets.QLabel(self.centralwidget)
self.tips.setObjectName("tips")
self.verticalLayout.addWidget(self.tips)
self.keyBoardList = QtWidgets.QListView(self.centralwidget)
self.keyBoardList.setObjectName("keyBoardList")
self.verticalLayout.addWidget(self.keyBoardList)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.addButton = QtWidgets.QPushButton(self.centralwidget)
self.addButton.setObjectName("addButton")
self.horizontalLayout.addWidget(self.addButton)
self.editButton = QtWidgets.QPushButton(self.centralwidget)
self.editButton.setObjectName("editButton")
self.horizontalLayout.addWidget(self.editButton)
self.delectButton = QtWidgets.QPushButton(self.centralwidget)
self.delectButton.setObjectName("delectButton")
self.horizontalLayout.addWidget(self.delectButton)
self.verticalLayout.addLayout(self.horizontalLayout)
MainWindow.setCentralWidget(self.centralwidget)
self.menuBar = QtWidgets.QMenuBar(MainWindow)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 692, 33))
self.menuBar.setObjectName("menuBar")
self.menu = QtWidgets.QMenu(self.menuBar)
self.menu.setObjectName("menu")
MainWindow.setMenuBar(self.menuBar)
self.action = QtWidgets.QAction(MainWindow)
self.action.setObjectName("action")
self.serverTips = QtWidgets.QAction(MainWindow)
self.serverTips.setEnabled(False)
self.serverTips.setObjectName("serverTips")
self.startServer = QtWidgets.QAction(MainWindow)
self.startServer.setObjectName("startServer")
self.stopServer = QtWidgets.QAction(MainWindow)
self.stopServer.setObjectName("stopServer")
self.setAutoStart = QtWidgets.QAction(MainWindow)
self.setAutoStart.setObjectName("setAutoStart")
self.setUnautoStart = QtWidgets.QAction(MainWindow)
self.setUnautoStart.setObjectName("setUnautoStart")
self.menu.addAction(self.serverTips)
self.menu.addSeparator()
self.menu.addAction(self.startServer)
self.menu.addAction(self.stopServer)
self.menu.addSeparator()
self.menu.addAction(self.setAutoStart)
self.menu.addAction(self.setUnautoStart)
self.menuBar.addAction(self.menu.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "编辑快捷键"))
self.tips.setText(_translate("MainWindow", "<html><head/><body><p>此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键<br/>Deepin/UOS将会使用默认的快捷键服务其它发行版将使用此运行器提供的快捷键服务<br>Deepin/UOS将只会提供快捷键添加功能请在控制中心进行快捷键的修改管理</p></body></html>"))
self.addButton.setText(_translate("MainWindow", "添加"))
self.editButton.setText(_translate("MainWindow", "编辑"))
self.delectButton.setText(_translate("MainWindow", "删除"))
self.menu.setTitle(_translate("MainWindow", "设置快捷键服务"))
self.action.setText(_translate("MainWindow", "关于"))
self.serverTips.setText(_translate("MainWindow", "此内容只支持非Deepin/UOS发行版"))
self.startServer.setText(_translate("MainWindow", "启动服务"))
self.stopServer.setText(_translate("MainWindow", "停止服务"))
self.setAutoStart.setText(_translate("MainWindow", "设置开机自启"))
self.setUnautoStart.setText(_translate("MainWindow", "关闭开机自启动"))

127
UI/KeyAddGui.ui Normal file
View File

@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>692</width>
<height>314</height>
</rect>
</property>
<property name="windowTitle">
<string>编辑快捷键</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="tips">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键&lt;br/&gt;Deepin/UOS将会使用默认的快捷键服务其它发行版将使用此运行器提供的快捷键服务&lt;br&gt;Deepin/UOS将只会提供快捷键添加功能请在控制中心进行快捷键的修改管理&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QListView" name="keyBoardList"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="addButton">
<property name="text">
<string>添加</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="editButton">
<property name="text">
<string>编辑</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="delectButton">
<property name="text">
<string>删除</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>692</width>
<height>33</height>
</rect>
</property>
<widget class="QMenu" name="menu">
<property name="title">
<string>设置快捷键服务</string>
</property>
<addaction name="serverTips"/>
<addaction name="separator"/>
<addaction name="startServer"/>
<addaction name="stopServer"/>
<addaction name="separator"/>
<addaction name="setAutoStart"/>
<addaction name="setUnautoStart"/>
</widget>
<addaction name="menu"/>
</widget>
<action name="action">
<property name="text">
<string>关于</string>
</property>
</action>
<action name="serverTips">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>此内容只支持非Deepin/UOS发行版</string>
</property>
</action>
<action name="startServer">
<property name="text">
<string>启动服务</string>
</property>
</action>
<action name="stopServer">
<property name="text">
<string>停止服务</string>
</property>
</action>
<action name="setAutoStart">
<property name="text">
<string>设置开机自启</string>
</property>
</action>
<action name="setUnautoStart">
<property name="text">
<string>关闭开机自启动</string>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>

86
UI/KeyAddKeyboardGui.py Normal file
View File

@@ -0,0 +1,86 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'KeyAddKeyboardGui.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 195)
icon = QtGui.QIcon.fromTheme("..")
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName("verticalLayout")
self.addTips = QtWidgets.QLabel(self.centralwidget)
self.addTips.setObjectName("addTips")
self.verticalLayout.addWidget(self.addTips)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.exeNameTips = QtWidgets.QLabel(self.centralwidget)
self.exeNameTips.setObjectName("exeNameTips")
self.horizontalLayout_3.addWidget(self.exeNameTips)
self.exeName = QtWidgets.QLineEdit(self.centralwidget)
self.exeName.setObjectName("exeName")
self.horizontalLayout_3.addWidget(self.exeName)
self.verticalLayout.addLayout(self.horizontalLayout_3)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.localTips = QtWidgets.QLabel(self.centralwidget)
self.localTips.setObjectName("localTips")
self.horizontalLayout.addWidget(self.localTips)
self.localKeyboardChoose = QtWidgets.QComboBox(self.centralwidget)
self.localKeyboardChoose.setObjectName("localKeyboardChoose")
self.horizontalLayout.addWidget(self.localKeyboardChoose)
self.addTips_2 = QtWidgets.QLabel(self.centralwidget)
self.addTips_2.setObjectName("addTips_2")
self.horizontalLayout.addWidget(self.addTips_2)
self.localKey = QtWidgets.QLineEdit(self.centralwidget)
self.localKey.setObjectName("localKey")
self.horizontalLayout.addWidget(self.localKey)
self.wineTips = QtWidgets.QLabel(self.centralwidget)
self.wineTips.setObjectName("wineTips")
self.horizontalLayout.addWidget(self.wineTips)
self.wineKeyboardChoose = QtWidgets.QComboBox(self.centralwidget)
self.wineKeyboardChoose.setObjectName("wineKeyboardChoose")
self.horizontalLayout.addWidget(self.wineKeyboardChoose)
self.addTipsWine = QtWidgets.QLabel(self.centralwidget)
self.addTipsWine.setObjectName("addTipsWine")
self.horizontalLayout.addWidget(self.addTipsWine)
self.wineKey = QtWidgets.QLineEdit(self.centralwidget)
self.wineKey.setObjectName("wineKey")
self.horizontalLayout.addWidget(self.wineKey)
self.verticalLayout.addLayout(self.horizontalLayout)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem1)
self.addButton = QtWidgets.QPushButton(self.centralwidget)
self.addButton.setObjectName("addButton")
self.horizontalLayout_2.addWidget(self.addButton)
self.verticalLayout.addLayout(self.horizontalLayout_2)
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "添加快捷键"))
self.addTips.setText(_translate("MainWindow", "暂时只支持特定组合\n"
"文本框内的只能输入单字母"))
self.exeNameTips.setText(_translate("MainWindow", "可这执行文件名称:"))
self.localTips.setText(_translate("MainWindow", "本地映射:"))
self.addTips_2.setText(_translate("MainWindow", "+"))
self.wineTips.setText(_translate("MainWindow", "Wine 容器映射内容:"))
self.addTipsWine.setText(_translate("MainWindow", "+"))
self.addButton.setText(_translate("MainWindow", "添加快捷键"))

130
UI/KeyAddKeyboardGui.ui Normal file
View File

@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>195</height>
</rect>
</property>
<property name="windowTitle">
<string>添加快捷键</string>
</property>
<property name="windowIcon">
<iconset theme="..">
<normaloff>../../../.designer/backup</normaloff>../../../.designer/backup</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="addTips">
<property name="text">
<string>暂时只支持特定组合
文本框内的只能输入单字母</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="exeNameTips">
<property name="text">
<string>可这执行文件名称:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="exeName"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="localTips">
<property name="text">
<string>本地映射:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="localKeyboardChoose"/>
</item>
<item>
<widget class="QLabel" name="addTips_2">
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="localKey"/>
</item>
<item>
<widget class="QLabel" name="wineTips">
<property name="text">
<string>Wine 容器映射内容:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="wineKeyboardChoose"/>
</item>
<item>
<widget class="QLabel" name="addTipsWine">
<property name="text">
<string>+</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="wineKey"/>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="addButton">
<property name="text">
<string>添加快捷键</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
arm-package.7z Normal file

Binary file not shown.

345
check-deb.sh Executable file
View File

@@ -0,0 +1,345 @@
#!/bin/bash
BASE_DIR=$1
DEBIAN_DIR="$BASE_DIR/DEBIAN"
OPT_DIR="${BASE_DIR}/opt"
declare -a dir_list
PACKAGE_IS_NULL=""
PACKAGE=""
VERSION=""
ARCH=""
DESC=""
LINE_IS_NULL=""
# 判断参数数量
if [ $# -ne 1 ];then
echo "USAGE: $0 DIR"
exit 1
fi
# 判断目录
if [ ! -d $1 ];then
echo "$1 不是目录或者该目录不存在."
exit 2
fi
function fail(){
echo -e "$1 \t\t\t[\033[31mFAIL\033[0m]"
}
function ok(){
echo -e "$1 \t\t\t[\033[32mOK\033[0m]"
}
function scan_dir(){
echo "-----------------------目录检查开始-------------------------"
# 扫描目录
for i in `ls $BASE_DIR`;do
dir_list[${#dir_list[*]}]=$i
done
# 打印目录
dirs=""
for i in ${dir_list[*]};do
if [ $i == "DEBIAN" ];then
dirs=$dirs+$i
elif [ $i == "opt" ];then
dirs=$dirs+$i
else
dirs=$dirs+$i
echo -e "\033[31mInfo: 扫描到不合规目录$i,请检查是否必要。\033[0m"
fi
done
#echo "所有目录:$dirs" | tr '+' ' '
# 检查DEBIAN目录是否存在
if [ ! -d $DEBIAN_DIR ];then
fail "检查DEBIAN目录是否存在\t\t"
echo -e "ERROR: ${DEBIAN_DIR}目录不存在\n"
else
ok "检查DEBIAN目录是否存在\t\t"
fi
# 检查control文件是否存在
if [ ! -f ${DEBIAN_DIR}/control ];then
fail "检查control文件是否存在\t\t"
echo -e "ERROR: ${DEBIAN_DIR}/control文件不存在\n"
else
ok "检查control文件是否存在\t\t"
fi
# 检查是否有钩子脚本
script_num=`ls ${DEBIAN_DIR}/*rm ${DEBIAN_DIR}/*inst 2>/dev/null |wc -l`
if [ ${script_num} -gt 0 ];then
fail "检查是否有钩子脚本\t\t"
echo -e "Note: ${DEBIAN_DIR}/下有钩子脚本,请手动检查是否合规.\n"
else
ok "检查是否有钩子脚本\t\t"
fi
# 检查opt目录是否存在
if [ ! -d $OPT_DIR ];then
fail "检查opt目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}目录不存在\n"
else
ok "检查opt目录是否存在\t\t"
fi
# 检查opt/apps目录是否存在
if [ ! -d $OPT_DIR/apps ];then
fail "检查opt/apps目录是否存在\t"
echo -e "ERROR: ${OPT_DIR}/apps目录不存在\n"
else
ok "检查opt/apps目录是否存在\t"
fi
# 检查PACKAGE目录名是否正确
if [ ! -d ${OPT_DIR}/apps/${PACKAGE} ];then
fail "检查程序目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}目录不存在,可能与control文件中包名不一致,终止后续检查.\n"
exit 100
else
ok "检查程序目录是否存在\t\t"
fi
# 检查entries目录
if [ ! -d ${OPT_DIR}/apps/${PACKAGE}/entries ];then
fail "检查entries目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries目录不存在\n"
else
ok "检查entries目录是否存在\t\t"
fi
# 检查applications目录
if [ ! -d ${OPT_DIR}/apps/${PACKAGE}/entries/applications ];then
fail "检查applications目录是否存在\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/applications目录不存在\n"
else
ok "检查applications目录是否存在\t"
fi
#检查desktop文件
if [ ! -f ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop ];then
fail "检查desktop文件是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop文件不存在\n"
else
ok "检查desktop文件是否存在\t\t"
fi
# 检查icons目录
if [ ! -d ${OPT_DIR}/apps/${PACKAGE}/entries/icons ];then
fail "检查icons目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/icons目录不存在\n"
else
ok "检查icons目录是否存在\t\t"
fi
# 检查hicolor目录
if [ ! -d ${OPT_DIR}/apps/${PACKAGE}/entries/icons/hicolor ];then
fail "检查hicolor目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/icons/hicolor目录不存在\n"
else
ok "检查hicolor目录是否存在\t\t"
fi
# 检查files目录
if [ ! -d ${OPT_DIR}/apps/${PACKAGE}/files ];then
fail "检查files目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/files目录不存在\n"
else
ok "检查files目录是否存在\t\t"
fi
#检查info文件
if [ ! -f ${OPT_DIR}/apps/${PACKAGE}/info ];then
fail "检查info文件是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/info文件不存在\n"
else
ok "检查info文件是否存在\t\t"
fi
echo -e "-----------------------目录检查结束-------------------------\n"
}
function check_icon_type(){
real_extent_name=`file $1 2>/dev/null| grep -E "SVG|JPEG|PNG" -o`
if [ ${real_extent_name} == "SVG" ];then
real_extent_name="svg"
elif [ ${real_extent_name} == "PNG" ];then
real_extent_name="png"
elif [ ${real_extent_name} == "JPEG" ];then
real_extent_name="jpg"
fi
if [ ${real_extent_name} == ${icon_type} ];then
ok "检查Icon字段\t\t\t"
else
fail "检查Icon字段\t\t\t"
echo -e "ERROR: $1文件扩展名为${icon_type},但实际文件类型为${real_extent_name},可能会影响图标显示.\n"
fi
}
function check_control(){
echo "-------------------control文件检查开始----------------------"
# 包名是否为空
PACKAGE_IS_NULL=`grep Package ${DEBIAN_DIR}/control | awk -F ": " '{print $2}'`
if [ -z $PACKAGE_IS_NULL ];then
fail "检查Package字段是否为空\t\t"
echo -e "ERROR: Package字段参数不能为空且:后必须有一个空格.\n"
else
ok "检查Package字段是否为空\t\t"
fi
# 包名是否是域名倒置
PACKAGE=`grep Package ${DEBIAN_DIR}/control | awk -F ": " '{print $2}' |grep -E "^(com|cn|edu|org|net|gov)(\.[a-Z0-9]+)+"`
if [ -z $PACKAGE ];then
fail "检查Package是否域名倒置\t\t"
echo -e "ERROR: Package字段参数必须是域名倒置.\n"
else
ok "检查Package是否域名倒置\t\t"
fi
# 版本
VERSION=`grep Version ${DEBIAN_DIR}/control | awk -F ": " '{print $2}'`
if [ -z $VERSION ];then
fail "检查Version字段\t\t\t"
echo -e "ERROR: Version字段不能为空且:后必须有一个空格.\n"
else
ok "检查Version字段\t\t\t"
fi
# 架构
ARCH=`grep Architecture ${DEBIAN_DIR}/control | awk -F ": " '{print $2}'`
if [ -z $ARCH ];then
fail "检查Architecture字段\t\t"
echo -e "ERROR: Architecture字段不能为空且:后必须有一个空格.\n"
else
if [ ${ARCH} != "amd64" -a ${ARCH} != "arm64" -a ${ARCH} != "mips64el" -a ${ARCH} != "sw_64" -a ${ARCH} != "all" -a ${ARCH} != "any" ];then
fail "检查Architecture字段\t\t"
echo -e "ERROR: Architecture字段只能{arm64|amd64|mips64el|sw_64|all|any}\n"
else
ok "检查Architecture字段\t\t"
fi
fi
# 描述
DESC=`grep Description ${DEBIAN_DIR}/control | awk -F ": " '{print $2}'`
if [ -z "$DESC" ];then
fail "检查Description字段\t\t"
echo -e "ERROR: Description字段不能为空且:后必须有一个空格.\n"
else
ok "检查Description字段\t\t"
fi
# 分类
SECTION=`grep Section ${DEBIAN_DIR}/control | awk -F ": " '{print $2}'`
if [ -z "$SECTION" ];then
fail "检查Section字段\t\t\t"
echo -e "ERROR: Section字段不能为空且:后必须有一个空格.\n"
else
ok "检查Section字段\t\t\t"
fi
# 是否有空行1表示没有空行0有空行
grep ^$ ${DEBIAN_DIR}/control 1>/dev/null 2>&1
LINE_IS_NULL=$?
if [ ! $LINE_IS_NULL -eq 1 ];then
fail "检查是否有空行\t\t\t"
echo -e "ERROE: control文件中不能有空行.\n"
else
ok "检查是否有空行\t\t\t"
fi
echo -e "-------------------control文件检查结束----------------------\n"
}
function check_desktop_file(){
echo -e "-------------------desktop文件检查开始----------------------"
# 检查Icon文件是否存在
icon_path=`grep Icon ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop 2>/dev/null|awk -F "=" '{print $2}'`
icon_is_full_path=`echo ${icon_path} | cut -c 1`
icon_type=`echo ${icon_path} |rev |cut -c 1-6 |rev | awk -F '.' '{print $2}'`
if [ -f ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop ];then
if [ ${icon_type} != "png" -a ${icon_type} != "svg" -a ${icon_type} != "jpg" ];then
fail "检查Icon文件类型\t\t"
echo -e "ERROR: Icon文件类型必须是jpg/png/svg,您desktop文件中可能没有扩展名。\n"
else
ok "检查Icon文件类型\t\t"
if [ -z $icon_path ];then
fail "检查Icon字段\t\t\t"
echo -e "ERROR: Icon字段不能为空且:后面要有一个空格.\n"
else
if [ ${icon_is_full_path} == '/' ];then
if [ ! -f ${BASE_DIR}${icon_path} ];then
fail "检查Icon字段\t\t\t"
echo -e "ERROR: ${BASE_DIR}${icon_path}文件不存在.\n"
else
check_icon_type ${BASE_DIR}${icon_path}
fi
else
image_dir="${OPT_DIR}/apps/${PACKAGE}/entries/icons/hicolor/"
if [ -f ${image_dir}16x16/apps/${icon_path} ];then
check_icon_type ${image_dir}16x16/apps/${icon_path}
elif [ -f ${image_dir}24x24/apps/${icon_path} ];then
check_icon_type ${image_dir}24x24/apps/${icon_path}
elif [ -f ${image_dir}32x32/apps/${icon_path} ];then
check_icon_type ${image_dir}32x32/apps/${icon_path}
elif [ -f ${image_dir}48x48/apps/${icon_path} ];then
check_icon_type ${image_dir}48x48/apps/${icon_path}
elif [ -f ${image_dir}128x128/apps/${icon_path} ];then
check_icon_type ${image_dir}128x128/apps/${icon_path}
elif [ -f ${image_dir}256x256/apps/${icon_path} ];then
check_icon_type ${image_dir}256x256/apps/${icon_path}
elif [ -f ${image_dir}512x512/apps/${icon_path} ];then
check_icon_type ${image_dir}512x512/apps/${icon_path}
elif [ -f ${image_dir}scalable/apps/${icon_path} ];then
check_icon_type ${image_dir}scalable/apps/${icon_path}
else
fail "检查Icon字段\t\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/icons/hicolor/{scalable|16x16|32x32|48x48...512}/apps/${icon_path}文件不存在.\n"
fi
fi
fi
fi
# 检查Exec启动程序是否存在
exec_path=`grep Exec ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop 2>/dev/null |awk -F "=" '{print $2}' |awk '{print $1}'`
if [ ! -f ${BASE_DIR}${exec_path} ];then
fail "检查Exec字段\t\t\t"
echo -e "ERROR: ${BASE_DIR}${exec_path}文件不存在.\n"
else
ok "检查Exec字段\t\t\t"
fi
else
fail "检查Icon文件类型\t\t"
fail "检查Exec字段\t\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop文件不存在\n"
fi
echo -e "-------------------desktop文件检查结束----------------------\n"
}
function check_info_file(){
echo -e "---------------------info文件检查开始-----------------------"
appid=`grep appid ${OPT_DIR}/apps/${PACKAGE}/info 2>/dev/null|awk -F ":" '{print $2}' |tr -d "\"" |tr -d , | tr -d ' '`
arch_num=`grep arch ${OPT_DIR}/apps/${PACKAGE}/info 2>/dev/null |tr -d "[]" |awk -F ',' '{print (NF-1)}'`
arch=`grep arch ${OPT_DIR}/apps/${PACKAGE}/info 2>/dev/null`
# 检查appid字段
if [ -z $appid ];then
fail "检查appid字段\t\t\t"
echo -e "ERROR: appid字段不能为空.\n"
else
if [ ${PACKAGE} != `echo ${appid} |tr -d "$" |tr -d "\r"` ];then
fail "检查appid字段\t\t\t"
echo -e "ERROR: appid字段参数与Package字段参数不一致.\n"
else
ok "检查appid字段\t\t\t"
fi
fi
# 检查arch字段
if [ $arch_num -eq "1" ];then
if [ $ARCH == `echo $arch | awk -F ":" '{print $2}' | tr -d "[],\""` ];then
ok "检查arch字段\t\t\t"
else
fail "检查arch字段\t\t\t"
echo -e "ERROR: arch字段参数与control中不一致.\n"
fi
elif [ $arch_num -eq "2" ];then
fail "检查arch字段\t\t\t"
echo -e "ERROR: arch字段参数与control中不一致.\n"
elif [ $arch_num -eq "3" ];then
if [ $ARCH == "any" -o $ARCH == "all" ];then
echo $arch | grep "amd64" |grep "arm64" | grep "mips64el" -q
if [ $? -eq 0 ];then
ok "检查arch字段\t\t\t"
else
fail "检查arch字段\t\t\t"
echo -e "ERROR: arch字段参数与control中不一致.\n"
fi
else
fail "检查arch字段\t\t\t"
echo -e "ERROR: arch字段参数与control中不一致.\n"
fi
else
fail "检查arch字段\t\t\t"
echo -e "ERROR: arch字段参数太多或\n"
fi
# 检查json语法
tail -n 2 ${OPT_DIR}/apps/${PACKAGE}/info | grep -q ","
if [ $? -eq 0 ];then
fail "检查json语法\t\t\t"
echo -e "ERROR: info文件倒数第二行有多余的,号.\n"
else
ok "检查json语法\t\t\t"
fi
echo -e "---------------------info文件检查结束-----------------------\n"
}
check_control
scan_dir
check_desktop_file
check_info_file

View File

@@ -1,39 +1,26 @@
Package: spark-deepin-wine-runner
Version: 2.2.1
Version: 2.4.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
Priority: optional
Depends: python3, python3-pil, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar, unzip, python3-requests, fakeroot, bash, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal
Depends: python3, python3-pil, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar, unzip, python3-requests, fakeroot, bash, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip
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
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
Installed-Size: 29616
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.4.0 更新内容:
※1、新增 VB Runtime 组件安装工具
※2、优化自动配置容器搜索功能,搜索不区分大小写
※3、新增 Wine 容器快捷键映射功能
※4、修复在 arm 架构运行 Wine 时提示无法解压资源的问题
※5、修复右键无法找到 Wine 运行器打开方式的问题
※6、修复了容器自动配置脚本 GUI 解析器无法指定 Wine、容器以及位数的功能
※7、容器自动配置脚本支持评分功能以及脚本内容介绍功能
※8、支持添加自定义安装的 Wine
※9、打包器打包的 arm 包支持同时支持 UOS 的 box86 和 exagear
※10、提供了 Python 的自动配置脚本 API
更新时间2022年10月25日
作者gfdgd xi、为什么您不喜欢熊出没和阿布呢

View File

@@ -2,11 +2,12 @@
# 使用系统默认的 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
#################################################################################################################
python3 -m pip install --upgrade pynput --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
# 如果为非 X86 PC可以删除掉一些无用组件主要是用不了
if [ `arch` != "x86_64" ]; then
echo 非X86架构删除对非X86架构无用的组件
@@ -32,4 +33,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.4.0 -s > /dev/null | true

View File

@@ -0,0 +1,54 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.4.0
# 更新时间2022年10月15日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 构建
###########################################################################################
#################
# 加入路径
#################
import os
import sys
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
sys.path.append(f"{programPath}/../../")
#################
# 引入所需的库(正式内容)
#################
import os
import sys
import ConfigLanguareRunner
class Old:
wine = ""
wineprefix = ""
def __init__(self, wine = "", wineprefix = "") -> None:
self.wine = os.getenv("WINE") if wine == "" else wine
self.wineprefix = os.getenv("WINEPREFIX") if wine == "" else wineprefix
def runCommand(self, command: str) -> None:
com = ConfigLanguareRunner.Command(command)
print(com.GetCommandList())
return com.Run(com.GetCommandList(), self.wineprefix, self.wine)
def runList(self, command: list) -> None:
return ConfigLanguareRunner.Command("").Run(command, self.wineprefix, self.wine)
class Bash:
wine = ""
wineprefix = ""
def __init__(self, wine = "", wineprefix = "") -> None:
self.wine = os.getenv("WINE") if wine == "" else wine
self.wineprefix = os.getenv("WINEPREFIX") if wine == "" else wineprefix
def runCommand(self, command: str) -> int:
return os.system(f"'{programPath}/../../AutoShell/main.py' -c \"{command}\"")
def runList(self, command: list) -> int:
commandStr = ""
for k in command:
for i in k:
commandStr += f"'{i}' "
commandStr += ";"
return os.system(f"'{programPath}/../../AutoShell/main.py' -c \"{commandStr}\"")

View File

@@ -0,0 +1,3 @@
import WineRunner
WineRunner.Bash("a").runList([["thank"], ["version"]])
#WineRunner.Bash("a").runCommand("thank")

View File

@@ -2,8 +2,8 @@
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.1.0
# 更新时间2022年08月25日
# 版本2.4.0
# 更新时间2022年10月25日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 构建
###########################################################################################
@@ -12,6 +12,7 @@
#################
import os
import sys
import base64
import json
import traceback
import req as requests
@@ -21,6 +22,223 @@ from Model import *
urlSources = "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/auto"
lists = []
class ProgramRunStatusUpload():
msgWindow = None
starLayout = None
fen = None
starList = []
sha1Value = ""
programName = None
def ChangeStar():
if ProgramRunStatusUpload.fen.currentIndex() > 5:
for i in ProgramRunStatusUpload.starList:
i.setText(f"<img src='{programPath}/Icon/BadStar.svg' width=25>")
return
for i in range(ProgramRunStatusUpload.fen.currentIndex()):
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/Star.svg' width=25>")
head = ProgramRunStatusUpload.fen.currentIndex()
end = len(ProgramRunStatusUpload.starList)
for i in range(head, end):
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/UnStar.svg' width=25>")
def ShowWindow(sha="", title=""):
ProgramRunStatusUpload.starList = []
ProgramRunStatusUpload.sha1Value = sha
ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow()
msgWidget = QtWidgets.QWidget()
msgWidgetLayout = QtWidgets.QGridLayout()
ProgramRunStatusUpload.programName = QtWidgets.QLineEdit()
ProgramRunStatusUpload.fen = QtWidgets.QComboBox()
ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout()
upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传"))
upload.clicked.connect(ProgramRunStatusUpload.Upload)
if title != "":
ProgramRunStatusUpload.programName.setText(title)
ProgramRunStatusUpload.programName.setDisabled(True)
# 生成星星列表
for i in [1, 1, 1, 1, 0]:
ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>"))
ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1])
ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
ProgramRunStatusUpload.programName.setPlaceholderText(QtCore.QCoreApplication.translate("U", "如果这个程序和程序名确实是合法还是检测到敏感词改为“NULL”即可"))
ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"])
ProgramRunStatusUpload.fen.setCurrentIndex(4)
ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar)
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序名:")), 0, 0)
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0)
msgWidgetLayout.addWidget(ProgramRunStatusUpload.programName, 0, 1)
msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1)
msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1)
msgWidgetLayout.addWidget(upload, 3, 1)
msgWidget.setLayout(msgWidgetLayout)
ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget)
ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况"))
ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
ProgramRunStatusUpload.msgWindow.show()
def Upload():
try:
#if ProgramRunStatusUpload.sha1Value == "":
#ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText())
QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL2Jhc2g=").decode("utf-8"), {
"BashName": ProgramRunStatusUpload.sha1Value,
"Fen": ProgramRunStatusUpload.fen.currentIndex()
}).json()["Error"])
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
class InformationWindow():
def ShowWindow():
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
try:
get = requests.get(f"{urlSources}/information/{fileName}.txt")
if get.status_code / 100 != 2 and get.status_code / 100 != 3:
int("Bad")
about = get.text
if not "<" in about:
# 非 Html 标签
for i in about.splitlines():
about += f"<p>{i}</p>\n"
#about = f"<pre>{about}</pre>"
about = f"<h1>关于“{choose}”的介绍</h1>\n{about}"
except:
traceback.print_exc()
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
try:
import requests as r
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
tipsInfo = ""
except:
fenlists = [0, 0, 0, 0, 0]
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
maxHead = fenlists.index(max(fenlists))
allNumber = 0
for i in fenlists:
allNumber += i
try:
maxNumber = max(fenlists) / allNumber * 100
if tipsInfo == "":
tipsInfo = f"{maxNumber}%的用户选择了这个评分"
except:
pass
end = 5
starHtml = ""
if maxHead > 5:
for i in range(end):
starHtml += f"<img src='{programPath}/Icon/BadStar.svg' width=50>\n"
else:
for i in range(maxHead):
starHtml += f"<img src='{programPath}/Icon/Star.svg' width=50>\n"
head = maxHead
for i in range(head, end):
starHtml += f"<img src='{programPath}/Icon/UnStar.svg' width=50>"
about += f"\n<hr/><h1>评分情况</h1>\n<p align='center'>{starHtml}</p>\n<p align='center'>{tipsInfo}</p>"
message = QtWidgets.QDialog()
messageLayout = QtWidgets.QVBoxLayout()
informationText = QtWidgets.QTextBrowser()
uploadFen = QtWidgets.QPushButton("提交评分")
uploadFen.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
informationText.setHtml(about)
messageLayout.addWidget(informationText)
messageLayout.addWidget(uploadFen)
message.setWindowTitle(f"关于“{choose}”的介绍")
message.resize(int(message.frameSize().width() * 1.5), int(message.frameSize().height()))
message.setLayout(messageLayout)
#message.setWindowModality(ApplicationModal);
message.show()
message.exec_()
class ProgramRunStatusShow():
msgWindow = None
def ShowWindow():
global lists
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
try:
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
#r = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8"))
#r.encoding = "utf-8"
#title = r.text
tipsInfo = ""
except:
#traceback.print_exc()
fenlists = [0, 0, 0, 0, 0]
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
maxHead = fenlists.index(max(fenlists))
allNumber = 0
for i in fenlists:
allNumber += i
try:
maxNumber = max(fenlists) / allNumber * 100
if tipsInfo == "":
tipsInfo = f"{maxNumber}%的用户选择了这个评分"
except:
pass
ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow()
msgWidget = QtWidgets.QWidget()
msgWidgetLayout = QtWidgets.QGridLayout()
starLayout = QtWidgets.QHBoxLayout()
uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况"))
uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0)
msgWidgetLayout.addLayout(starLayout, 0, 1)
msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 1, 0, 1, 2)
#msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2)
msgWidgetLayout.addWidget(uploadButton, 3, 0, 1, 2)
end = 5
if maxHead > 5:
for i in range(end):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/BadStar.svg' width=50>"))
else:
for i in range(maxHead):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/Star.svg' width=50>"))
head = maxHead
for i in range(head, end):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/UnStar.svg' width=50>"))
msgWidget.setLayout(msgWidgetLayout)
ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget)
ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
ProgramRunStatusShow.msgWindow.setWindowTitle(f"脚本“{choose}”运行情况")
ProgramRunStatusShow.msgWindow.show()
def UploadFen():
global lists
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
ProgramRunStatusUpload.ShowWindow(fileName, choose)
class Connect:
def SearchBotton_Clicked():
@@ -33,7 +251,7 @@ class Connect:
return
for i in lists:
# 显示筛选的内容
if ui.searchThings.text() in i[0]:
if ui.searchThings.text().upper() in i[0].upper():
nmodel.appendRow(QtGui.QStandardItem(i[0]))
ui.searchList.setModel(nmodel)
@@ -64,7 +282,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,10 +304,10 @@ 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]}'")
OpenTerminal(f"env WINEARCH='{os.getenv('WINEARCH')}' WINEDEBUG='{os.getenv('WINEDEBUG')}' WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'")
#process = QtCore.QProcess()
#process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", path[0], "--system"])
#process.waitForFinished()
@@ -119,12 +337,16 @@ if __name__ == "__main__":
ui.setupUi(window)
window.setWindowTitle(f"Wine 运行器 {version}——容器自动配置部署脚本")
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
window.show()
# 连接信号和槽
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
ui.uploadFen.clicked.connect(UploadFen)
ui.getInfoButton.clicked.connect(InformationWindow.ShowWindow)
ui.runBotton.clicked.connect(Connect.RunBotton_Clicked)
ui.openFile.triggered.connect(Connect.OpenFile_Triggered)
ui.exitProgram.triggered.connect(window.close)
ui.getFen.clicked.connect(ProgramRunStatusShow.ShowWindow)
# 解析云列表
try:
# 获取列表
@@ -137,4 +359,5 @@ if __name__ == "__main__":
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
app.exec_()

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View 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]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View 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]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View 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]))

View File

@@ -11,3 +11,5 @@ 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]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View 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]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -10,4 +10,5 @@ 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"))
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@@ -0,0 +1,42 @@
{
"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参数介绍无",
"installvb": "安装指定的 VB 运行库到指定容器\n参数数量1\n参数介绍在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6"
}

View File

@@ -3,7 +3,7 @@
###########################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.1.0
# 更新时间2022年08月25日
# 更新时间2022年10月05日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 构建
###########################################################################################
@@ -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,18 @@ class Command():
"winver",
"changeversion",
"stopdll",
"cat"
"cat",
"taskmgr",
"control",
"killall",
"killallwineserver",
"enabledhttpproxy",
"disbledhttpproxy",
"enabledwinecrashdialog",
"disbledwinecrashdialog",
"disbledWinebottlecreatelink",
"enabledWinebottlecreatelink",
"installvb"
]
def __init__(self, commandString: str) -> None:
@@ -321,6 +334,68 @@ 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()
def InstallVB(self):
import InstallVisualBasicRuntime
return InstallVisualBasicRuntime.Download(self.wineBottonPath, int(self.command[1]), self.wine)
# 可以运行的命令的映射关系
# 可以被使用的命令的映射
commandList = {
@@ -352,11 +427,22 @@ 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,
"installvb": InstallVB
}
# 参数数列表
commandInfo = {
"killall": [1],
"installdll": [1],
"installfont": [1],
"installsparkcorefont": [0],
@@ -385,7 +471,17 @@ 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],
"installvb": [1]
}
windowsUnrun = [
"createbotton",
@@ -432,6 +528,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("参数不足")
@@ -450,6 +553,10 @@ class Command():
break
app = QtWidgets.QApplication(sys.argv)
if os.getenv("WINE") != None:
programEnv[1][1] = os.getenv("WINE")
if os.getenv("WINEPREFIX") != None:
programEnv[0][1] = os.getenv("WINEPREFIX")
if __name__ == "__main__":
optionAll = 0
if "--debug" in sys.argv:
@@ -457,10 +564,6 @@ if __name__ == "__main__":
if "--system" in sys.argv:
programEnv[2][1] = "1"
optionAll += 1
if os.getenv("WINE") != None:
programEnv[1][1] = os.getenv("WINE")
if os.getenv("WINEPREFIX") != None:
programEnv[0][1] = os.getenv("WINEPREFIX")
if len(sys.argv) - optionAll < 2:
print("Wine 运行器自动配置文件解析器交互环境")
print(f"版本:{version}")
@@ -472,7 +575,7 @@ if __name__ == "__main__":
break
com = Command(commandLine)
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
exit()
sys.exit(int(programEnv[9][1]))
# 读取文件
try:
file = open(sys.argv[1], "r")
@@ -485,4 +588,5 @@ if __name__ == "__main__":
print(f"版本:{version}")
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
print("--------------------------------------------------------------")
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
sys.exit(int(programEnv[9][1]))

Some files were not shown because too many files have changed in this diff Show More