mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-13 01:58:27 +08:00
支持使用Exagear的容器
This commit is contained in:
parent
00245232bf
commit
d3790780dd
27
WineLib/run-more.sh
Executable file
27
WineLib/run-more.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
CURRENT_DIR=$1
|
||||||
|
if [[ ! -d "$CURRENT_DIR/usr" ]]; then
|
||||||
|
zenity --info --text=未安装运行库,无法运行 --no-wrap
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
if [[ ! -d "$CURRENT_DIR/usr/lib64" ]]; then
|
||||||
|
bwrap --dev-bind / / \
|
||||||
|
--ro-bind "$CURRENT_DIR/usr/lib" /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 \
|
||||||
|
-- "${@:2}"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
if [[ ! -f /lib64 ]] && [[ ! -d /lib64 ]] && [[ ! -L /lib64 ]]; then
|
||||||
|
pkexec mkdir /lib64 -p
|
||||||
|
fi
|
||||||
|
bwrap --dev-bind / / \
|
||||||
|
--ro-bind "$CURRENT_DIR/usr/lib" /lib \
|
||||||
|
--ro-bind "$CURRENT_DIR/usr/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 \
|
||||||
|
-- "${@:2}"
|
@ -4,12 +4,22 @@ if [[ ! -d "$CURRENT_DIR/usr" ]]; then
|
|||||||
zenity --info --text=未安装运行库,无法运行 --no-wrap
|
zenity --info --text=未安装运行库,无法运行 --no-wrap
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if [[ ! -f /lib64 ]] && [[ ! -d /lib64 ]] && [[ ! -L /lib64 ]]; then
|
if [[ ! -d "$CURRENT_DIR/usr/lib64" ]]; then
|
||||||
pkexec mkdir /lib64 -p
|
|
||||||
fi
|
|
||||||
bwrap --dev-bind / / \
|
bwrap --dev-bind / / \
|
||||||
--ro-bind "$CURRENT_DIR/lib" /lib \
|
--ro-bind "$CURRENT_DIR/usr/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 \
|
||||||
|
-- "$@"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
if [[ ! -f /lib64 ]] && [[ ! -d /lib64 ]] && [[ ! -L /lib64 ]]; then
|
||||||
|
pkexec mkdir /lib64 -p
|
||||||
|
fi
|
||||||
|
bwrap --dev-bind / / \
|
||||||
|
--ro-bind "$CURRENT_DIR/usr/lib" /lib \
|
||||||
|
--ro-bind "$CURRENT_DIR/usr/lib64" /lib \
|
||||||
--ro-bind "$CURRENT_DIR/usr" /usr \
|
--ro-bind "$CURRENT_DIR/usr" /usr \
|
||||||
--ro-bind /usr/share /usr/share \
|
--ro-bind /usr/share /usr/share \
|
||||||
--ro-bind /usr/bin /usr/bin \
|
--ro-bind /usr/bin /usr/bin \
|
||||||
|
@ -2347,14 +2347,14 @@ def CheckWine():
|
|||||||
if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"):
|
if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"):
|
||||||
nameValue.append(
|
nameValue.append(
|
||||||
[
|
[
|
||||||
"使用 64 位 exagear 运行",
|
"使用 ubt_x64a64_al 运行",
|
||||||
"/opt/exagear/bin/ubt_x64a64_al -- "
|
"/opt/exagear/bin/ubt_x64a64_al -- "
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
if os.path.exists("/opt/exagear/bin/ubt_x32a64_al"):
|
if os.path.exists("/opt/exagear/bin/ubt_x32a64_al"):
|
||||||
nameValue.append(
|
nameValue.append(
|
||||||
[
|
[
|
||||||
"使用 32 位 exagear 运行",
|
"使用 ubt_x32a64_al 运行",
|
||||||
"/opt/exagear/bin/ubt_x32a64_al -- "
|
"/opt/exagear/bin/ubt_x32a64_al -- "
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@ -2404,11 +2404,23 @@ def CheckWine():
|
|||||||
canUseWine.append(f"{get_home()}/.deepinwine/{i}/bin/wine64")
|
canUseWine.append(f"{get_home()}/.deepinwine/{i}/bin/wine64")
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
for i in canUseWine[:]:
|
try:
|
||||||
|
canUseWineOld = canUseWine[:]
|
||||||
|
for i in canUseWineOld:
|
||||||
if os.path.exists(f"{programPath}/WineLib/usr/lib/ld-linux-x86-64.so.2"):
|
if os.path.exists(f"{programPath}/WineLib/usr/lib/ld-linux-x86-64.so.2"):
|
||||||
wine[f"使用运行器的运行库运行 {i}"] = f"bash '{programPath}/WineLib/run.sh' {wine[i]}"
|
wine[f"使用运行器的运行库运行 {i}"] = f"bash '{programPath}/WineLib/run.sh' {wine[i]}"
|
||||||
canUseWine.append(f"使用运行器的运行库运行 {i}")
|
canUseWine.append(f"使用运行器的运行库运行 {i}")
|
||||||
untipsWine.append(f"使用运行器的运行库运行 {i}")
|
untipsWine.append(f"使用运行器的运行库运行 {i}")
|
||||||
|
if os.path.exists("/opt/exagear/images"):
|
||||||
|
for k in os.listdir("/opt/exagear/images"):
|
||||||
|
if not os.path.isdir(f"/opt/exagear/images/{k}"):
|
||||||
|
continue
|
||||||
|
for i in canUseWineOld:
|
||||||
|
wine[f"使用Exagear容器运行库运行 {i}"] = f"bash '{programPath}/WineLib/run-more.sh' '/opt/exagear/images/{k}' {wine[i]}"
|
||||||
|
canUseWine.append(f"使用Exagear容器运行库运行 {i}")
|
||||||
|
untipsWine.append(f"使用Exagear容器运行库运行 {i}")
|
||||||
|
except:
|
||||||
|
traceback.print_exc()
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
Loading…
Reference in New Issue
Block a user