diff --git a/Makefile b/Makefile index ac8ef6e..d8521a5 100755 --- a/Makefile +++ b/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) diff --git a/VM/VirtualMachine b/VM/VirtualMachine index 743a448..31d2e72 100755 --- a/VM/VirtualMachine +++ b/VM/VirtualMachine @@ -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'") diff --git a/deb-termux/DEBIAN/control b/deb-termux/DEBIAN/control index 3b0ca37..2193823 100755 --- a/deb-termux/DEBIAN/control +++ b/deb-termux/DEBIAN/control @@ -26,7 +26,8 @@ Depends: python3, git, xfwm4, tigervnc, - proot + proot, + bash Recommends: winbind, wimtools | wimlib, python3-pyquery, diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control index ee9997b..074c6bf 100755 --- a/deb/DEBIAN/control +++ b/deb/DEBIAN/control @@ -27,7 +27,8 @@ Depends: python3, zenity, tree, dpkg, - fakeroot + fakeroot, + bash Recommends: winbind, wimtools | wimlib, python3-pyquery, diff --git a/mainwindow-termux-loader.sh b/mainwindow-termux-loader.sh new file mode 100755 index 0000000..27155b5 --- /dev/null +++ b/mainwindow-termux-loader.sh @@ -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