mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-14 02:52:03 +08:00
初步云DLL下载完成
This commit is contained in:
@@ -27,17 +27,17 @@ import PyQt5.QtWidgets as QtWidgets
|
||||
#################
|
||||
|
||||
def button1_cl():
|
||||
path = QtWidgets.QFileDialog.getExistingDirectory(widget, "选择 wine 容器", f"{get_home()}/.deepinwine")
|
||||
path = QtWidgets.QFileDialog.getExistingDirectory(QtCore.QCoreApplication.translate("U", "选择 wine 容器"), f"{get_home()}/.deepinwine")
|
||||
if path != "":
|
||||
e6_text.setText(path)
|
||||
|
||||
def button2_cl():
|
||||
path = QtWidgets.QFileDialog.getOpenFileName(widget, "选择图标文件", get_home(), "PNG图标(*.png);;SVG图标(*.svg);;全部文件(*.*)")[0]
|
||||
path = QtWidgets.QFileDialog.getOpenFileName(widget, QtCore.QCoreApplication.translate("U", "选择图标文件"), get_home(), "PNG图标(*.png);;SVG图标(*.svg);;全部文件(*.*)")[0]
|
||||
if path != "":
|
||||
e9_text.setText(path)
|
||||
|
||||
def button4_cl():
|
||||
path = QtWidgets.QFileDialog.getSaveFileName(widget, "保存 deb 包", get_home(), "deb 文件(*.deb);;所有文件(*.*)", "{}_{}_i386.deb".format(e1_text.text(), e2_text.text()))[0]
|
||||
path = QtWidgets.QFileDialog.getSaveFileName(widget, QtCore.QCoreApplication.translate("U", "保存 deb 包"), get_home(), "deb 文件(*.deb);;所有文件(*.*)", "{}_{}_i386.deb".format(e1_text.text(), e2_text.text()))[0]
|
||||
if path != "":
|
||||
e12_text.setText(path)
|
||||
|
||||
@@ -99,7 +99,7 @@ def make_deb(build=False):
|
||||
disabled_or_NORMAL_all(True)
|
||||
label13_text_change("必填信息没有填写完整,无法继续构建 deb 包")
|
||||
return
|
||||
if QtWidgets.QMessageBox.question(widget, "提示", "打包将会改动现在选择的容器,是否继续?") == QtWidgets.QMessageBox.No:
|
||||
if QtWidgets.QMessageBox.question(widget, QtCore.QCoreApplication.translate("U", "提示"), QtCore.QCoreApplication.translate("U", "打包将会改动现在选择的容器,是否继续?")) == QtWidgets.QMessageBox.No:
|
||||
disabled_or_NORMAL_all(True)
|
||||
return
|
||||
#thread = threading.Thread(target=make_deb_threading)
|
||||
@@ -832,6 +832,7 @@ fi
|
||||
print("e")
|
||||
self.label.emit("正在处理 Wine")
|
||||
if os.path.exists(wine[wineVersion.currentText()]):
|
||||
shutil.copy(f"{programPath}/gtkGetFileNameDlg", f"{debPackagePath}/opt/apps/{e1_text.text()}/files/gtkGetFileNameDlg")
|
||||
if wine[wineVersion.currentText()][-3:] == ".7z":
|
||||
shutil.copy(wine[wineVersion.currentText()], f"{debPackagePath}/opt/apps/{e1_text.text()}/files/wine_archive.7z")
|
||||
else:
|
||||
@@ -1081,24 +1082,24 @@ e12_text = QtWidgets.QLineEdit()
|
||||
e15_text = QtWidgets.QLineEdit()
|
||||
label13_text = QtWidgets.QLabel("<p align='center'>当前 deb 打包情况:暂未打包</p>")
|
||||
option1_text = QtWidgets.QComboBox()
|
||||
button1 = QtWidgets.QPushButton("浏览……")
|
||||
button2 = QtWidgets.QPushButton("浏览……")
|
||||
button4 = QtWidgets.QPushButton("浏览……")
|
||||
button1 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "浏览……"))
|
||||
button2 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "浏览……"))
|
||||
button4 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "浏览……"))
|
||||
debControlFrame = QtWidgets.QHBoxLayout()
|
||||
button5 = QtWidgets.QPushButton("打包……")
|
||||
installDeb = QtWidgets.QPushButton("安装打包完成的 deb……")
|
||||
buildDebDir = QtWidgets.QPushButton("根据填写内容打包模板")
|
||||
button5 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "打包……"))
|
||||
installDeb = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "安装打包完成的 deb……"))
|
||||
buildDebDir = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "根据填写内容打包模板"))
|
||||
debControlFrame.addWidget(button5)
|
||||
debControlFrame.addWidget(installDeb)
|
||||
rmBash = QtWidgets.QCheckBox("设置卸载该 deb 后自动删除该容器")
|
||||
cleanBottonByUOS = QtWidgets.QCheckBox("使用统信 Wine 生态适配活动容器清理脚本")
|
||||
rmBash = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "设置卸载该 deb 后自动删除该容器"))
|
||||
cleanBottonByUOS = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "使用统信 Wine 生态适配活动容器清理脚本"))
|
||||
debArch = QtWidgets.QComboBox()
|
||||
debArch.addItems(["i386", "arm64(box86)", "arm64(exagear)"])
|
||||
textbox1 = QtWidgets.QTextBrowser()
|
||||
option1_text.addItems(["Network", "Chat", "Audio", "Video", "Graphics", "Office", "Translation", "Development", "Utility"])
|
||||
option1_text.setCurrentText("Network")
|
||||
wineFrame = QtWidgets.QHBoxLayout()
|
||||
chooseWineHelperValue = QtWidgets.QCheckBox("使用星火wine helper\n(如不勾选默认为deepin-wine-helper)")
|
||||
chooseWineHelperValue = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "使用星火wine helper\n(如不勾选默认为deepin-wine-helper)"))
|
||||
button1.clicked.connect(button1_cl)
|
||||
button2.clicked.connect(button2_cl)
|
||||
button4.clicked.connect(button4_cl)
|
||||
@@ -1108,19 +1109,19 @@ installDeb.clicked.connect(InstallDeb)
|
||||
wineFrame.addWidget(wineVersion)
|
||||
debArch.currentIndexChanged.connect(ChangeArchCombobox)
|
||||
# 创建控件
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("要打包的 deb 包的包名(※必填):"), 0, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("要打包的 deb 包的版本号(※必填):"), 1, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("要打包的 deb 包的说明(※必填):"), 2, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("要打包的 deb 包的维护者(※必填):"), 3, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("要解压的 wine 容器的容器名(※必填):"), 4, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("要解压的 wine 容器(※必填):"), 5, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("wine 容器里需要运行的可执行文件路径(※必填):"), 6, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的分类(※必填):"), 7, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("wine 容器里需要运行的可执行文件的参数(选填):"), 8, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的名称(※必填):"), 9, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的图标(选填):"), 10, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("选择打包的 wine 版本(※必选):"), 12, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("打包 deb 的保存路径(※必填):"), 13, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要打包的 deb 包的包名(※必填):")), 0, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要打包的 deb 包的版本号(※必填):")), 1, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要打包的 deb 包的说明(※必填):")), 2, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要打包的 deb 包的维护者(※必填):")), 3, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要解压的 wine 容器的容器名(※必填):")), 4, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要解压的 wine 容器(※必填):")), 5, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "wine 容器里需要运行的可执行文件路径(※必填):")), 6, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要显示的 .desktop 文件的分类(※必填):")), 7, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "wine 容器里需要运行的可执行文件的参数(选填):")), 8, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要显示的 .desktop 文件的名称(※必填):")), 9, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要显示的 .desktop 文件的图标(选填):")), 10, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "选择打包的 wine 版本(※必选):")), 12, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "打包 deb 的保存路径(※必填):")), 13, 0, 1, 1)
|
||||
widgetLayout.addWidget(e1_text, 0, 1, 1, 1)
|
||||
widgetLayout.addWidget(e2_text, 1, 1, 1, 1)
|
||||
widgetLayout.addWidget(e3_text, 2, 1, 1, 1)
|
||||
@@ -1141,30 +1142,30 @@ widgetLayout.addLayout(debControlFrame, 16, 1, 1, 1)
|
||||
widgetLayout.addWidget(label13_text, 17, 0, 1, 3)
|
||||
widgetLayout.addWidget(textbox1, 18, 0, 1, 3)
|
||||
# 高级功能
|
||||
moreSetting = QtWidgets.QGroupBox("高级设置")
|
||||
moreSetting = QtWidgets.QGroupBox(QtCore.QCoreApplication.translate("U", "高级设置"))
|
||||
debDepends = QtWidgets.QLineEdit()
|
||||
debRecommend = QtWidgets.QLineEdit()
|
||||
debDepends.setPlaceholderText("deb 包的依赖(如无特殊需求默认即可)")
|
||||
debDepends.setPlaceholderText(QtCore.QCoreApplication.translate("U", "deb 包的依赖(如无特殊需求默认即可)"))
|
||||
debDepends.setText("deepin-wine6-stable, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei")
|
||||
debRecommend.setPlaceholderText("deb 包的推荐依赖(非强制,一般默认即可)")
|
||||
debRecommend.setPlaceholderText(QtCore.QCoreApplication.translate("U", "deb 包的推荐依赖(非强制,一般默认即可)"))
|
||||
moreSettingLayout = QtWidgets.QVBoxLayout()
|
||||
localWineVersion = QtWidgets.QComboBox()
|
||||
useInstallWineArch = QtWidgets.QComboBox()
|
||||
useInstallWineArch.addItems(["wine", "wine64"])
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel("Wine 位数(只限本地需要打包集成的Wine):\n提示:32位的Wine不能使用64位容器"))
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "Wine 位数(只限本地需要打包集成的Wine):\n提示:32位的Wine不能使用64位容器")))
|
||||
#moreSettingLayout.addWidget(localWineVersion)
|
||||
moreSettingLayout.addWidget(useInstallWineArch)
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel("deb 包选项:"))
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "deb 包选项:")))
|
||||
moreSettingLayout.addWidget(rmBash)
|
||||
moreSettingLayout.addWidget(cleanBottonByUOS)
|
||||
moreSettingLayout.addWidget(chooseWineHelperValue)
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel("deb 的依赖(强制,如无特殊需求默认即可):"))
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "deb 的依赖(强制,如无特殊需求默认即可):")))
|
||||
moreSettingLayout.addWidget(debDepends)
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel("deb 的推荐依赖(非强制,一般默认即可):"))
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "deb 的推荐依赖(非强制,一般默认即可):")))
|
||||
moreSettingLayout.addWidget(debRecommend)
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的 MimeType:"))
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要显示的 .desktop 文件的 MimeType:")))
|
||||
moreSettingLayout.addWidget(e10_text)
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel("打包 deb 架构:"))
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "打包 deb 架构:")))
|
||||
moreSettingLayout.addWidget(debArch)
|
||||
moreSetting.setLayout(moreSettingLayout)
|
||||
widgetLayout.addWidget(moreSetting, 0, 3, 16, 1)
|
||||
@@ -1174,10 +1175,10 @@ wineVersion.currentTextChanged.connect(ChangeWine)
|
||||
chooseWineHelperValue.stateChanged.connect(ChangeWine)
|
||||
# 菜单栏
|
||||
menu = window.menuBar()
|
||||
programmenu = menu.addMenu("程序")
|
||||
help = menu.addMenu("帮助")
|
||||
exit = QtWidgets.QAction("退出程序")
|
||||
tip = QtWidgets.QAction("小提示")
|
||||
programmenu = menu.addMenu(QtCore.QCoreApplication.translate("U", "程序"))
|
||||
help = menu.addMenu(QtCore.QCoreApplication.translate("U", "帮助"))
|
||||
exit = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "退出程序"))
|
||||
tip = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "小提示"))
|
||||
exit.triggered.connect(window.close)
|
||||
tip.triggered.connect(helps)
|
||||
programmenu.addAction(exit)
|
||||
|
||||
Reference in New Issue
Block a user