mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-05-21 15:39:51 +08:00
修复简易打包器无法打开问题
This commit is contained in:
parent
640c9f77a0
commit
8a7010529d
QemuDownload.pydeepin-wine-easy-packager.pymainwindow.py
deb
opt/apps/deepin-wine-runner
usr
bin
share/applications
trans
@ -27,6 +27,11 @@ class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(693, 404)
|
||||
if not get_now_lang() == "zh_CN.UTF-8":
|
||||
transla = Trans("en_US", f"{programPath}/trans/deepin-wine-runner-qemu-download.json")
|
||||
else:
|
||||
transla = Trans("zh_CN")
|
||||
_translate = transla.transe
|
||||
self.centralWidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralWidget.setObjectName("centralWidget")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralWidget)
|
||||
@ -42,6 +47,13 @@ class Ui_MainWindow(object):
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout.setSpacing(6)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.verticalLayout_2.addWidget(QtWidgets.QLabel(_translate("U", """使用前须知:
|
||||
1、Qemu 跨架构效率较低,如果有条件建议优先使用 box86、exagear 等效率较高的转换层;
|
||||
2、使用此方案需要使用到 Root 权限(需开启管理员模式)并安装 qemu-user-static;
|
||||
3、chroot 时候可能会出现问题导致程序闪退或异常,出现该问题重启电脑即可;
|
||||
4、在此环境使用 Wine 时,只能读取到您用户目录或本程序文件夹下的文件,其它路径无法读取;
|
||||
5、移除容器时请保证在这次打开电脑时没有调用过需要删除容器,如果有调用过建议重启电脑后再移除;
|
||||
6、暂时属于测试功能;""")))
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
self.addButton = QtWidgets.QPushButton(self.centralWidget)
|
||||
@ -76,11 +88,7 @@ class Ui_MainWindow(object):
|
||||
MainWindow.setCentralWidget(self.centralWidget)
|
||||
# 菜单栏
|
||||
#_translate = QtCore.QCoreApplication.translate
|
||||
if not get_now_lang() == "zh_CN.UTF-8":
|
||||
transla = Trans("en_US", f"{programPath}/trans/deepin-wine-runner-qemu-download.json")
|
||||
else:
|
||||
transla = Trans("zh_CN")
|
||||
_translate = transla.transe
|
||||
|
||||
self.menu = MainWindow.menuBar()
|
||||
self.changeSources = self.menu.addMenu(_translate("MainWindow", "更换源"))
|
||||
self.gitlinkAction = QtWidgets.QAction(_translate("MainWindow", "Gitlink 源(推荐)"))
|
||||
|
@ -469,7 +469,7 @@ class RunThread(QtCore.QThread):
|
||||
if len(k[1]) < miniLenge:
|
||||
rightLnk = k
|
||||
miniLenge = len(rightLnk[1])
|
||||
debPackageName = "spark-" + xpinyin.Pinyin().get_pinyin(os.path.splitext(os.path.basename(rightLnk[0]))[0].replace(" ", "")).lower().replace("--", "-").replace(" ", "").replace("_", "-")
|
||||
debPackageName = "com." + xpinyin.Pinyin().get_pinyin(os.path.splitext(os.path.basename(rightLnk[0]))[0].replace(" ", "")).lower().replace("--", "-").replace(" ", "").replace("_", "-").replace("-", ".") + ".spark"
|
||||
programIconPath = f"/opt/apps/{debPackageName}/entries/icons/hicolor/scalable/apps/{debPackageName}.png"
|
||||
bottlePackagePath = f"{debBuildPath}/opt/apps/{debPackageName}/files/files.7z"
|
||||
self.RunCommand(f"mkdir -pv '{debBuildPath}/opt/apps/{debPackageName}/entries/icons/hicolor/scalable/apps/'")
|
||||
|
@ -1060,7 +1060,7 @@ class UpdateWindow():
|
||||
updateWidgetLayout = QtWidgets.QGridLayout()
|
||||
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:未知\n更新内容:")
|
||||
updateText = QtWidgets.QTextBrowser()
|
||||
ok = QtWidgets.QPushButton(transla.transe("U", "更新(更新过程中会关闭所有Python应用,包括这个应用)"))
|
||||
ok = QtWidgets.QPushButton(transla.transe("U", "更新(更新后需要自行手动重启程序)"))
|
||||
ok.clicked.connect(UpdateWindow.Update)
|
||||
cancel = QtWidgets.QPushButton("取消")
|
||||
cancel.clicked.connect(UpdateWindow.update.close)
|
||||
@ -1107,8 +1107,8 @@ class UpdateWindow():
|
||||
write_txt("/tmp/spark-deepin-wine-runner/update.sh", f"""#!/bin/bash
|
||||
echo 删除多余的安装包
|
||||
rm -rfv /tmp/spark-deepin-wine-runner/update/*
|
||||
echo 关闭“Wine 运行器”以及其它“Python 应用”
|
||||
killall python3
|
||||
#echo 关闭“Wine 运行器”以及其它“Python 应用”
|
||||
#killall python3
|
||||
echo 下载安装包
|
||||
wget -P /tmp/spark-deepin-wine-runner/update {UpdateWindow.data["Url"][0]}
|
||||
echo 安装安装包
|
||||
@ -2278,6 +2278,7 @@ updateThingsString = transla.transe("U", '''※1、支持使用 Qemu + Chroot
|
||||
8、优化程序文案;
|
||||
9、新增日志翻译功能;
|
||||
10、程序进一步完善英语翻译(机翻);
|
||||
11、优化程序更新策略;
|
||||
''')
|
||||
for i in information["Thank"]:
|
||||
thankText += f"{i}\n"
|
||||
@ -2660,7 +2661,7 @@ w4.triggered.connect(DeleteWineBotton)
|
||||
cleanBottonUOS.triggered.connect(CleanWineBottonByUOS)
|
||||
w5.triggered.connect(BuildExeDeb)
|
||||
w6.triggered.connect(UOSPackageScript)
|
||||
easyPackager.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-easy-packager.py' '{e2.currentText()}'"]))
|
||||
easyPackager.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-easy-packager.py' '{e2.currentText()}'"]).start())
|
||||
wineKeyboardLnk.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/key/key-add-gui.py'"]).start())
|
||||
getDllOnInternet.triggered.connect(GetDllFromInternet)
|
||||
w7.triggered.connect(GetDllFromWindowsISO.ShowWindow)
|
||||
|
@ -3,6 +3,7 @@
|
||||
"Thank": [
|
||||
"感谢 @鹤舞白沙 对程序文案进行优化以及编写《Wine运行器和Wine打包器傻瓜式使用教程(小白专用) 》",
|
||||
"感谢 @璀璨星空 提供的彩蛋图标",
|
||||
"感谢 @Bail 反馈的更新策略问题",
|
||||
"感谢 @白水 反馈的安装 exagear 后无法识别和调用 box86 的问题",
|
||||
"感谢 @汐光. 提供的建议",
|
||||
"感谢 @鹤舞白沙 专门为小白用户编写的使用 Wine 运行器非基于生态适配脚本的程序打包教程",
|
||||
|
Binary file not shown.
File diff suppressed because one or more lines are too long
1
deb/usr/bin/deepin-wine-packager-easy-builder
Symbolic link
1
deb/usr/bin/deepin-wine-packager-easy-builder
Symbolic link
@ -0,0 +1 @@
|
||||
/opt/apps/deepin-wine-runner/deepin-wine-easy-packager.py
|
12
deb/usr/share/applications/spark-deepin-wine-packager-easy-builder.desktop
Executable file
12
deb/usr/share/applications/spark-deepin-wine-packager-easy-builder.desktop
Executable file
@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
X-Categories=System;Wine;
|
||||
Exec=/usr/bin/deepin-wine-packager-easy-builder %F
|
||||
Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
|
||||
Name=Wine Package Builder
|
||||
Name[zh]=Wine 简易打包器
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
NoDisplay=true
|
||||
Keywords=exe;scr;
|
||||
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;
|
@ -348,7 +348,8 @@ def UnUseUpperCharPath(path: str):
|
||||
def ReadMe():
|
||||
QtWidgets.QMessageBox.information(window, "提示", """1、目前只支持打包 X86 架构的 deb 包,暂未支持 arm;
|
||||
2、需要区分要打包的程序是绿色软件还是单文件安装包,两个对应的打包方式不相同;
|
||||
3、打包详情:
|
||||
3、打包绿色软件时为尽可能减小程序体积,请将绿化后的程序(或程序文件夹)单独拷贝到干净的目录后再浏览选择主程序打包;
|
||||
4、打包详情:
|
||||
①调用 Wine:Deepin Wine6 Stable
|
||||
②调用 Helper:Spark Wine Helper
|
||||
③有卸载自动移除容器脚本""")
|
||||
@ -469,7 +470,7 @@ class RunThread(QtCore.QThread):
|
||||
if len(k[1]) < miniLenge:
|
||||
rightLnk = k
|
||||
miniLenge = len(rightLnk[1])
|
||||
debPackageName = "spark-" + xpinyin.Pinyin().get_pinyin(os.path.splitext(os.path.basename(rightLnk[0]))[0].replace(" ", "")).lower().replace("--", "-").replace(" ", "").replace("_", "-")
|
||||
debPackageName = "com." + xpinyin.Pinyin().get_pinyin(os.path.splitext(os.path.basename(rightLnk[0]))[0].replace(" ", "")).lower().replace("--", "-").replace(" ", "").replace("_", "-").replace("-", ".") + ".spark"
|
||||
programIconPath = f"/opt/apps/{debPackageName}/entries/icons/hicolor/scalable/apps/{debPackageName}.png"
|
||||
bottlePackagePath = f"{debBuildPath}/opt/apps/{debPackageName}/files/files.7z"
|
||||
self.RunCommand(f"mkdir -pv '{debBuildPath}/opt/apps/{debPackageName}/entries/icons/hicolor/scalable/apps/'")
|
||||
|
@ -2661,7 +2661,7 @@ w4.triggered.connect(DeleteWineBotton)
|
||||
cleanBottonUOS.triggered.connect(CleanWineBottonByUOS)
|
||||
w5.triggered.connect(BuildExeDeb)
|
||||
w6.triggered.connect(UOSPackageScript)
|
||||
easyPackager.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-easy-packager.py' '{e2.currentText()}'"]))
|
||||
easyPackager.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-easy-packager.py' '{e2.currentText()}'"]).start())
|
||||
wineKeyboardLnk.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/key/key-add-gui.py'"]).start())
|
||||
getDllOnInternet.triggered.connect(GetDllFromInternet)
|
||||
w7.triggered.connect(GetDllFromWindowsISO.ShowWindow)
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
{"更换源": "Change the source", "Gitlink 源(推荐)": "Gitlink source (recommended)", "备用源(只支持 IPv6 用户)": "The alternate source (only support IPv6 users)", "本地测试源(127.0.0.1)": "Local test source (127.0.0.1)"}
|
||||
{"更换源": "Change the source", "Gitlink 源(推荐)": "Gitlink source (recommended)", "备用源(只支持 IPv6 用户)": "The alternate source (only support IPv6 users)", "本地测试源(127.0.0.1)": "Local test source (127.0.0.1)", "使用前须知:\n1、Qemu 跨架构效率较低,如果有条件建议优先使用 box86、exagear 等效率较高的转换层;\n2、使用此方案需要使用到 Root 权限(需开启管理员模式)并安装 qemu-user-static;\n3、chroot 时候可能会出现问题导致程序闪退或异常,出现该问题重启电脑即可;\n4、在此环境使用 Wine 时,只能读取到您用户目录或本程序文件夹下的文件,其它路径无法读取;\n5、移除容器时请保证在这次打开电脑时没有调用过需要删除容器,如果有调用过建议重启电脑后再移除;\n6、暂时属于测试功能;": "Instructions before use:\n1, Qemu across architecture efficiency is low, if there is condition is preferred to use box86, exagear high efficiency transformation layer;\n2, use this program to need to use the Root administrator mode (open) and install qemu - user - static;\n3, when chroot flash back problems may cause the program or abnormal, the problems to restart the computer;\n4, in this environment using Wine, can only read your user directory or folder of the program files, other path cannot read;\n5, remove the container please make sure that no calls while in the open a computer need to delete the container, if there is a call after advice to restart the computer to remove;\n6, a temporary belong to test functionality;"}
|
Loading…
x
Reference in New Issue
Block a user