mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-14 19:12:04 +08:00
优化在termux的使用体验
This commit is contained in:
5
Makefile
5
Makefile
@@ -146,7 +146,7 @@ copy-files:
|
||||
cp -rv RemoveQemuUser.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallBox86.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallRuntime deb/opt/apps/deepin-wine-runner
|
||||
if [[ ! -d novnc/utils/websockify ]]; then ; git submodule update --init --recursive ; fi
|
||||
if [[ ! -d novnc/utils/websockify ]]; then git submodule update --init --recursive ; fi
|
||||
cp -rv novnc deb/opt/apps/deepin-wine-runner
|
||||
mkdir -pv deb/opt/apps/deepin-wine-runner/entries/
|
||||
cp -rv deb/usr/share/applications deb/opt/apps/deepin-wine-runner/entries/applications
|
||||
@@ -212,6 +212,9 @@ package-termux-deb:
|
||||
sudo cp deb-termux/DEBIAN /tmp/spark-deepin-wine-runner-builder/DEBIAN -rv
|
||||
sudo cp -rv deb-termux/usr/share/applications /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/entries/applications
|
||||
sudo cp -rv deb-termux/usr/share/applications /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/share/applications
|
||||
# 加入 termux loader
|
||||
sudo cp -rv mainwindow-termux-loader.sh /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-runner
|
||||
sudo cp -rv mainwindow.py /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/mainwindow.py
|
||||
sudo bash builddeb/ChangeDebVersion.sh
|
||||
dpkg-deb -Z xz -z 9 -b /tmp/spark-deepin-wine-runner-builder spark-deepin-wine-runner-termux.deb
|
||||
make remove-copy-files -j$(nproc)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
arch = subprocess.getoutput("dpkg --print-architecture").replace(" ", "").replace("\n", "")
|
||||
if os.path.exists(f"{programPath}/VirtualMachine-{arch}"):
|
||||
@@ -13,6 +15,10 @@ if not os.path.exists(f"{programPath}/VirtualMachine-amd64"):
|
||||
if os.path.exists(f"{programPath}/VirtualMachine-{arch}"):
|
||||
os.system(f"{programPath}/VirtualMachine-{arch}")
|
||||
exit()
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
QtWidgets.QMessageBox.information(None, "提示", "虚拟机安装器暂不支持此系统")
|
||||
exit(1)
|
||||
# 后面已废弃
|
||||
# 只能使用 Qemu User 运行程序
|
||||
if os.path.exists("/usr/lib/x86_64-linux-gnu/") and not os.system("which qemu-x86_64"):
|
||||
os.system(f"qemu-x86_64 '{programPath}/VirtualMachine-x86_64'")
|
||||
|
||||
@@ -26,7 +26,8 @@ Depends: python3,
|
||||
git,
|
||||
xfwm4,
|
||||
tigervnc,
|
||||
proot
|
||||
proot,
|
||||
bash
|
||||
Recommends: winbind,
|
||||
wimtools | wimlib,
|
||||
python3-pyquery,
|
||||
|
||||
@@ -27,7 +27,8 @@ Depends: python3,
|
||||
zenity,
|
||||
tree,
|
||||
dpkg,
|
||||
fakeroot
|
||||
fakeroot,
|
||||
bash
|
||||
Recommends: winbind,
|
||||
wimtools | wimlib,
|
||||
python3-pyquery,
|
||||
|
||||
14
mainwindow-termux-loader.sh
Executable file
14
mainwindow-termux-loader.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/data/data/com.termux/files/usr/bin/bash
|
||||
CURRENT_DIR=$(cd $(dirname $0); pwd)
|
||||
if [[ $DISPLAY == "" ]] && [[ $WAYLAND_DISPLAY == "" ]]; then
|
||||
# 自动配置 NoVNC
|
||||
export DISPLAY=:5
|
||||
vncserver $DISPLAY &
|
||||
sleep 3
|
||||
xfwm4 &
|
||||
if [[ -f /data/data/com.termux/files/usr/bin/startxfce4 ]]; then
|
||||
startxfce4 &
|
||||
fi
|
||||
$CURRENT_DIR/novnc/utils/novnc_proxy --vnc localhost:5905 &
|
||||
fi
|
||||
python3 $CURRENT_DIR/mainwindow.py
|
||||
Reference in New Issue
Block a user