diff --git a/VM/.qmake.stash b/VM/.qmake.stash deleted file mode 100755 index 6cab99c..0000000 --- a/VM/.qmake.stash +++ /dev/null @@ -1,24 +0,0 @@ -QMAKE_CXX.QT_COMPILER_STDCXX = 201402L -QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 8 -QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3 -QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 -QMAKE_CXX.COMPILER_MACROS = \ - QT_COMPILER_STDCXX \ - QMAKE_GCC_MAJOR_VERSION \ - QMAKE_GCC_MINOR_VERSION \ - QMAKE_GCC_PATCH_VERSION -QMAKE_CXX.INCDIRS = \ - /usr/include/c++/8 \ - /usr/include/x86_64-linux-gnu/c++/8 \ - /usr/include/c++/8/backward \ - /usr/lib/gcc/x86_64-linux-gnu/8/include \ - /usr/local/include \ - /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed \ - /usr/include/x86_64-linux-gnu \ - /usr/include -QMAKE_CXX.LIBDIRS = \ - /usr/lib/gcc/x86_64-linux-gnu/8 \ - /usr/lib/x86_64-linux-gnu \ - /usr/lib \ - /lib/x86_64-linux-gnu \ - /lib diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control index c74a165..6a87474 100755 --- a/deb/DEBIAN/control +++ b/deb/DEBIAN/control @@ -1,5 +1,5 @@ Package: spark-deepin-wine-runner -Version: 3.2.0-2 +Version: 3.2.1 Maintainer: gfdgd xi <3025613752@qq.com> Homepage: https://gitee.com/gfdgd-xi-org/deep-wine-runner Architecture: all diff --git a/deb/DEBIAN/postinst b/deb/DEBIAN/postinst index 20c6b0b..5c2543e 100755 --- a/deb/DEBIAN/postinst +++ b/deb/DEBIAN/postinst @@ -8,6 +8,8 @@ # 基于 sh ################################################################################################################# # 非强制性的必应组件,所以成功不成功都行 +# 程序版本号 +version=3.2.0 echo 安装组件 python3 -m pip install --upgrade pynput --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true python3 -m pip install --upgrade xpinyin --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true @@ -30,11 +32,11 @@ echo 移除完成 if [ `arch` != "x86_64" ]; then echo 非X86架构,删除对非X86架构无用的组件 # 删除虚拟机功能 - rm -rf /opt/apps/deepin-wine-runner/StartVM.sh - rm -rf /opt/apps/deepin-wine-runner/RunVM.sh - rm -rf /opt/apps/deepin-wine-runner/VM - rm -rf /usr/share/applications/spark-deepin-wine-runner-control-vm.desktop - rm -rf /usr/share/applications/spark-deepin-wine-runner-start-vm.desktop + #rm -rf /opt/apps/deepin-wine-runner/StartVM.sh + #rm -rf /opt/apps/deepin-wine-runner/RunVM.sh + #rm -rf /opt/apps/deepin-wine-runner/VM + #rm -rf /usr/share/applications/spark-deepin-wine-runner-control-vm.desktop + #rm -rf /usr/share/applications/spark-deepin-wine-runner-start-vm.desktop # 删除安装 wine 功能 rm -rf "/opt/apps/deepin-wine-runner/wine install" # 这个注释掉的理论可用,不移除 @@ -48,6 +50,21 @@ if [ `arch` != "x86_64" ]; then rm -rf /opt/apps/deepin-wine-runner/AllInstall.py rm -rf /opt/apps/deepin-wine-runner/InstallNewWineHQ.sh fi +# 处理 VM 工具 +vmPath=/opt/apps/deepin-wine-runner/VM/VirtualMachine-`arch` +echo 当前架构为:`arch` +if [ -f $vmPath ]; then + echo 虚拟机工具有该架构的预编译文件 + # 移除辅助文件 + rm -f /opt/apps/deepin-wine-runner/VM/VirtualMachine + # 移动 + mv $vmPath /opt/apps/deepin-wine-runner/VM/VirtualMachine + rm -f /opt/apps/deepin-wine-runner/VM/VirtualMachine-* +else + echo 虚拟机工具无该架构的预编译文件 + rm -f /opt/apps/deepin-wine-runner/VM/VirtualMachine-* +fi +echo 处理完成! # 到时候切换 gpg 源会方便很多 if [ -r /etc/apt/sources.list.d/better-dde.list ]; then if [ -d /usr/share/deepin-installer ]; then @@ -64,4 +81,4 @@ fi # 设置目录权限,让用户可读可写,方便后续删除组件 chmod 777 -R /opt/apps/deepin-wine-runner # 向服务器返回安装数加1(不显示内容且忽略错误) -python3 /opt/apps/deepin-wine-runner/Download.py 3.2.0 > /dev/null 2>&1 | true +python3 /opt/apps/deepin-wine-runner/Download.py $version > /dev/null 2>&1 | true diff --git a/deb/opt/apps/deepin-wine-runner/AllInstall.py b/deb/opt/apps/deepin-wine-runner/AllInstall.py index cf43bae..436cdba 100755 --- a/deb/opt/apps/deepin-wine-runner/AllInstall.py +++ b/deb/opt/apps/deepin-wine-runner/AllInstall.py @@ -11,6 +11,7 @@ # 引入所需的库 ################# import os +import updatekiller def AddSparkStoreSource(): # Download and install key diff --git a/deb/opt/apps/deepin-wine-runner/AppStore.py b/deb/opt/apps/deepin-wine-runner/AppStore.py index 9e8dda8..f7c9880 100755 --- a/deb/opt/apps/deepin-wine-runner/AppStore.py +++ b/deb/opt/apps/deepin-wine-runner/AppStore.py @@ -14,6 +14,7 @@ import os import sys import json import pyquery +import updatekiller import req as requests import urllib.parse as parse diff --git a/deb/opt/apps/deepin-wine-runner/AutoConfig.py b/deb/opt/apps/deepin-wine-runner/AutoConfig.py index bad7e36..3476207 100755 --- a/deb/opt/apps/deepin-wine-runner/AutoConfig.py +++ b/deb/opt/apps/deepin-wine-runner/AutoConfig.py @@ -15,6 +15,7 @@ import sys import base64 import json import traceback +import updatekiller import urllib.request import req as requests import PyQt5.QtWidgets as QtWidgets diff --git a/deb/opt/apps/deepin-wine-runner/BuildDesktop.py b/deb/opt/apps/deepin-wine-runner/BuildDesktop.py index ec766ca..53b7035 100755 --- a/deb/opt/apps/deepin-wine-runner/BuildDesktop.py +++ b/deb/opt/apps/deepin-wine-runner/BuildDesktop.py @@ -13,6 +13,7 @@ import os import sys import traceback +import updatekiller import PyQt5.QtGui as QtGui import PyQt5.QtCore as QtCore import PyQt5.QtWidgets as QtWidgets diff --git a/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py b/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py index 5b007a2..1b560aa 100755 --- a/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py +++ b/deb/opt/apps/deepin-wine-runner/ConfigLanguareRunner.py @@ -12,6 +12,7 @@ import sys import time import json import random +import updatekiller # 阉割 Android 应用安装功能 #import uengineapi import platform diff --git a/deb/opt/apps/deepin-wine-runner/Icon/doge.png b/deb/opt/apps/deepin-wine-runner/Icon/doge.png new file mode 100755 index 0000000..0292729 Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/Icon/doge.png differ diff --git a/deb/opt/apps/deepin-wine-runner/InstallDll.py b/deb/opt/apps/deepin-wine-runner/InstallDll.py index 70b48fd..a4d7fb7 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallDll.py +++ b/deb/opt/apps/deepin-wine-runner/InstallDll.py @@ -13,6 +13,7 @@ import os import sys import json +import updatekiller import traceback import req as requests def exit(): diff --git a/deb/opt/apps/deepin-wine-runner/InstallFont.py b/deb/opt/apps/deepin-wine-runner/InstallFont.py index 5030229..d6ed91e 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallFont.py +++ b/deb/opt/apps/deepin-wine-runner/InstallFont.py @@ -14,6 +14,7 @@ import os import sys import json import shutil +import updatekiller import req as requests homePath = os.path.expanduser('~') try: diff --git a/deb/opt/apps/deepin-wine-runner/InstallMono.py b/deb/opt/apps/deepin-wine-runner/InstallMono.py index f941287..9a2f191 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallMono.py +++ b/deb/opt/apps/deepin-wine-runner/InstallMono.py @@ -12,6 +12,7 @@ ################# import os import sys +import updatekiller import traceback import pyquery diff --git a/deb/opt/apps/deepin-wine-runner/InstallMsxml.py b/deb/opt/apps/deepin-wine-runner/InstallMsxml.py index 3b84a2a..4d29933 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallMsxml.py +++ b/deb/opt/apps/deepin-wine-runner/InstallMsxml.py @@ -13,6 +13,7 @@ import os import sys import json +import updatekiller import req as requests try: sourcesList = [ diff --git a/deb/opt/apps/deepin-wine-runner/InstallNetFramework.py b/deb/opt/apps/deepin-wine-runner/InstallNetFramework.py index a57955c..933ee7a 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallNetFramework.py +++ b/deb/opt/apps/deepin-wine-runner/InstallNetFramework.py @@ -13,6 +13,7 @@ import os import sys import json +import updatekiller import req as requests try: sourcesList = [ diff --git a/deb/opt/apps/deepin-wine-runner/InstallOther.py b/deb/opt/apps/deepin-wine-runner/InstallOther.py index 0ea5936..aa68d34 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallOther.py +++ b/deb/opt/apps/deepin-wine-runner/InstallOther.py @@ -13,6 +13,7 @@ import os import sys import json +import updatekiller import req as requests try: sourcesList = [ diff --git a/deb/opt/apps/deepin-wine-runner/InstallRuntime/amd64.sh b/deb/opt/apps/deepin-wine-runner/InstallRuntime/amd64.sh index 19fa97e..f912f54 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallRuntime/amd64.sh +++ b/deb/opt/apps/deepin-wine-runner/InstallRuntime/amd64.sh @@ -16,5 +16,6 @@ fi aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName sudo apt update sudo dpkg -i /tmp/$fileName +sudo apt install qemu-user qemu-user-static binfmt-support -y echo 安装完成,按回车键退出 -read \ No newline at end of file +read diff --git a/deb/opt/apps/deepin-wine-runner/InstallRuntime/arm64.sh b/deb/opt/apps/deepin-wine-runner/InstallRuntime/arm64.sh index df208d7..1395b93 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallRuntime/arm64.sh +++ b/deb/opt/apps/deepin-wine-runner/InstallRuntime/arm64.sh @@ -15,6 +15,7 @@ if [[ -f /tmp/$fileName ]]; then fi aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName sudo apt update +sudo apt install qemu-user qemu-user-static binfmt-support -y sudo dpkg -i /tmp/$fileName echo 安装完成,按回车键退出 -read \ No newline at end of file +read diff --git a/deb/opt/apps/deepin-wine-runner/InstallRuntime/armhf.sh b/deb/opt/apps/deepin-wine-runner/InstallRuntime/armhf.sh index 015e39b..8b06e95 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallRuntime/armhf.sh +++ b/deb/opt/apps/deepin-wine-runner/InstallRuntime/armhf.sh @@ -15,6 +15,7 @@ if [[ -f /tmp/$fileName ]]; then fi aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName sudo apt update +sudo apt install qemu-user qemu-user-static binfmt-support -y sudo dpkg -i /tmp/$fileName echo 安装完成,按回车键退出 -read \ No newline at end of file +read diff --git a/deb/opt/apps/deepin-wine-runner/InstallRuntime/i386.sh b/deb/opt/apps/deepin-wine-runner/InstallRuntime/i386.sh index 4b22eb2..9d5fa9a 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallRuntime/i386.sh +++ b/deb/opt/apps/deepin-wine-runner/InstallRuntime/i386.sh @@ -15,6 +15,7 @@ if [[ -f /tmp/$fileName ]]; then fi aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName sudo apt update +sudo apt install qemu-user qemu-user-static binfmt-support -y sudo dpkg -i /tmp/$fileName echo 安装完成,按回车键退出 -read \ No newline at end of file +read diff --git a/deb/opt/apps/deepin-wine-runner/InstallRuntime/mips64el.sh b/deb/opt/apps/deepin-wine-runner/InstallRuntime/mips64el.sh index 56c6eae..fb439a2 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallRuntime/mips64el.sh +++ b/deb/opt/apps/deepin-wine-runner/InstallRuntime/mips64el.sh @@ -15,6 +15,7 @@ if [[ -f /tmp/$fileName ]]; then fi aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName sudo apt update +sudo apt install qemu-user qemu-user-static binfmt-support -y sudo dpkg -i /tmp/$fileName echo 安装完成,按回车键退出 -read \ No newline at end of file +read diff --git a/deb/opt/apps/deepin-wine-runner/InstallRuntime/ppc64el.sh b/deb/opt/apps/deepin-wine-runner/InstallRuntime/ppc64el.sh index 78abc01..346a355 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallRuntime/ppc64el.sh +++ b/deb/opt/apps/deepin-wine-runner/InstallRuntime/ppc64el.sh @@ -15,6 +15,7 @@ if [[ -f /tmp/$fileName ]]; then fi aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName sudo apt update +sudo apt install qemu-user qemu-user-static binfmt-support -y sudo dpkg -i /tmp/$fileName echo 安装完成,按回车键退出 -read \ No newline at end of file +read diff --git a/deb/opt/apps/deepin-wine-runner/InstallVisualBasicRuntime.py b/deb/opt/apps/deepin-wine-runner/InstallVisualBasicRuntime.py index 83a6183..d40e27e 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallVisualBasicRuntime.py +++ b/deb/opt/apps/deepin-wine-runner/InstallVisualBasicRuntime.py @@ -13,6 +13,7 @@ import os import sys import json +import updatekiller import req as requests try: sourcesList = [ diff --git a/deb/opt/apps/deepin-wine-runner/InstallVisualCPlusPlus.py b/deb/opt/apps/deepin-wine-runner/InstallVisualCPlusPlus.py index c74fa4a..b14cb89 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallVisualCPlusPlus.py +++ b/deb/opt/apps/deepin-wine-runner/InstallVisualCPlusPlus.py @@ -13,6 +13,7 @@ import os import sys import json +import updatekiller import req as requests try: sourcesList = [ diff --git a/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23.py b/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23.py index 5791e82..024dd45 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23.py +++ b/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23.py @@ -11,6 +11,7 @@ # 引入所需的库 ################# import os +import updatekiller def InstallWithDeepinSource(program): os.system(f"sudo cp '{programPath}/deepin.list' /etc/apt/sources.list.d/deepin20-withwinerunner.list") diff --git a/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23Alpha.py b/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23Alpha.py index 61d074b..2a1ac8d 100755 --- a/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23Alpha.py +++ b/deb/opt/apps/deepin-wine-runner/InstallWineOnDeepin23Alpha.py @@ -12,6 +12,7 @@ ################# import os import webbrowser +import updatekiller def YesOrNo(): if input().replace(" ", "").upper() == "N": diff --git a/deb/opt/apps/deepin-wine-runner/LANG/InstallDll.py b/deb/opt/apps/deepin-wine-runner/LANG/InstallDll.py index 70b48fd..a4d7fb7 100755 --- a/deb/opt/apps/deepin-wine-runner/LANG/InstallDll.py +++ b/deb/opt/apps/deepin-wine-runner/LANG/InstallDll.py @@ -13,6 +13,7 @@ import os import sys import json +import updatekiller import traceback import req as requests def exit(): diff --git a/deb/opt/apps/deepin-wine-runner/Model/__init__.py b/deb/opt/apps/deepin-wine-runner/Model/__init__.py index eee72d3..eac623a 100755 --- a/deb/opt/apps/deepin-wine-runner/Model/__init__.py +++ b/deb/opt/apps/deepin-wine-runner/Model/__init__.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import os import sys import PyQt5.QtWidgets as QtWidgets diff --git a/deb/opt/apps/deepin-wine-runner/ProgramFen.py b/deb/opt/apps/deepin-wine-runner/ProgramFen.py index 0c432c9..fb1a398 100644 --- a/deb/opt/apps/deepin-wine-runner/ProgramFen.py +++ b/deb/opt/apps/deepin-wine-runner/ProgramFen.py @@ -3,6 +3,7 @@ import os import sys import base64 import traceback +import updatekiller import req as requests import PyQt5.QtGui as QtGui import PyQt5.QtCore as QtCore diff --git a/deb/opt/apps/deepin-wine-runner/QemuDownload.py b/deb/opt/apps/deepin-wine-runner/QemuDownload.py index 6005dd5..e98232f 100755 --- a/deb/opt/apps/deepin-wine-runner/QemuDownload.py +++ b/deb/opt/apps/deepin-wine-runner/QemuDownload.py @@ -13,6 +13,7 @@ import os import shutil import random import sys +import updatekiller import json import traceback import requests diff --git a/deb/opt/apps/deepin-wine-runner/QemuRun.py b/deb/opt/apps/deepin-wine-runner/QemuRun.py index a94e9aa..9a329d8 100755 --- a/deb/opt/apps/deepin-wine-runner/QemuRun.py +++ b/deb/opt/apps/deepin-wine-runner/QemuRun.py @@ -2,6 +2,7 @@ import os import sys import getpass +import updatekiller import PyQt5.QtWidgets as QtWidgets if __name__ == "__main__": diff --git a/deb/opt/apps/deepin-wine-runner/QemuSystemInstall.sh b/deb/opt/apps/deepin-wine-runner/QemuSystemInstall.sh new file mode 100755 index 0000000..0426c48 --- /dev/null +++ b/deb/opt/apps/deepin-wine-runner/QemuSystemInstall.sh @@ -0,0 +1,4 @@ +#!/bin/bash +pkexec apt install qemu-system -y +echo 安装完成!按回车键退出 +read \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/RunCommandWithTerminal.py b/deb/opt/apps/deepin-wine-runner/RunCommandWithTerminal.py new file mode 100644 index 0000000..d988f6a --- /dev/null +++ b/deb/opt/apps/deepin-wine-runner/RunCommandWithTerminal.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 +import sys +from Model import * +if len(sys.argv) < 2: + print("请加入需要的命令") + sys.exit(1) +o = "" +for i in sys.argv[1:]: + o += f"'{i}' " +OpenTerminal(o) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/StartVM.sh b/deb/opt/apps/deepin-wine-runner/StartVM.sh index d1a7c77..ef87b5d 100755 --- a/deb/opt/apps/deepin-wine-runner/StartVM.sh +++ b/deb/opt/apps/deepin-wine-runner/StartVM.sh @@ -8,13 +8,30 @@ # 基于 Python3 的 tkinter 构建 ########################################################################################### VBoxManage showvminfo Windows -if test 0 == $?; then +if [[ 0 == $? ]]; then # 检测到虚拟机存在,启动虚拟机 VBoxManage startvm Windows exit fi +# 检查是否有 QEMU +if [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then + # 查看逻辑CPU的个数 + CpuCount=`cat /proc/cpuinfo| grep "processor"| wc -l` + + # 总内存大小GB + MemTotal=`awk '($1 == "MemTotal:"){printf "%.2f\n",$2/1024/1024}' /proc/meminfo` + use=$(echo "scale=4; $MemTotal / 3" | bc) + if [[ `arch` == "x86_64" ]]; then + echo X86 架构,使用 kvm 加速 + kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" -soundhw all -smp $CpuCount -m ${use}G -net user,hostfwd=tcp::3389-:3389 -display vnc=:5 -display gtk -usb + exit + fi + echo 非 X86 架构,不使用 kvm 加速 + qemu-system-x86_64 --hda "$HOME/Qemu/Windows/Windows.qcow2" -soundhw all -smp $CpuCount -m ${use}G -net user,hostfwd=tcp::3389-:3389 -display vnc=:5 -display gtk -usb + exit +fi zenity --question --no-wrap --text="检查到您未创建所指定的虚拟机,是否创建虚拟机并继续?\n如果不创建将无法使用" -if test 1 == $?; then +if [[ 1 == $? ]]; then # 用户不想创建虚拟机,结束 exit fi diff --git a/deb/opt/apps/deepin-wine-runner/VM/.qmake.stash b/deb/opt/apps/deepin-wine-runner/VM/.qmake.stash deleted file mode 100755 index 6cab99c..0000000 --- a/deb/opt/apps/deepin-wine-runner/VM/.qmake.stash +++ /dev/null @@ -1,24 +0,0 @@ -QMAKE_CXX.QT_COMPILER_STDCXX = 201402L -QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 8 -QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3 -QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 -QMAKE_CXX.COMPILER_MACROS = \ - QT_COMPILER_STDCXX \ - QMAKE_GCC_MAJOR_VERSION \ - QMAKE_GCC_MINOR_VERSION \ - QMAKE_GCC_PATCH_VERSION -QMAKE_CXX.INCDIRS = \ - /usr/include/c++/8 \ - /usr/include/x86_64-linux-gnu/c++/8 \ - /usr/include/c++/8/backward \ - /usr/lib/gcc/x86_64-linux-gnu/8/include \ - /usr/local/include \ - /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed \ - /usr/include/x86_64-linux-gnu \ - /usr/include -QMAKE_CXX.LIBDIRS = \ - /usr/lib/gcc/x86_64-linux-gnu/8 \ - /usr/lib/x86_64-linux-gnu \ - /usr/lib \ - /lib/x86_64-linux-gnu \ - /lib diff --git a/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine index a431fab..c5bb472 100755 Binary files a/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine and b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine differ diff --git a/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-aarch64 b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-aarch64 new file mode 100755 index 0000000..45fc2e0 Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-aarch64 differ diff --git a/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-loongarch64 b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-loongarch64 new file mode 100755 index 0000000..fd41f9e Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-loongarch64 differ diff --git a/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-mips64 b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-mips64 new file mode 100755 index 0000000..e0949e5 Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-mips64 differ diff --git a/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-ppc64el b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-ppc64el new file mode 100755 index 0000000..f6eb14a Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-ppc64el differ diff --git a/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-riscv64 b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-riscv64 new file mode 100755 index 0000000..f0f609f Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-riscv64 differ diff --git a/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-s390x b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-s390x new file mode 100755 index 0000000..7a56e31 Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-s390x differ diff --git a/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-x86_64 b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-x86_64 new file mode 100755 index 0000000..b2542ca Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/VM/VirtualMachine-x86_64 differ diff --git a/deb/opt/apps/deepin-wine-runner/clean-unuse-program.py b/deb/opt/apps/deepin-wine-runner/clean-unuse-program.py index bc8645c..7cf06e5 100755 --- a/deb/opt/apps/deepin-wine-runner/clean-unuse-program.py +++ b/deb/opt/apps/deepin-wine-runner/clean-unuse-program.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 import os +import updatekiller if __name__ == "__main__": print(''' diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-easy-packager.py b/deb/opt/apps/deepin-wine-runner/deepin-wine-easy-packager.py index 342691d..df46fcd 100755 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-easy-packager.py +++ b/deb/opt/apps/deepin-wine-runner/deepin-wine-easy-packager.py @@ -3,6 +3,7 @@ import os import sys import json import time +import updatekiller import random import xpinyin import traceback diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-packager-with-script.py b/deb/opt/apps/deepin-wine-runner/deepin-wine-packager-with-script.py index 9b22d7e..6644209 100755 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-packager-with-script.py +++ b/deb/opt/apps/deepin-wine-runner/deepin-wine-packager-with-script.py @@ -13,6 +13,7 @@ import os import sys import json +import updatekiller import threading import PyQt5.QtWidgets as QtWidgets diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-packager.py b/deb/opt/apps/deepin-wine-runner/deepin-wine-packager.py index 450ca5b..ee0025b 100755 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-packager.py +++ b/deb/opt/apps/deepin-wine-runner/deepin-wine-packager.py @@ -15,6 +15,7 @@ import json import shutil import random import pathlib +import updatekiller import threading import traceback import subprocess @@ -40,7 +41,7 @@ def button2_cl(number): mapLink[number].setText(path) def button4_cl(): - path = QtWidgets.QFileDialog.getSaveFileName(widget, transla.transe("U", "保存 deb 包"), get_home(), "deb 文件(*.deb);;所有文件(*.*)", "{}_{}_i386.deb".format(e1_text.text(), e2_text.text()))[0] + path = QtWidgets.QFileDialog.getSaveFileName(widget, transla.transe("U", "保存 deb 包"), get_home(), "deb 文件(*.deb);;所有文件(*.*)", "{}_{}_all.deb".format(e1_text.text(), e2_text.text()))[0] if path != "": e12_text.setText(path) @@ -395,7 +396,7 @@ class make_deb_threading(QtCore.QThread): { # I386 wine 打包配置文件 "Wine": wine[wineVersion.currentText()], - "Architecture": "i386", + "Architecture": debFirstArch.currentText(), "Depends": [ f"{wine[wineVersion.currentText()]}, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei", f"{wine[wineVersion.currentText()]}, spark-dwine-helper | store.spark-app.spark-dwine-helper, fonts-wqy-microhei, fonts-wqy-zenhei" @@ -588,7 +589,7 @@ fi""" "appid": "{e1_text.text()}", "name": "{e8_text.text()}", "version": "{e2_text.text()}", - "arch": ["i386"], + "arch": ["{debFirstArch.currentText()}"], "permissions": {{ "autostart": false, "notification": false, @@ -1657,7 +1658,11 @@ def ChangeArchCombobox(): #rmBash.setEnabled(option) if debArch.currentIndex() == 0: ChangeWine() + debFirstArch.setEnabled(True) + debFirstArch.setCurrentIndex(0) else: + debFirstArch.setCurrentIndex(2) + debFirstArch.setDisabled(True) debDepends.setText("com.deepin-wine6-stable.deepin (>= 6.0deepin31), com.wine-helper.deepin (>= 0.0.8), com.deepin-box86.deepin (>= 0.2.6deepin3), deepin-elf-verify (>= 1.1.1-1)") def InstallDeb(): @@ -1697,7 +1702,7 @@ autoChange = True # 有第一次的路径自动设置 def AutoPathSet(): global autoChange autoChange = True - architecture = ["i386", "arm64", "arm64"] + architecture = [debFirstArch.currentText(), "arm64", "arm64"] if not change: e12_text.setText(f"{get_desktop_path()}/{e1_text.text()}_{e2_text.text()}_{architecture[debArch.currentIndex()]}.deb") @@ -2032,12 +2037,12 @@ bottleNameLock = False ############### programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string # 如果要添加其他 wine,请在字典添加其名称和执行路径 -wine = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine6 stable": "deepin-wine6-stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine"} -wineValue = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5-stable": "deepin-wine5 stable", "deepin-wine6-stable": "deepin-wine6 stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine"} +wine = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine6 stable": "deepin-wine6-stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine", "spark-wine8": "spark-wine8"} +wineValue = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5-stable": "deepin-wine5 stable", "deepin-wine6-stable": "deepin-wine6 stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine", "spark-wine8": "spark-wine8"} # 读取 wine 本地列表 -for i in ["/opt/wine-staging", "/opt/wine-dev", "/opt/wine-stable", "/opt/spark-wine7-devel"]: - if os.path.exists(i): - wine[i] = i +for i in os.listdir("/opt"): + if os.path.exists(f"/opt/{i}/bin/wine"): + wine[f"/opt/{i}/bin/wine"] = f"/opt/{i}/bin/wine" try: for i in os.listdir(f"{get_home()}/.deepinwine"): if os.path.exists(f"{get_home()}/.deepinwine/{i}/bin/wine"): @@ -2115,7 +2120,7 @@ rmBash = QtWidgets.QCheckBox(transla.transe("U", "设置卸载该 deb 后自动 cleanBottonByUOS = QtWidgets.QCheckBox(transla.transe("U", "使用统信 Wine 生态适配活动容器清理脚本")) disabledMono = QtWidgets.QCheckBox(transla.transe("U", "禁用 Mono 和 Gecko 安装器")) debArch = QtWidgets.QComboBox() -debArch.addItems(["i386", "arm64(box86+exagear)"]) +debArch.addItems(["默认选项", "arm64(box86+exagear)"]) #debArch.addItems(["i386", "arm64(box86+exagear)", "all(crossover)"]) textbox1 = QtWidgets.QTextBrowser() option1_text.addItems(["Network", "Chat", "Audio", "Video", "Graphics", "Office", "Translation", "Development", "Utility"]) @@ -2192,6 +2197,10 @@ widgetLayout.addWidget(textbox1, 18, 0, 1, 3) moreSetting = QtWidgets.QGroupBox(transla.transe("U", "高级设置")) debDepends = QtWidgets.QLineEdit() debRecommend = QtWidgets.QLineEdit() +debFirstArch = QtWidgets.QComboBox() +debFirstArch.addItems(["all", "i386", "arm64"]) +debFirstArch.setCurrentIndex(0) +debFirstArch.currentIndexChanged.connect(AutoPathSet) debDepends.setPlaceholderText(transla.transe("U", "deb 包的依赖(如无特殊需求默认即可)")) debDepends.setText("deepin-wine6-stable, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei") debRecommend.setPlaceholderText(transla.transe("U", "deb 包的推荐依赖(非强制,一般默认即可)")) @@ -2214,6 +2223,8 @@ moreSettingLayout.addWidget(debRecommend) moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要显示的 .desktop 文件的 MimeType:"))) moreSettingLayout.addWidget(e10_text) moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "打包 deb 架构:"))) +moreSettingLayout.addWidget(debFirstArch) +moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "打包选项:"))) moreSettingLayout.addWidget(debArch) moreSetting.setLayout(moreSettingLayout) widgetLayout.addWidget(moreSetting, 0, 3, 16, 2) @@ -2273,7 +2284,7 @@ rmBash.setChecked(True) disabledMono.setChecked(True) cleanBottonByUOS.setChecked(True) chooseWineHelperValue.setChecked(True) -e12_text.setText(f"{get_desktop_path()}/demo_1.0.0_i386.deb") +e12_text.setText(f"{get_desktop_path()}/demo_1.0.0_all.deb") widget.setLayout(widgetLayout) window.setCentralWidget(widget) window.setWindowTitle(f"wine 应用打包器 {version}") diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner index c656f41..c2f5896 100755 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner +++ b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner @@ -22,6 +22,7 @@ import platform import threading import traceback import webbrowser +import updatekiller import subprocess import req as requests import urllib.parse as parse @@ -380,14 +381,14 @@ def OpenUrl(url): print(url.url()) # 判断是否可以使用小窗打开 if not bad: - Temp.webWindow = QtWidgets.QMainWindow() + '''Temp.webWindow = QtWidgets.QMainWindow() web = QtWebEngineWidgets.QWebEngineView() web.setUrl(url) Temp.webWindow.setWindowTitle("浏览页面") Temp.webWindow.setCentralWidget(web) Temp.webWindow.setWindowIcon(QtGui.QIcon(iconPath)) Temp.webWindow.show() - return + return''' webbrowser.open_new_tab(url.url()) #QtCore.QUrl().url() @@ -1122,38 +1123,44 @@ class UpdateWindow(): updateWidgetLayout = QtWidgets.QGridLayout() versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:未知\n更新内容:") updateText = QtWidgets.QTextBrowser() - ok = QtWidgets.QPushButton(transla.transe("U", "更新(更新后需要自行手动重启程序)")) + updateText.anchorClicked.connect(OpenUrl) + updateText.setOpenExternalLinks(False) + ok = QtWidgets.QPushButton(transla.transe("U", "更新(更新时会自动关闭 Wine 运行器)")) ok.clicked.connect(UpdateWindow.Update) cancel = QtWidgets.QPushButton("取消") cancel.clicked.connect(UpdateWindow.update.close) - if "从源码运行的版本" == programVersionType: - versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:未知(从源码运行不提供更新)\n更新内容:") - updateText.setText("从源码运行不提供更新") - ok.setDisabled(True) - else: - if 1 == 0: - url = "" - else: - if "deepin/UOS 应用商店版本<带签名>" == programVersionType: - url = "aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci11cGRhdGUtaW5mb3JtYXRpb24vcmF3L2JyYW5jaC9tYXN0ZXIvdXBkYXRlLXVvcy5qc29u" - elif "星火应用商店版本" == programVersionType: - url = "aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci11cGRhdGUtaW5mb3JtYXRpb24vcmF3L2JyYW5jaC9tYXN0ZXIvdXBkYXRlLXNwYXJrLmpzb24=" - else: - url = "aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci11cGRhdGUtaW5mb3JtYXRpb24vcmF3L2JyYW5jaC9tYXN0ZXIvdXBkYXRlLmpzb24=" - - try: - UpdateWindow.data = json.loads(requests.get(base64.b64decode(url).decode("utf-8")).text) - versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:{UpdateWindow.data['Version']}\n更新内容:") - if UpdateWindow.data["Version"] == version: - updateText.setText(transla.transe("U", "此为最新版本,无需更新")) - ok.setDisabled(True) - else: - updateText.setText(UpdateWindow.data["New"].replace("\\n", "\n")) - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(updateWidget, transla.transe("U", "错误"), transla.transe("U", "无法连接服务器!")) - updateText.setText("无法连接服务器,无法更新") + url = "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-update-information/raw/branch/master/update.json" + try: + UpdateWindow.data = json.loads(requests.get(url).text) + versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:{UpdateWindow.data['Version']}\n更新内容:") + if UpdateWindow.data["Version"] == version: + updateText.setText("此为最新版本,无需更新") ok.setDisabled(True) + else: + # 版本号读取(防止出现高版本号提示要“升级”到低版本号的问题) + localVersionList = version.split(".") + webVersionList = UpdateWindow.data['Version'].split(".") + for i in range(len(localVersionList)): + local = int(localVersionList[i]) + web = int(webVersionList[i]) + if web < local: + updateText.setHtml(f"""
此为最新版本,无需更新,但似乎您当前使用的程序版本比云端版本还要高。
+出现这个问题可能会有如下几种情况:
+1、使用编译或者内测版本
+2、自己修改了程序版本
+3、作者忘记更新云端上的更新信息了
+如果是第三种情况,请反馈到此:https://gitee.com/gfdgd-xi/deep-wine-runner/issues/I6T3FG
+""") + ok.setDisabled(True) + break + if web > local: + updateText.setText(UpdateWindow.data["New"].replace("\\n", "\n")) + ok.setEnabled(True) + break + + except: + traceback.print_exc() + QtWidgets.QMessageBox.critical(updateWidget, "错误", "无法连接服务器!") updateWidgetLayout.addWidget(versionLabel, 0, 0, 1, 1) updateWidgetLayout.addWidget(updateText, 1, 0, 1, 3) updateWidgetLayout.addWidget(ok, 2, 2, 1, 1) @@ -1173,8 +1180,8 @@ class UpdateWindow(): write_txt("/tmp/spark-deepin-wine-runner/update.sh", f"""#!/bin/bash echo 删除多余的安装包 rm -rfv /tmp/spark-deepin-wine-runner/update/* -#echo 关闭“Wine 运行器”以及其它“Python 应用” -#killall python3 +echo 关闭“Wine 运行器” +python3 "{programPath}/updatekiller.py" echo 下载安装包 wget -P /tmp/spark-deepin-wine-runner/update {UpdateWindow.data["Url"][0]} echo 安装安装包 @@ -2197,6 +2204,7 @@ try: "deepin-wine6 stable": "deepin-wine6-stable", "deepin-wine5 stable": "deepin-wine5-stable", "spark-wine7-devel": "spark-wine7-devel", + "spark-wine8": "spark-wine8", "deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", @@ -2399,23 +2407,9 @@ exe路径\' 参数 \' 千万不要中断后不删除源的情况下 apt upgrade !!!中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可 以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示;N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。
''')
-updateThingsString = transla.transe("U", '''※1、Windows 应用适配工具新增系统资源显示;
-※2、Windows 应用适配工具使用 C++ 重写;
-※3、修复打包器(基于官方生态适配脚本)无法打开的问题;
-※4、新增运行库功能安装,以实现使用 Qemu User 跨架构运行 Wine 的功能(理论上支持 3a4000 了,但没试过);
-※5、修复 Chroot 容器的一些问题;
-※6、修复在 Debian11 安装时缺失依赖 rar 的问题;
-※7、新增安装 box86、box64 的功能;
-※8、修复故障反馈功能错误的问题;
-※9、支持调用 Flatpak 安装的 Wine;
-10、修改程序内的部分网址;
-11、作者信息变更;
-12、支持禁用程序的多语言支持(默认禁用,因为是机翻的);
-13、支持在程序本地翻译缺失的情况下自动机翻缺失语句;
-14、从此版本开始不再区分吾爱版、Spark 版和 UOS 版;
-15、新增下载量查询;
-16、更新程序公告;
-17、新增断网彩蛋。
+updateThingsString = transla.transe("U", '''※1、Windows 虚拟机安装工具支持非 X86 架构;
+※2、应用打包器可以与星火应用商店配合构建 arm/all 全架构的 Wine 包;
+3、运行器和打包器支持调用 spark-wine8;
''')
for i in information["Thank"]:
thankText += f"{i}\n"
@@ -2437,6 +2431,7 @@ a:link, a:active {{
版本:{version}
适用平台:{goodRunSystem}(@VersionForType@)
+安装包构建时间:{information['Time']}
Qt 版本:{QtCore.qVersion()}
程序官网:{programUrl}
当前程序占用体积:@programSize@MB
@@ -2624,7 +2619,7 @@ mainLayout.setColumnStretch(1, 1)
mainLayout.addWidget(returnText, 0, 1, 2, 1)
# 版权
-copy = QtWidgets.QLabel(f"""\n程序版本:{version},提示:Wine 无法运行保证可以运行所有的 Windows 程序,如果想要运行更多可执行程序,可以考虑虚拟机和双系统N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。
''')
-updateThingsString = transla.transe("U", '''※1、Windows 应用适配工具新增系统资源显示;
-※2、Windows 应用适配工具使用 C++ 重写;
-※3、修复打包器(基于官方生态适配脚本)无法打开的问题;
-※4、新增运行库功能安装,以实现使用 Qemu User 跨架构运行 Wine 的功能(理论上支持 3a4000 了,但没试过);
-※5、修复 Chroot 容器的一些问题;
-※6、修复在 Debian11 安装时缺失依赖 rar 的问题;
-※7、新增安装 box86、box64 的功能;
-※8、修复故障反馈功能错误的问题;
-※9、支持调用 Flatpak 安装的 Wine;
-10、修改程序内的部分网址;
-11、作者信息变更;
-12、支持禁用程序的多语言支持(默认禁用,因为是机翻的);
-13、支持在程序本地翻译缺失的情况下自动机翻缺失语句;
-14、从此版本开始不再区分吾爱版、Spark 版和 UOS 版;
-15、新增下载量查询;
-16、更新程序公告;
-17、新增断网彩蛋。
+updateThingsString = transla.transe("U", '''※1、Windows 虚拟机安装工具支持非 X86 架构;
+※2、应用打包器可以与星火应用商店配合构建 arm/all 全架构的 Wine 包;
+3、运行器和打包器支持调用 spark-wine8;
''')
for i in information["Thank"]:
thankText += f"{i}\n"
diff --git a/package-script.zip b/package-script.zip
index 0ced483..7dd7221 100644
Binary files a/package-script.zip and b/package-script.zip differ
diff --git a/package-script/information.json b/package-script/information.json
index bc8fce0..612eea6 100755
--- a/package-script/information.json
+++ b/package-script/information.json
@@ -1,5 +1,6 @@
{
- "Version": "3.2.0",
+ "Version": "3.2.1",
+ "Time": "未知",
"Thank": [
"感谢 RacoonGX 的付出与贡献",
"感谢 @Amber 编写的《使用wine运行器打包无安装包的软件》:https://bbs.deepin.org/post/247720",