修改DEBIAN/postinst

This commit is contained in:
gfdgd xi 2023-04-15 18:39:30 +08:00
parent 0a643cb808
commit c61607de13
55 changed files with 222 additions and 151 deletions

View File

@ -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

View File

@ -1,5 +1,5 @@
Package: spark-deepin-wine-runner Package: spark-deepin-wine-runner
Version: 3.2.0-2 Version: 3.2.1
Maintainer: gfdgd xi <3025613752@qq.com> Maintainer: gfdgd xi <3025613752@qq.com>
Homepage: https://gitee.com/gfdgd-xi-org/deep-wine-runner Homepage: https://gitee.com/gfdgd-xi-org/deep-wine-runner
Architecture: all Architecture: all

View File

@ -8,6 +8,8 @@
# 基于 sh # 基于 sh
################################################################################################################# #################################################################################################################
# 非强制性的必应组件,所以成功不成功都行 # 非强制性的必应组件,所以成功不成功都行
# 程序版本号
version=3.2.0
echo 安装组件 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 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 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 if [ `arch` != "x86_64" ]; then
echo 非X86架构删除对非X86架构无用的组件 echo 非X86架构删除对非X86架构无用的组件
# 删除虚拟机功能 # 删除虚拟机功能
rm -rf /opt/apps/deepin-wine-runner/StartVM.sh #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/RunVM.sh
rm -rf /opt/apps/deepin-wine-runner/VM #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-control-vm.desktop
rm -rf /usr/share/applications/spark-deepin-wine-runner-start-vm.desktop #rm -rf /usr/share/applications/spark-deepin-wine-runner-start-vm.desktop
# 删除安装 wine 功能 # 删除安装 wine 功能
rm -rf "/opt/apps/deepin-wine-runner/wine install" 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/AllInstall.py
rm -rf /opt/apps/deepin-wine-runner/InstallNewWineHQ.sh rm -rf /opt/apps/deepin-wine-runner/InstallNewWineHQ.sh
fi 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 源会方便很多 # 到时候切换 gpg 源会方便很多
if [ -r /etc/apt/sources.list.d/better-dde.list ]; then if [ -r /etc/apt/sources.list.d/better-dde.list ]; then
if [ -d /usr/share/deepin-installer ]; then if [ -d /usr/share/deepin-installer ]; then
@ -64,4 +81,4 @@ fi
# 设置目录权限,让用户可读可写,方便后续删除组件 # 设置目录权限,让用户可读可写,方便后续删除组件
chmod 777 -R /opt/apps/deepin-wine-runner chmod 777 -R /opt/apps/deepin-wine-runner
# 向服务器返回安装数加1不显示内容且忽略错误 # 向服务器返回安装数加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

View File

@ -11,6 +11,7 @@
# 引入所需的库 # 引入所需的库
################# #################
import os import os
import updatekiller
def AddSparkStoreSource(): def AddSparkStoreSource():
# Download and install key # Download and install key

View File

@ -14,6 +14,7 @@ import os
import sys import sys
import json import json
import pyquery import pyquery
import updatekiller
import req as requests import req as requests
import urllib.parse as parse import urllib.parse as parse

View File

@ -15,6 +15,7 @@ import sys
import base64 import base64
import json import json
import traceback import traceback
import updatekiller
import urllib.request import urllib.request
import req as requests import req as requests
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets

View File

@ -13,6 +13,7 @@
import os import os
import sys import sys
import traceback import traceback
import updatekiller
import PyQt5.QtGui as QtGui import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore import PyQt5.QtCore as QtCore
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets

View File

@ -12,6 +12,7 @@ import sys
import time import time
import json import json
import random import random
import updatekiller
# 阉割 Android 应用安装功能 # 阉割 Android 应用安装功能
#import uengineapi #import uengineapi
import platform import platform

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -13,6 +13,7 @@
import os import os
import sys import sys
import json import json
import updatekiller
import traceback import traceback
import req as requests import req as requests
def exit(): def exit():

View File

@ -14,6 +14,7 @@ import os
import sys import sys
import json import json
import shutil import shutil
import updatekiller
import req as requests import req as requests
homePath = os.path.expanduser('~') homePath = os.path.expanduser('~')
try: try:

View File

@ -12,6 +12,7 @@
################# #################
import os import os
import sys import sys
import updatekiller
import traceback import traceback
import pyquery import pyquery

View File

@ -13,6 +13,7 @@
import os import os
import sys import sys
import json import json
import updatekiller
import req as requests import req as requests
try: try:
sourcesList = [ sourcesList = [

View File

@ -13,6 +13,7 @@
import os import os
import sys import sys
import json import json
import updatekiller
import req as requests import req as requests
try: try:
sourcesList = [ sourcesList = [

View File

@ -13,6 +13,7 @@
import os import os
import sys import sys
import json import json
import updatekiller
import req as requests import req as requests
try: try:
sourcesList = [ sourcesList = [

View File

@ -16,5 +16,6 @@ fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update sudo apt update
sudo dpkg -i /tmp/$fileName sudo dpkg -i /tmp/$fileName
sudo apt install qemu-user qemu-user-static binfmt-support -y
echo 安装完成,按回车键退出 echo 安装完成,按回车键退出
read read

View File

@ -15,6 +15,7 @@ if [[ -f /tmp/$fileName ]]; then
fi fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update sudo apt update
sudo apt install qemu-user qemu-user-static binfmt-support -y
sudo dpkg -i /tmp/$fileName sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出 echo 安装完成,按回车键退出
read read

View File

@ -15,6 +15,7 @@ if [[ -f /tmp/$fileName ]]; then
fi fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update sudo apt update
sudo apt install qemu-user qemu-user-static binfmt-support -y
sudo dpkg -i /tmp/$fileName sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出 echo 安装完成,按回车键退出
read read

View File

@ -15,6 +15,7 @@ if [[ -f /tmp/$fileName ]]; then
fi fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update sudo apt update
sudo apt install qemu-user qemu-user-static binfmt-support -y
sudo dpkg -i /tmp/$fileName sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出 echo 安装完成,按回车键退出
read read

View File

@ -15,6 +15,7 @@ if [[ -f /tmp/$fileName ]]; then
fi fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update sudo apt update
sudo apt install qemu-user qemu-user-static binfmt-support -y
sudo dpkg -i /tmp/$fileName sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出 echo 安装完成,按回车键退出
read read

View File

@ -15,6 +15,7 @@ if [[ -f /tmp/$fileName ]]; then
fi fi
aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName aria2c -x 16 -s 16 -c $url -d /tmp -o $fileName
sudo apt update sudo apt update
sudo apt install qemu-user qemu-user-static binfmt-support -y
sudo dpkg -i /tmp/$fileName sudo dpkg -i /tmp/$fileName
echo 安装完成,按回车键退出 echo 安装完成,按回车键退出
read read

View File

@ -13,6 +13,7 @@
import os import os
import sys import sys
import json import json
import updatekiller
import req as requests import req as requests
try: try:
sourcesList = [ sourcesList = [

View File

@ -13,6 +13,7 @@
import os import os
import sys import sys
import json import json
import updatekiller
import req as requests import req as requests
try: try:
sourcesList = [ sourcesList = [

View File

@ -11,6 +11,7 @@
# 引入所需的库 # 引入所需的库
################# #################
import os import os
import updatekiller
def InstallWithDeepinSource(program): def InstallWithDeepinSource(program):
os.system(f"sudo cp '{programPath}/deepin.list' /etc/apt/sources.list.d/deepin20-withwinerunner.list") os.system(f"sudo cp '{programPath}/deepin.list' /etc/apt/sources.list.d/deepin20-withwinerunner.list")

View File

@ -12,6 +12,7 @@
################# #################
import os import os
import webbrowser import webbrowser
import updatekiller
def YesOrNo(): def YesOrNo():
if input().replace(" ", "").upper() == "N": if input().replace(" ", "").upper() == "N":

View File

@ -13,6 +13,7 @@
import os import os
import sys import sys
import json import json
import updatekiller
import traceback import traceback
import req as requests import req as requests
def exit(): def exit():

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python3
import os import os
import sys import sys
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets

View File

@ -3,6 +3,7 @@ import os
import sys import sys
import base64 import base64
import traceback import traceback
import updatekiller
import req as requests import req as requests
import PyQt5.QtGui as QtGui import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore import PyQt5.QtCore as QtCore

View File

@ -13,6 +13,7 @@ import os
import shutil import shutil
import random import random
import sys import sys
import updatekiller
import json import json
import traceback import traceback
import requests import requests

View File

@ -2,6 +2,7 @@
import os import os
import sys import sys
import getpass import getpass
import updatekiller
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -0,0 +1,4 @@
#!/bin/bash
pkexec apt install qemu-system -y
echo 安装完成!按回车键退出
read

View File

@ -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)

View File

@ -8,13 +8,30 @@
# 基于 Python3 的 tkinter 构建 # 基于 Python3 的 tkinter 构建
########################################################################################### ###########################################################################################
VBoxManage showvminfo Windows VBoxManage showvminfo Windows
if test 0 == $?; then if [[ 0 == $? ]]; then
# 检测到虚拟机存在,启动虚拟机 # 检测到虚拟机存在,启动虚拟机
VBoxManage startvm Windows VBoxManage startvm Windows
exit exit
fi 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如果不创建将无法使用" zenity --question --no-wrap --text="检查到您未创建所指定的虚拟机,是否创建虚拟机并继续?\n如果不创建将无法使用"
if test 1 == $?; then if [[ 1 == $? ]]; then
# 用户不想创建虚拟机,结束 # 用户不想创建虚拟机,结束
exit exit
fi fi

View File

@ -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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os import os
import updatekiller
if __name__ == "__main__": if __name__ == "__main__":
print(''' print('''

View File

@ -3,6 +3,7 @@ import os
import sys import sys
import json import json
import time import time
import updatekiller
import random import random
import xpinyin import xpinyin
import traceback import traceback

View File

@ -13,6 +13,7 @@
import os import os
import sys import sys
import json import json
import updatekiller
import threading import threading
import PyQt5.QtWidgets as QtWidgets import PyQt5.QtWidgets as QtWidgets

View File

@ -15,6 +15,7 @@ import json
import shutil import shutil
import random import random
import pathlib import pathlib
import updatekiller
import threading import threading
import traceback import traceback
import subprocess import subprocess
@ -40,7 +41,7 @@ def button2_cl(number):
mapLink[number].setText(path) mapLink[number].setText(path)
def button4_cl(): 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 != "": if path != "":
e12_text.setText(path) e12_text.setText(path)
@ -395,7 +396,7 @@ class make_deb_threading(QtCore.QThread):
{ {
# I386 wine 打包配置文件 # I386 wine 打包配置文件
"Wine": wine[wineVersion.currentText()], "Wine": wine[wineVersion.currentText()],
"Architecture": "i386", "Architecture": debFirstArch.currentText(),
"Depends": [ "Depends": [
f"{wine[wineVersion.currentText()]}, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei", 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" 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()}", "appid": "{e1_text.text()}",
"name": "{e8_text.text()}", "name": "{e8_text.text()}",
"version": "{e2_text.text()}", "version": "{e2_text.text()}",
"arch": ["i386"], "arch": ["{debFirstArch.currentText()}"],
"permissions": {{ "permissions": {{
"autostart": false, "autostart": false,
"notification": false, "notification": false,
@ -1657,7 +1658,11 @@ def ChangeArchCombobox():
#rmBash.setEnabled(option) #rmBash.setEnabled(option)
if debArch.currentIndex() == 0: if debArch.currentIndex() == 0:
ChangeWine() ChangeWine()
debFirstArch.setEnabled(True)
debFirstArch.setCurrentIndex(0)
else: 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)") 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(): def InstallDeb():
@ -1697,7 +1702,7 @@ autoChange = True # 有第一次的路径自动设置
def AutoPathSet(): def AutoPathSet():
global autoChange global autoChange
autoChange = True autoChange = True
architecture = ["i386", "arm64", "arm64"] architecture = [debFirstArch.currentText(), "arm64", "arm64"]
if not change: if not change:
e12_text.setText(f"{get_desktop_path()}/{e1_text.text()}_{e2_text.text()}_{architecture[debArch.currentIndex()]}.deb") 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 programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# 如果要添加其他 wine请在字典添加其名称和执行路径 # 如果要添加其他 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"} 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"} 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 本地列表 # 读取 wine 本地列表
for i in ["/opt/wine-staging", "/opt/wine-dev", "/opt/wine-stable", "/opt/spark-wine7-devel"]: for i in os.listdir("/opt"):
if os.path.exists(i): if os.path.exists(f"/opt/{i}/bin/wine"):
wine[i] = i wine[f"/opt/{i}/bin/wine"] = f"/opt/{i}/bin/wine"
try: try:
for i in os.listdir(f"{get_home()}/.deepinwine"): for i in os.listdir(f"{get_home()}/.deepinwine"):
if os.path.exists(f"{get_home()}/.deepinwine/{i}/bin/wine"): 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 生态适配活动容器清理脚本")) cleanBottonByUOS = QtWidgets.QCheckBox(transla.transe("U", "使用统信 Wine 生态适配活动容器清理脚本"))
disabledMono = QtWidgets.QCheckBox(transla.transe("U", "禁用 Mono 和 Gecko 安装器")) disabledMono = QtWidgets.QCheckBox(transla.transe("U", "禁用 Mono 和 Gecko 安装器"))
debArch = QtWidgets.QComboBox() debArch = QtWidgets.QComboBox()
debArch.addItems(["i386", "arm64(box86+exagear)"]) debArch.addItems(["默认选项", "arm64(box86+exagear)"])
#debArch.addItems(["i386", "arm64(box86+exagear)", "all(crossover)"]) #debArch.addItems(["i386", "arm64(box86+exagear)", "all(crossover)"])
textbox1 = QtWidgets.QTextBrowser() textbox1 = QtWidgets.QTextBrowser()
option1_text.addItems(["Network", "Chat", "Audio", "Video", "Graphics", "Office", "Translation", "Development", "Utility"]) 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", "高级设置")) moreSetting = QtWidgets.QGroupBox(transla.transe("U", "高级设置"))
debDepends = QtWidgets.QLineEdit() debDepends = QtWidgets.QLineEdit()
debRecommend = 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.setPlaceholderText(transla.transe("U", "deb 包的依赖(如无特殊需求默认即可)"))
debDepends.setText("deepin-wine6-stable, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei") debDepends.setText("deepin-wine6-stable, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei")
debRecommend.setPlaceholderText(transla.transe("U", "deb 包的推荐依赖(非强制,一般默认即可)")) debRecommend.setPlaceholderText(transla.transe("U", "deb 包的推荐依赖(非强制,一般默认即可)"))
@ -2214,6 +2223,8 @@ moreSettingLayout.addWidget(debRecommend)
moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要显示的 .desktop 文件的 MimeType"))) moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要显示的 .desktop 文件的 MimeType")))
moreSettingLayout.addWidget(e10_text) moreSettingLayout.addWidget(e10_text)
moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "打包 deb 架构:"))) moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "打包 deb 架构:")))
moreSettingLayout.addWidget(debFirstArch)
moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "打包选项:")))
moreSettingLayout.addWidget(debArch) moreSettingLayout.addWidget(debArch)
moreSetting.setLayout(moreSettingLayout) moreSetting.setLayout(moreSettingLayout)
widgetLayout.addWidget(moreSetting, 0, 3, 16, 2) widgetLayout.addWidget(moreSetting, 0, 3, 16, 2)
@ -2273,7 +2284,7 @@ rmBash.setChecked(True)
disabledMono.setChecked(True) disabledMono.setChecked(True)
cleanBottonByUOS.setChecked(True) cleanBottonByUOS.setChecked(True)
chooseWineHelperValue.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) widget.setLayout(widgetLayout)
window.setCentralWidget(widget) window.setCentralWidget(widget)
window.setWindowTitle(f"wine 应用打包器 {version}") window.setWindowTitle(f"wine 应用打包器 {version}")

View File

@ -22,6 +22,7 @@ import platform
import threading import threading
import traceback import traceback
import webbrowser import webbrowser
import updatekiller
import subprocess import subprocess
import req as requests import req as requests
import urllib.parse as parse import urllib.parse as parse
@ -380,14 +381,14 @@ def OpenUrl(url):
print(url.url()) print(url.url())
# 判断是否可以使用小窗打开 # 判断是否可以使用小窗打开
if not bad: if not bad:
Temp.webWindow = QtWidgets.QMainWindow() '''Temp.webWindow = QtWidgets.QMainWindow()
web = QtWebEngineWidgets.QWebEngineView() web = QtWebEngineWidgets.QWebEngineView()
web.setUrl(url) web.setUrl(url)
Temp.webWindow.setWindowTitle("浏览页面") Temp.webWindow.setWindowTitle("浏览页面")
Temp.webWindow.setCentralWidget(web) Temp.webWindow.setCentralWidget(web)
Temp.webWindow.setWindowIcon(QtGui.QIcon(iconPath)) Temp.webWindow.setWindowIcon(QtGui.QIcon(iconPath))
Temp.webWindow.show() Temp.webWindow.show()
return return'''
webbrowser.open_new_tab(url.url()) webbrowser.open_new_tab(url.url())
#QtCore.QUrl().url() #QtCore.QUrl().url()
@ -1122,38 +1123,44 @@ class UpdateWindow():
updateWidgetLayout = QtWidgets.QGridLayout() updateWidgetLayout = QtWidgets.QGridLayout()
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本未知\n更新内容") versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本未知\n更新内容")
updateText = QtWidgets.QTextBrowser() 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) ok.clicked.connect(UpdateWindow.Update)
cancel = QtWidgets.QPushButton("取消") cancel = QtWidgets.QPushButton("取消")
cancel.clicked.connect(UpdateWindow.update.close) cancel.clicked.connect(UpdateWindow.update.close)
if "从源码运行的版本" == programVersionType: url = "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-update-information/raw/branch/master/update.json"
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本未知从源码运行不提供更新\n更新内容") try:
updateText.setText("从源码运行不提供更新") UpdateWindow.data = json.loads(requests.get(url).text)
ok.setDisabled(True) versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本{UpdateWindow.data['Version']}\n更新内容")
else: if UpdateWindow.data["Version"] == version:
if 1 == 0: updateText.setText("此为最新版本,无需更新")
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("无法连接服务器,无法更新")
ok.setDisabled(True) 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"""<p>此为最新版本,无需更新,但似乎您当前使用的程序版本比云端版本还要高。</p>
<p>出现这个问题可能会有如下几种情况:</p>
<p>1、使用编译或者内测版本</p>
<p>2、自己修改了程序版本</p>
<p>3、作者忘记更新云端上的更新信息了</p>
<p>如果是第三种情况,请反馈到此:<a href='https://gitee.com/gfdgd-xi/deep-wine-runner/issues/I6T3FG'>https://gitee.com/gfdgd-xi/deep-wine-runner/issues/I6T3FG</a></p>
<p><img src='{programPath}/Icon/doge.png'></p>""")
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(versionLabel, 0, 0, 1, 1)
updateWidgetLayout.addWidget(updateText, 1, 0, 1, 3) updateWidgetLayout.addWidget(updateText, 1, 0, 1, 3)
updateWidgetLayout.addWidget(ok, 2, 2, 1, 1) 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 write_txt("/tmp/spark-deepin-wine-runner/update.sh", f"""#!/bin/bash
echo 删除多余的安装包 echo 删除多余的安装包
rm -rfv /tmp/spark-deepin-wine-runner/update/* rm -rfv /tmp/spark-deepin-wine-runner/update/*
#echo 关闭“Wine 运行器”以及其它“Python 应用” echo 关闭“Wine 运行器”
#killall python3 python3 "{programPath}/updatekiller.py"
echo 下载安装包 echo 下载安装包
wget -P /tmp/spark-deepin-wine-runner/update {UpdateWindow.data["Url"][0]} wget -P /tmp/spark-deepin-wine-runner/update {UpdateWindow.data["Url"][0]}
echo 安装安装包 echo 安装安装包
@ -2197,6 +2204,7 @@ try:
"deepin-wine6 stable": "deepin-wine6-stable", "deepin-wine6 stable": "deepin-wine6-stable",
"deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine5 stable": "deepin-wine5-stable",
"spark-wine7-devel": "spark-wine7-devel", "spark-wine7-devel": "spark-wine7-devel",
"spark-wine8": "spark-wine8",
"deepin-wine": "deepin-wine", "deepin-wine": "deepin-wine",
"deepin-wine5": "deepin-wine5", "deepin-wine5": "deepin-wine5",
"wine": "wine", "wine": "wine",
@ -2399,23 +2407,9 @@ exe路径\' 参数 \'
<b>千万不要中断后不删除源的情况下 apt upgrade </b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine会自动执行恢复操作即可 <b>千万不要中断后不删除源的情况下 apt upgrade </b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine会自动执行恢复操作即可
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示; 以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示;
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>''') <code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>''')
updateThingsString = transla.transe("U", '''※1、Windows 应用适配工具新增系统资源显示; updateThingsString = transla.transe("U", '''※1、Windows 虚拟机安装工具支持非 X86 架构;
※2、Windows 应用适配工具使用 C++ 重写; ※2、应用打包器可以与星火应用商店配合构建 arm/all 全架构的 Wine 包;
※3、修复打包器基于官方生态适配脚本无法打开的问题 3、运行器和打包器支持调用 spark-wine8
※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、新增断网彩蛋。
''') ''')
for i in information["Thank"]: for i in information["Thank"]:
thankText += f"{i}\n" thankText += f"{i}\n"
@ -2437,6 +2431,7 @@ a:link, a:active {{
版本:{version} 版本:{version}
适用平台:{goodRunSystem}@VersionForType@ 适用平台:{goodRunSystem}@VersionForType@
安装包构建时间:{information['Time']}
Qt 版本:{QtCore.qVersion()} Qt 版本:{QtCore.qVersion()}
程序官网:{programUrl} 程序官网:{programUrl}
当前程序占用体积:@programSize@MB</pre> 当前程序占用体积:@programSize@MB</pre>
@ -2624,7 +2619,7 @@ mainLayout.setColumnStretch(1, 1)
mainLayout.addWidget(returnText, 0, 1, 2, 1) mainLayout.addWidget(returnText, 0, 1, 2, 1)
# 版权 # 版权
copy = QtWidgets.QLabel(f"""\n程序版本{version}<b>提示Wine 无法运行保证可以运行所有的 Windows 程序,如果想要运行更多可执行程序,可以考虑虚拟机和双系统</b><br> copy = QtWidgets.QLabel(f"""\n程序版本{version}<b>提示Wine 无法保证可以运行所有的 Windows 程序,如果想要运行更多 Windows 程序,可以考虑虚拟机和双系统</b><br>
©2020~{time.strftime("%Y")} gfdgd xi、为什么您不喜欢熊出没和阿布呢""") ©2020~{time.strftime("%Y")} gfdgd xi、为什么您不喜欢熊出没和阿布呢""")
mainLayout.addWidget(copy, 2, 0, 1, 1) mainLayout.addWidget(copy, 2, 0, 1, 1)
@ -2937,7 +2932,7 @@ def AddLib(install: QtWidgets.QAction, uninstall, menu, info):
menu.addAction(uninstall) menu.addAction(uninstall)
if os.path.exists(f"{programPath}/InstallRuntime"): if os.path.exists(f"{programPath}/InstallRuntime"):
installLib = menu.addMenu(transla.transe("U", "运行库")) installLib = menu.addMenu(transla.transe("U", "运行库(&R)"))
installQemuMenu = installLib.addMenu(transla.transe("U", "安装 Qemu User")) installQemuMenu = installLib.addMenu(transla.transe("U", "安装 Qemu User"))
installQemu = QtWidgets.QAction("安装 Qemu User") installQemu = QtWidgets.QAction("安装 Qemu User")
removeQemu = QtWidgets.QAction("卸载 Qemu User") removeQemu = QtWidgets.QAction("卸载 Qemu User")

View File

@ -12,6 +12,7 @@
################# #################
import os import os
import sys import sys
import updatekiller
################### ###################
# 程序所需事件 # 程序所需事件

View File

@ -1,5 +1,6 @@
{ {
"Version": "3.2.0", "Version": "3.2.1",
"Time": "2023-04-15 18:37:38 Linux-5.15.77-amd64-desktop-x86_64-with-Deepin-20.8-apricot",
"Thank": [ "Thank": [
"感谢 RacoonGX 的付出与贡献", "感谢 RacoonGX 的付出与贡献",
"感谢 @Amber 编写的《使用wine运行器打包无安装包的软件》https://bbs.deepin.org/post/247720", "感谢 @Amber 编写的《使用wine运行器打包无安装包的软件》https://bbs.deepin.org/post/247720",
@ -21,7 +22,7 @@
"感谢 @统信UCARE服务 https://mp.weixin.qq.com/s/iOdfNv6phc8F4inackFFTw", "感谢 @统信UCARE服务 https://mp.weixin.qq.com/s/iOdfNv6phc8F4inackFFTw",
"感谢 @星火应用商店 提供部分安装包的源以及本程序的下载地址", "感谢 @星火应用商店 提供部分安装包的源以及本程序的下载地址",
"感谢 @delsin 和 @神末shenmo 在 deepin 论坛提供打包器打包的 deb 包自动删除容器的建议", "感谢 @delsin 和 @神末shenmo 在 deepin 论坛提供打包器打包的 deb 包自动删除容器的建议",
"感谢 @shenmo 反馈的 2.1.0 打包器问题和 2.1.0-1 终端调用问题", "感谢 @shenmo 反馈的 2.1.0 打包器问题和 2.1.0-1 终端调用问题",
"感谢 @GershonWang 在 https://github.com/gfdgd-xi/deep-wine-runner/issues/1 提供窗口居中的建议", "感谢 @GershonWang 在 https://github.com/gfdgd-xi/deep-wine-runner/issues/1 提供窗口居中的建议",
"感谢 @134******28 和 @sgb76 提供的新程序 GUI 布局和实现代码", "感谢 @134******28 和 @sgb76 提供的新程序 GUI 布局和实现代码",
"感谢 @sgb76 为 Wine 打包器(非生态适配脚本)打包的 i386 deb 提供建议", "感谢 @sgb76 为 Wine 打包器(非生态适配脚本)打包的 i386 deb 提供建议",
@ -55,4 +56,4 @@
"可以从上面的各种解决方案更好的学习 Wine 生态适配,也可以看 deepin 论坛板块 https://bbs.deepin.org/module/detail/116 进行学习,最后也向各位有进行 Wine 生态适配的大佬进行由衷的感谢!", "可以从上面的各种解决方案更好的学习 Wine 生态适配,也可以看 deepin 论坛板块 https://bbs.deepin.org/module/detail/116 进行学习,最后也向各位有进行 Wine 生态适配的大佬进行由衷的感谢!",
"如果上面有遗漏,请向我反馈补充" "如果上面有遗漏,请向我反馈补充"
] ]
} }

View File

@ -0,0 +1,33 @@
#!/usr/bin/env python3
import sys
import os
import atexit
PIDFILE = '/tmp/deepin-wine-runner.pid'
#程序结束时清理pid
@atexit.register
def remove_pid():
with open(PIDFILE) as pidfile:
pidlst = pidfile.readlines()
pidlst.remove(str(PID)+'\n')
with open(PIDFILE,'w') as pidfile:
pidfile.writelines(pidlst)
#更新时结束进程
def main():
for i in open(PIDFILE):
try:
os.kill(int(i),15)
except ProcessLookupError:
pass
os.remove(PIDFILE)
#当该程序被直接执行时执行结束进程操作。如果是导入的形式则只是记录pid
if __name__ == '__main__':
sys.exit(main())
else:
#获取进程pid用于更新时结束进程
PID = os.getpid()
with open(PIDFILE,'a') as pidfile:
print(PID,file=pidfile) #使用print可以在行末输出换行符而且可以省去类型转换

View File

@ -78,17 +78,24 @@ class Ui_MainWindow(object):
self.menu = MainWindow.menuBar() self.menu = MainWindow.menuBar()
self.changeSources = self.menu.addMenu(_translate("MainWindow", "更换源")) self.changeSources = self.menu.addMenu(_translate("MainWindow", "更换源"))
self.gitlinkAction = QtWidgets.QAction(_translate("MainWindow", "Gitlink 源(推荐)")) self.gitlinkAction = QtWidgets.QAction(_translate("MainWindow", "Gitlink 源(推荐)"))
self.ipv6Action = QtWidgets.QAction(_translate("MainWindow", "备用源(只支持 IPv6 用户)")) self.kgithubAction = QtWidgets.QAction(_translate("MainWindow", "KGithub 源"))
self.ipv6Action = QtWidgets.QAction(_translate("MainWindow", "Github 源1国内访问不稳定"))
self.githubAction = QtWidgets.QAction(_translate("MainWindow", "Github 源2国内访问不稳定"))
self.localAction = QtWidgets.QAction(_translate("MainWindow", "本地测试源127.0.0.1")) self.localAction = QtWidgets.QAction(_translate("MainWindow", "本地测试源127.0.0.1"))
self.changeSources.addAction(self.gitlinkAction) self.changeSources.addAction(self.gitlinkAction)
self.changeSources.addAction(self.kgithubAction)
self.changeSources.addAction(self.ipv6Action) self.changeSources.addAction(self.ipv6Action)
self.changeSources.addAction(self.githubAction)
self.changeSources.addAction(self.localAction) self.changeSources.addAction(self.localAction)
for i in [self.gitlinkAction, self.ipv6Action, self.localAction]: for i in [self.gitlinkAction, self.ipv6Action, self.localAction, self.kgithubAction, self.githubAction]:
i.setCheckable(True) i.setCheckable(True)
self.gitlinkAction.setChecked(True) self.gitlinkAction.setChecked(True)
self.changeSourcesGroup = QtWidgets.QActionGroup(MainWindow) self.changeSourcesGroup = QtWidgets.QActionGroup(MainWindow)
self.changeSourcesGroup.addAction(self.gitlinkAction) self.changeSourcesGroup.addAction(self.gitlinkAction)
self.changeSourcesGroup.addAction(self.kgithubAction)
self.changeSourcesGroup.addAction(self.ipv6Action) self.changeSourcesGroup.addAction(self.ipv6Action)
self.changeSourcesGroup.addAction(self.githubAction)
self.changeSourcesGroup.addAction(self.localAction) self.changeSourcesGroup.addAction(self.localAction)
self.retranslateUi(MainWindow) self.retranslateUi(MainWindow)
@ -153,7 +160,7 @@ def InstallOtherWine():
def ChangeSources(): def ChangeSources():
global urlSources global urlSources
global internetWineSource global internetWineSource
sources = [ui.gitlinkAction, ui.ipv6Action, ui.localAction] sources = [ui.gitlinkAction, ui.kgithubAction, ui.ipv6Action, ui.githubAction, ui.localAction]
for i in range(0, len(sources)): for i in range(0, len(sources)):
if sources[i].isChecked(): if sources[i].isChecked():
urlSources = internetWineSourceList[i] urlSources = internetWineSourceList[i]
@ -171,6 +178,7 @@ def ReadInternetInformation():
try: try:
internetJsonList = json.loads(requests.get(f"{internetWineSource}/information.json").text) internetJsonList = json.loads(requests.get(f"{internetWineSource}/information.json").text)
except: except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(window, "错误", "无法连接服务器!") QtWidgets.QMessageBox.critical(window, "错误", "无法连接服务器!")
return return
nmodel = QtGui.QStandardItemModel(window) nmodel = QtGui.QStandardItemModel(window)
@ -292,7 +300,11 @@ def on_addButton_clicked():
if(ui.deleteZip.isChecked() + ui.unzip.isChecked() == 2): if(ui.deleteZip.isChecked() + ui.unzip.isChecked() == 2):
ui.deleteZip.setChecked(False) ui.deleteZip.setChecked(False)
ui.unzip.setChecked(False) ui.unzip.setChecked(False)
downloadUrl = internetWineSource + downloadName #downloadUrl = internetWineSource + downloadName
if "://" in downloadName:
downloadUrl = downloadName
else:
downloadUrl = internetWineSource + downloadName
dialog = QtWidgets.QProgressDialog() dialog = QtWidgets.QProgressDialog()
cancel = QtWidgets.QPushButton("取消") cancel = QtWidgets.QPushButton("取消")
cancel.setDisabled(True) cancel.setDisabled(True)
@ -346,7 +358,9 @@ if __name__ == "__main__":
internetJsonList = [] internetJsonList = []
internetWineSourceList = [ internetWineSourceList = [
"https://code.gitlink.org.cn/gfdgd_xi/wine-mirrors/raw/branch/master/", "https://code.gitlink.org.cn/gfdgd_xi/wine-mirrors/raw/branch/master/",
"http://gfdgdxi.msns.cn/wine-mirrors/", # 备用源,纯 IPv6 源 "https://kgithub.com/gfdgd-xi/wine-mirrors-websize/raw/master/",
"http://wine.wine-runner.gfdgdxi.top/",
"https://github.com/gfdgd-xi/wine-mirrors-websize/raw/master/",
"http://127.0.0.1/wine-mirrors/" # 本地测试源 "http://127.0.0.1/wine-mirrors/" # 本地测试源
] ]
internetWineSource = internetWineSourceList[0] internetWineSource = internetWineSourceList[0]

View File

@ -2407,23 +2407,9 @@ exe路径\' 参数 \'
<b>千万不要中断后不删除源的情况下 apt upgrade </b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine会自动执行恢复操作即可 <b>千万不要中断后不删除源的情况下 apt upgrade </b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine会自动执行恢复操作即可
以及此脚本安装的 Wine 无法保证 100% 能使用以及副作用是会提示 以及此脚本安装的 Wine 无法保证 100% 能使用以及副作用是会提示
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构跳过配置文件 'main/binary-i386/Packages' 的获取</code>''') <code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构跳过配置文件 'main/binary-i386/Packages' 的获取</code>''')
updateThingsString = transla.transe("U", '''※1、Windows 应用适配工具新增系统资源显示; updateThingsString = transla.transe("U", '''※1、Windows 虚拟机安装工具支持非 X86 架构;
2Windows 应用适配工具使用 C++ 重写 2应用打包器可以与星火应用商店配合构建 arm/all 全架构的 Wine
3修复打包器基于官方生态适配脚本无法打开的问题 3运行器和打包器支持调用 spark-wine8
4新增运行库功能安装以实现使用 Qemu User 跨架构运行 Wine 的功能理论上支持 3a4000 但没试过
5修复 Chroot 容器的一些问题
6修复在 Debian11 安装时缺失依赖 rar 的问题
7新增安装 box86box64 的功能
8修复故障反馈功能错误的问题
9支持调用 Flatpak 安装的 Wine
10修改程序内的部分网址
11作者信息变更
12支持禁用程序的多语言支持默认禁用因为是机翻的
13支持在程序本地翻译缺失的情况下自动机翻缺失语句
14从此版本开始不再区分吾爱版Spark 版和 UOS
15新增下载量查询
16更新程序公告
17新增断网彩蛋
''') ''')
for i in information["Thank"]: for i in information["Thank"]:
thankText += f"{i}\n" thankText += f"{i}\n"

Binary file not shown.

View File

@ -1,5 +1,6 @@
{ {
"Version": "3.2.0", "Version": "3.2.1",
"Time": "未知",
"Thank": [ "Thank": [
"感谢 RacoonGX 的付出与贡献", "感谢 RacoonGX 的付出与贡献",
"感谢 @Amber 编写的《使用wine运行器打包无安装包的软件》https://bbs.deepin.org/post/247720", "感谢 @Amber 编写的《使用wine运行器打包无安装包的软件》https://bbs.deepin.org/post/247720",