修复使用官方生态适配脚本打包器无法打开问题

This commit is contained in:
gfdgd xi 2023-03-19 13:28:29 +08:00
parent 0bcdc5a5ba
commit a572839928
36 changed files with 109 additions and 38 deletions

12
InstallQemuUser.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
# 判断是否有安装 Qemu User
which qemu-i386 > /dev/null
if [[ !$? ]]; then
echo 您已安装过 Qemu User按回车键后退出
read
exit 1
fi
sudo apt update
sudo apt install binfmt-support qemu-user qemu-user-static -y
echo 安装完成,按回车键后退出
read

0
InstallRuntime/amd64.sh Normal file → Executable file
View File

0
InstallRuntime/arm64.sh Normal file → Executable file
View File

0
InstallRuntime/armhf.sh Normal file → Executable file
View File

0
InstallRuntime/i386.sh Normal file → Executable file
View File

0
InstallRuntime/mips64el.sh Normal file → Executable file
View File

0
InstallRuntime/ppc64el.sh Normal file → Executable file
View File

0
InstallRuntime/remove/amd64.sh Normal file → Executable file
View File

0
InstallRuntime/remove/arm64.sh Normal file → Executable file
View File

0
InstallRuntime/remove/armhf.sh Normal file → Executable file
View File

0
InstallRuntime/remove/i386.sh Normal file → Executable file
View File

0
InstallRuntime/remove/mips64el.sh Normal file → Executable file
View File

0
InstallRuntime/remove/ppc64el.sh Normal file → Executable file
View File

0
InstallRuntime/remove/riscv64.sh Normal file → Executable file
View File

0
InstallRuntime/remove/s390x.sh Normal file → Executable file
View File

0
InstallRuntime/riscv64.sh Normal file → Executable file
View File

0
InstallRuntime/s390x.sh Normal file → Executable file
View File

View File

@ -12,6 +12,7 @@ package:
cp -rv VM-source/Windows7X86Auto.iso VM
cp -rv wine/ deb/opt/apps/deepin-wine-runner/
cp -rv Test/ deb/opt/apps/deepin-wine-runner/
cp -rv information.json package-script
zip -v -q -r package-script.zip package-script
cp -rv VM deb/opt/apps/deepin-wine-runner
cp -rv Download.py deb/opt/apps/deepin-wine-runner/

Binary file not shown.

View File

@ -34,6 +34,8 @@ mount -o bind /usr/share/fonts ./usr/share/fonts
if [ ! -d "home/$2" ]; then
# 新建用户,且密码为 123456以便读写
"$programPath/pardus-chroot" . bash /opt/apps/deepin-wine-runner/ChangePassword.sh "$2"
mkdir -p "home/$2"
chmod 777 -Rv "home/$2"
fi
# 挂载用户目录到 /root默认 $HOME 路径)
if [[ $2 == "root" ]]; then
@ -43,6 +45,7 @@ else
fi
# 挂载此内容以可以跨架构运行程序
mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
systemctl restart binfmt-support.service
# 判断是否有 Root 权限
cat etc/sudoers | grep "$2"
if [[ $? != 0 ]]; then
@ -51,4 +54,5 @@ fi
# 写入 DNS
cat /etc/resolv.conf > etc/resolv.conf
# 如果参数 3 存在
"$programPath/pardus-chroot" "--userspec=$2:$2" . env "HOME=/home/$2" ${@:3}
"$programPath/pardus-chroot" . #env "HOME=/home/$2" ${@:3}
chroot "--userspec=$2:$2" . env "HOME=/home/$2" ${@:3}

View File

@ -28,5 +28,6 @@ chmod 777 -R root tmp
xhost +
# 挂载此内容以可以跨架构运行程序
mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
systemctl restart binfmt-support.service
# 如果参数 3 存在
"$programPath/pardus-chroot" . ${@:3}

View File

@ -254,7 +254,7 @@ class DownloadThread(QtCore.QThread):
#progressbar.update(int(part / show))
filePart.write(chunk)
bytesRead += 1024
self.ChangeDialog.emit(self.dialog, bytesRead / allSize * 100, bytesRead / 1024 / 1024, allSize / 1024 / 1024)
self.ChangeDialog.emit(self.dialog, int(bytesRead / allSize * 100), int(bytesRead / 1024 / 1024), int(allSize / 1024 / 1024))
self.ChangeDialog.emit(self.dialog, 100, 100, 100)
# 写入配置文件
rfile = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "r")
@ -349,8 +349,8 @@ def on_addButton_clicked():
def on_delButton_clicked():
if os.path.exists("/tmp/deepin-wine-runner-qemu-lock"):
if QtWidgets.QMessageBox.question(window, "提示", "检测到您的电脑已经运行了 Qemu/Chroot 容器,建议您重启电脑后再删除该容器,否则容易造成数据损失!\n是否取消操作?") == QtWidgets.QMessageBox.Yes:
return
QtWidgets.QMessageBox.question(window, "提示", "检测到您的电脑已经运行了 Qemu/Chroot 容器,请重启后再移除")
return
if QtWidgets.QMessageBox.question(window, "提示", "你确定要删除吗?") == QtWidgets.QMessageBox.No:
return
if ui.localWineList.currentIndex().row() < 0:

View File

@ -1,3 +1,5 @@
#!/bin/bash
echo 开始安装 qemu-user-static
pkexec apt update
pkexec apt install qemu-user-static -y
# binfmt-support 是非常重要的
pkexec apt install qemu-user-static binfmt-support -y

View File

@ -300,10 +300,12 @@ class Runexebutton_threading(QtCore.QThread):
# 删除前后无用空格以防止出现问题
print(exePath)
exePath = exePath.strip()
l = exePath.index(" ")
exePath = f"{exePath[:l]}' {exePath[l:]} '"
print(l)
#print(i)
# 有空格再说
if " " in exePath:
l = exePath.index(" ")
exePath = f"{exePath[:l]}' {exePath[l:]} '"
print(l)
#print(i)
print(exePath)
if o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable":
wineUsingOption = ""
@ -767,8 +769,9 @@ def RunWineProgram(wineProgram, history = False, Disbled = True):
DisableButton(True)
if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable不推荐" and o1.currentText() != "基于 UOS exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable":
if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine:
DisableButton(False)
return
if QtWidgets.QMessageBox.question(widget, "提示", "检查到您未安装这个 wine是否继续使用这个 wine 运行?") == QtWidgets.QMessageBox.No:
DisableButton(False)
return
returnText.setText("")
runProgram = RunWineProgramThread(wineProgram, history, Disbled)
runProgram.signal.connect(QT.ShowWineReturn)
@ -2185,6 +2188,7 @@ try:
wine = {
"基于 UOS box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ",
"基于 UOS exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ",
"使用 Flatpak 安装的 Wine": "flatpak run org.winehq.Wine",
"deepin-wine6 stable": "deepin-wine6-stable",
"deepin-wine5 stable": "deepin-wine5-stable",
"spark-wine7-devel": "spark-wine7-devel",
@ -2196,7 +2200,7 @@ try:
"mono这不是 wine但可以实现初步调用运行 .net 应用)": "mono",
"基于 linglong 的 deepin-wine6-stable不推荐": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'"
}
untipsWine = ["基于 exagear 的 deepin-wine6-stable", "基于 UOS box86 的 deepin-wine6-stable", "基于 UOS exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable不推荐"]
untipsWine = ["使用 Flatpak 安装的 Wine", "基于 exagear 的 deepin-wine6-stable", "基于 UOS box86 的 deepin-wine6-stable", "基于 UOS exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable不推荐"]
canUseWine = []
if os.path.exists("/opt/deepin-box86/box86") and os.path.exists("/opt/deepin-wine6-stable/bin/wine"):
canUseWine.append("基于 UOS box86 的 deepin-wine6-stable")
@ -2207,6 +2211,8 @@ try:
for i in wine.keys():
if not os.system(f"which '{wine[i]}'"):
canUseWine.append(i)
if not os.system("which flatpak") and os.path.exists("/var/lib/flatpak/app/org.winehq.Wine"):
canUseWine.append("使用 Flatpak 安装的 Wine")
if os.path.exists("/persistent/linglong/layers/"): # 判断是否使用 linglong
for i in os.listdir("/persistent/linglong/layers/"):
@ -2423,18 +2429,14 @@ Qt 版本:{QtCore.qVersion()}
<pre>{tips}
</pre>
<hr>
<h1>关于 RacoonGX 项目组</h1>
<p>是由 @gfdgd xi 带头的团队gfdgd xi开发了UEngine运行器等好用的开源软件。</p>
<hr>
<h1>友谊链接</h1>
<pre>星火应用商店:<a href="https://spark-app.store/">https://spark-app.store/</a>
Deepin 官网:<a href="https://www.deepin.org">https://www.deepin.org</a>
Deepin 论坛:<a href="https://bbs.deepin.org">https://bbs.deepin.org</a>
论坛:<a href="https://bbs.racoongx.cn">https://bbs.racoongx.cn</a></pre>
<hr>
<h1>©2020~{time.strftime("%Y")} By gfdgd xi、为什么您不喜欢熊出没和阿布呢RacoonGX 团队作品</h1>'''
<h1>©2020~{time.strftime("%Y")} By gfdgd xi、为什么您不喜欢熊出没和阿布呢</h1>'''
title = "Wine 运行器 {}".format(version)
#<h1>©2020~{time.strftime("%Y")} <a href="https://gitee.com/gfdgd-xi">RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢</h1>'''
#<h1>©2020~{time.strftime("%Y")} <a href="https://gitee.com/gfdgd-xi">By gfdgd xi、为什么您不喜欢熊出没和阿布呢</h1>'''
updateThings = "{} 更新内容:\n{}\n更新时间{}".format(version, updateThingsString, updateTime, time.strftime("%Y"))
try:
threading.Thread(target=requests.get, args=[parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9vcGVuL0luc3RhbGwucGhw").decode("utf-8")) + "?Version=" + version]).start()
@ -2598,7 +2600,7 @@ mainLayout.addWidget(returnText, 0, 1, 2, 1)
# 版权
copy = QtWidgets.QLabel(f"""\n程序版本{version}<b>提示Wine 无法运行保证可以运行所有的 Windows 程序,如果想要运行更多可执行程序,可以考虑虚拟机和双系统</b><br>
©2020~{time.strftime("%Y")} gfdgd xi、为什么您不喜欢熊出没和阿布呢RacoonGX 团队作品""")
©2020~{time.strftime("%Y")} gfdgd xi、为什么您不喜欢熊出没和阿布呢""")
mainLayout.addWidget(copy, 2, 0, 1, 1)
# 程序运行
@ -2921,7 +2923,6 @@ fenUpload = QtWidgets.QAction(transla.transe("U", "程序评分"))
h7 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "关于这个程序"))
h8 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "关于 Qt"))
gfdgdxiio = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "作者个人站"))
forumWebsize = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "程序论坛"))
gitee = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Gitee"))
github = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Github"))
gitlink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Gitlink"))
@ -2934,7 +2935,6 @@ h1.addAction(gitlink)
h1.addAction(gitlab)
h1.addAction(jihu)
help.addSeparator()
help.addAction(forumWebsize)
help.addAction(wineRunnerHelp)
help.addAction(runStatusWebSize)
help.addSeparator()
@ -2943,11 +2943,6 @@ help.addAction(h3)
help.addAction(h4)
help.addSeparator()
zanShang = menu.addMenu("赞赏我们")
zanShangAction = QtWidgets.QAction("赞赏我们")
zanShang.addAction(zanShangAction)
zanShangAction.triggered.connect(lambda: webbrowser.open_new_tab("http://dt.racoongx.cn/"))
wikiHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "程序 Wiki"))
help.addAction(wikiHelp)
videoHelp = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "视频教程"))
@ -2973,7 +2968,6 @@ gitlink.triggered.connect(lambda: webbrowser.open_new_tab("https://gitlink.org.c
gitlab.triggered.connect(lambda: webbrowser.open_new_tab("https://gitlab.com/gfdgd-xi/deep-wine-runner"))
jihu.triggered.connect(lambda: webbrowser.open_new_tab("https://jihulab.com//gfdgd-xi/deep-wine-runner"))
runStatusWebSize.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io/wine-runner-info"))
forumWebsize.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/"))
h2.triggered.connect(helps)
h3.triggered.connect(UpdateThings)
wineRunnerHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://bbs.deepin.org/post/246837"))

View File

@ -1,6 +1,7 @@
{
"Version": "3.1.0",
"Thank": [
"感谢 RacoonGX 的付出与贡献",
"感谢 @Amber 编写的《使用wine运行器打包无安装包的软件》https://bbs.deepin.org/post/247720",
"感谢 @豪 提供程序图标",
"感谢 @鹤舞白沙 对程序文案进行优化以及编写《Wine运行器和Wine打包器傻瓜式使用教程小白专用https://bbs.deepin.org/post/246837",

View File

@ -21,12 +21,13 @@ mount -t devpts devpts "$DESTDIR/dev/pts"
mount -t sysfs sysfs "$DESTDIR/sys"
mount -t proc proc "$DESTDIR/proc"
mount -t tmpfs tmpfs "$DESTDIR/dev/shm"
mount --bind /tmp "$DESTDIR/tmp"
if [[ -d /sys/firmware/efi/ ]] ; then
mount -t efivarfs efivarfs "$DESTDIR/sys/firmware/efi/efivars"
fi
#cat /etc/resolv.conf > $DESTDIR/etc/resolv.conf
SHELL=/bin/bash unshare --fork --pid chroot "$DESTDIR" "$@"
exit
#SHELL=/bin/bash unshare --fork --pid chroot "$DESTDIR" "$@"
#exit
# 下面的因为有问题,不使用
#if [[ -d /sys/firmware/efi/ ]] ; then
# while umount "$DESTDIR/sys/firmware/efi/efivars" 2>/dev/null ; do : ;done

View File

@ -6,7 +6,7 @@ import traceback
class Trans():
isTrans = False
unCloudTrans = True
unCloudTrans = False
word = {}
fileName = ""
@ -50,4 +50,4 @@ class Trans():
except:
traceback.print_exc()
print(f"{text}=>{transText}")
return transText
return transText

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,3 +1,58 @@
{
"Version": "3.0.0"
"Version": "3.1.0",
"Thank": [
"感谢 RacoonGX 的付出与贡献",
"感谢 @Amber 编写的《使用wine运行器打包无安装包的软件》https://bbs.deepin.org/post/247720",
"感谢 @豪 提供程序图标",
"感谢 @鹤舞白沙 对程序文案进行优化以及编写《Wine运行器和Wine打包器傻瓜式使用教程小白专用https://bbs.deepin.org/post/246837",
"感谢 @璀璨星空 提供的彩蛋图标",
"感谢 @Bail 反馈的更新策略问题",
"感谢 @白水 反馈的安装 exagear 后无法识别和调用 box86 的问题",
"感谢 @汐光. 提供的翻译接口",
"感谢 @鹤舞白沙 专门为小白用户编写的使用 Wine 运行器非基于生态适配脚本的程序打包教程",
"感谢 @牦牛儿苗 进行了龙芯 3a5000 平台的测试与移植",
"感谢 @鹤舞白沙 优化了程序文案",
"感谢 @豪 的程序测试和制作的论坛 https://gfdgdxi.flarum.cloud/",
"感谢 @185******67 反馈的 2.4.0 无法打开 Visual Basic 组件安装工具的问题",
"感谢 @shenmo 提供的 在打包器的 postrm 脚本添加 kill.sh、追加参数改为 --uri xxxxxxx、独立生成容器 7z 文件的功能",
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
"感谢 @zhangs https://bbs.deepin.org/post/227948",
"感谢 @gtjmaster https://bbs.deepin.org/post/225509",
"感谢 @统信UCARE服务 https://mp.weixin.qq.com/s/iOdfNv6phc8F4inackFFTw",
"感谢 @星火应用商店 提供部分安装包的源以及本程序的下载地址",
"感谢 @delsin 和 @神末shenmo 在 deepin 论坛提供打包器打包的 deb 包自动删除容器的建议",
"感谢 @shenmo 反馈的 2.1.0 打包器问题和 2.1.0-1 终端调用问题",
"感谢 @GershonWang 在 https://github.com/gfdgd-xi/deep-wine-runner/issues/1 提供窗口居中的建议",
"感谢 @134******28 和 @sgb76 提供的新程序 GUI 布局和实现代码",
"感谢 @sgb76 为 Wine 打包器(非生态适配脚本)打包的 i386 deb 提供建议",
"感谢 @PossibleVing 提供的新版应用图标",
"感谢 @zhengjl 反馈的 1.7.0 中 .net framrwork 3.5 非离线版安装包的问题以及 1.8.0 重复路径一直自动重复增加的问题",
"感谢 @国川 @刘岐 提供的非 i386、amd64 运行 wine 使用 i386/amd64 可执行文件的教程和脚本",
"感谢 @王俊文 @189******09 @tfhyl 提供在非 X86 平台的国产 PC 进行测试",
"感谢 @cuisirwork 提供的提供视频教程的建议",
"感谢 @办公助手 提供的非 X86 平台 Wine 运行自定义 exe 应用教程和 deb 包",
"感谢 @季星火 反馈的无法使用该程序删除生成的 .desktop 的问题",
"感谢 @ZYH 提供的敏感词列表",
"感谢 @五行缺钱 反馈的 2.0.0 在 Deepin 23 缺失依赖 toilet 的问题",
"感谢 @云的眼泪 @zhengjl 反馈的 2.0.0 发布忘记把安装包传蓝奏云的问题",
"感谢 @虚幻的早晨 提出的添加 DXVK、VKD3D 的功能VKD3D 暂未实现)",
"感谢 @以勒 修改 Dll 提取工具提示文本的建议",
"感谢 @历山居士 反馈的获取自动配置容器脚本工具无法正常加载数据的问题",
"感谢 @Nick @奋斗ing 反馈的 2.1.0-2 的快捷方式故障",
"感谢 @俊生鹏程 反馈的 2.1.0-2 及以前版本在鲲鹏运行 wine 错误的问题并积极测试,以及组件安装工具在 arm 架构的异常",
"感谢 @云的眼泪 反馈的 2.1.0-2 更新死循环的问题可见https://bbs.deepin.org/post/243241以及感谢 @神末shenmo @忘记、过去 和 @历山居士 的讨论",
"感谢 @186******75 反馈的 2.2.0 基于生态适配脚本打包器对话框异常的问题",
"感谢微信用户 @华为 @办公助手 @白水 @北冥没有鱼 @俊生鹏程 @^♀莫離♪^ @姚洪安 @гυи @杨飞 在 arm飞腾/鲲鹏)架构上提供提供测试与帮助",
"感谢 @办公助手 提供的 2.4.0 打包器支持生成的 arm 架构 deb 包同时支持 UOS box86+exagear 的建议",
"",
"感谢统信在 Wine 生态适配活动中提供的打包脚本",
"也感谢 Deepin Wine 团体制作的 Deepin Wine 和对应的 Deepin Wine Tools对本程序有很大的帮助",
"也感谢 DXVK 的开发者开发了 DXVK 这个程序项目链接https://github.com/doitsujin/dxvk",
"也感谢 WineHQ 开发团队开发的 WineHQ项目网址https://dl.winehq.org/",
"也感谢来自 Vek 的灵感和 Vek 开发者的支持项目链接https://jihulab.com/vk",
"最后也感谢支持本程序的用户和上传相关软件运行情况数据的用户,有你们的支持和使用,使这个程序变得更好",
"",
"可以从上面的各种解决方案更好的学习 Wine 生态适配,也可以看 deepin 论坛板块 https://bbs.deepin.org/module/detail/116 进行学习,最后也向各位有进行 Wine 生态适配的大佬进行由衷的感谢!",
"如果上面有遗漏,请向我反馈补充"
]
}

View File

@ -6,7 +6,7 @@ import traceback
class Trans():
isTrans = False
unCloudTrans = True
unCloudTrans = False
word = {}
fileName = ""
@ -50,4 +50,4 @@ class Trans():
except:
traceback.print_exc()
print(f"{text}=>{transText}")
return transText
return transText

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long