mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-13 01:58:27 +08:00
Wine运行库
This commit is contained in:
parent
adf35abfc7
commit
2dab9ef7ce
17
WineLib/install.sh
Executable file
17
WineLib/install.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
CURRENT_DIR=$(cd $(dirname $0); pwd)
|
||||||
|
cd $CURRENT_DIR
|
||||||
|
if [[ -f $CURRENT_DIR/usr/lib/ld-linux-x86-64.so.2 ]]; then
|
||||||
|
echo 运行库已安装,按回车键退出
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
aria2c -x 16 -s 16 -d /tmp https://jihulab.com/gfdgd-xi/bwrapruntime/-/raw/main/library.tar.xz
|
||||||
|
if [[ $? != 0 ]]; then
|
||||||
|
echo 安装包下载失败!按回车键退出
|
||||||
|
read
|
||||||
|
fi
|
||||||
|
sudo chmod 777 -Rv .
|
||||||
|
tar -xvf /tmp/library.tar.xz
|
||||||
|
rm -vf /tmp/library.tar.xz
|
||||||
|
echo 安装完成!按回车键退出
|
||||||
|
read
|
11
WineLib/remove.sh
Executable file
11
WineLib/remove.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
CURRENT_DIR=$(cd $(dirname $0); pwd)
|
||||||
|
cd $CURRENT_DIR
|
||||||
|
if [[ ! -f $CURRENT_DIR/usr/lib/ld-linux-x86-64.so.2 ]]; then
|
||||||
|
echo 运行库未安装,按回车键退出
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
sudo rm -rfv lib
|
||||||
|
sudo rm -rfv lib64
|
||||||
|
sudo rm -rfv usr
|
||||||
|
sudo chmod 777 -Rv .
|
13
WineLib/run.sh
Executable file
13
WineLib/run.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
CURRENT_DIR=$(cd $(dirname $0); pwd)
|
||||||
|
if [[ ! -d /lib64 ]]; then
|
||||||
|
pkexec mkdir /lib64 -p
|
||||||
|
fi
|
||||||
|
bwrap --dev-bind / / \
|
||||||
|
--ro-bind $CURRENT_DIR/lib /lib \
|
||||||
|
--ro-bind $CURRENT_DIR/lib64 /lib \
|
||||||
|
--ro-bind $CURRENT_DIR/usr /usr \
|
||||||
|
--ro-bind /usr/share /usr/share \
|
||||||
|
--ro-bind /usr/bin /usr/bin \
|
||||||
|
--ro-bind /usr/sbin /usr/sbin \
|
||||||
|
-- "$@"
|
@ -2351,6 +2351,13 @@ def CheckWine():
|
|||||||
"/opt/exagear/bin/ubt_x32a64_al -- "
|
"/opt/exagear/bin/ubt_x32a64_al -- "
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
if os.path.exists(f"{programPath}/WineLib/usr/lib/ld-linux-x86-64.so.2"):
|
||||||
|
nameValue.append(
|
||||||
|
[
|
||||||
|
"使用运行器的运行库运行",
|
||||||
|
f"bash '{programPath}/WineLib/run.sh' "
|
||||||
|
]
|
||||||
|
)
|
||||||
for g in qemuBottleList:
|
for g in qemuBottleList:
|
||||||
nameValue.append([
|
nameValue.append([
|
||||||
f"使用qemu-{g[0]}-static 调用容器{g[1]}运行 ",
|
f"使用qemu-{g[0]}-static 调用容器{g[1]}运行 ",
|
||||||
@ -2991,11 +2998,31 @@ 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)"))
|
||||||
|
howtouseQemuUser = QtWidgets.QAction(transla.transe("U", "Qemu User 使用教程(配合运行库实现在非 X86 架构运行 X86 Wine)"))
|
||||||
|
howtouseQemuUser.triggered.connect(lambda: webbrowser.open_new_tab("https://www.bilibili.com/read/cv23185651"))
|
||||||
|
runnerlibinfo = QtWidgets.QAction("只在运行器使用的运行库(不与其他运行库以及兼容层冲突)")
|
||||||
|
installRunnerLib = QtWidgets.QAction("安装运行库")
|
||||||
|
statusRunnerLib = QtWidgets.QAction("当前状态:未安装")
|
||||||
|
removeRunnerLib = QtWidgets.QAction("移除运行库")
|
||||||
|
runnerlibinfo.setDisabled(True)
|
||||||
|
statusRunnerLib.setDisabled(True)
|
||||||
|
removeRunnerLib.setDisabled(True)
|
||||||
|
installLib.addAction(howtouseQemuUser)
|
||||||
|
installLib.addSeparator()
|
||||||
|
installLib.addAction(runnerlibinfo)
|
||||||
|
installLib.addAction(statusRunnerLib)
|
||||||
|
installLib.addAction(installRunnerLib)
|
||||||
|
installLib.addAction(removeRunnerLib)
|
||||||
|
if os.path.exists(f"{programPath}/WineLib/usr/lib/ld-linux-x86-64.so.2"):
|
||||||
|
installRunnerLib.setDisabled(True)
|
||||||
|
removeRunnerLib.setEnabled(True)
|
||||||
|
statusRunnerLib.setText("当前状态:已安装")
|
||||||
if os.path.exists(f"{programPath}/InstallRuntime"):
|
if os.path.exists(f"{programPath}/InstallRuntime"):
|
||||||
installLib = menu.addMenu(transla.transe("U", "应用运行库(&R)"))
|
installLib.addSeparator()
|
||||||
howtouseQemuUser = QtWidgets.QAction(transla.transe("U", "Qemu User 使用教程(配合运行库实现在非 X86 架构运行 X86 Wine)"))
|
systemalllibinfo = QtWidgets.QAction("全局运行库(与其他运行库以及部分兼容层冲突)")
|
||||||
howtouseQemuUser.triggered.connect(lambda: webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/deep-wine-runner/wikis/%E4%BD%BF%E7%94%A8%E5%B8%AE%E5%8A%A9/%E9%9D%9EX86%E6%9E%B6%E6%9E%84PC/%E4%BD%BF%E7%94%A8Qemu%20User%E8%BF%90%E8%A1%8CWine%EF%BC%88%E6%94%AF%E6%8C%81%E5%85%A8%E6%9E%B6%E6%9E%84%EF%BC%89"))
|
systemalllibinfo.setDisabled(True)
|
||||||
installLib.addAction(howtouseQemuUser)
|
installLib.addAction(systemalllibinfo)
|
||||||
installQemuMenu = installLib.addMenu(transla.transe("U", "安装 Qemu User"))
|
installQemuMenu = installLib.addMenu(transla.transe("U", "安装 Qemu User"))
|
||||||
installQemu = QtWidgets.QAction(transla.transe("U", "安装 Qemu User"))
|
installQemu = QtWidgets.QAction(transla.transe("U", "安装 Qemu User"))
|
||||||
removeQemu = QtWidgets.QAction(transla.transe("U", "卸载 Qemu User"))
|
removeQemu = QtWidgets.QAction(transla.transe("U", "卸载 Qemu User"))
|
||||||
|
Loading…
Reference in New Issue
Block a user