lead qt translator into mainwindow.py (preliminary)

This commit is contained in:
gfdgd xi 2023-11-26 09:11:26 +08:00
parent d019d0d223
commit 516a854f84

View File

@ -27,6 +27,7 @@ import updatekiller
import subprocess import subprocess
import req as requests import req as requests
import urllib.parse as parse import urllib.parse as parse
import PyQt5.QtGui as QtGui import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore import PyQt5.QtCore as QtCore
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets
@ -422,7 +423,7 @@ def about_this_program()->"显示“关于这个程序”窗口":
aboutInfo.setHtml(about) aboutInfo.setHtml(about)
aboutInfo.setOpenExternalLinks(False) aboutInfo.setOpenExternalLinks(False)
messageLayout.addWidget(aboutInfo, 0, 1, 1, 1) messageLayout.addWidget(aboutInfo, 0, 1, 1, 1)
ok = QtWidgets.QPushButton(transla.transe("U", "确定")) ok = QtWidgets.QPushButton(transeObject.tr("确定"))
ok.clicked.connect(QT.message.close) ok.clicked.connect(QT.message.close)
messageLayout.addWidget(ok, 1, 1, 1, 1, QtCore.Qt.AlignBottom | QtCore.Qt.AlignRight) messageLayout.addWidget(ok, 1, 1, 1, 1, QtCore.Qt.AlignBottom | QtCore.Qt.AlignRight)
messageWidget.setLayout(messageLayout) messageWidget.setLayout(messageLayout)
@ -695,7 +696,7 @@ def OpenWineFontPath():
wineBottonPath = setting["DefultBotton"] wineBottonPath = setting["DefultBotton"]
else: else:
wineBottonPath = e1.currentText() wineBottonPath = e1.currentText()
QtWidgets.QMessageBox.information(widget, "提示", transla.transe("U", "如果安装字体?只需要把字体文件复制到此字体目录\n按下“OK”按钮可以打开字体目录")) QtWidgets.QMessageBox.information(widget, "提示", transeObject.tr("如果安装字体?只需要把字体文件复制到此字体目录\n按下“OK”按钮可以打开字体目录"))
os.system("xdg-open \"" + wineBottonPath.replace("\'", "\\\'") + "/drive_c/windows/Fonts\"") os.system("xdg-open \"" + wineBottonPath.replace("\'", "\\\'") + "/drive_c/windows/Fonts\"")
def GetLoseDll(): def GetLoseDll():
@ -1197,7 +1198,7 @@ class UpdateWindow():
updateText = QtWidgets.QTextBrowser() updateText = QtWidgets.QTextBrowser()
updateText.anchorClicked.connect(OpenUrl) updateText.anchorClicked.connect(OpenUrl)
updateText.setOpenExternalLinks(False) updateText.setOpenExternalLinks(False)
ok = QtWidgets.QPushButton(transla.transe("U", "更新(更新时会自动关闭 Wine 运行器)")) ok = QtWidgets.QPushButton(transeObject.tr("更新(更新时会自动关闭 Wine 运行器)"))
ok.clicked.connect(UpdateWindow.Update) ok.clicked.connect(UpdateWindow.Update)
cancel = QtWidgets.QPushButton("取消") cancel = QtWidgets.QPushButton("取消")
cancel.clicked.connect(UpdateWindow.update.close) cancel.clicked.connect(UpdateWindow.update.close)
@ -1239,7 +1240,7 @@ class UpdateWindow():
updateWidgetLayout.addWidget(cancel, 2, 1, 1, 1) updateWidgetLayout.addWidget(cancel, 2, 1, 1, 1)
updateWidget.setLayout(updateWidgetLayout) updateWidget.setLayout(updateWidgetLayout)
UpdateWindow.update.setCentralWidget(updateWidget) UpdateWindow.update.setCentralWidget(updateWidget)
UpdateWindow.update.setWindowTitle(transla.transe("U", "检查更新")) UpdateWindow.update.setWindowTitle(transeObject.tr("检查更新"))
UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5)) UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5))
UpdateWindow.update.show() UpdateWindow.update.show()
@ -1290,27 +1291,27 @@ class GetDllFromWindowsISO:
widgetLayout = QtWidgets.QGridLayout() widgetLayout = QtWidgets.QGridLayout()
if not e1.currentText() == "": if not e1.currentText() == "":
GetDllFromWindowsISO.wineBottonPath = e1.currentText() GetDllFromWindowsISO.wineBottonPath = e1.currentText()
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", f"""提示: widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr(f"""提示:
目前本提取功能暂只支持 NT 内核系统的官方安装镜像不支持读取 ghost 等第三方封装方式的安装镜像 目前本提取功能暂只支持 NT 内核系统的官方安装镜像不支持读取 ghost 等第三方封装方式的安装镜像
以及不要拷贝/替换太多的 dll否则可能会导致 wine 容器异常以及不要替换 Wine 的核心 dll 以及不要拷贝/替换太多的 dll否则可能会导致 wine 容器异常以及不要替换 Wine 的核心 dll
最后拷贝/替换 dll 建议点击下面设置 wine 容器按钮==函数库 进行设置 最后拷贝/替换 dll 建议点击下面设置 wine 容器按钮==函数库 进行设置
当前选择的 Wine 容器{GetDllFromWindowsISO.wineBottonPath}""")), 0, 0, 1, 5) 当前选择的 Wine 容器{GetDllFromWindowsISO.wineBottonPath}""")), 0, 0, 1, 5)
isoLabel = QtWidgets.QLabel(transla.transe("U", "ISO镜像")) isoLabel = QtWidgets.QLabel(transeObject.tr("ISO镜像"))
GetDllFromWindowsISO.isoPath = QtWidgets.QComboBox() GetDllFromWindowsISO.isoPath = QtWidgets.QComboBox()
GetDllFromWindowsISO.browser = QtWidgets.QPushButton(transla.transe("U", "浏览")) GetDllFromWindowsISO.browser = QtWidgets.QPushButton(transeObject.tr("浏览"))
isoControl = QtWidgets.QWidget() isoControl = QtWidgets.QWidget()
isoControlLayout = QtWidgets.QHBoxLayout() isoControlLayout = QtWidgets.QHBoxLayout()
isoControl.setLayout(isoControlLayout) isoControl.setLayout(isoControlLayout)
dllControl = QtWidgets.QWidget() dllControl = QtWidgets.QWidget()
dllControlLayout = QtWidgets.QHBoxLayout() dllControlLayout = QtWidgets.QHBoxLayout()
dllControl.setLayout(dllControlLayout) dllControl.setLayout(dllControlLayout)
GetDllFromWindowsISO.mountButton = QtWidgets.QPushButton(transla.transe("U", "读取/挂载ISO镜像")) GetDllFromWindowsISO.mountButton = QtWidgets.QPushButton(transeObject.tr("读取/挂载ISO镜像"))
umountButton = QtWidgets.QPushButton(transla.transe("U", "关闭/卸载ISO镜像")) umountButton = QtWidgets.QPushButton(transeObject.tr("关闭/卸载ISO镜像"))
GetDllFromWindowsISO.dllFound = QtWidgets.QComboBox() GetDllFromWindowsISO.dllFound = QtWidgets.QComboBox()
GetDllFromWindowsISO.foundButton = QtWidgets.QPushButton(transla.transe("U", "查找")) GetDllFromWindowsISO.foundButton = QtWidgets.QPushButton(transeObject.tr("查找"))
GetDllFromWindowsISO.dllList = QtWidgets.QListView() GetDllFromWindowsISO.dllList = QtWidgets.QListView()
GetDllFromWindowsISO.saveDll = QtWidgets.QPushButton(transla.transe("U", "保存到 wine 容器中")) GetDllFromWindowsISO.saveDll = QtWidgets.QPushButton(transeObject.tr("保存到 wine 容器中"))
GetDllFromWindowsISO.setWineBotton = QtWidgets.QPushButton(transla.transe("U", "设置 wine 容器")) GetDllFromWindowsISO.setWineBotton = QtWidgets.QPushButton(transeObject.tr("设置 wine 容器"))
isoLabel.setSizePolicy(size) isoLabel.setSizePolicy(size)
GetDllFromWindowsISO.isoPath.setEditable(True) GetDllFromWindowsISO.isoPath.setEditable(True)
GetDllFromWindowsISO.isoPath.addItems(isoPath) GetDllFromWindowsISO.isoPath.addItems(isoPath)
@ -1332,7 +1333,7 @@ class GetDllFromWindowsISO:
widgetLayout.addWidget(GetDllFromWindowsISO.isoPath, 1, 1, 1, 1) widgetLayout.addWidget(GetDllFromWindowsISO.isoPath, 1, 1, 1, 1)
widgetLayout.addWidget(GetDllFromWindowsISO.browser, 1, 2, 1, 1) widgetLayout.addWidget(GetDllFromWindowsISO.browser, 1, 2, 1, 1)
widgetLayout.addWidget(isoControl, 2, 1, 1, 1) widgetLayout.addWidget(isoControl, 2, 1, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "查找DLL\n(为空则代表不查找,\n将显示全部内容):")), 3, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("查找DLL\n(为空则代表不查找,\n将显示全部内容):")), 3, 0, 1, 1)
widgetLayout.addWidget(GetDllFromWindowsISO.dllFound, 3, 1, 1, 1) widgetLayout.addWidget(GetDllFromWindowsISO.dllFound, 3, 1, 1, 1)
widgetLayout.addWidget(GetDllFromWindowsISO.foundButton, 3, 2, 1, 1) widgetLayout.addWidget(GetDllFromWindowsISO.foundButton, 3, 2, 1, 1)
widgetLayout.addWidget(GetDllFromWindowsISO.dllList, 4, 1, 1, 1) widgetLayout.addWidget(GetDllFromWindowsISO.dllList, 4, 1, 1, 1)
@ -1517,12 +1518,12 @@ class GetDllFromWindowsISO:
os.system("rm -rf /tmp/wine-runner-getdll-wim") os.system("rm -rf /tmp/wine-runner-getdll-wim")
except: except:
traceback.print_exc() traceback.print_exc()
QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, transla.transe("U", "错误"), f"关闭/卸载镜像失败,报错如下:\n{traceback.format_exc()}") QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, transeObject.tr("错误"), f"关闭/卸载镜像失败,报错如下:\n{traceback.format_exc()}")
return return
GetDllFromWindowsISO.DisbledDown(True) GetDllFromWindowsISO.DisbledDown(True)
GetDllFromWindowsISO.DisbledUp(False) GetDllFromWindowsISO.DisbledUp(False)
GetDllFromWindowsISO.mount = False GetDllFromWindowsISO.mount = False
QtWidgets.QMessageBox.information(GetDllFromWindowsISO.message, transla.transe("U", "提示"), transla.transe("U", "关闭/卸载成功!")) QtWidgets.QMessageBox.information(GetDllFromWindowsISO.message, transeObject.tr("提示"), transeObject.tr("关闭/卸载成功!"))
def CopyDll(): def CopyDll():
choose = GetDllFromWindowsISO.dllList.selectionModel().selectedIndexes()[0].data() choose = GetDllFromWindowsISO.dllList.selectionModel().selectedIndexes()[0].data()
@ -1614,9 +1615,9 @@ class ProgramRunStatusShow():
msgWidget = QtWidgets.QWidget() msgWidget = QtWidgets.QWidget()
msgWidgetLayout = QtWidgets.QGridLayout() msgWidgetLayout = QtWidgets.QGridLayout()
starLayout = QtWidgets.QHBoxLayout() starLayout = QtWidgets.QHBoxLayout()
uploadButton = QtWidgets.QPushButton(transla.transe("U", "点此上传运行情况")) uploadButton = QtWidgets.QPushButton(transeObject.tr("点此上传运行情况"))
uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(sha, title)) uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(sha, title))
msgWidgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "综合评价:")), 0, 0) msgWidgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("综合评价:")), 0, 0)
msgWidgetLayout.addLayout(starLayout, 0, 1) msgWidgetLayout.addLayout(starLayout, 0, 1)
msgWidgetLayout.addWidget(QtWidgets.QLabel(informationList[maxHead]), 1, 0, 1, 2) msgWidgetLayout.addWidget(QtWidgets.QLabel(informationList[maxHead]), 1, 0, 1, 2)
msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2) msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2)
@ -1665,7 +1666,7 @@ class ProgramRunStatusUpload():
ProgramRunStatusUpload.programName = QtWidgets.QLineEdit() ProgramRunStatusUpload.programName = QtWidgets.QLineEdit()
ProgramRunStatusUpload.fen = QtWidgets.QComboBox() ProgramRunStatusUpload.fen = QtWidgets.QComboBox()
ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout() ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout()
upload = QtWidgets.QPushButton(transla.transe("U", "上传")) upload = QtWidgets.QPushButton(transeObject.tr("上传"))
upload.clicked.connect(ProgramRunStatusUpload.Upload) upload.clicked.connect(ProgramRunStatusUpload.Upload)
if title != "": if title != "":
ProgramRunStatusUpload.programName.setText(title) ProgramRunStatusUpload.programName.setText(title)
@ -1675,7 +1676,7 @@ class ProgramRunStatusUpload():
ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>")) ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>"))
ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1]) ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1])
ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
ProgramRunStatusUpload.programName.setPlaceholderText(transla.transe("U", "如果这个程序和程序名确实是合法还是检测到敏感词改为“NULL”即可")) ProgramRunStatusUpload.programName.setPlaceholderText(transeObject.tr("如果这个程序和程序名确实是合法还是检测到敏感词改为“NULL”即可"))
ProgramRunStatusUpload.fen.addItems(["0分无法运行并且也没有报错自己无法解决", ProgramRunStatusUpload.fen.addItems(["0分无法运行并且也没有报错自己无法解决",
"1分无法运行但有报错自己无法解决", "1分无法运行但有报错自己无法解决",
"2分可以运行但是效果很差几乎无法使用", "2分可以运行但是效果很差几乎无法使用",
@ -1686,15 +1687,15 @@ class ProgramRunStatusUpload():
"含有病毒、木马等对计算机有害的软件"]) "含有病毒、木马等对计算机有害的软件"])
ProgramRunStatusUpload.fen.setCurrentIndex(4) ProgramRunStatusUpload.fen.setCurrentIndex(4)
ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar) ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar)
msgWidgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "程序名:")), 0, 0) msgWidgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("程序名:")), 0, 0)
msgWidgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "评分:")), 1, 0) msgWidgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("评分:")), 1, 0)
msgWidgetLayout.addWidget(ProgramRunStatusUpload.programName, 0, 1) msgWidgetLayout.addWidget(ProgramRunStatusUpload.programName, 0, 1)
msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1) msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1)
msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1) msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1)
msgWidgetLayout.addWidget(upload, 3, 1) msgWidgetLayout.addWidget(upload, 3, 1)
msgWidget.setLayout(msgWidgetLayout) msgWidget.setLayout(msgWidgetLayout)
ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget) ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget)
ProgramRunStatusUpload.msgWindow.setWindowTitle(transla.transe("U", "上传程序运行情况")) ProgramRunStatusUpload.msgWindow.setWindowTitle(transeObject.tr("上传程序运行情况"))
ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
ProgramRunStatusUpload.msgWindow.show() ProgramRunStatusUpload.msgWindow.show()
@ -1708,7 +1709,7 @@ class ProgramRunStatusUpload():
try: try:
if ProgramRunStatusUpload.sha1Value == "": if ProgramRunStatusUpload.sha1Value == "":
ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText()) ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText())
QtWidgets.QMessageBox.information(None, transla.transe("U", "提示"), json.loads(requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUw").decode("utf-8"), { QtWidgets.QMessageBox.information(None, transeObject.tr("提示"), json.loads(requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUw").decode("utf-8"), {
"SHA1": ProgramRunStatusUpload.sha1Value, "SHA1": ProgramRunStatusUpload.sha1Value,
"Name": ProgramRunStatusUpload.programName.text(), "Name": ProgramRunStatusUpload.programName.text(),
"Fen": ProgramRunStatusUpload.fen.currentIndex(), "Fen": ProgramRunStatusUpload.fen.currentIndex(),
@ -1716,7 +1717,7 @@ class ProgramRunStatusUpload():
}).text)["Error"]) }).text)["Error"])
except: except:
traceback.print_exc() traceback.print_exc()
QtWidgets.QMessageBox.critical(None, transla.transe("U", "错误"), transla.transe("U", "数据上传失败!")) QtWidgets.QMessageBox.critical(None, transeObject.tr("错误"), transeObject.tr("数据上传失败!"))
def GetSHA1(filePath): def GetSHA1(filePath):
sha1 = hashlib.sha1() sha1 = hashlib.sha1()
@ -1752,43 +1753,43 @@ class ProgramSetting():
ProgramSetting.message = QtWidgets.QMainWindow() ProgramSetting.message = QtWidgets.QMainWindow()
widget = QtWidgets.QWidget() widget = QtWidgets.QWidget()
widgetLayout = QtWidgets.QGridLayout() widgetLayout = QtWidgets.QGridLayout()
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "选择 Wine 容器版本:")), 0, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("选择 Wine 容器版本:")), 0, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "wine DEBUG 信息输出:")), 1, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("wine DEBUG 信息输出:")), 1, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "默认 Wine")), 2, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("默认 Wine")), 2, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "默认 Wine 容器:")), 3, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("默认 Wine 容器:")), 3, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "使用终端打开:")), 4, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("使用终端打开:")), 4, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "自定义 wine 参数:")), 5, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("自定义 wine 参数:")), 5, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "程序主题:")), 6, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("程序主题:")), 6, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "Wine 默认 Mono 和 Gecko 安装器:")), 7, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("Wine 默认 Mono 和 Gecko 安装器:")), 7, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "忽略未安装的 Wine")), 8, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("忽略未安装的 Wine")), 8, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "下载缓存:")), 9, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("下载缓存:")), 9, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "图标生成:")), 10, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("图标生成:")), 10, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "自动根据EXE名称生成路径")), 11, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("自动根据EXE名称生成路径")), 11, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "Qemu + Chroot 挂载用户目录:")), 12, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("Qemu + Chroot 挂载用户目录:")), 12, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "程序翻译:")), 13, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("程序翻译:")), 13, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "字体缩小比例(数值越大字体越小,默认为 1")), 14, 0, 1, 1) widgetLayout.addWidget(QtWidgets.QLabel(transeObject.tr("字体缩小比例(数值越大字体越小,默认为 1")), 14, 0, 1, 1)
ProgramSetting.wineBottonA = QtWidgets.QComboBox() ProgramSetting.wineBottonA = QtWidgets.QComboBox()
ProgramSetting.wineDebug = QtWidgets.QCheckBox(transla.transe("U", "开启 DEBUG 输出")) ProgramSetting.wineDebug = QtWidgets.QCheckBox(transeObject.tr("开启 DEBUG 输出"))
ProgramSetting.defultWine = QtWidgets.QComboBox() ProgramSetting.defultWine = QtWidgets.QComboBox()
ProgramSetting.defultBotton = QtWidgets.QLineEdit() ProgramSetting.defultBotton = QtWidgets.QLineEdit()
ProgramSetting.theme = QtWidgets.QComboBox() ProgramSetting.theme = QtWidgets.QComboBox()
ProgramSetting.theme.addItems(QtWidgets.QStyleFactory.keys()) ProgramSetting.theme.addItems(QtWidgets.QStyleFactory.keys())
ProgramSetting.theme.setCurrentText(setting["Theme"]) ProgramSetting.theme.setCurrentText(setting["Theme"])
save = QtWidgets.QPushButton(transla.transe("U", "保存")) save = QtWidgets.QPushButton(transeObject.tr("保存"))
save.clicked.connect(ProgramSetting.Save) save.clicked.connect(ProgramSetting.Save)
defultBottonButton = QtWidgets.QPushButton(transla.transe("U", "浏览")) defultBottonButton = QtWidgets.QPushButton(transeObject.tr("浏览"))
defultBottonButton.clicked.connect(ProgramSetting.Browser) defultBottonButton.clicked.connect(ProgramSetting.Browser)
themeTry = QtWidgets.QPushButton(transla.transe("U", "测试(重启后变回设置的主题)")) themeTry = QtWidgets.QPushButton(transeObject.tr("测试(重启后变回设置的主题)"))
themeTry.clicked.connect(ProgramSetting.Try) themeTry.clicked.connect(ProgramSetting.Try)
ProgramSetting.terminalOpen = QtWidgets.QCheckBox(transla.transe("U", "使用终端打开deepin 终端)")) ProgramSetting.terminalOpen = QtWidgets.QCheckBox(transeObject.tr("使用终端打开deepin 终端)"))
ProgramSetting.wineOption = QtWidgets.QLineEdit() ProgramSetting.wineOption = QtWidgets.QLineEdit()
ProgramSetting.monogeckoInstaller = QtWidgets.QCheckBox(transla.transe("U", "屏蔽 Wine 默认 Mono 和 Gecko 安装器")) ProgramSetting.monogeckoInstaller = QtWidgets.QCheckBox(transeObject.tr("屏蔽 Wine 默认 Mono 和 Gecko 安装器"))
ProgramSetting.autoWine = QtWidgets.QCheckBox(transla.transe("U", "不显示未检测到的 Wine")) ProgramSetting.autoWine = QtWidgets.QCheckBox(transeObject.tr("不显示未检测到的 Wine"))
ProgramSetting.runtimeCache = QtWidgets.QCheckBox(transla.transe("U", "开启下载缓存")) ProgramSetting.runtimeCache = QtWidgets.QCheckBox(transeObject.tr("开启下载缓存"))
ProgramSetting.buildByBottleName = QtWidgets.QCheckBox(transla.transe("U", "本软件构建的图标后面添加容器名")) ProgramSetting.buildByBottleName = QtWidgets.QCheckBox(transeObject.tr("本软件构建的图标后面添加容器名"))
ProgramSetting.autoPath = QtWidgets.QCheckBox(transla.transe("U", "自动根据文件名生成容器路径开启后必须通过修改默认wine容器路径才可指定其它路径重启程序后生效")) ProgramSetting.autoPath = QtWidgets.QCheckBox(transeObject.tr("自动根据文件名生成容器路径开启后必须通过修改默认wine容器路径才可指定其它路径重启程序后生效"))
ProgramSetting.qemuUnmountHome = QtWidgets.QCheckBox(transla.transe("U", "使用 Qemu + Chroot 时不挂载用户目录并与系统隔离(修改后重启操作系统生效)")) ProgramSetting.qemuUnmountHome = QtWidgets.QCheckBox(transeObject.tr("使用 Qemu + Chroot 时不挂载用户目录并与系统隔离(修改后重启操作系统生效)"))
ProgramSetting.chineseLanguage = QtWidgets.QCheckBox(transla.transe("U", "禁用程序界面翻译")) ProgramSetting.chineseLanguage = QtWidgets.QCheckBox(transeObject.tr("禁用程序界面翻译"))
ProgramSetting.fontSize = QtWidgets.QDoubleSpinBox() ProgramSetting.fontSize = QtWidgets.QDoubleSpinBox()
ProgramSetting.wineBottonA.addItems(["Auto", "win32", "win64"]) ProgramSetting.wineBottonA.addItems(["Auto", "win32", "win64"])
ProgramSetting.wineBottonA.setCurrentText(setting["Architecture"]) ProgramSetting.wineBottonA.setCurrentText(setting["Architecture"])
@ -1832,7 +1833,7 @@ class ProgramSetting():
ProgramSetting.message.show() ProgramSetting.message.show()
def Browser(): def Browser():
path = QtWidgets.QFileDialog.getExistingDirectory(ProgramSetting.message, transla.transe("U", "选择 Wine 容器"), json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBotton.json"))["path"]) path = QtWidgets.QFileDialog.getExistingDirectory(ProgramSetting.message, transeObject.tr("选择 Wine 容器"), json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBotton.json"))["path"])
if path == "" or path == None or path == "()" or path == (): if path == "" or path == None or path == "()" or path == ():
return return
ProgramSetting.defultBotton.setText(path) ProgramSetting.defultBotton.setText(path)
@ -2519,19 +2520,24 @@ print(wine)
########################### ###########################
# 程序信息 # 程序信息
########################### ###########################
app = QtWidgets.QApplication(sys.argv)
transe = QtCore.QTranslator()
transeObject = QtCore.QObject()
#transeObject.tr("")
# 语言载入 # 语言载入
if not "zh_CN".lower() in get_now_lang().lower() and not setting["Chinese"]: if not "zh_CN".lower() in get_now_lang().lower() and not setting["Chinese"]:
transla = Trans("en_US", f"{programPath}/trans/deepin-wine-runner.json") transe.load()
else: else:
transla = Trans("zh_CN") pass
app.installTranslator(transe)
iconPath = "{}/deepin-wine-runner.svg".format(programPath) iconPath = "{}/deepin-wine-runner.svg".format(programPath)
#iconPath = "{}/Icon/Program/wine运行器.png".format(programPath) #iconPath = "{}/Icon/Program/wine运行器.png".format(programPath)
programUrl = "https://gitee.com/gfdgd-xi/deep-wine-runner\nhttps://github.com/gfdgd-xi/deep-wine-runner\nhttps://gfdgd-xi.github.io" programUrl = "https://gitee.com/gfdgd-xi/deep-wine-runner\nhttps://github.com/gfdgd-xi/deep-wine-runner\nhttps://gfdgd-xi.github.io"
information = json.loads(readtxt(f"{programPath}/information.json")) information = json.loads(readtxt(f"{programPath}/information.json"))
version = information["Version"] version = information["Version"]
goodRunSystem = transla.transe("U", "常见 Linux 发行版") goodRunSystem = transeObject.tr("常见 Linux 发行版")
thankText = "" thankText = ""
tips = transla.transe("U", '''<h4>提示:</h4> tips = transeObject.tr('''<h4>提示:</h4>
1使用终端运行该程序可以看到 wine 以及程序本身的提示和报错 1使用终端运行该程序可以看到 wine 以及程序本身的提示和报错
2wine 32 位和 64 位的容器互不兼容 2wine 32 位和 64 位的容器互不兼容
3所有的 wine winetricks 均需要自行安装可以从 菜单栏=>程序 里面进行安装 3所有的 wine winetricks 均需要自行安装可以从 菜单栏=>程序 里面进行安装
@ -2541,7 +2547,7 @@ exe路径\' 参数 \'
5wine 容器如果没有指定则会默认为 ~/.wine 5wine 容器如果没有指定则会默认为 ~/.wine
6如果可执行文件比较大的话会出现点击获取该程序运行情况出现假死的情况因为正在后台读取 SHA1只需要等一下即可读取速度依照您电脑处理速度读写速度可执行文件大小等有关 6如果可执行文件比较大的话会出现点击获取该程序运行情况出现假死的情况因为正在后台读取 SHA1只需要等一下即可读取速度依照您电脑处理速度读写速度可执行文件大小等有关
7如果非 X86 的用户的 UOS 专业版用户想要使用的话只需要在应用商店安装一个 Wine 版本微信即可在本程序选择正确的 Wine 运行程序''') 7如果非 X86 的用户的 UOS 专业版用户想要使用的话只需要在应用商店安装一个 Wine 版本微信即可在本程序选择正确的 Wine 运行程序''')
updateThingsString = transla.transe("U", '''<b>3.5.0 更新内容:</b> updateThingsString = transeObject.tr('''<b>3.5.0 更新内容:</b>
1虚拟机工具支持 kvm 检测 1虚拟机工具支持 kvm 检测
2修改虚拟机工具提示文本新增对 UOS 3a4000 用户无法正常使用 Qemu 的解决方案 2修改虚拟机工具提示文本新增对 UOS 3a4000 用户无法正常使用 Qemu 的解决方案
3在主界面点击安装按钮后自动切换至帮助页面 3在主界面点击安装按钮后自动切换至帮助页面
@ -2558,7 +2564,7 @@ updateThingsString = transla.transe("U", '''<b>3.5.0 更新内容:</b>
for i in information["Thank"]: for i in information["Thank"]:
thankText += f"{i}\n" thankText += f"{i}\n"
updateTime = "2023年11月17日" updateTime = "2023年11月17日"
aboutProgram = transla.transe("U", """<p>Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作且安装过程较为繁琐对小白不友好。于是该运行器为了解决该痛点内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。</p> aboutProgram = transeObject.tr("""<p>Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作且安装过程较为繁琐对小白不友好。于是该运行器为了解决该痛点内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。</p>
<p>它同时还内置了基于Qemu/VirtualBox制作的专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机的安装创建分区等操作也能在非 X86 架构安装 X86 架构的 Windows 操作系统但是效率较低可以运行些老系统</p> <p>它同时还内置了基于Qemu/VirtualBox制作的专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机的安装创建分区等操作也能在非 X86 架构安装 X86 架构的 Windows 操作系统但是效率较低可以运行些老系统</p>
<p>而且对于部分 Wine 应用适配者来说提供了图形化的打包工具以及提供了一些常用工具以及运行库的安装方式以及能安装多种不同的 Wine 以测试效果能极大提升适配效率</p> <p>而且对于部分 Wine 应用适配者来说提供了图形化的打包工具以及提供了一些常用工具以及运行库的安装方式以及能安装多种不同的 Wine 以测试效果能极大提升适配效率</p>
<p>且对于 Deepin23 用户做了特别优化以便能在缺少 i386 运行库的情况下运行 Wine32同时也为非 X86 架构用户提供了 Box86/64Qemu User 的安装方式</p> <p>且对于 Deepin23 用户做了特别优化以便能在缺少 i386 运行库的情况下运行 Wine32同时也为非 X86 架构用户提供了 Box86/64Qemu User 的安装方式</p>
@ -2630,7 +2636,6 @@ except:
########################### ###########################
# 读取主题 # 读取主题
# Qt 窗口 # Qt 窗口
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QMainWindow() window = QtWidgets.QMainWindow()
defaultFont = app.font() defaultFont = app.font()
window.setWindowTitle(title) window.setWindowTitle(title)
@ -2648,27 +2653,27 @@ leftUp = QtWidgets.QWidget()
mainLayout.addWidget(leftUp, 0, 0, 1, 1) mainLayout.addWidget(leftUp, 0, 0, 1, 1)
leftUpLayout = QtWidgets.QGridLayout() leftUpLayout = QtWidgets.QGridLayout()
leftUp.setLayout(leftUpLayout) leftUp.setLayout(leftUpLayout)
fastLabel = QtWidgets.QLabel(transla.transe("U", "快速启动")) fastLabel = QtWidgets.QLabel(transeObject.tr("快速启动"))
fastLabel.setStyleSheet("font: 30px;") fastLabel.setStyleSheet("font: 30px;")
leftUpLayout.addWidget(fastLabel, 0, 0, 1, 2) leftUpLayout.addWidget(fastLabel, 0, 0, 1, 2)
leftUpLayout.addWidget(QtWidgets.QLabel("<hr>"), 1, 0, 1, 2) leftUpLayout.addWidget(QtWidgets.QLabel("<hr>"), 1, 0, 1, 2)
leftUpLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "请选择容器路径:")), 2, 0, 1, 1) leftUpLayout.addWidget(QtWidgets.QLabel(transeObject.tr("请选择容器路径:")), 2, 0, 1, 1)
e1 = QtWidgets.QComboBox() e1 = QtWidgets.QComboBox()
e1.setEditable(True) e1.setEditable(True)
leftUpLayout.addWidget(e1, 3, 0, 1, 1) leftUpLayout.addWidget(e1, 3, 0, 1, 1)
button1 = QtWidgets.QPushButton("浏览") button1 = QtWidgets.QPushButton("浏览")
button1.clicked.connect(liulanbutton) button1.clicked.connect(liulanbutton)
leftUpLayout.addWidget(button1, 3, 1, 1, 1) leftUpLayout.addWidget(button1, 3, 1, 1, 1)
leftUpLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "请选择要执行的程序EXE、MSI或者命令")), 4, 0, 1, 1) leftUpLayout.addWidget(QtWidgets.QLabel(transeObject.tr("请选择要执行的程序EXE、MSI或者命令")), 4, 0, 1, 1)
e2 = QtWidgets.QComboBox() e2 = QtWidgets.QComboBox()
if setting["AutoPath"]: if setting["AutoPath"]:
e2.editTextChanged.connect(ChangePath) e2.editTextChanged.connect(ChangePath)
e2.setEditable(True) e2.setEditable(True)
leftUpLayout.addWidget(e2, 5, 0, 1, 1) leftUpLayout.addWidget(e2, 5, 0, 1, 1)
button2 = QtWidgets.QPushButton(transla.transe("U", "浏览")) button2 = QtWidgets.QPushButton(transeObject.tr("浏览"))
button2.clicked.connect(liulanexebutton) button2.clicked.connect(liulanexebutton)
leftUpLayout.addWidget(button2, 5, 1, 1, 1) leftUpLayout.addWidget(button2, 5, 1, 1, 1)
leftUpLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "请选择WINE版本")), 6, 0, 1, 1) leftUpLayout.addWidget(QtWidgets.QLabel(transeObject.tr("请选择WINE版本")), 6, 0, 1, 1)
o1 = QtWidgets.QComboBox() o1 = QtWidgets.QComboBox()
leftUpLayout.addWidget(o1, 7, 0, 1, 1) leftUpLayout.addWidget(o1, 7, 0, 1, 1)
# 设置空间权重 # 设置空间权重
@ -2680,68 +2685,68 @@ leftDown = QtWidgets.QWidget()
mainLayout.addWidget(leftDown, 1, 0, 1, 1) mainLayout.addWidget(leftDown, 1, 0, 1, 1)
leftDownLayout = QtWidgets.QVBoxLayout() leftDownLayout = QtWidgets.QVBoxLayout()
leftDown.setLayout(leftDownLayout) leftDown.setLayout(leftDownLayout)
highLabel = QtWidgets.QLabel(transla.transe("U", "高级功能")) highLabel = QtWidgets.QLabel(transeObject.tr("高级功能"))
highLabel.setStyleSheet("font: 30px;") highLabel.setStyleSheet("font: 30px;")
leftDownLayout.addWidget(highLabel) leftDownLayout.addWidget(highLabel)
leftDownLayout.addWidget(QtWidgets.QLabel("<hr>")) leftDownLayout.addWidget(QtWidgets.QLabel("<hr>"))
leftDownLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "创建快捷方式Desktop文件"))) leftDownLayout.addWidget(QtWidgets.QLabel(transeObject.tr("创建快捷方式Desktop文件")))
createDesktopLink = QtWidgets.QHBoxLayout() createDesktopLink = QtWidgets.QHBoxLayout()
label_r_2 = QtWidgets.QLabel(transla.transe("U", "名称:")) label_r_2 = QtWidgets.QLabel(transeObject.tr("名称:"))
createDesktopLink.addWidget(label_r_2) createDesktopLink.addWidget(label_r_2)
combobox1 = QtWidgets.QComboBox() combobox1 = QtWidgets.QComboBox()
combobox1.setEditable(True) combobox1.setEditable(True)
createDesktopLink.addWidget(combobox1) createDesktopLink.addWidget(combobox1)
button5 = QtWidgets.QPushButton(transla.transe("U", "创建到桌面")) button5 = QtWidgets.QPushButton(transeObject.tr("创建到桌面"))
button5.clicked.connect(make_desktop_on_desktop) button5.clicked.connect(make_desktop_on_desktop)
createDesktopLink.addWidget(button5) createDesktopLink.addWidget(button5)
saveDesktopFileOnLauncher = QtWidgets.QPushButton(transla.transe("U", "创建到开始菜单")) saveDesktopFileOnLauncher = QtWidgets.QPushButton(transeObject.tr("创建到开始菜单"))
saveDesktopFileOnLauncher.clicked.connect(make_desktop_on_launcher) saveDesktopFileOnLauncher.clicked.connect(make_desktop_on_launcher)
createDesktopLink.addWidget(saveDesktopFileOnLauncher) createDesktopLink.addWidget(saveDesktopFileOnLauncher)
leftDownLayout.addLayout(createDesktopLink) leftDownLayout.addLayout(createDesktopLink)
programManager = QtWidgets.QGridLayout() programManager = QtWidgets.QGridLayout()
leftDownLayout.addLayout(programManager) leftDownLayout.addLayout(programManager)
programManager.addWidget(QtWidgets.QLabel(transla.transe("U", "程序管理:")), 0, 0, 1, 1) programManager.addWidget(QtWidgets.QLabel(transeObject.tr("程序管理:")), 0, 0, 1, 1)
getProgramIcon = QtWidgets.QPushButton(transla.transe("U", "提取图标")) getProgramIcon = QtWidgets.QPushButton(transeObject.tr("提取图标"))
getProgramIcon.clicked.connect(lambda: RunWineProgram(f"{programPath}/BeCyIconGrabber.exe' '{e2.currentText()}" if e2.currentText()[:2].upper() == "C:" else f"{programPath}/BeCyIconGrabber.exe' 'z:/{e2.currentText()}")) getProgramIcon.clicked.connect(lambda: RunWineProgram(f"{programPath}/BeCyIconGrabber.exe' '{e2.currentText()}" if e2.currentText()[:2].upper() == "C:" else f"{programPath}/BeCyIconGrabber.exe' 'z:/{e2.currentText()}"))
programManager.addWidget(getProgramIcon, 1, 0, 1, 1) programManager.addWidget(getProgramIcon, 1, 0, 1, 1)
programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 1, 1, 1) programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 1, 1, 1)
trasButton = QtWidgets.QPushButton(transla.transe("U", "窗口透明工具")) trasButton = QtWidgets.QPushButton(transeObject.tr("窗口透明工具"))
trasButton.clicked.connect(lambda: RunWineProgram(f"{programPath}/窗体透明度设置工具.exe")) trasButton.clicked.connect(lambda: RunWineProgram(f"{programPath}/窗体透明度设置工具.exe"))
programManager.addWidget(trasButton, 1, 2, 1, 1) programManager.addWidget(trasButton, 1, 2, 1, 1)
uninstallProgram = QtWidgets.QPushButton(transla.transe("U", "卸载程序")) uninstallProgram = QtWidgets.QPushButton(transeObject.tr("卸载程序"))
uninstallProgram.clicked.connect(lambda: RunWineProgram(f"{programPath}/geek.exe")) uninstallProgram.clicked.connect(lambda: RunWineProgram(f"{programPath}/geek.exe"))
programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 3, 1, 1) programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 3, 1, 1)
programManager.addWidget(uninstallProgram, 1, 4, 1, 1) programManager.addWidget(uninstallProgram, 1, 4, 1, 1)
miniAppStore = QtWidgets.QPushButton(transla.transe("U", "微型应用商店")) miniAppStore = QtWidgets.QPushButton(transeObject.tr("微型应用商店"))
miniAppStore.clicked.connect(lambda: threading.Thread(target=MiniAppStore).start()) miniAppStore.clicked.connect(lambda: threading.Thread(target=MiniAppStore).start())
programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 5, 1, 1) programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 5, 1, 1)
programManager.addWidget(miniAppStore, 1, 6, 1, 1) programManager.addWidget(miniAppStore, 1, 6, 1, 1)
programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 7, 1, 1) programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 7, 1, 1)
getProgramStatus = QtWidgets.QPushButton(transla.transe("U", "获取该程序运行情况")) getProgramStatus = QtWidgets.QPushButton(transeObject.tr("获取该程序运行情况"))
getProgramStatus.clicked.connect(ProgramRunStatusShow.ShowWindow) getProgramStatus.clicked.connect(ProgramRunStatusShow.ShowWindow)
programManager.addWidget(getProgramStatus, 1, 8, 1, 1) programManager.addWidget(getProgramStatus, 1, 8, 1, 1)
getLoseDll = QtWidgets.QPushButton(transla.transe("U", "检测静态下程序缺少DLL")) getLoseDll = QtWidgets.QPushButton(transeObject.tr("检测静态下程序缺少DLL"))
getLoseDll.clicked.connect(GetLoseDll) getLoseDll.clicked.connect(GetLoseDll)
programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 9, 1, 1) programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 9, 1, 1)
programManager.addWidget(getLoseDll, 1, 10, 1, 1) programManager.addWidget(getLoseDll, 1, 10, 1, 1)
programManager.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum), 1, 11, 1, 1) programManager.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum), 1, 11, 1, 1)
programManager.addWidget(QtWidgets.QLabel(transla.transe("U", "WINE配置")), 2, 0, 1, 1) programManager.addWidget(QtWidgets.QLabel(transeObject.tr("WINE配置")), 2, 0, 1, 1)
wineConfig = QtWidgets.QPushButton(transla.transe("U", "配置容器")) wineConfig = QtWidgets.QPushButton(transeObject.tr("配置容器"))
wineConfig.clicked.connect(lambda: RunWineProgram("winecfg")) wineConfig.clicked.connect(lambda: RunWineProgram("winecfg"))
programManager.addWidget(wineConfig, 3, 0, 1, 1) programManager.addWidget(wineConfig, 3, 0, 1, 1)
fontAppStore = QtWidgets.QPushButton(transla.transe("U", "字体商店")) fontAppStore = QtWidgets.QPushButton(transeObject.tr("字体商店"))
fontAppStore.clicked.connect(FontAppStore) fontAppStore.clicked.connect(FontAppStore)
programManager.addWidget(fontAppStore, 3, 2, 1, 1) programManager.addWidget(fontAppStore, 3, 2, 1, 1)
button_r_6 = QtWidgets.QPushButton(transla.transe("U", "RegShot")) button_r_6 = QtWidgets.QPushButton(transeObject.tr("RegShot"))
button_r_6.clicked.connect(lambda: RunWineProgram(f"{programPath}/RegShot/regshot.exe")) button_r_6.clicked.connect(lambda: RunWineProgram(f"{programPath}/RegShot/regshot.exe"))
programManager.addWidget(button_r_6, 3, 4, 1, 1) programManager.addWidget(button_r_6, 3, 4, 1, 1)
sparkWineSetting = QtWidgets.QPushButton(transla.transe("U", "星火wine配置")) sparkWineSetting = QtWidgets.QPushButton(transeObject.tr("星火wine配置"))
sparkWineSetting.clicked.connect(lambda: threading.Thread(target=os.system, args=["bash /opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"]).start()) sparkWineSetting.clicked.connect(lambda: threading.Thread(target=os.system, args=["bash /opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"]).start())
programManager.addWidget(sparkWineSetting, 3, 6, 1, 1) programManager.addWidget(sparkWineSetting, 3, 6, 1, 1)
wineAutoConfig = QtWidgets.QPushButton(transla.transe("U", "自动/手动配置 Wine 容器")) wineAutoConfig = QtWidgets.QPushButton(transeObject.tr("自动/手动配置 Wine 容器"))
wineAutoConfig.clicked.connect(WineBottonAutoConfig) wineAutoConfig.clicked.connect(WineBottonAutoConfig)
programManager.addWidget(wineAutoConfig, 3, 8, 1, 1) programManager.addWidget(wineAutoConfig, 3, 8, 1, 1)
wineBottleReboot = QtWidgets.QPushButton(transla.transe("U", "重启指定Wine容器")) wineBottleReboot = QtWidgets.QPushButton(transeObject.tr("重启指定Wine容器"))
wineBottleReboot.clicked.connect(lambda: RunWineProgram(f"wineboot' '-k")) wineBottleReboot.clicked.connect(lambda: RunWineProgram(f"wineboot' '-k"))
programManager.addWidget(wineBottleReboot, 3, 10, 1, 1) programManager.addWidget(wineBottleReboot, 3, 10, 1, 1)
# 权重 # 权重
@ -2758,7 +2763,7 @@ returnText.setStyleSheet("""
background-color: black; background-color: black;
color: white; color: white;
""") """)
returnText.setText(transla.transe("U", "在此可以看到wine安装应用时的终端输出内容")) returnText.setText(transeObject.tr("在此可以看到wine安装应用时的终端输出内容"))
mainLayout.setRowStretch(0, 2) mainLayout.setRowStretch(0, 2)
mainLayout.setRowStretch(1, 1) mainLayout.setRowStretch(1, 1)
mainLayout.setColumnStretch(0, 2) mainLayout.setColumnStretch(0, 2)
@ -2776,41 +2781,41 @@ programRun = QtWidgets.QWidget()
programRunLayout = QtWidgets.QHBoxLayout() programRunLayout = QtWidgets.QHBoxLayout()
programRun.setLayout(programRunLayout) programRun.setLayout(programRunLayout)
programRunLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) programRunLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
button3 = QtWidgets.QPushButton(transla.transe("U", "运行程序")) button3 = QtWidgets.QPushButton(transeObject.tr("运行程序"))
button3.clicked.connect(runexebutton) button3.clicked.connect(runexebutton)
programRunLayout.addWidget(button3) programRunLayout.addWidget(button3)
killProgram = QtWidgets.QPushButton(transla.transe("U", "终止程序")) killProgram = QtWidgets.QPushButton(transeObject.tr("终止程序"))
killProgram.clicked.connect(KillProgram) killProgram.clicked.connect(KillProgram)
programRunLayout.addWidget(killProgram) programRunLayout.addWidget(killProgram)
killBottonProgram = QtWidgets.QPushButton(transla.transe("U", "终止指定容器的程序")) killBottonProgram = QtWidgets.QPushButton(transeObject.tr("终止指定容器的程序"))
killBottonProgram.clicked.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/kill.sh' '{os.path.basename(e1.currentText())}'"]).start()) killBottonProgram.clicked.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/kill.sh' '{os.path.basename(e1.currentText())}'"]).start())
programRunLayout.addWidget(killBottonProgram) programRunLayout.addWidget(killBottonProgram)
mainLayout.addWidget(programRun, 2, 1, 1, 1) mainLayout.addWidget(programRun, 2, 1, 1, 1)
# 菜单栏 # 菜单栏
menu = window.menuBar() menu = window.menuBar()
programmenu = menu.addMenu(transla.transe("U", "程序(&P)")) programmenu = menu.addMenu(transeObject.tr("程序(&P)"))
p1 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transla.transe("U", "安装 wine(&I)")) p1 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transeObject.tr("安装 wine(&I)"))
installWineOnDeepin23 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine23P.png"), transla.transe("U", "安装 wine(只限Deepin23 Preview)")) installWineOnDeepin23 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine23P.png"), transeObject.tr("安装 wine(只限Deepin23 Preview)"))
installWineOnDeepin23Alpha = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine23A.png"), transla.transe("U", "安装 wine(只限Deepin23 Alpha)")) installWineOnDeepin23Alpha = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine23A.png"), transeObject.tr("安装 wine(只限Deepin23 Alpha)"))
installWineHQOrg = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transla.transe("U", "安装 WineHQ官方源")) installWineHQOrg = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transeObject.tr("安装 WineHQ官方源"))
installWineHQ = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transla.transe("U", "安装 WineHQ国内清华大学镜像源")) installWineHQ = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transeObject.tr("安装 WineHQ国内清华大学镜像源"))
installMoreWine = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/more-wine.png"), transla.transe("U", "安装更多 WineWine 下载工具,推荐)")) installMoreWine = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/more-wine.png"), transeObject.tr("安装更多 WineWine 下载工具,推荐)"))
downloadChrootBottle = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), transla.transe("U", "下载 Chroot 容器")) downloadChrootBottle = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), transeObject.tr("下载 Chroot 容器"))
installBox86CN = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transla.transe("U", "安装 Box86/Box64 日构建(国内源)")) installBox86CN = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transeObject.tr("安装 Box86/Box64 日构建(国内源)"))
installBox86 = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transla.transe("U", "安装 Box86/Box64 日构建(国外 Github 源)")) installBox86 = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transeObject.tr("安装 Box86/Box64 日构建(国外 Github 源)"))
installBox86Own = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transla.transe("U", "安装 Box86/Box64使用自建源支持 riscv64")) installBox86Own = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transeObject.tr("安装 Box86/Box64使用自建源支持 riscv64"))
installLat = QtWidgets.QAction(transla.transe("U", "安装 lat只限 Loongarch64 架构)")) installLat = QtWidgets.QAction(transeObject.tr("安装 lat只限 Loongarch64 架构)"))
addWineDebMirrorForDeepin20 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transla.transe("U", "添加 Wine 运行器源以安装较新版本的 WineHQ支持 Deepin20/Debian10")) addWineDebMirrorForDeepin20 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transeObject.tr("添加 Wine 运行器源以安装较新版本的 WineHQ支持 Deepin20/Debian10"))
p2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("settings"), transla.transe("U", "设置程序(&S)")) p2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("settings"), transeObject.tr("设置程序(&S)"))
enabledAll = QtWidgets.QAction(transla.transe("U", "强制启用所有被禁用的组件(不推荐)")) enabledAll = QtWidgets.QAction(transeObject.tr("强制启用所有被禁用的组件(不推荐)"))
setMiniFont = QtWidgets.QAction(transla.transe("U", "临时设置小字体")) setMiniFont = QtWidgets.QAction(transeObject.tr("临时设置小字体"))
setTinyFont = QtWidgets.QAction(transla.transe("U", "临时设置很小的字体")) setTinyFont = QtWidgets.QAction(transeObject.tr("临时设置很小的字体"))
setDefaultFont = QtWidgets.QAction(transla.transe("U", "临时设置默认字体")) setDefaultFont = QtWidgets.QAction(transeObject.tr("临时设置默认字体"))
p3 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transla.transe("U", "清空软件历史记录(&C)")) p3 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transeObject.tr("清空软件历史记录(&C)"))
cleanCache = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transla.transe("U", "清空软件缓存")) cleanCache = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transeObject.tr("清空软件缓存"))
cleanProgramUnuse = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transla.transe("U", "删除程序组件")) cleanProgramUnuse = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transeObject.tr("删除程序组件"))
p4 = QtWidgets.QAction(QtGui.QIcon.fromTheme("exit"), transla.transe("U", "退出程序(&E)")) p4 = QtWidgets.QAction(QtGui.QIcon.fromTheme("exit"), transeObject.tr("退出程序(&E)"))
programmenu.addAction(p1) programmenu.addAction(p1)
programmenu.addAction(installWineOnDeepin23) programmenu.addAction(installWineOnDeepin23)
programmenu.addAction(installWineOnDeepin23Alpha) programmenu.addAction(installWineOnDeepin23Alpha)
@ -2868,21 +2873,21 @@ cleanCache.triggered.connect(CleanProgramCache)
cleanProgramUnuse.triggered.connect(CleanProgram) cleanProgramUnuse.triggered.connect(CleanProgram)
p4.triggered.connect(window.close) p4.triggered.connect(window.close)
wineOption = menu.addMenu(transla.transe("U", "Wine(&W)")) wineOption = menu.addMenu(transeObject.tr("Wine(&W)"))
w1 = QtWidgets.QAction(transla.transe("U", "打开 Wine 容器目录")) w1 = QtWidgets.QAction(transeObject.tr("打开 Wine 容器目录"))
w2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("font"), transla.transe("U", "安装常见字体")) w2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("font"), transeObject.tr("安装常见字体"))
w3 = QtWidgets.QAction(QtGui.QIcon.fromTheme("font"), transla.transe("U", "安装自定义字体")) w3 = QtWidgets.QAction(QtGui.QIcon.fromTheme("font"), transeObject.tr("安装自定义字体"))
w4 = QtWidgets.QAction(transla.transe("U", "删除选择的 Wine 容器")) w4 = QtWidgets.QAction(transeObject.tr("删除选择的 Wine 容器"))
cleanBottonUOS = QtWidgets.QAction(transla.transe("U", "清理 Wine 容器(基于 Wine 适配活动脚本)")) cleanBottonUOS = QtWidgets.QAction(transeObject.tr("清理 Wine 容器(基于 Wine 适配活动脚本)"))
wineKeyboardLnk = QtWidgets.QAction(transla.transe("U", "Wine 快捷键映射")) wineKeyboardLnk = QtWidgets.QAction(transeObject.tr("Wine 快捷键映射"))
w5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transla.transe("U", "打包 wine 应用(专业用户使用)")) w5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transeObject.tr("打包 wine 应用(专业用户使用)"))
w6 = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transla.transe("U", "使用官方 Wine 适配活动的脚本进行打包")) w6 = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transeObject.tr("使用官方 Wine 适配活动的脚本进行打包"))
easyPackager = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transla.transe("U", "使用简易打包器进行打包(小白且无特殊需求建议使用这个)")) easyPackager = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transeObject.tr("使用简易打包器进行打包(小白且无特殊需求建议使用这个)"))
getDllOnInternet = QtWidgets.QAction(QtGui.QIcon.fromTheme("1CD8_rundll32.0"), transla.transe("U", "从互联网获取DLL")) getDllOnInternet = QtWidgets.QAction(QtGui.QIcon.fromTheme("1CD8_rundll32.0"), transeObject.tr("从互联网获取DLL"))
w7 = QtWidgets.QAction(transla.transe("U", "从镜像获取DLL只支持官方安装镜像DOS内核如 Windows 95 暂不支持)")) w7 = QtWidgets.QAction(transeObject.tr("从镜像获取DLL只支持官方安装镜像DOS内核如 Windows 95 暂不支持)"))
updateGeek = QtWidgets.QAction(transla.transe("U", "从 Geek Uninstaller 官网升级程序")) updateGeek = QtWidgets.QAction(transeObject.tr("从 Geek Uninstaller 官网升级程序"))
deletePartIcon = QtWidgets.QAction(transla.transe("U", "快捷方式管理工具")) deletePartIcon = QtWidgets.QAction(transeObject.tr("快捷方式管理工具"))
deleteDesktopIcon = QtWidgets.QAction(transla.transe("U", "删除所有 Wine 程序在启动器的快捷方式")) deleteDesktopIcon = QtWidgets.QAction(transeObject.tr("删除所有 Wine 程序在启动器的快捷方式"))
wineOption.addAction(w1) wineOption.addAction(w1)
wineOption.addAction(w2) wineOption.addAction(w2)
wineOption.addAction(w3) wineOption.addAction(w3)
@ -2901,15 +2906,15 @@ wineOption.addAction(w7)
wineOption.addSeparator() wineOption.addSeparator()
wineOption.addAction(updateGeek) wineOption.addAction(updateGeek)
wineOption.addSeparator() wineOption.addSeparator()
wm1 = wineOption.addMenu(transla.transe("U", "在指定 Wine、容器安装组件")) wm1 = wineOption.addMenu(transeObject.tr("在指定 Wine、容器安装组件"))
wm1_1 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 .net framework")) wm1_1 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 .net framework"))
wm1_2 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 Visual Studio C++")) wm1_2 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 Visual Studio C++"))
wm1_8 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 Visual FoxPro")) wm1_8 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 Visual FoxPro"))
wm1_3 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 MSXML")) wm1_3 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 MSXML"))
wm1_4 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 gecko")) wm1_4 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 gecko"))
wm1_5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("mono"), transla.transe("U", "在指定wine、指定容器安装 mono")) wm1_5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("mono"), transeObject.tr("在指定wine、指定容器安装 mono"))
wm1_7 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 Visual Basic Runtime")) wm1_7 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装 Visual Basic Runtime"))
wm1_6 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装其它运行库")) wm1_6 = QtWidgets.QAction(transeObject.tr("在指定wine、指定容器安装其它运行库"))
wm1.addAction(wm1_1) wm1.addAction(wm1_1)
wm1.addAction(wm1_2) wm1.addAction(wm1_2)
wm1.addAction(wm1_8) wm1.addAction(wm1_8)
@ -2918,13 +2923,13 @@ wm1.addAction(wm1_4)
wm1.addAction(wm1_5) wm1.addAction(wm1_5)
wm1.addAction(wm1_7) wm1.addAction(wm1_7)
wm1.addAction(wm1_6) wm1.addAction(wm1_6)
wm2 = wineOption.addMenu(transla.transe("U", "在指定 Wine、容器运行基础应用")) wm2 = wineOption.addMenu(transeObject.tr("在指定 Wine、容器运行基础应用"))
wm2_1 = QtWidgets.QAction(QtGui.QIcon.fromTheme("control-center2"), transla.transe("U", "打开指定wine、指定容器的控制面板")) wm2_1 = QtWidgets.QAction(QtGui.QIcon.fromTheme("control-center2"), transeObject.tr("打开指定wine、指定容器的控制面板"))
wm2_2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("web-browser"), transla.transe("U", "打开指定wine、指定容器的浏览器")) wm2_2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("web-browser"), transeObject.tr("打开指定wine、指定容器的浏览器"))
wm2_3 = QtWidgets.QAction(QtGui.QIcon.fromTheme("regedit"), transla.transe("U", "打开指定wine、指定容器的注册表")) wm2_3 = QtWidgets.QAction(QtGui.QIcon.fromTheme("regedit"), transeObject.tr("打开指定wine、指定容器的注册表"))
wm2_4 = QtWidgets.QAction(transla.transe("U", "打开指定wine、指定容器的任务管理器")) wm2_4 = QtWidgets.QAction(transeObject.tr("打开指定wine、指定容器的任务管理器"))
wm2_5 = QtWidgets.QAction(transla.transe("U", "打开指定wine、指定容器的资源管理器")) wm2_5 = QtWidgets.QAction(transeObject.tr("打开指定wine、指定容器的资源管理器"))
wm2_6 = QtWidgets.QAction(transla.transe("U", "打开指定wine、指定容器的关于 wine")) wm2_6 = QtWidgets.QAction(transeObject.tr("打开指定wine、指定容器的关于 wine"))
wm2.addAction(wm2_1) wm2.addAction(wm2_1)
wm2.addAction(wm2_2) wm2.addAction(wm2_2)
wm2.addAction(wm2_3) wm2.addAction(wm2_3)
@ -2932,12 +2937,12 @@ wm2.addAction(wm2_4)
wm2.addAction(wm2_5) wm2.addAction(wm2_5)
wm2.addAction(wm2_6) wm2.addAction(wm2_6)
wineOption.addSeparator() wineOption.addSeparator()
settingRunV3Sh = wineOption.addMenu(transla.transe("U", "run_v3.sh 管理")) settingRunV3Sh = wineOption.addMenu(transeObject.tr("run_v3.sh 管理"))
w8 = QtWidgets.QAction(transla.transe("U", "设置 run_v3.sh 的文管为 Deepin 默认文管")) w8 = QtWidgets.QAction(transeObject.tr("设置 run_v3.sh 的文管为 Deepin 默认文管"))
w9 = QtWidgets.QAction(transla.transe("U", "设置 run_v3.sh 的文管为 Wine 默认文管")) w9 = QtWidgets.QAction(transeObject.tr("设置 run_v3.sh 的文管为 Wine 默认文管"))
w10 = QtWidgets.QAction(transla.transe("U", "重新安装 deepin-wine-helper")) w10 = QtWidgets.QAction(transeObject.tr("重新安装 deepin-wine-helper"))
w11 = QtWidgets.QAction(QtGui.QIcon.fromTheme("winetricks"), transla.transe("U", "使用winetricks打开指定容器")) w11 = QtWidgets.QAction(QtGui.QIcon.fromTheme("winetricks"), transeObject.tr("使用winetricks打开指定容器"))
w11WithWineLib = QtWidgets.QAction(QtGui.QIcon.fromTheme("winetricks"), transla.transe("U", "使用winetricks打开指定容器使用Wine运行器运行库")) w11WithWineLib = QtWidgets.QAction(QtGui.QIcon.fromTheme("winetricks"), transeObject.tr("使用winetricks打开指定容器使用Wine运行器运行库"))
w11WithWineLib.setDisabled(True) w11WithWineLib.setDisabled(True)
settingRunV3Sh.addAction(w8) settingRunV3Sh.addAction(w8)
settingRunV3Sh.addAction(w9) settingRunV3Sh.addAction(w9)
@ -2946,62 +2951,62 @@ wineOption.addSeparator()
wineOption.addAction(w11) wineOption.addAction(w11)
#wineOption.addAction(w11WithWineLib) #wineOption.addAction(w11WithWineLib)
wineOption.addSeparator() wineOption.addSeparator()
optionCheckDemo = wineOption.addMenu(transla.transe("U", "组件功能测试")) optionCheckDemo = wineOption.addMenu(transeObject.tr("组件功能测试"))
vbDemo = QtWidgets.QAction(transla.transe("U", "测试 Visual Basic 6 程序")) vbDemo = QtWidgets.QAction(transeObject.tr("测试 Visual Basic 6 程序"))
netDemo = QtWidgets.QAction(transla.transe("U", "测试 .net framework 程序")) netDemo = QtWidgets.QAction(transeObject.tr("测试 .net framework 程序"))
netIEDemo = QtWidgets.QAction(transla.transe("U", "测试 .net framework + Internet Explorer 程序")) netIEDemo = QtWidgets.QAction(transeObject.tr("测试 .net framework + Internet Explorer 程序"))
optionCheckDemo.addAction(vbDemo) optionCheckDemo.addAction(vbDemo)
optionCheckDemo.addAction(netDemo) optionCheckDemo.addAction(netDemo)
optionCheckDemo.addAction(netIEDemo) optionCheckDemo.addAction(netIEDemo)
wineOption.addSeparator() wineOption.addSeparator()
wm3 = wineOption.addMenu(transla.transe("U", "启用/禁用功能")) wm3 = wineOption.addMenu(transeObject.tr("启用/禁用功能"))
ed1 = wm3.addMenu(transla.transe("U", "启用/禁用 opengl")) ed1 = wm3.addMenu(transeObject.tr("启用/禁用 opengl"))
wm3_1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "开启 opengl")) wm3_1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("开启 opengl"))
wm3_2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "禁用 opengl")) wm3_2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("禁用 opengl"))
ed1.addAction(wm3_1) ed1.addAction(wm3_1)
ed1.addAction(wm3_2) ed1.addAction(wm3_2)
ed2 = wm3.addMenu(transla.transe("U", "安装/卸载 winbind")) ed2 = wm3.addMenu(transeObject.tr("安装/卸载 winbind"))
wm4_1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "安装 winbind")) wm4_1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("安装 winbind"))
wm4_2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "卸载 winbind")) wm4_2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("卸载 winbind"))
ed2.addAction(wm4_1) ed2.addAction(wm4_1)
ed2.addAction(wm4_2) ed2.addAction(wm4_2)
dxvkMenu = wm3.addMenu(transla.transe("U", "安装/卸载 DXVK")) dxvkMenu = wm3.addMenu(transeObject.tr("安装/卸载 DXVK"))
installDxvk = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "安装 DXVK")) installDxvk = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("安装 DXVK"))
uninstallDxvk = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "卸载 DXVK")) uninstallDxvk = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("卸载 DXVK"))
dxvkMenu.addAction(installDxvk) dxvkMenu.addAction(installDxvk)
dxvkMenu.addAction(uninstallDxvk) dxvkMenu.addAction(uninstallDxvk)
vkd3dMenu = wm3.addMenu(transla.transe("U", "安装/卸载 Vkd3d")) vkd3dMenu = wm3.addMenu(transeObject.tr("安装/卸载 Vkd3d"))
installvkd3d = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "安装 Vkd3d")) installvkd3d = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("安装 Vkd3d"))
uninstallvkd3d = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "卸载 Vkd3d")) uninstallvkd3d = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("卸载 Vkd3d"))
vkd3dMenu.addAction(installvkd3d) vkd3dMenu.addAction(installvkd3d)
vkd3dMenu.addAction(uninstallvkd3d) vkd3dMenu.addAction(uninstallvkd3d)
wineOption.addSeparator() wineOption.addSeparator()
wineOption.addAction(deleteDesktopIcon) wineOption.addAction(deleteDesktopIcon)
wineOption.addSeparator() wineOption.addSeparator()
settingWineBottleCreateLink = wm3.addMenu(transla.transe("U", "启用/禁止指定 wine 容器生成快捷方式")) settingWineBottleCreateLink = wm3.addMenu(transeObject.tr("启用/禁止指定 wine 容器生成快捷方式"))
enabledWineBottleCreateLink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "允许指定 wine 容器生成快捷方式")) enabledWineBottleCreateLink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("允许指定 wine 容器生成快捷方式"))
disbledWineBottleCreateLink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "禁止指定 wine 容器生成快捷方式")) disbledWineBottleCreateLink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("禁止指定 wine 容器生成快捷方式"))
settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink) settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink)
settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink) settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink)
settingWineCrashDialog = wm3.addMenu(transla.transe("U", "启用/禁用指定 wine 容器崩溃提示窗口")) settingWineCrashDialog = wm3.addMenu(transeObject.tr("启用/禁用指定 wine 容器崩溃提示窗口"))
disbledWineCrashDialog = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "禁用指定 wine 容器崩溃提示窗口")) disbledWineCrashDialog = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("禁用指定 wine 容器崩溃提示窗口"))
enabledWineCrashDialog = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "启用指定 wine 容器崩溃提示窗口")) enabledWineCrashDialog = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("启用指定 wine 容器崩溃提示窗口"))
settingWineCrashDialog.addAction(enabledWineCrashDialog) settingWineCrashDialog.addAction(enabledWineCrashDialog)
settingWineCrashDialog.addAction(disbledWineCrashDialog) settingWineCrashDialog.addAction(disbledWineCrashDialog)
settingOpenProgram = wm3.addMenu(transla.transe("U", "启用/禁止指定 wine 容器创建文件关联")) settingOpenProgram = wm3.addMenu(transeObject.tr("启用/禁止指定 wine 容器创建文件关联"))
enabledOpenProgram = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "允许指定 wine 容器创建文件关联")) enabledOpenProgram = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transeObject.tr("允许指定 wine 容器创建文件关联"))
disbledOpenProgram = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "禁止指定 wine 容器创建文件关联")) disbledOpenProgram = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("禁止指定 wine 容器创建文件关联"))
settingOpenProgram.addAction(enabledOpenProgram) settingOpenProgram.addAction(enabledOpenProgram)
settingOpenProgram.addAction(disbledOpenProgram) settingOpenProgram.addAction(disbledOpenProgram)
settingHttpProxy = wineOption.addMenu(transla.transe("U", "设置指定 Wine 容器代理")) settingHttpProxy = wineOption.addMenu(transeObject.tr("设置指定 Wine 容器代理"))
enabledHttpProxy = QtWidgets.QAction(transla.transe("U", "设置指定 wine 容器的代理")) enabledHttpProxy = QtWidgets.QAction(transeObject.tr("设置指定 wine 容器的代理"))
disbledHttpProxy = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "禁用指定 wine 容器的代理")) disbledHttpProxy = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transeObject.tr("禁用指定 wine 容器的代理"))
settingHttpProxy.addAction(enabledHttpProxy) settingHttpProxy.addAction(enabledHttpProxy)
settingHttpProxy.addAction(disbledHttpProxy) settingHttpProxy.addAction(disbledHttpProxy)
dllOver = wineOption.addMenu(transla.transe("U", "函数顶替库列表")) dllOver = wineOption.addMenu(transeObject.tr("函数顶替库列表"))
saveDllOver = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(43), transla.transe("U", "导出函数顶替列表")) saveDllOver = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(43), transeObject.tr("导出函数顶替列表"))
addDllOver = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "导入函数顶替列表")) addDllOver = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("导入函数顶替列表"))
editDllOver = QtWidgets.QAction(transla.transe("U", "编辑函数顶替库列表")) editDllOver = QtWidgets.QAction(transeObject.tr("编辑函数顶替库列表"))
dllOver.addAction(saveDllOver) dllOver.addAction(saveDllOver)
dllOver.addAction(addDllOver) dllOver.addAction(addDllOver)
dllOver.addAction(editDllOver) dllOver.addAction(editDllOver)
@ -3061,17 +3066,17 @@ vbDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/vb.exe"))
netDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/net.exe")) netDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/net.exe"))
netIEDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/netandie.exe")) netIEDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/netandie.exe"))
virtualMachine = menu.addMenu(transla.transe("U", "虚拟机(&V)")) virtualMachine = menu.addMenu(transeObject.tr("虚拟机(&V)"))
v1 = QtWidgets.QAction(QtGui.QIcon.fromTheme("virtualbox"), transla.transe("U", "使用虚拟机运行 Windows 应用")) v1 = QtWidgets.QAction(QtGui.QIcon.fromTheme("virtualbox"), transeObject.tr("使用虚拟机运行 Windows 应用"))
virtualMachine.addAction(v1) virtualMachine.addAction(v1)
v1.triggered.connect(RunVM) v1.triggered.connect(RunVM)
checkValue = menu.addMenu(transla.transe("U", "校验值计算(&S)")) checkValue = menu.addMenu(transeObject.tr("校验值计算(&S)"))
md5Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "MD5(&M)")) md5Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("MD5(&M)"))
sha1Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "SHA1(&M)")) sha1Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("SHA1(&M)"))
base64Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "Base64(建议小文件)(&B)")) base64Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("Base64(建议小文件)(&B)"))
sha256Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "SHA256(&S)")) sha256Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("SHA256(&S)"))
sha512Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "SHA512(&S)")) sha512Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("SHA512(&S)"))
md5Value.triggered.connect(lambda: ValueCheck().Get("MD5")) md5Value.triggered.connect(lambda: ValueCheck().Get("MD5"))
sha1Value.triggered.connect(lambda: ValueCheck().Get("SHA1")) sha1Value.triggered.connect(lambda: ValueCheck().Get("SHA1"))
base64Value.triggered.connect(lambda: ValueCheck().Get("BASE64")) base64Value.triggered.connect(lambda: ValueCheck().Get("BASE64"))
@ -3084,11 +3089,11 @@ checkValue.addAction(sha256Value)
checkValue.addAction(sha512Value) checkValue.addAction(sha512Value)
safeWebsize = menu.addMenu(transla.transe("U", "云沙箱(&C)")) safeWebsize = menu.addMenu(transeObject.tr("云沙箱(&C)"))
s1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "360 沙箱云")) s1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("360 沙箱云"))
s2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "微步云沙箱")) s2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("微步云沙箱"))
s3 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "VIRUSTOTAL")) s3 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("VIRUSTOTAL"))
s4 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "计算机病毒防御技术国家工程实验室")) s4 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("计算机病毒防御技术国家工程实验室"))
safeWebsize.addAction(s1) safeWebsize.addAction(s1)
safeWebsize.addAction(s2) safeWebsize.addAction(s2)
safeWebsize.addAction(s3) safeWebsize.addAction(s3)
@ -3098,12 +3103,12 @@ s2.triggered.connect(lambda: webbrowser.open_new_tab("https://s.threatbook.cn/")
s3.triggered.connect(lambda: webbrowser.open_new_tab("https://www.virustotal.com/")) s3.triggered.connect(lambda: webbrowser.open_new_tab("https://www.virustotal.com/"))
s4.triggered.connect(lambda: webbrowser.open_new_tab("https://cloud.vdnel.cn/")) s4.triggered.connect(lambda: webbrowser.open_new_tab("https://cloud.vdnel.cn/"))
log = menu.addMenu(transla.transe("U", "日志(&L)")) log = menu.addMenu(transeObject.tr("日志(&L)"))
getDllInfo = QtWidgets.QAction(transla.transe("U", "查询 Dll")) getDllInfo = QtWidgets.QAction(transeObject.tr("查询 Dll"))
checkLogText = QtWidgets.QAction(transla.transe("U", "日志分析")) checkLogText = QtWidgets.QAction(transeObject.tr("日志分析"))
saveLogText = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(16), transla.transe("U", "另存为日志")) saveLogText = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(16), transeObject.tr("另存为日志"))
transLogText = QtWidgets.QAction(transla.transe("U", "翻译日志(翻译后日志分析功能会故障)")) transLogText = QtWidgets.QAction(transeObject.tr("翻译日志(翻译后日志分析功能会故障)"))
uploadLogText = QtWidgets.QAction(transla.transe("U", "上传日志")) uploadLogText = QtWidgets.QAction(transeObject.tr("上传日志"))
getDllInfo.triggered.connect(DllWindow.ShowWindow) getDllInfo.triggered.connect(DllWindow.ShowWindow)
checkLogText.triggered.connect(LogChecking.ShowWindow) checkLogText.triggered.connect(LogChecking.ShowWindow)
saveLogText.triggered.connect(SaveLog) saveLogText.triggered.connect(SaveLog)
@ -3124,8 +3129,8 @@ def AddLib(install: QtWidgets.QAction, uninstall, menu, info):
menu.addAction(install) menu.addAction(install)
menu.addAction(uninstall) menu.addAction(uninstall)
installLib = menu.addMenu(transla.transe("U", "应用运行库(&R)")) installLib = menu.addMenu(transeObject.tr("应用运行库(&R)"))
howtouseQemuUser = QtWidgets.QAction(transla.transe("U", "Qemu User 使用教程(配合运行库实现在非 X86 架构运行 X86 Wine")) howtouseQemuUser = QtWidgets.QAction(transeObject.tr("Qemu User 使用教程(配合运行库实现在非 X86 架构运行 X86 Wine"))
howtouseQemuUser.triggered.connect(lambda: webbrowser.open_new_tab("https://www.bilibili.com/read/cv23185651")) howtouseQemuUser.triggered.connect(lambda: webbrowser.open_new_tab("https://www.bilibili.com/read/cv23185651"))
runnerlibinfo = QtWidgets.QAction("只在运行器使用的运行库(不与其他运行库以及兼容层冲突)") runnerlibinfo = QtWidgets.QAction("只在运行器使用的运行库(不与其他运行库以及兼容层冲突)")
installRunnerLib = QtWidgets.QAction("安装运行库") installRunnerLib = QtWidgets.QAction("安装运行库")
@ -3186,9 +3191,9 @@ if os.path.exists(f"{programPath}/InstallRuntime"):
systemalllibinfo = QtWidgets.QAction("全局运行库(与其他运行库以及部分兼容层冲突)") systemalllibinfo = QtWidgets.QAction("全局运行库(与其他运行库以及部分兼容层冲突)")
systemalllibinfo.setDisabled(True) systemalllibinfo.setDisabled(True)
installLib.addAction(systemalllibinfo) installLib.addAction(systemalllibinfo)
installQemuMenu = installLib.addMenu(transla.transe("U", "安装 Qemu User")) installQemuMenu = installLib.addMenu(transeObject.tr("安装 Qemu User"))
installQemu = QtWidgets.QAction(transla.transe("U", "安装 Qemu User")) installQemu = QtWidgets.QAction(transeObject.tr("安装 Qemu User"))
removeQemu = QtWidgets.QAction(transla.transe("U", "卸载 Qemu User")) removeQemu = QtWidgets.QAction(transeObject.tr("卸载 Qemu User"))
installQemuMenu.addAction(installQemu) installQemuMenu.addAction(installQemu)
installQemuMenu.addAction(removeQemu) installQemuMenu.addAction(removeQemu)
installQemu.triggered.connect(lambda: OpenTerminal(f"bash '{programPath}/InstallQemuUser.sh'")) installQemu.triggered.connect(lambda: OpenTerminal(f"bash '{programPath}/InstallQemuUser.sh'"))
@ -3199,43 +3204,43 @@ if os.path.exists(f"{programPath}/InstallRuntime"):
if i[-3:] == ".sh": if i[-3:] == ".sh":
print(f"检测到库 {os.path.splitext(i)[0]}") print(f"检测到库 {os.path.splitext(i)[0]}")
AddLib(QtWidgets.QAction(transla.transe("U", f"安装 {os.path.splitext(i)[0]} 运行库")), QtWidgets.QAction(transla.transe("U", f"卸载 {os.path.splitext(i)[0]} 运行库")), installLib.addMenu(transla.transe("U", f"运行库 {os.path.splitext(i)[0]}")), i) AddLib(QtWidgets.QAction(transeObject.tr(f"安装 {os.path.splitext(i)[0]} 运行库")), QtWidgets.QAction(transeObject.tr(f"卸载 {os.path.splitext(i)[0]} 运行库")), installLib.addMenu(transeObject.tr(f"运行库 {os.path.splitext(i)[0]}")), i)
qemuMenu = menu.addMenu(transla.transe("U", "容器(&C)")) qemuMenu = menu.addMenu(transeObject.tr("容器(&C)"))
unpackDeb = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "解包 deb 提取容器")) unpackDeb = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transeObject.tr("解包 deb 提取容器"))
qemuMenu.addAction(unpackDeb) qemuMenu.addAction(unpackDeb)
unpackDeb.triggered.connect(UnPackage) unpackDeb.triggered.connect(UnPackage)
if len(qemuBottleList) >= 1: if len(qemuBottleList) >= 1:
configMenu = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), transla.transe("U", "配置指定 Chroot 容器")) configMenu = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), transeObject.tr("配置指定 Chroot 容器"))
qemuMenu.addAction(configMenu) qemuMenu.addAction(configMenu)
configMenu.triggered.connect(ConfigQemu) configMenu.triggered.connect(ConfigQemu)
print(qemuBottleList) print(qemuBottleList)
videoHelp = menu.addMenu(transla.transe("U", "视频教程(&V)")) videoHelp = menu.addMenu(transeObject.tr("视频教程(&V)"))
videoHelpAction = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "视频教程")) videoHelpAction = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("视频教程"))
videoHelpAction.triggered.connect(lambda: webbrowser.open_new_tab("https://space.bilibili.com/695814694/channel/collectiondetail?sid=1610353")) videoHelpAction.triggered.connect(lambda: webbrowser.open_new_tab("https://space.bilibili.com/695814694/channel/collectiondetail?sid=1610353"))
videoHelp.addAction(videoHelpAction) videoHelp.addAction(videoHelpAction)
help = menu.addMenu(transla.transe("U", "帮助(&H)")) help = menu.addMenu(transeObject.tr("帮助(&H)"))
runStatusWebSize = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "查询程序在 Wine 的运行情况")) runStatusWebSize = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("查询程序在 Wine 的运行情况"))
h1 = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "程序官网")) h1 = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("程序官网"))
h2 = QtWidgets.QAction(transla.transe("U", "小提示")) h2 = QtWidgets.QAction(transeObject.tr("小提示"))
wineRunnerHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Wine运行器和Wine打包器傻瓜式使用教程小白专用 By 鹤舞白沙")) wineRunnerHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("Wine运行器和Wine打包器傻瓜式使用教程小白专用 By 鹤舞白沙"))
h3 = QtWidgets.QAction(transla.transe("U", "更新内容")) h3 = QtWidgets.QAction(transeObject.tr("更新内容"))
h4 = QtWidgets.QAction(transla.transe("U", "鸣谢名单")) h4 = QtWidgets.QAction(transeObject.tr("鸣谢名单"))
h5 = QtWidgets.QAction(transla.transe("U", "更新这个程序")) h5 = QtWidgets.QAction(transeObject.tr("更新这个程序"))
programInformation = QtWidgets.QAction(transla.transe("U", "获取程序公告(也可以在这里看程序安装/打开量)")) programInformation = QtWidgets.QAction(transeObject.tr("获取程序公告(也可以在这里看程序安装/打开量)"))
h6 = QtWidgets.QAction(transla.transe("U", "反馈这个程序的建议和问题")) h6 = QtWidgets.QAction(transeObject.tr("反馈这个程序的建议和问题"))
fenUpload = QtWidgets.QAction(transla.transe("U", "程序评分")) fenUpload = QtWidgets.QAction(transeObject.tr("程序评分"))
h7 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "关于这个程序")) h7 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("关于这个程序"))
h8 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "关于 Qt")) h8 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transeObject.tr("关于 Qt"))
gfdgdxiio = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "作者个人站")) gfdgdxiio = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("作者个人站"))
gitee = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Gitee")) gitee = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("Gitee"))
github = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Github")) github = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("Github"))
gitlab = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Gitlab")) gitlab = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("Gitlab"))
jihu = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "极狐")) jihu = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("极狐"))
h1.addAction(gfdgdxiio) h1.addAction(gfdgdxiio)
h1.addAction(gitee) h1.addAction(gitee)
h1.addAction(github) h1.addAction(github)
@ -3250,9 +3255,9 @@ help.addAction(h3)
help.addAction(h4) help.addAction(h4)
help.addSeparator() help.addSeparator()
wikiHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "程序 Wiki")) wikiHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("程序 Wiki"))
help.addAction(wikiHelp) help.addAction(wikiHelp)
videoHelp = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "视频教程")) videoHelp = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), transeObject.tr("视频教程"))
videoHelp.addAction(videoHelpAction) videoHelp.addAction(videoHelpAction)
help.addSeparator() help.addSeparator()
help.addAction(h5) help.addAction(h5)
@ -3262,8 +3267,8 @@ help.addAction(programInformation)
help.addAction(h7) help.addAction(h7)
help.addAction(h8) help.addAction(h8)
help.addSeparator() help.addSeparator()
hm1 = help.addMenu(transla.transe("U", "更多生态适配应用")) hm1 = help.addMenu(transeObject.tr("更多生态适配应用"))
hm1_1 = QtWidgets.QAction(transla.transe("U", "运行 Android 应用UEngine 运行器")) hm1_1 = QtWidgets.QAction(transeObject.tr("运行 Android 应用UEngine 运行器"))
hm1.addAction(hm1_1) hm1.addAction(hm1_1)
gfdgdxiio.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io")) gfdgdxiio.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io"))
gitee.triggered.connect(lambda: webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/deep-wine-runner")) gitee.triggered.connect(lambda: webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/deep-wine-runner"))