mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
deb包构建完成,即将测试
This commit is contained in:
parent
e9f24c2cc0
commit
3c25c54aca
@ -4,18 +4,17 @@ Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿
|
|||||||
Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner
|
Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Depends: python3, python3-tk, python3-pip, python3-pil, python3-pil.imagetk, python3-pyquery, deepin-terminal, aria2, curl, unrar, unzip, python3-requests, fakeroot, bash
|
Depends: python3, python3-pil, python3-pil.imagetk, python3-pyquery, deepin-terminal, aria2, curl, unrar, unzip, python3-requests, fakeroot, bash, python3-pyqt5
|
||||||
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
|
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
|
||||||
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
|
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
|
||||||
Description: gfdgd xi 制作的 wine 运行器
|
Description: gfdgd xi 制作的 wine 运行器
|
||||||
更新内容:
|
更新内容:
|
||||||
※1、新增程序感谢、谢明以及程序的建议和问题反馈和内置更新程序
|
※1、界面大改造,从使用 Tkinter 改为 Qt,参考了 @134******28 和 @sgb76 提供的设计方案和代码
|
||||||
※2、支持 winetricks 指定 Wine 打开
|
※2、添加了基于 UOS 生态适配活动打包脚本的打包器,以及基于 Virtualbox 的简易 Windows 镜像安装工具
|
||||||
※3、新增窗口透明工具,感谢@a2035274 和 @虚幻的早晨 在论坛的讨论
|
※3、将 pip 由阿里源改为华为源,提升下载安装速度,并删除使用 pip 下载库的功能(已不需要,废弃)
|
||||||
※4、支持在指定容器、Wine 安装 MSXML
|
4、添加 @delsin 和 @神末shenmo 建议的 postrm 脚本
|
||||||
※5、支持启用/关闭 opengl(感谢@zhangs 在论坛发帖)以及支持安装/卸载 winbind
|
5、优化多屏窗口居中问题
|
||||||
※6、添加云沙箱的网站链接快捷方式
|
6、修复 1.6.0 程序无法保存设置的问题
|
||||||
※7、支持从星火应用商店源安装 Windows 常见字体
|
7、修复 1.6.0 的更新程序无法正常更新的问题
|
||||||
8、优化窗口布局以及默认显示位置
|
8、升级 Geek Uninstaller 版本
|
||||||
9、支持打开指定容器、Wine 的资源管理器
|
|
||||||
作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||||
|
17
deb/opt/apps/deepin-wine-runner/RunVM.sh
Executable file
17
deb/opt/apps/deepin-wine-runner/RunVM.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 使用系统默认的 bash 运行
|
||||||
|
###########################################################################################
|
||||||
|
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||||
|
# 版本:1.7.0
|
||||||
|
# 更新时间:2022年07月15日
|
||||||
|
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||||
|
# 基于 Python3 的 tkinter 构建
|
||||||
|
###########################################################################################
|
||||||
|
cd `dirname $0`
|
||||||
|
which VBoxManage
|
||||||
|
if test $? == 0 ; then
|
||||||
|
VM/VirtualMachine
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
echo 未安装 VirtualBox,开始安装,安装结束重新运行即可
|
||||||
|
./launch.sh deepin-terminal -C "pkexec apt install virtualbox-6.1 -y && zenity --info --text=\"安装完毕,关闭此对话框和安装终端重新运行程序即可\" --no-wrap" --keep-open
|
22
deb/opt/apps/deepin-wine-runner/StartVM.sh
Executable file
22
deb/opt/apps/deepin-wine-runner/StartVM.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 使用系统默认的 bash 运行
|
||||||
|
###########################################################################################
|
||||||
|
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||||
|
# 版本:1.7.0
|
||||||
|
# 更新时间:2022年07月15日
|
||||||
|
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||||
|
# 基于 Python3 的 tkinter 构建
|
||||||
|
###########################################################################################
|
||||||
|
VBoxManage showvminfo Windows
|
||||||
|
if test 0 == $?; then
|
||||||
|
# 检测到虚拟机存在,启动虚拟机
|
||||||
|
VBoxManage startvm Windows
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
zenity --question --no-wrap --text="检查到您未创建所指定的虚拟机,是否创建虚拟机并继续?\n如果不创建将无法使用"
|
||||||
|
if test 1 == $?; then
|
||||||
|
# 用户不想创建虚拟机,结束
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
cd `dirname $0`
|
||||||
|
./VM/VirtualMachine
|
24
deb/opt/apps/deepin-wine-runner/VM/.qmake.stash
Normal file
24
deb/opt/apps/deepin-wine-runner/VM/.qmake.stash
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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
|
BIN
deb/opt/apps/deepin-wine-runner/VM/VirtualMachine
Executable file
BIN
deb/opt/apps/deepin-wine-runner/VM/VirtualMachine
Executable file
Binary file not shown.
BIN
deb/opt/apps/deepin-wine-runner/VM/Windows7X64Auto.iso
Normal file
BIN
deb/opt/apps/deepin-wine-runner/VM/Windows7X64Auto.iso
Normal file
Binary file not shown.
BIN
deb/opt/apps/deepin-wine-runner/VM/Windows7X86Auto.iso
Normal file
BIN
deb/opt/apps/deepin-wine-runner/VM/Windows7X86Auto.iso
Normal file
Binary file not shown.
125
deb/opt/apps/deepin-wine-runner/VM/api/__init__.py
Normal file
125
deb/opt/apps/deepin-wine-runner/VM/api/__init__.py
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
################################################
|
||||||
|
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||||
|
# 版本:1.0
|
||||||
|
# 依照 GPL V3 协议开源
|
||||||
|
################################################
|
||||||
|
# 参考文献:
|
||||||
|
# https://juejin.cn/post/7080484519328874510
|
||||||
|
################################################
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
homePath = os.path.expanduser('~')
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0]
|
||||||
|
|
||||||
|
class File:
|
||||||
|
def __init__(self, path) -> None:
|
||||||
|
self.path = path
|
||||||
|
|
||||||
|
def getFileFolderSize(self):
|
||||||
|
"""get size for file or folder"""
|
||||||
|
totalSize = 0
|
||||||
|
if not os.path.exists(self.path):
|
||||||
|
return totalSize
|
||||||
|
if os.path.isfile(self.path):
|
||||||
|
totalSize = os.path.getsize(self.path) # 5041481
|
||||||
|
return totalSize
|
||||||
|
if os.path.isdir(self.path):
|
||||||
|
with os.scandir(self.path) as dirEntryList:
|
||||||
|
for curSubEntry in dirEntryList:
|
||||||
|
curSubEntryFullPath = os.path.join(self.path, curSubEntry.name)
|
||||||
|
if curSubEntry.is_dir():
|
||||||
|
curSubFolderSize = self.path(curSubEntryFullPath) # 5800007
|
||||||
|
totalSize += curSubFolderSize
|
||||||
|
elif curSubEntry.is_file():
|
||||||
|
curSubFileSize = os.path.getsize(curSubEntryFullPath) # 1891
|
||||||
|
totalSize += curSubFileSize
|
||||||
|
return totalSize
|
||||||
|
|
||||||
|
class Manager:
|
||||||
|
def __init__(self, name: str, managerPath: str="VBoxManage") -> None:
|
||||||
|
self.name = name
|
||||||
|
self.managerPath = managerPath
|
||||||
|
self.vboxVersion = subprocess.getoutput(f"\"{self.managerPath}\" -v")
|
||||||
|
|
||||||
|
def Create(self, type: str="Windows7") -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" createvm --name \"{self.name}\" --ostype \"{type}\" --register")
|
||||||
|
|
||||||
|
def CreateDisk(self, path: str, size: int) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" createvdi --filename \"{path}\" --size \"{size}\"")
|
||||||
|
|
||||||
|
def CreateDiskControl(self, controlName: str="storage_controller_1") -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" storagectl \"{self.name}\" --name \"{controlName}\" --add ide")
|
||||||
|
|
||||||
|
def MountDisk(self, diskPath: str, controlName: str="storage_controller_1", port: int=0, device: int=0) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" storageattach \"{self.name}\" --storagectl \"{controlName}\" --type hdd --port {port} --device {device} --medium \"{diskPath}\"")
|
||||||
|
|
||||||
|
def MountISO(self, isoPath: str, controlName: str="storage_controller_1", port: int=1, device: int=0) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" storageattach \"{self.name}\" --storagectl \"{controlName}\" --type dvddrive --port {port} --device {device} --medium \"{isoPath}\"")
|
||||||
|
|
||||||
|
def BootFirst(self, bootDrive: str) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --boot1 {bootDrive}")
|
||||||
|
|
||||||
|
def SetNetBridge(self, netDriver: str) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --nic1 bridged --cableconnected1 on --nictype1 82540EM --bridgeadapter1 \"{netDriver}\" --intnet1 brigh1 --macaddress1 auto")
|
||||||
|
#os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --nic1 hostif")
|
||||||
|
pass
|
||||||
|
|
||||||
|
def SetCPU(self, number: int) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --cpus {number}")
|
||||||
|
|
||||||
|
def SetMemory(self, memory: int) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --memory {memory}")
|
||||||
|
|
||||||
|
def SetRemote(self, setting: bool) -> None:
|
||||||
|
if setting:
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --vrde on")
|
||||||
|
return
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --vrde off")
|
||||||
|
|
||||||
|
def SetRemoteConnectSetting(self, port: int=5540) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --vrdeport {port} --vrdeaddress """)
|
||||||
|
|
||||||
|
def Start(self, unShown: bool = False) -> None:
|
||||||
|
if unShown:
|
||||||
|
os.system(f"\"{self.managerPath}\" startvm \"{self.name}\" -type headless")
|
||||||
|
return
|
||||||
|
os.system(f"\"{self.managerPath}\" startvm \"{self.name}\"")
|
||||||
|
|
||||||
|
def Stop(self) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" controlvm \"{self.name}\" poweroff")
|
||||||
|
|
||||||
|
def Delete(self) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" unregistervm --delete \"{self.name}\"")
|
||||||
|
|
||||||
|
def SetDisplayMemory(self, memory: int) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --vram {memory}")
|
||||||
|
|
||||||
|
def InstallGuessAdditions(self, controlName: str="storage_controller_1", port: int=1, device: int=0) -> None:
|
||||||
|
self.MountISO("/usr/share/virtualbox/VBoxGuestAdditions.iso", controlName, port, device)
|
||||||
|
|
||||||
|
def EnabledAudio(self) -> None:
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --audio pulse --audiocontroller hda --audioin on --audioout on")
|
||||||
|
#os.system("")
|
||||||
|
|
||||||
|
def EnabledClipboardMode(self):
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --clipboard-mode bidirectional")
|
||||||
|
|
||||||
|
def EnabledDraganddrop(self):
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --draganddrop bidirectional")
|
||||||
|
|
||||||
|
def ShareFile(self, name, path):
|
||||||
|
os.system(f"\"{self.managerPath}\" sharedfolder add \"{self.name}\" -name \"{name}\" -hostpath \"{path}\"")
|
||||||
|
|
||||||
|
def SetVBoxSVGA(self):
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --graphicscontroller vboxsvga")
|
||||||
|
|
||||||
|
def SetMousePS2(self):
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --mouse usb")
|
||||||
|
|
||||||
|
def SetKeyboardPS2(self):
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --keyboard usb")
|
||||||
|
|
||||||
|
def OpenUSB(self):
|
||||||
|
os.system(f"\"{self.managerPath}\" modifyvm \"{self.name}\" --usbohci on")
|
||||||
|
pass
|
Binary file not shown.
BIN
deb/opt/apps/deepin-wine-runner/VM/icon.png
Executable file
BIN
deb/opt/apps/deepin-wine-runner/VM/icon.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
50
deb/opt/apps/deepin-wine-runner/VM/run.py
Executable file
50
deb/opt/apps/deepin-wine-runner/VM/run.py
Executable file
@ -0,0 +1,50 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
import api
|
||||||
|
import sys
|
||||||
|
import psutil
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
os.system("clear")
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0]
|
||||||
|
if len(sys.argv) < 3 :
|
||||||
|
print("参数不齐!")
|
||||||
|
exit()
|
||||||
|
net = ""
|
||||||
|
for k, v in psutil.net_if_addrs().items():
|
||||||
|
for item in v:
|
||||||
|
if item[0] == 2 and not item[1] == "127.0.0.1" and not item[1] == "192.168.250.1":
|
||||||
|
net = k
|
||||||
|
break
|
||||||
|
if net == "":
|
||||||
|
exit()
|
||||||
|
# 创建一个叫Windows的虚拟机
|
||||||
|
vm = api.Manager("Windows")
|
||||||
|
if sys.argv[2] == "0":
|
||||||
|
vm.Create("Windows7")
|
||||||
|
elif sys.argv[2] == "1":
|
||||||
|
vm.Create("Windows7_64")
|
||||||
|
else:
|
||||||
|
vm.Create("WindowsNT_64")
|
||||||
|
vm.CreateDisk(f"{api.homePath}/VirtualBox VMs/Windows/Windows.vdi", 131072)
|
||||||
|
vm.CreateDiskControl()
|
||||||
|
vm.MountDisk(f"{api.homePath}/VirtualBox VMs/Windows/Windows.vdi")
|
||||||
|
vm.MountISO(sys.argv[1])
|
||||||
|
if sys.argv[2] == "0":
|
||||||
|
vm.MountISO(f"{programPath}/Windows7X86Auto.iso", device=1)
|
||||||
|
elif sys.argv[2] == "1":
|
||||||
|
vm.MountISO(f"{programPath}/Windows7X64Auto.iso", device=1)
|
||||||
|
vm.SetCPU(1)
|
||||||
|
vm.SetMemory(psutil.virtual_memory().total // 1024 // 1024 // 3)
|
||||||
|
vm.SetDisplayMemory(32)
|
||||||
|
vm.SetNetBridge(net)
|
||||||
|
vm.EnabledAudio()
|
||||||
|
vm.EnabledClipboardMode()
|
||||||
|
vm.EnabledDraganddrop()
|
||||||
|
vm.SetVBoxSVGA()
|
||||||
|
vm.SetMousePS2()
|
||||||
|
vm.SetKeyboardPS2()
|
||||||
|
vm.OpenUSB()
|
||||||
|
vm.ShareFile("ROOT", "/")
|
||||||
|
vm.ShareFile("HOME", api.homePath)
|
||||||
|
vm.Start()
|
@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 使用系统默认的 python3 运行
|
||||||
|
###########################################################################################
|
||||||
|
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||||
|
# 版本:1.6.1
|
||||||
|
# 更新时间:2022年07月14日
|
||||||
|
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||||
|
# 基于 Python3 的 tkinter 构建
|
||||||
|
###########################################################################################
|
||||||
|
#################
|
||||||
|
# 引入所需的库
|
||||||
|
#################
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import json
|
||||||
|
import threading
|
||||||
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
|
|
||||||
|
# 读取文本文档
|
||||||
|
def readtxt(path):
|
||||||
|
f = open(path, "r") # 设置文件对象
|
||||||
|
str = f.read() # 获取内容
|
||||||
|
f.close() # 关闭文本对象
|
||||||
|
return str # 返回结果
|
||||||
|
|
||||||
|
def Unzip():
|
||||||
|
os.system("mkdir -p ~")
|
||||||
|
os.chdir(f"{homePath}")
|
||||||
|
os.system(f"unzip -o \"{programPath}/package-script.zip\"")
|
||||||
|
print("Unzip Done")
|
||||||
|
ReStartProgram()
|
||||||
|
|
||||||
|
# 重启本应用程序
|
||||||
|
def ReStartProgram():
|
||||||
|
python = sys.executable
|
||||||
|
os.execl(python, python, * sys.argv)
|
||||||
|
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
homePath = os.path.expanduser('~')
|
||||||
|
information = json.loads(readtxt(f"{programPath}/information.json"))
|
||||||
|
version = information["Version"]
|
||||||
|
if not os.path.exists(f"{homePath}/package-script") or not json.loads(readtxt(f"{homePath}/package-script/information.json"))["Version"] == version:
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
widget = QtWidgets.QWidget()
|
||||||
|
widgetLayout = QtWidgets.QVBoxLayout()
|
||||||
|
widget.setWindowTitle("解压中")
|
||||||
|
widgetLayout.addWidget(QtWidgets.QLabel("正在解压所需程序,请稍后……"))
|
||||||
|
progress = QtWidgets.QProgressBar()
|
||||||
|
progress.setMaximum(0)
|
||||||
|
progress.setMinimum(0)
|
||||||
|
progress.update()
|
||||||
|
widgetLayout.addWidget(progress)
|
||||||
|
widget.setLayout(widgetLayout)
|
||||||
|
widget.show()
|
||||||
|
# 解压流程
|
||||||
|
QtWidgets.QProgressDialog(None)
|
||||||
|
t = threading.Thread(target=Unzip)
|
||||||
|
t.start()
|
||||||
|
sys.exit(app.exec_())
|
||||||
|
os.chdir(f"{homePath}/package-script")
|
||||||
|
os.system("./package.py")
|
||||||
|
print("End")
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布
|
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布
|
||||||
# 版本:1.5.3
|
# 版本:1.7.0
|
||||||
# 感谢:感谢 deepin-wine 团队,提供了 deepin-wine 给大家使用,让我能做这个程序
|
# 感谢:感谢 deepin-wine 团队,提供了 deepin-wine 给大家使用,让我能做这个程序
|
||||||
# 基于 Python3 的 tkinter 构建
|
# 基于 Python3 的 tkinter 构建
|
||||||
#########################################################################
|
#########################################################################
|
||||||
@ -14,195 +14,203 @@ import json
|
|||||||
import shutil
|
import shutil
|
||||||
import random
|
import random
|
||||||
import pathlib
|
import pathlib
|
||||||
import ttkthemes
|
|
||||||
import threading
|
|
||||||
import traceback
|
import traceback
|
||||||
import subprocess
|
import subprocess
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
import tkinter as tk
|
import PyQt5.QtGui as QtGui
|
||||||
import tkinter.ttk as ttk
|
import PyQt5.QtCore as QtCore
|
||||||
import tkinter.messagebox as messagebox
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
import tkinter.filedialog as filedialog
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# 程序所需事件
|
# 程序所需事件
|
||||||
#################
|
#################
|
||||||
|
|
||||||
def button1_cl():
|
def button1_cl():
|
||||||
path = filedialog.askdirectory(title="选择 wine 容器", initialdir="~/.deepinwine")
|
path = QtWidgets.QFileDialog.getExistingDirectory(widget, "选择 wine 容器", f"{get_home()}/.deepinwine")
|
||||||
if path != "":
|
if path != "":
|
||||||
e6_text.set(path)
|
e6_text.setText(path)
|
||||||
|
|
||||||
def button2_cl():
|
def button2_cl():
|
||||||
path = filedialog.askopenfilename(filetypes=[("PNG图标", "*.png"), ("SVG图标", "*.svg"), ("全部文件", "*.*")], title="选择图标文件", initialdir="~")
|
path = QtWidgets.QFileDialog.getOpenFileName(widget, "选择图标文件", get_home(), "PNG图标(*.png);;SVG图标(*.svg);;全部文件(*.*)")[0]
|
||||||
if path != "":
|
if path != "":
|
||||||
e9_text.set(path)
|
e9_text.setText(path)
|
||||||
|
|
||||||
def button4_cl():
|
def button4_cl():
|
||||||
path = filedialog.asksaveasfilename(filetypes=[("deb 文件", "*.deb"), ("所有文件", "*.*")], title="保存 deb 包", initialdir="~", initialfile="{}_{}_i386.deb".format(e1_text.get(), e2_text.get()))
|
path = QtWidgets.QFileDialog.getSaveFileName(widget, "保存 deb 包", get_home(), "deb 文件(*.deb);;所有文件(*.*)", "{}_{}_i386.deb".format(e1_text.text(), e2_text.text()))[0]
|
||||||
if path != "":
|
if path != "":
|
||||||
e12_text.set(path)
|
e12_text.setText(path)
|
||||||
|
|
||||||
def disabled_or_NORMAL_all(choose):
|
def disabled_or_NORMAL_all(choose):
|
||||||
chooses = {True: tk.NORMAL, False: tk.DISABLED}
|
choose = not choose
|
||||||
a = chooses[choose]
|
e1_text.setDisabled(choose)
|
||||||
label1.configure(state=a)
|
e2_text.setDisabled(choose)
|
||||||
label2.configure(state=a)
|
e3_text.setDisabled(choose)
|
||||||
label3.configure(state=a)
|
e4_text.setDisabled(choose)
|
||||||
label4.configure(state=a)
|
e5_text.setDisabled(choose)
|
||||||
label5.configure(state=a)
|
e6_text.setDisabled(choose)
|
||||||
label6.configure(state=a)
|
e7_text.setDisabled(choose)
|
||||||
label7.configure(state=a)
|
e8_text.setDisabled(choose)
|
||||||
label8.configure(state=a)
|
e9_text.setDisabled(choose)
|
||||||
label9.configure(state=a)
|
e10_text.setDisabled(choose)
|
||||||
label10.configure(state=a)
|
e12_text.setDisabled(choose)
|
||||||
label12.configure(state=a)
|
e15_text.setDisabled(choose)
|
||||||
label14.configure(state=a)
|
button1.setDisabled(choose)
|
||||||
label15.configure(state=a)
|
button2.setDisabled(choose)
|
||||||
e1.configure(state=a)
|
button4.setDisabled(choose)
|
||||||
e2.configure(state=a)
|
button5.setDisabled(choose)
|
||||||
e3.configure(state=a)
|
option1_text.setDisabled(choose)
|
||||||
e4.configure(state=a)
|
chooseWineHelperValue.setDisabled(choose)
|
||||||
e5.configure(state=a)
|
wineVersion.setDisabled(choose)
|
||||||
e6.configure(state=a)
|
|
||||||
e7.configure(state=a)
|
|
||||||
e8.configure(state=a)
|
|
||||||
e9.configure(state=a)
|
|
||||||
e10.configure(state=a)
|
|
||||||
e12.configure(state=a)
|
|
||||||
e15.configure(state=a)
|
|
||||||
button1.config(state=a)
|
|
||||||
button2.config(state=a)
|
|
||||||
button4.config(state=a)
|
|
||||||
button5.config(state=a)
|
|
||||||
option1.config(state=a)
|
|
||||||
chooseWineHelper.config(state=a)
|
|
||||||
chooseWineVersion.config(state=a)
|
|
||||||
|
|
||||||
|
class QT:
|
||||||
|
thread = None
|
||||||
|
|
||||||
def make_deb():
|
def make_deb():
|
||||||
clean_textbox1_things()
|
clean_textbox1_things()
|
||||||
disabled_or_NORMAL_all(False)
|
disabled_or_NORMAL_all(False)
|
||||||
if e1_text.get() == "" or e2_text.get() == "" or e3_text.get() == "" or e4_text.get() == "" or e5_text.get() == "" or e6_text.get() == "" or e7_text.get() == "" or e8_text.get() == "" or e12_text.get() == "":
|
if e1_text.text() == "" or e2_text.text() == "" or e3_text.text() == "" or e4_text.text() == "" or e5_text.text() == "" or e6_text.text() == "" or e7_text.text() == "" or e8_text.text() == "" or e12_text.text() == "":
|
||||||
messagebox.showinfo(title="提示", message="必填信息没有填写完整,无法继续构建 deb 包")
|
QtWidgets.QMessageBox.critical(widget, "错误", "必填信息没有填写完整,无法继续构建 deb 包")
|
||||||
disabled_or_NORMAL_all(True)
|
disabled_or_NORMAL_all(True)
|
||||||
label13_text_change("必填信息没有填写完整,无法继续构建 deb 包")
|
label13_text_change("必填信息没有填写完整,无法继续构建 deb 包")
|
||||||
return
|
return
|
||||||
if not messagebox.askyesno(title="提示", message="打包将会改动现在选择的容器,是否继续?"):
|
if QtWidgets.QMessageBox.question(widget, "提示", "打包将会改动现在选择的容器,是否继续?") == QtWidgets.QMessageBox.No:
|
||||||
disabled_or_NORMAL_all(True)
|
disabled_or_NORMAL_all(True)
|
||||||
return
|
return
|
||||||
thread = threading.Thread(target=make_deb_threading)
|
#thread = threading.Thread(target=make_deb_threading)
|
||||||
thread.start()
|
QT.thread = make_deb_threading()
|
||||||
|
QT.thread.signal.connect(chang_textbox1_things)
|
||||||
|
QT.thread.label.connect(label13_text_change)
|
||||||
|
QT.thread.start()
|
||||||
|
#thread.start()
|
||||||
|
|
||||||
|
|
||||||
def label13_text_change(thing):
|
def label13_text_change(thing):
|
||||||
label13_text.set("当前 deb 打包情况:{}".format(thing))
|
label13_text.setText(f"<p align='center'>当前 deb 打包情况:{thing}</p>")
|
||||||
|
|
||||||
def make_deb_threading():
|
class make_deb_threading(QtCore.QThread):
|
||||||
#####################################
|
signal = QtCore.pyqtSignal(str)
|
||||||
# 程序创建的 deb 构建临时文件夹目录树:
|
label = QtCore.pyqtSignal(str)
|
||||||
# /XXX
|
def __init__(self) -> None:
|
||||||
# ├── DEBIAN
|
super().__init__()
|
||||||
# │ └── control
|
|
||||||
# └── opt
|
def run_command(self, command):
|
||||||
# └── apps
|
res = subprocess.Popen([command], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
# └── XXX
|
# 实时读取程序返回
|
||||||
# ├── entries
|
while res.poll() is None:
|
||||||
# │ ├── applications
|
|
||||||
# │ │ └── XXX.desktop
|
|
||||||
# │ └── icons
|
|
||||||
# │ └── hicolor
|
|
||||||
# │ └── scalable
|
|
||||||
# │ └── apps
|
|
||||||
# │ └── XXX.png(XXX.svg)
|
|
||||||
# ├── files
|
|
||||||
# │ ├── files.7z
|
|
||||||
# │ └── run.sh
|
|
||||||
# └── info
|
|
||||||
#
|
|
||||||
# 11 directories, 6 files
|
|
||||||
#####################################
|
|
||||||
try:
|
|
||||||
#####################
|
|
||||||
# 判断文件是否存在
|
|
||||||
#####################
|
|
||||||
label13_text_change("正在检查文件是否存在并为后面步骤准备……")
|
|
||||||
a = ""
|
|
||||||
if e6_text.get() == "/":
|
|
||||||
b = e6_text.get()[:-1]
|
|
||||||
else:
|
|
||||||
b = e6.get()
|
|
||||||
if e9_text.get() != "":
|
|
||||||
# 获取图片格式(不太准)
|
|
||||||
try:
|
try:
|
||||||
im = Image.open(e9_text.get())
|
text = res.stdout.readline().decode("utf8")
|
||||||
imms = im.format.lower()
|
except:
|
||||||
except: # 未知(就直接设置为 svg 后缀)
|
text = ""
|
||||||
imms = ".svg"
|
print(text, end="")
|
||||||
a = "/opt/apps/{}/entries/icons/hicolor/scalable/apps/{}.{}".format(e1_text.get(), e1_text.get(), imms)
|
self.signal.emit(text)
|
||||||
if not os.path.exists(e9_text.get()):
|
|
||||||
messagebox.showerror(title="提示", message="图标的路径填写错误,无法进行构建 deb 包")
|
def run(self):
|
||||||
|
#####################################
|
||||||
|
# 程序创建的 deb 构建临时文件夹目录树:
|
||||||
|
# /XXX
|
||||||
|
# ├── DEBIAN
|
||||||
|
# │ ├── control
|
||||||
|
# │ └── postrm
|
||||||
|
# └── opt
|
||||||
|
# └── apps
|
||||||
|
# └── XXX
|
||||||
|
# ├── entries
|
||||||
|
# │ ├── applications
|
||||||
|
# │ │ └── XXX.desktop
|
||||||
|
# │ └── icons
|
||||||
|
# │ └── hicolor
|
||||||
|
# │ └── scalable
|
||||||
|
# │ └── apps
|
||||||
|
# │ └── XXX.png(XXX.svg)
|
||||||
|
# ├── files
|
||||||
|
# │ ├── files.7z
|
||||||
|
# │ └── run.sh
|
||||||
|
# └── info
|
||||||
|
#
|
||||||
|
# 11 directories, 7 files
|
||||||
|
#####################################
|
||||||
|
try:
|
||||||
|
#####################
|
||||||
|
# 判断文件是否存在
|
||||||
|
#####################
|
||||||
|
self.label.emit("正在检查文件是否存在并为后面步骤准备……")
|
||||||
|
a = ""
|
||||||
|
if e6_text.text() == "/":
|
||||||
|
b = e6_text.text()[:-1]
|
||||||
|
else:
|
||||||
|
b = e6_text.text()
|
||||||
|
if e9_text.text() != "":
|
||||||
|
# 获取图片格式(不太准)
|
||||||
|
try:
|
||||||
|
im = Image.open(e9_text.text())
|
||||||
|
imms = im.format.lower()
|
||||||
|
except: # 未知(就直接设置为 svg 后缀)
|
||||||
|
imms = ".svg"
|
||||||
|
a = "/opt/apps/{}/entries/icons/hicolor/scalable/apps/{}.{}".format(e1_text.text(), e1_text.text(), imms)
|
||||||
|
if not os.path.exists(e9_text.text()):
|
||||||
|
QtWidgets.QMessageBox.critical(widget, "错误", "图标的路径填写错误,无法进行构建 deb 包")
|
||||||
|
disabled_or_NORMAL_all(True)
|
||||||
|
label13_text_change("图标的路径填写错误,无法进行构建 deb 包")
|
||||||
|
return
|
||||||
|
if not os.path.exists(e6_text.text()):
|
||||||
|
QtWidgets.QMessageBox.critical(widget, "错误", "路径填写错误,无法继续构建 deb 包")
|
||||||
disabled_or_NORMAL_all(True)
|
disabled_or_NORMAL_all(True)
|
||||||
label13_text_change("图标的路径填写错误,无法进行构建 deb 包")
|
label13_text_change("图标的路径填写错误,无法进行构建 deb 包")
|
||||||
return
|
return
|
||||||
if not os.path.exists(e6_text.get()):
|
#############
|
||||||
messagebox.showerror(title="提示", message="路径填写错误,无法继续构建 deb 包")
|
# 删除文件
|
||||||
disabled_or_NORMAL_all(True)
|
#############
|
||||||
label13_text_change("图标的路径填写错误,无法进行构建 deb 包")
|
self.label.emit("正在删除对构建 deb 包有影响的文件……")
|
||||||
return
|
debPackagePath = f"/tmp/{random.randint(0, 9999)}"
|
||||||
#############
|
self.run_command(f"rm -rfv /tmp/{debPackagePath}")
|
||||||
# 删除文件
|
###############
|
||||||
#############
|
# 创建目录
|
||||||
label13_text_change("正在删除对构建 deb 包有影响的文件……")
|
###############
|
||||||
debPackagePath = f"/tmp/{random.randint(0, 9999)}"
|
self.label.emit("正在创建目录……")
|
||||||
run_command(f"rm -rfv /tmp/{debPackagePath}")
|
os.makedirs("{}/DEBIAN".format(debPackagePath))
|
||||||
###############
|
os.makedirs("{}/opt/apps/{}/entries/applications".format(debPackagePath, e1_text.text()))
|
||||||
# 创建目录
|
os.makedirs("{}/opt/apps/{}/entries/icons/hicolor/scalable/apps".format(debPackagePath, e1_text.text()))
|
||||||
###############
|
os.makedirs("{}/opt/apps/{}/files".format(debPackagePath, e1_text.text()))
|
||||||
label13_text_change("正在创建目录……")
|
###############
|
||||||
os.makedirs("{}/DEBIAN".format(debPackagePath))
|
# 创建文件
|
||||||
os.makedirs("{}/opt/apps/{}/entries/applications".format(debPackagePath, e1_text.get()))
|
###############
|
||||||
os.makedirs("{}/opt/apps/{}/entries/icons/hicolor/scalable/apps".format(debPackagePath, e1_text.get()))
|
self.label.emit("正在创建文件……")
|
||||||
os.makedirs("{}/opt/apps/{}/files".format(debPackagePath, e1_text.get()))
|
os.mknod("{}/DEBIAN/control".format(debPackagePath))
|
||||||
###############
|
os.mknod("{}/opt/apps/{}/entries/applications/{}.desktop".format(debPackagePath, e1_text.text(), e1_text.text()))
|
||||||
# 创建文件
|
os.mknod("{}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.text()))
|
||||||
###############
|
os.mknod("{}/opt/apps/{}/info".format(debPackagePath, e1_text.text()))
|
||||||
label13_text_change("正在创建文件……")
|
###############
|
||||||
os.mknod("{}/DEBIAN/control".format(debPackagePath))
|
# 设置容器
|
||||||
os.mknod("{}/opt/apps/{}/entries/applications/{}.desktop".format(debPackagePath, e1_text.get(), e1_text.get()))
|
###############
|
||||||
os.mknod("{}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.get()))
|
self.label.emit("正在设置 wine 容器")
|
||||||
os.mknod("{}/opt/apps/{}/info".format(debPackagePath, e1_text.get()))
|
os.chdir(b)
|
||||||
###############
|
self.run_command("sed -i \"s#$USER#@current_user@#\" ./*.reg")
|
||||||
# 设置容器
|
os.chdir(f"{b}/drive_c/users")
|
||||||
###############
|
self.run_command(f"mv -v '{os.getlogin()}' @current_user@")
|
||||||
label13_text_change("正在设置 wine 容器")
|
os.chdir(programPath)
|
||||||
os.chdir(b)
|
###############
|
||||||
run_command("sed -i \"s#$USER#@current_user@#\" ./*.reg")
|
# 压缩容器
|
||||||
os.chdir(f"{b}/drive_c/users")
|
###############
|
||||||
run_command(f"mv -v '{os.getlogin()}' @current_user@")
|
self.label.emit("正在打包 wine 容器")
|
||||||
os.chdir(programPath)
|
self.run_command("7z a {}/opt/apps/{}/files/files.7z {}/*".format(debPackagePath, e1_text.text(), b))
|
||||||
###############
|
###############
|
||||||
# 压缩容器
|
# 复制图片
|
||||||
###############
|
###############
|
||||||
label13_text_change("正在打包 wine 容器")
|
self.label.emit("正在复制文件……")
|
||||||
run_command("7z a {}/opt/apps/{}/files/files.7z {}/*".format(debPackagePath, e1_text.get(), b))
|
self.run_command(f"cp -rv '{programPath}/dlls' {debPackagePath}/opt/apps/{e1_text.text()}/files/")
|
||||||
###############
|
if e9_text.text() != "":
|
||||||
# 复制图片
|
shutil.copy(e9_text.text(), "{}/opt/apps/{}/entries/icons/hicolor/scalable/apps/{}.{}".format(debPackagePath, e1_text.text(), e1_text.text(), imms))
|
||||||
###############
|
################
|
||||||
label13_text_change("正在复制文件……")
|
# 获取文件大小
|
||||||
run_command(f"cp -rv '{programPath}/dlls' {debPackagePath}/opt/apps/{e1_text.get()}/files/")
|
################
|
||||||
if e9_text.get() != "":
|
self.label.emit("正在计算文件大小……")
|
||||||
shutil.copy(e9_text.get(), "{}/opt/apps/{}/entries/icons/hicolor/scalable/apps/{}.{}".format(debPackagePath, e1_text.get(), e1_text.get(), imms))
|
size = getFileFolderSize(debPackagePath) / 1024
|
||||||
################
|
################
|
||||||
# 获取文件大小
|
# 写入文本文档
|
||||||
################
|
################
|
||||||
label13_text_change("正在计算文件大小……")
|
self.label.emit("正在写入文件……")
|
||||||
size = getFileFolderSize(debPackagePath) / 1024
|
if not chooseWineHelperValue.isChecked():
|
||||||
################
|
write_txt("{}/DEBIAN/control".format(debPackagePath), '''Package: {}
|
||||||
# 写入文本文档
|
|
||||||
################
|
|
||||||
label13_text_change("正在写入文件……")
|
|
||||||
if not bool(chooseWineHelperValue.get()):
|
|
||||||
write_txt("{}/DEBIAN/control".format(debPackagePath), '''Package: {}
|
|
||||||
Version: {}
|
Version: {}
|
||||||
Architecture: i386
|
Architecture: i386
|
||||||
Maintainer: {}
|
Maintainer: {}
|
||||||
@ -211,9 +219,9 @@ Section: non-free/otherosfs
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Multi-Arch: foreign
|
Multi-Arch: foreign
|
||||||
Description: {}
|
Description: {}
|
||||||
'''.format(e1_text.get(), e2_text.get(), e4_text.get(), wineVersion.get(), e3_text.get()))
|
'''.format(e1_text.text(), e2_text.text(), e4_text.text(), wineVersion.currentText(), e3_text.text()))
|
||||||
else:
|
else:
|
||||||
write_txt("{}/DEBIAN/control".format(debPackagePath), '''Package: {}
|
write_txt("{}/DEBIAN/postrm".format(debPackagePath), '''Package: {}
|
||||||
Version: {}
|
Version: {}
|
||||||
Architecture: i386
|
Architecture: i386
|
||||||
Maintainer: {}
|
Maintainer: {}
|
||||||
@ -222,10 +230,28 @@ Section: non-free/otherosfs
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Multi-Arch: foreign
|
Multi-Arch: foreign
|
||||||
Description: {}
|
Description: {}
|
||||||
'''.format(e1_text.get(), e2_text.get(), e4_text.get(), wineVersion.get(), e3_text.get()))
|
'''.format(e1_text.text(), e2_text.text(), e4_text.text(), wineVersion.currentText(), e3_text.text()))
|
||||||
write_txt("{}/opt/apps/{}/entries/applications/{}.desktop".format(debPackagePath, e1_text.get(), e1_text.get()), '#!/usr/bin/env xdg-open\n[Desktop Entry]\nEncoding=UTF-8\nType=Application\nX-Created-By={}\nCategories={};\nIcon={}\nExec="/opt/apps/{}/files/run.sh" {}\nName={}\nComment={}\nMimeType={}\nGenericName={}\nTerminal=false\nStartupNotify=false\n'.format(e4_text.get(), option1_text.get(), a, e1_text.get(), e15_text.get(), e8_text.get(), e3_text.get(), e10_text.get(), e1_text.get()))
|
if rmBash.isChecked():
|
||||||
if not bool(chooseWineHelperValue.get()):
|
write_txt("{}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.text()), f'''#!/bin/bash
|
||||||
write_txt("{}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.get()), '''#!/bin/sh
|
|
||||||
|
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
|
||||||
|
|
||||||
|
echo"清理卸载残留"
|
||||||
|
for username in ls /home
|
||||||
|
do
|
||||||
|
echo /home/$username
|
||||||
|
if [ -d "/home/$username/.deepinwine/{e5_text.text()}" ]
|
||||||
|
then
|
||||||
|
rm -rf "/home/$username/.deepinwine/{e5_text.text()}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo"非卸载,跳过清理"
|
||||||
|
fi
|
||||||
|
''')
|
||||||
|
write_txt("{}/opt/apps/{}/entries/applications/{}.desktop".format(debPackagePath, e1_text.text(), e1_text.text()), '#!/usr/bin/env xdg-open\n[Desktop Entry]\nEncoding=UTF-8\nType=Application\nX-Created-By={}\nCategories={};\nIcon={}\nExec="/opt/apps/{}/files/run.sh" {}\nName={}\nComment={}\nMimeType={}\nGenericName={}\nTerminal=false\nStartupNotify=false\n'.format(e4_text.text(), option1_text.currentText(), a, e1_text.text(), e15_text.text(), e8_text.text(), e3_text.text(), e10_text.text(), e1_text.text()))
|
||||||
|
if not bool(chooseWineHelperValue.text()):
|
||||||
|
write_txt("{}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.text()), '''#!/bin/sh
|
||||||
|
|
||||||
# Copyright (C) 2016 Deepin, Inc.
|
# Copyright (C) 2016 Deepin, Inc.
|
||||||
#
|
#
|
||||||
@ -269,9 +295,9 @@ if [ -n "$EXEC_PATH" ];then
|
|||||||
else
|
else
|
||||||
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
|
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
|
||||||
fi
|
fi
|
||||||
'''.format(e5_text.get(), e2_text.get(), e7_text.get(), e1_text.get(), wineVersion.get()))
|
'''.format(e5_text.text(), e2_text.text(), e7_text.text(), e1_text.text(), wineVersion.currentText()))
|
||||||
else:
|
else:
|
||||||
write_txt("{}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.get()), '''#!/bin/sh
|
write_txt("{}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.text()), '''#!/bin/sh
|
||||||
|
|
||||||
# Copyright (C) 2016 Deepin, Inc.
|
# Copyright (C) 2016 Deepin, Inc.
|
||||||
#
|
#
|
||||||
@ -341,33 +367,33 @@ if [ -n "$EXEC_PATH" ];then
|
|||||||
else
|
else
|
||||||
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
|
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
|
||||||
fi
|
fi
|
||||||
'''.format(e5_text.get(), e2_text.get(), e7_text.get(), e1_text.get(), wineVersion.get()))
|
'''.format(e5_text.text(), e2_text.text(), e7_text.text(), e1_text.text(), wineVersion.currentText()))
|
||||||
write_txt("{}/opt/apps/{}/info".format(debPackagePath, e1_text.get()), '{\n "appid": "' + e1_text.get() + '",\n "name": "' + e8_text.get() + '",\n "version": "' + e2_text.get() + '",\n "arch": ["i386"],\n "permissions": {\n "autostart": false,\n "notification": false,\n "trayicon": true,\n "clipboard": true,\n "account": false,\n "bluetooth": false,\n "camera": false,\n "audio_record": false,\n "installed_apps": false\n }\n}')
|
write_txt("{}/opt/apps/{}/info".format(debPackagePath, e1_text.text()), '{\n "appid": "' + e1_text.text() + '",\n "name": "' + e8_text.text() + '",\n "version": "' + e2_text.text() + '",\n "arch": ["i386"],\n "permissions": {\n "autostart": false,\n "notification": false,\n "trayicon": true,\n "clipboard": true,\n "account": false,\n "bluetooth": false,\n "camera": false,\n "audio_record": false,\n "installed_apps": false\n }\n}')
|
||||||
################
|
################
|
||||||
# 修改文件权限
|
# 修改文件权限
|
||||||
################
|
################
|
||||||
label13_text_change("正在修改文件权限……")
|
self.label.emit("正在修改文件权限……")
|
||||||
run_command("chmod -Rv 644 {}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.get()))
|
self.run_command("chmod -Rv 644 {}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.text()))
|
||||||
run_command("chmod -Rv 644 {}/opt/apps/{}/info".format(debPackagePath, e1_text.get()))
|
self.run_command("chmod -Rv 644 {}/opt/apps/{}/info".format(debPackagePath, e1_text.text()))
|
||||||
run_command("chmod -Rv 755 {}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.get()))
|
self.run_command("chmod -Rv 755 {}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.text()))
|
||||||
run_command("chmod -Rv 755 {}/opt/apps/{}/entries/applications/{}.desktop".format(debPackagePath, e1_text.get(), e1_text.get()))
|
self.run_command("chmod -Rv 755 {}/opt/apps/{}/entries/applications/{}.desktop".format(debPackagePath, e1_text.text(), e1_text.text()))
|
||||||
################
|
################
|
||||||
# 构建 deb 包
|
# 构建 deb 包
|
||||||
################
|
################
|
||||||
label13_text_change("正在构建 deb 包……")
|
self.label.emit("正在构建 deb 包……")
|
||||||
run_command("dpkg -b {} {}".format(debPackagePath, e12_text.get()))
|
self.run_command("dpkg -b {} {}".format(debPackagePath, e12_text.text()))
|
||||||
################
|
################
|
||||||
# 完成构建
|
# 完成构建
|
||||||
################
|
################
|
||||||
label13_text_change("完成构建!")
|
self.label.emit("完成构建!")
|
||||||
disabled_or_NORMAL_all(True)
|
disabled_or_NORMAL_all(True)
|
||||||
messagebox.showinfo(title="提示", message="打包完毕!")
|
QtWidgets.QMessageBox.information(widget, "提示", "打包完毕!")
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
messagebox.showerror(title="错误", message="程序出现错误,错误信息:\n{}".format(traceback.format_exc()))
|
QtWidgets.QMessageBox.critical(widget, "错误", "程序出现错误,错误信息:\n{}".format(traceback.format_exc()))
|
||||||
label13_text_change("deb 包构建出现错误")
|
self.label.emit("deb 包构建出现错误")
|
||||||
chang_textbox1_things(traceback.format_exc())
|
self.signal.emit(traceback.format_exc())
|
||||||
disabled_or_NORMAL_all(True)
|
disabled_or_NORMAL_all(True)
|
||||||
|
|
||||||
# 写入文本文档
|
# 写入文本文档
|
||||||
def write_txt(path, things):
|
def write_txt(path, things):
|
||||||
@ -376,25 +402,12 @@ def write_txt(path, things):
|
|||||||
file.close() # 关闭文本对象
|
file.close() # 关闭文本对象
|
||||||
|
|
||||||
def chang_textbox1_things(things):
|
def chang_textbox1_things(things):
|
||||||
textbox1.configure(state=tk.NORMAL)
|
if things.replace("\n", "").replace(" ", "") == "":
|
||||||
textbox1.insert('end', things)
|
return
|
||||||
textbox1.configure(state=tk.DISABLED)
|
textbox1.append(things)
|
||||||
|
|
||||||
def clean_textbox1_things():
|
def clean_textbox1_things():
|
||||||
textbox1.configure(state=tk.NORMAL)
|
textbox1.setText("")
|
||||||
textbox1.delete('1.0','end')
|
|
||||||
textbox1.configure(state=tk.DISABLED)
|
|
||||||
|
|
||||||
def run_command(command):
|
|
||||||
res = subprocess.Popen([command], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
|
||||||
# 实时读取程序返回
|
|
||||||
while res.poll() is None:
|
|
||||||
try:
|
|
||||||
text = res.stdout.readline().decode("utf8")
|
|
||||||
except:
|
|
||||||
text = ""
|
|
||||||
print(text)
|
|
||||||
chang_textbox1_things(text)
|
|
||||||
|
|
||||||
|
|
||||||
def getFileFolderSize(fileOrFolderPath):
|
def getFileFolderSize(fileOrFolderPath):
|
||||||
@ -419,7 +432,7 @@ def getFileFolderSize(fileOrFolderPath):
|
|||||||
|
|
||||||
# 显示“提示”窗口
|
# 显示“提示”窗口
|
||||||
def helps():
|
def helps():
|
||||||
messagebox.showinfo(title="提示", message=tips)
|
QtWidgets.QMessageBox.information(widget, "提示", tips)
|
||||||
|
|
||||||
# 读取文本文档
|
# 读取文本文档
|
||||||
def readtxt(path):
|
def readtxt(path):
|
||||||
@ -448,136 +461,106 @@ tips = """提示:
|
|||||||
2、如果要填写路径,有“浏览……”按钮的是要填本计算机对应文件的路径,否则就是填写安装到其他计算机使用的路径
|
2、如果要填写路径,有“浏览……”按钮的是要填本计算机对应文件的路径,否则就是填写安装到其他计算机使用的路径
|
||||||
3、输入 wine 的容器路径时最后面请不要输入“/”
|
3、输入 wine 的容器路径时最后面请不要输入“/”
|
||||||
4、输入可执行文件的运行路径时是以“C:/XXX/XXX.exe”的格式进行输入,默认是以 C: 为开头,不用“\”做命令的分隔,而是用“/”
|
4、输入可执行文件的运行路径时是以“C:/XXX/XXX.exe”的格式进行输入,默认是以 C: 为开头,不用“\”做命令的分隔,而是用“/”
|
||||||
5、.desktop 的图标只支持 PNG 格式和 SVG 格式,其他格式无法显示图标"""
|
5、.desktop 的图标只支持 PNG 格式和 SVG 格式,其他格式无法显示图标
|
||||||
|
6、路径建议不要带空格,容易出问题"""
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# 窗口创建
|
# 窗口创建
|
||||||
###############
|
###############
|
||||||
# 读取主题
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
try:
|
window = QtWidgets.QMainWindow()
|
||||||
theme = not ("dark" in readtxt(get_home() + "/.gtkrc-2.0") and "gtk-theme-name=" in readtxt(get_home() + "/.gtkrc-2.0"))
|
widget = QtWidgets.QWidget()
|
||||||
except:
|
widgetLayout = QtWidgets.QGridLayout()
|
||||||
print("主题读取错误,默认使用浅色主题")
|
|
||||||
theme = True
|
|
||||||
if theme:
|
|
||||||
window = tk.Tk()
|
|
||||||
themes = ttkthemes.ThemedStyle(window)
|
|
||||||
themes.set_theme("breeze")
|
|
||||||
else:
|
|
||||||
import ttkbootstrap
|
|
||||||
style = ttkbootstrap.Style(theme="darkly")
|
|
||||||
window = style.master # 创建窗口
|
|
||||||
# 设置变量以修改和获取值项
|
# 设置变量以修改和获取值项
|
||||||
wineVersion = tk.StringVar()
|
wineVersion = QtWidgets.QComboBox()
|
||||||
wineVersion.set("deepin-wine6 stable")
|
wineVersion.addItems(wine.keys())
|
||||||
e1_text = tk.StringVar()
|
wineVersion.setCurrentText("deepin-wine6 stable")
|
||||||
e2_text = tk.StringVar()
|
e1_text = QtWidgets.QLineEdit()
|
||||||
e3_text = tk.StringVar()
|
e2_text = QtWidgets.QLineEdit()
|
||||||
e4_text = tk.StringVar()
|
e3_text = QtWidgets.QLineEdit()
|
||||||
e5_text = tk.StringVar()
|
e4_text = QtWidgets.QLineEdit()
|
||||||
e6_text = tk.StringVar()
|
e5_text = QtWidgets.QLineEdit()
|
||||||
e7_text = tk.StringVar()
|
e6_text = QtWidgets.QLineEdit()
|
||||||
e8_text = tk.StringVar()
|
e7_text = QtWidgets.QLineEdit()
|
||||||
e9_text = tk.StringVar()
|
e8_text = QtWidgets.QLineEdit()
|
||||||
e10_text = tk.StringVar()
|
e9_text = QtWidgets.QLineEdit()
|
||||||
e12_text = tk.StringVar()
|
e10_text = QtWidgets.QLineEdit()
|
||||||
e15_text = tk.StringVar()
|
e12_text = QtWidgets.QLineEdit()
|
||||||
label13_text = tk.StringVar()
|
e15_text = QtWidgets.QLineEdit()
|
||||||
option1_text = tk.StringVar()
|
label13_text = QtWidgets.QLabel("<p align='center'>当前 deb 打包情况:暂未打包</p>")
|
||||||
option1_text.set("Network")
|
option1_text = QtWidgets.QComboBox()
|
||||||
label13_text.set("当前 deb 打包情况:暂未打包")
|
button1 = QtWidgets.QPushButton("浏览……")
|
||||||
|
button2 = QtWidgets.QPushButton("浏览……")
|
||||||
|
button4 = QtWidgets.QPushButton("浏览……")
|
||||||
|
button5 = QtWidgets.QPushButton("打包……")
|
||||||
|
rmBash = QtWidgets.QCheckBox("设置卸载该 deb 后自动删除该容器")
|
||||||
|
textbox1 = QtWidgets.QTextBrowser()
|
||||||
|
option1_text.addItems(["Network", "Chat", "Audio", "Video", "Graphics", "Office", "Translation", "Development", "Utility", "System"])
|
||||||
|
option1_text.setCurrentText("Network")
|
||||||
|
wineFrame = QtWidgets.QHBoxLayout()
|
||||||
|
chooseWineHelperValue = QtWidgets.QCheckBox("使用星火wine helper(如不勾选默认为deepin-wine-helper)")
|
||||||
|
button1.clicked.connect(button1_cl)
|
||||||
|
button2.clicked.connect(button2_cl)
|
||||||
|
button4.clicked.connect(button4_cl)
|
||||||
|
button5.clicked.connect(make_deb)
|
||||||
|
wineFrame.addWidget(wineVersion)
|
||||||
|
wineFrame.addWidget(chooseWineHelperValue)
|
||||||
# 创建控件
|
# 创建控件
|
||||||
label1 = ttk.Label(window, text="要打包的 deb 包的包名(※必填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要打包的 deb 包的包名(※必填):"), 0, 0, 1, 1)
|
||||||
label2 = ttk.Label(window, text="要打包的 deb 包的版本号(※必填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要打包的 deb 包的版本号(※必填):"), 1, 0, 1, 1)
|
||||||
label3 = ttk.Label(window, text="要打包的 deb 包的说明(※必填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要打包的 deb 包的说明(※必填):"), 2, 0, 1, 1)
|
||||||
label4 = ttk.Label(window, text="要打包的 deb 包的维护者(※必填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要打包的 deb 包的维护者(※必填):"), 3, 0, 1, 1)
|
||||||
label5 = ttk.Label(window, text="要解压的 wine 容器的容器名(※必填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要解压的 wine 容器的容器名(※必填):"), 4, 0, 1, 1)
|
||||||
label6 = ttk.Label(window, text="要解压的 wine 容器(※必填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要解压的 wine 容器(※必填):"), 5, 0, 1, 1)
|
||||||
label7 = ttk.Label(window, text="要解压的 wine 容器里需要运行的可执行文件路径(※必填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要解压的 wine 容器里需要运行的可执行文件路径(※必填):"), 6, 0, 1, 1)
|
||||||
label8 = ttk.Label(window, text="要显示的 .desktop 文件的名称(※必填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的分类(※必填):"), 7, 0, 1, 1)
|
||||||
label9 = ttk.Label(window, text="要显示的 .desktop 文件的图标(选填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要解压的 wine 容器里需要运行的可执行文件的参数(选填):"), 8, 0, 1, 1)
|
||||||
label10 = ttk.Label(window, text="要显示的 .desktop 文件的 MimeType 内容(选填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的名称(※必填):"), 9, 0, 1, 1)
|
||||||
label12 = ttk.Label(window, text="打包 deb 的保存路径(※必填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的图标(选填):"), 10, 0, 1, 1)
|
||||||
label13 = ttk.Label(window, textvariable=label13_text)
|
widgetLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的 MimeType 内容(选填):"), 11, 0, 1, 1)
|
||||||
label14 = ttk.Label(window, text="要显示的 .desktop 文件的分类(※必填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("选择打包的 wine 版本(※必选):"), 12, 0, 1, 1)
|
||||||
label15 = ttk.Label(window,text="要解压的 wine 容器里需要运行的可执行文件的参数(选填):")
|
widgetLayout.addWidget(QtWidgets.QLabel("打包 deb 的保存路径(※必填):"), 13, 0, 1, 1)
|
||||||
wineFrame = ttk.Frame(window)
|
widgetLayout.addWidget(QtWidgets.QLabel("自动删除选项(选填):"), 14, 0, 1, 1)
|
||||||
chooseWineVersionTips = ttk.Label(window,text="选择打包的 wine 版本(※必选):")
|
widgetLayout.addWidget(e1_text, 0, 1, 1, 1)
|
||||||
chooseWineVersion = ttk.OptionMenu(wineFrame, wineVersion, "deepin-wine6 stable", *list(wine)) # 创建选择框控件
|
widgetLayout.addWidget(e2_text, 1, 1, 1, 1)
|
||||||
chooseWineHelperValue = tk.IntVar()
|
widgetLayout.addWidget(e3_text, 2, 1, 1, 1)
|
||||||
chooseWineHelper = ttk.Checkbutton(wineFrame, text="使用星火wine helper(如不勾选默认为deepin-wine-helper)", variable=chooseWineHelperValue)
|
widgetLayout.addWidget(e4_text, 3, 1, 1, 1)
|
||||||
e1 = ttk.Entry(window, textvariable=e1_text, width=100)
|
widgetLayout.addWidget(e5_text, 4, 1, 1, 1)
|
||||||
e2 = ttk.Entry(window, textvariable=e2_text, width=100)
|
widgetLayout.addWidget(e6_text, 5, 1, 1, 1)
|
||||||
e3 = ttk.Entry(window, textvariable=e3_text, width=100)
|
widgetLayout.addWidget(button1, 5, 2, 1, 1)
|
||||||
e4 = ttk.Entry(window, textvariable=e4_text, width=100)
|
widgetLayout.addWidget(e7_text, 6, 1, 1, 1)
|
||||||
e5 = ttk.Entry(window, textvariable=e5_text, width=100)
|
widgetLayout.addWidget(option1_text, 7, 1, 1, 1)
|
||||||
e6 = ttk.Entry(window, textvariable=e6_text, width=100)
|
widgetLayout.addWidget(e15_text, 8, 1, 1, 1)
|
||||||
e7 = ttk.Entry(window, textvariable=e7_text, width=100)
|
widgetLayout.addWidget(e8_text, 9, 1, 1, 1)
|
||||||
e8 = ttk.Entry(window, textvariable=e8_text, width=100)
|
widgetLayout.addWidget(e9_text, 10, 1, 1, 1)
|
||||||
e9 = ttk.Entry(window, textvariable=e9_text, width=100)
|
widgetLayout.addWidget(button2, 10, 2, 1, 1)
|
||||||
e10 = ttk.Entry(window, textvariable=e10_text, width=100)
|
widgetLayout.addWidget(e10_text, 11, 1, 1, 1)
|
||||||
e12 = ttk.Entry(window, textvariable=e12_text, width=100)
|
widgetLayout.addLayout(wineFrame, 12, 1, 1, 1)
|
||||||
e15 = ttk.Entry(window, textvariable=e15_text, width=100)
|
widgetLayout.addWidget(e12_text, 13, 1, 1, 1)
|
||||||
button1 = ttk.Button(window, text="浏览……", command=button1_cl)
|
widgetLayout.addWidget(button4, 13, 2, 1, 1)
|
||||||
button2 = ttk.Button(window, text="浏览……", command=button2_cl)
|
widgetLayout.addWidget(rmBash, 14, 1, 1, 1)
|
||||||
button4 = ttk.Button(window, text="浏览……", command=button4_cl)
|
widgetLayout.addWidget(button5, 15, 1, 1, 1)
|
||||||
button5 = ttk.Button(window, text="打包……", command=make_deb)
|
widgetLayout.addWidget(label13_text, 16, 0, 1, 3)
|
||||||
option1 = ttk.OptionMenu(window, option1_text, "Network", "Chat", "Audio", "Video", "Graphics", "Office", "Translation", "Development", "Utility")
|
widgetLayout.addWidget(textbox1, 17, 0, 1, 3)
|
||||||
textbox1 = tk.Text(window, width=100, height=4)
|
menu = window.menuBar()
|
||||||
textbox1.configure(state=tk.DISABLED)
|
programmenu = menu.addMenu("程序")
|
||||||
menu = tk.Menu(window) # 设置菜单栏
|
help = menu.addMenu("帮助")
|
||||||
programmenu = tk.Menu(menu, tearoff=0) # 设置“程序”菜单栏
|
exit = QtWidgets.QAction("退出程序")
|
||||||
menu.add_cascade(label="程序", menu=programmenu)
|
tip = QtWidgets.QAction("小提示")
|
||||||
programmenu.add_command(label="退出程序", command=window.quit) # 设置“退出程序”项
|
exit.triggered.connect(window.close)
|
||||||
help = tk.Menu(menu, tearoff=0) # 设置“帮助”菜单栏
|
tip.triggered.connect(helps)
|
||||||
menu.add_cascade(label="帮助", menu=help)
|
programmenu.addAction(exit)
|
||||||
help.add_command(label="小提示", command=helps) # 设置“小提示”项
|
help.addAction(tip)
|
||||||
# 设置窗口
|
|
||||||
window.title(f"wine 应用打包器 {version}")
|
|
||||||
window.iconphoto(False, tk.PhotoImage(file=iconPath))
|
|
||||||
# 控件配置
|
# 控件配置
|
||||||
try:
|
try:
|
||||||
e6_text.set(sys.argv[1])
|
e6_text.setText(sys.argv[1])
|
||||||
e5_text.set(pathlib.PurePath(sys.argv[1]).name)
|
e5_text.setText(pathlib.PurePath(sys.argv[1]).name)
|
||||||
wineVersion.set(sys.argv[2])
|
wineVersion.setCurrentText(sys.argv[2])
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
# 添加控件
|
widget.setLayout(widgetLayout)
|
||||||
window.config(menu=menu) # 显示菜单栏
|
window.setCentralWidget(widget)
|
||||||
label1.grid(row=0, column=0)
|
window.setWindowTitle(f"wine 应用打包器 {version}")
|
||||||
e1.grid(row=0, column=1)
|
window.setWindowIcon(QtGui.QIcon(iconPath))
|
||||||
label2.grid(row=1, column=0)
|
window.show()
|
||||||
e2.grid(row=1, column=1)
|
sys.exit(app.exec_())
|
||||||
label3.grid(row=2, column=0)
|
|
||||||
e3.grid(row=2, column=1)
|
|
||||||
label4.grid(row=3, column=0)
|
|
||||||
e4.grid(row=3, column=1)
|
|
||||||
label5.grid(row=4, column=0)
|
|
||||||
e5.grid(row=4, column=1)
|
|
||||||
label6.grid(row=5, column=0)
|
|
||||||
e6.grid(row=5, column=1)
|
|
||||||
button1.grid(row=5, column=2)
|
|
||||||
label7.grid(row=6, column=0)
|
|
||||||
e7.grid(row=6, column=1)
|
|
||||||
label14.grid(row=7, column=0)
|
|
||||||
option1.grid(row=7, column=1)
|
|
||||||
label15.grid(row=8, column=0)
|
|
||||||
e15.grid(row=8, column=1)
|
|
||||||
label8.grid(row=9, column=0)
|
|
||||||
e8.grid(row=9, column=1)
|
|
||||||
label9.grid(row=10, column=0)
|
|
||||||
e9.grid(row=10, column=1)
|
|
||||||
button2.grid(row=10, column=2)
|
|
||||||
label10.grid(row=11, column=0)
|
|
||||||
e10.grid(row=11, column=1)
|
|
||||||
chooseWineVersionTips.grid(row=12, column=0)
|
|
||||||
wineFrame.grid(row=12, column=1)
|
|
||||||
chooseWineVersion.grid(row=0, column=0)
|
|
||||||
chooseWineHelper.grid(row=0, column=1)
|
|
||||||
label12.grid(row=13, column=0)
|
|
||||||
e12.grid(row=13, column=1)
|
|
||||||
button4.grid(row=13, column=2)
|
|
||||||
button5.grid(row=14, column=1)
|
|
||||||
label13.grid(row=15, column=0, columnspan=3)
|
|
||||||
textbox1.grid(row=16, column=0, columnspan=3)
|
|
||||||
window.mainloop()
|
|
File diff suppressed because it is too large
Load Diff
@ -1,15 +1,14 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import json
|
import json
|
||||||
import base64
|
import base64
|
||||||
import requests
|
import requests
|
||||||
import ttkthemes
|
|
||||||
import traceback
|
import traceback
|
||||||
import webbrowser
|
import webbrowser
|
||||||
import tkinter as tk
|
|
||||||
import tkinter.ttk as ttk
|
|
||||||
import tkinter.messagebox as messagebox
|
|
||||||
import urllib.parse as parse
|
import urllib.parse as parse
|
||||||
|
import PyQt5.QtGui as QtGui
|
||||||
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
|
|
||||||
# 读取文本文档
|
# 读取文本文档
|
||||||
def readtxt(path: "路径")->"读取文本文档":
|
def readtxt(path: "路径")->"读取文本文档":
|
||||||
@ -28,17 +27,17 @@ def Update(name, stars, contact, things, version):
|
|||||||
"Version": version
|
"Version": version
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
messagebox.showinfo(message=requests.post(parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9idWcvdXBsb2FkLnBocA==").decode("utf-8")), data=data).text)
|
QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9idWcvdXBsb2FkLnBocA==").decode("utf-8")), data=data).text)
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
messagebox.showerror(title="错误", message="服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息:{}".format(traceback.format_exc()))
|
QtWidgets.QMessageBox.critical(widget, "错误", f"服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息:{traceback.format_exc()}")
|
||||||
|
|
||||||
def UpdateButtonClick():
|
def UpdateButtonClick():
|
||||||
#判断是否为空
|
#判断是否为空
|
||||||
if nameThings.get() == "" or starValue.get() == "" or contactThings.get() == "" or updateThings.get(1.0, "end").replace(" ", "").replace("\n", "") == "":
|
if nameThings.text() == "" or starMenu.currentText() == "" or contactThings.text() == "" or updateThings.toPlainText().replace(" ", "").replace("\n", "") == "":
|
||||||
messagebox.showerror(title="错误", message="反馈信息未填写完整!")
|
QtWidgets.QMessageBox.critical(widget, "错误", "反馈信息未填写完整!")
|
||||||
return
|
return
|
||||||
Update(name=nameThings.get(), stars=starValue.get(), contact=contactThings.get(), things=updateThings.get(1.0, "end"), version=version)
|
Update(name=nameThings.text(), stars=starMenu.currentText(), contact=contactThings.text(), things=updateThings.toPlainText(), version=version)
|
||||||
|
|
||||||
def OpenGiteeIssues():
|
def OpenGiteeIssues():
|
||||||
webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/deep-wine-runner/issues")
|
webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/deep-wine-runner/issues")
|
||||||
@ -64,70 +63,42 @@ version = information["Version"]
|
|||||||
###########################
|
###########################
|
||||||
# 窗口创建
|
# 窗口创建
|
||||||
###########################
|
###########################
|
||||||
# 读取主题
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
try:
|
window = QtWidgets.QMainWindow()
|
||||||
theme = not ("dark" in readtxt(get_home() + "/.gtkrc-2.0") and "gtk-theme-name=" in readtxt(get_home() + "/.gtkrc-2.0"))
|
widget = QtWidgets.QWidget()
|
||||||
except:
|
widgetLayout = QtWidgets.QGridLayout()
|
||||||
print("主题读取错误,默认使用浅色主题")
|
nameThings = QtWidgets.QLineEdit()
|
||||||
theme = True
|
contactThings = QtWidgets.QLineEdit()
|
||||||
if theme:
|
starMenu = QtWidgets.QComboBox()
|
||||||
window = tk.Tk()
|
updateThings = QtWidgets.QTextEdit()
|
||||||
themes = ttkthemes.ThemedStyle(window)
|
updateButton = QtWidgets.QPushButton("提交")
|
||||||
themes.set_theme("breeze")
|
otherUpload = QtWidgets.QHBoxLayout()
|
||||||
else:
|
giteeButton = QtWidgets.QPushButton("Gitee Issues")
|
||||||
import ttkbootstrap
|
githubButton = QtWidgets.QPushButton("Github Issues")
|
||||||
style = ttkbootstrap.Style(theme="darkly")
|
gitlinkButton = QtWidgets.QPushButton("Gitlink Issues")
|
||||||
window = style.master # 创建窗口
|
otherUpload.addWidget(QtWidgets.QLabel("如果无法正常反馈,可以用其他方式反馈:"))
|
||||||
win = ttk.Frame()
|
otherUpload.addWidget(giteeButton)
|
||||||
|
otherUpload.addWidget(githubButton)
|
||||||
starValue = tk.StringVar()
|
otherUpload.addWidget(gitlinkButton)
|
||||||
starValue.set("5分")
|
otherUpload.addSpacerItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
|
||||||
|
starMenu.addItems(["5分", "4分", "3分", "2分", "1分"])
|
||||||
name = ttk.Label(win, text="你的昵称:")
|
widgetLayout.addWidget(QtWidgets.QLabel("你的昵称:"), 0, 0, 1, 1)
|
||||||
nameThings = ttk.Entry(win, width=25)
|
widgetLayout.addWidget(QtWidgets.QLabel("联系方式(电子邮箱):"), 0, 2, 1, 1)
|
||||||
|
widgetLayout.addWidget(QtWidgets.QLabel("评分:"), 0, 4, 1, 1)
|
||||||
contact = ttk.Label(win, text="联系方式(电子邮箱):")
|
widgetLayout.addWidget(QtWidgets.QLabel("反馈内容(支持 Markdown 格式):"), 1, 0, 1, 2)
|
||||||
contactThings = ttk.Entry(win, width=25)
|
widgetLayout.addWidget(nameThings, 0, 1, 1, 1)
|
||||||
|
widgetLayout.addWidget(contactThings, 0, 3, 1, 1)
|
||||||
star = ttk.Label(win, text="评分:")
|
widgetLayout.addWidget(starMenu, 0, 5, 1, 1)
|
||||||
starMenu = ttk.OptionMenu(win, starValue, "5分", "5分", "4分", "3分", "2分", "1分")
|
widgetLayout.addWidget(updateThings, 2, 0, 1, 6)
|
||||||
|
widgetLayout.addLayout(otherUpload, 3, 0, 1, 5)
|
||||||
updateThingsTips = ttk.Label(win, text="反馈内容(支持 Markdown 格式):")
|
widgetLayout.addWidget(updateButton, 3, 5, 1, 1)
|
||||||
updateThings = tk.Text(win, width=100)
|
giteeButton.clicked.connect(OpenGiteeIssues)
|
||||||
|
githubButton.clicked.connect(OpenGithubIssues)
|
||||||
otherUpload = ttk.Frame(win)
|
gitlinkButton.clicked.connect(OpenGitlinkIssues)
|
||||||
# 所属内容
|
updateButton.clicked.connect(UpdateButtonClick)
|
||||||
tips = ttk.Label(otherUpload, text="如果无法正常反馈,可以用其他方式反馈:")
|
widget.setLayout(widgetLayout)
|
||||||
giteeButton = ttk.Button(otherUpload, text="Gitee Issues", command=OpenGiteeIssues)
|
window.setCentralWidget(widget)
|
||||||
githubButton = ttk.Button(otherUpload, text="Github Issues", command=OpenGithubIssues)
|
window.setWindowTitle(f"Wine 运行器 {version} 问题/建议反馈")
|
||||||
gitlinkButton = ttk.Button(otherUpload, text="Gitlink Issues", command=OpenGitlinkIssues)
|
window.setWindowIcon(QtGui.QIcon(iconPath))
|
||||||
|
window.show()
|
||||||
updateButton = ttk.Button(win, text="提交", command=UpdateButtonClick)
|
sys.exit(app.exec_())
|
||||||
|
|
||||||
# 设置窗口
|
|
||||||
window.title("Wine 运行器 {} 问题/建议反馈".format(version))
|
|
||||||
window.resizable(0, 0)
|
|
||||||
window.iconphoto(False, tk.PhotoImage(file=iconPath))
|
|
||||||
|
|
||||||
tips.grid(row=0, column=0)
|
|
||||||
giteeButton.grid(row=0, column=1)
|
|
||||||
githubButton.grid(row=0, column=2)
|
|
||||||
gitlinkButton.grid(row=0, column=3)
|
|
||||||
|
|
||||||
name.grid(row=0, column=0)
|
|
||||||
nameThings.grid(row=0, column=1)
|
|
||||||
|
|
||||||
contact.grid(row=0, column=2)
|
|
||||||
contactThings.grid(row=0, column=3)
|
|
||||||
|
|
||||||
star.grid(row=0, column=4)
|
|
||||||
starMenu.grid(row=0, column=5)
|
|
||||||
|
|
||||||
updateThingsTips.grid(row=1, column=0, columnspan=2)
|
|
||||||
updateThings.grid(row=2, column=0, columnspan=6)
|
|
||||||
|
|
||||||
otherUpload.grid(row=3, column=0, columnspan=4, sticky=tk.W)
|
|
||||||
updateButton.grid(row=3, column=5)
|
|
||||||
|
|
||||||
win.pack(expand="yes", fill="both")
|
|
||||||
window.mainloop()
|
|
Binary file not shown.
@ -1,13 +1,17 @@
|
|||||||
{
|
{
|
||||||
"Version": "1.6.0",
|
"Version": "1.7.0",
|
||||||
"Thank": [
|
"Thank": [
|
||||||
"@a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
|
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
|
||||||
"@zhangs https://bbs.deepin.org/post/227948",
|
"感谢 @zhangs https://bbs.deepin.org/post/227948",
|
||||||
"@gtjmaster https://bbs.deepin.org/post/225509",
|
"感谢 @gtjmaster https://bbs.deepin.org/post/225509",
|
||||||
"@统信UCARE服务 https://mp.weixin.qq.com/s/iOdfNv6phc8F4inackFFTw",
|
"感谢 @统信UCARE服务 https://mp.weixin.qq.com/s/iOdfNv6phc8F4inackFFTw",
|
||||||
"@星火应用商店 提供部分安装包的源以及本程序的下载地址",
|
"感谢 @星火应用商店 提供部分安装包的源以及本程序的下载地址",
|
||||||
|
"感谢 @delsin 和 @神末shenmo 在 deepin 论坛提供打包器打包的 deb 包自动删除容器的建议",
|
||||||
|
"感谢 @GershonWang 在 https://github.com/gfdgd-xi/deep-wine-runner/issues/1 提供窗口居中的建议",
|
||||||
|
"感谢 @134******28 和 @sgb76 提供的新程序 GUI 布局和实现代码",
|
||||||
|
"感谢统信在 Wine 生态适配活动中提供的打包脚本",
|
||||||
"",
|
"",
|
||||||
"可以从上面的各种解决方案更好的学习 Wine 生态适配,也可以看 deepin 论坛板块 https://bbs.deepin.org/module/detail/116 进行学习,最后也向各位有进行 Wine 生态适配的大佬进行由衷的更新!",
|
"可以从上面的各种解决方案更好的学习 Wine 生态适配,也可以看 deepin 论坛板块 https://bbs.deepin.org/module/detail/116 进行学习,最后也向各位有进行 Wine 生态适配的大佬进行由衷的感谢!",
|
||||||
"如果上面有遗漏,请向我反馈补充"
|
"如果上面有遗漏,请向我反馈补充"
|
||||||
]
|
]
|
||||||
}
|
}
|
BIN
deb/opt/apps/deepin-wine-runner/package-script.zip
Normal file
BIN
deb/opt/apps/deepin-wine-runner/package-script.zip
Normal file
Binary file not shown.
BIN
deb/opt/apps/deepin-wine-runner/窗体透明度设置工具.exe
Normal file
BIN
deb/opt/apps/deepin-wine-runner/窗体透明度设置工具.exe
Normal file
Binary file not shown.
1
deb/usr/bin/deepin-wine-packager-with-script
Symbolic link
1
deb/usr/bin/deepin-wine-packager-with-script
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/opt/apps/deepin-wine-runner/deepin-wine-packager-with-script.py
|
1
deb/usr/bin/deepin-wine-runner-control-vm
Symbolic link
1
deb/usr/bin/deepin-wine-runner-control-vm
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/opt/apps/deepin-wine-runner/RunVM.sh
|
1
deb/usr/bin/deepin-wine-runner-dtk-launch
Symbolic link
1
deb/usr/bin/deepin-wine-runner-dtk-launch
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/opt/apps/deepin-wine-runner/launch.sh
|
1
deb/usr/bin/deepin-wine-runner-start-vm
Symbolic link
1
deb/usr/bin/deepin-wine-runner-start-vm
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/opt/apps/deepin-wine-runner/StartVM.sh
|
1
deb/usr/bin/deepin-wine-runner-update-bug
Symbolic link
1
deb/usr/bin/deepin-wine-runner-update-bug
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/opt/apps/deepin-wine-runner/deepin-wine-runner-update-bug
|
1
deb/usr/bin/deepin-wine-runner-wine-install
Symbolic link
1
deb/usr/bin/deepin-wine-runner-wine-install
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/opt/apps/deepin-wine-runner/wine install
|
@ -231,7 +231,8 @@ Priority: optional
|
|||||||
Multi-Arch: foreign
|
Multi-Arch: foreign
|
||||||
Description: {}
|
Description: {}
|
||||||
'''.format(e1_text.text(), e2_text.text(), e4_text.text(), wineVersion.currentText(), e3_text.text()))
|
'''.format(e1_text.text(), e2_text.text(), e4_text.text(), wineVersion.currentText(), e3_text.text()))
|
||||||
write_txt("{}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.text()), f'''#!/bin/bash
|
if rmBash.isChecked():
|
||||||
|
write_txt("{}/opt/apps/{}/files/run.sh".format(debPackagePath, e1_text.text()), f'''#!/bin/bash
|
||||||
|
|
||||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
|
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
|
||||||
|
|
||||||
@ -492,6 +493,7 @@ button1 = QtWidgets.QPushButton("浏览……")
|
|||||||
button2 = QtWidgets.QPushButton("浏览……")
|
button2 = QtWidgets.QPushButton("浏览……")
|
||||||
button4 = QtWidgets.QPushButton("浏览……")
|
button4 = QtWidgets.QPushButton("浏览……")
|
||||||
button5 = QtWidgets.QPushButton("打包……")
|
button5 = QtWidgets.QPushButton("打包……")
|
||||||
|
rmBash = QtWidgets.QCheckBox("设置卸载该 deb 后自动删除该容器")
|
||||||
textbox1 = QtWidgets.QTextBrowser()
|
textbox1 = QtWidgets.QTextBrowser()
|
||||||
option1_text.addItems(["Network", "Chat", "Audio", "Video", "Graphics", "Office", "Translation", "Development", "Utility", "System"])
|
option1_text.addItems(["Network", "Chat", "Audio", "Video", "Graphics", "Office", "Translation", "Development", "Utility", "System"])
|
||||||
option1_text.setCurrentText("Network")
|
option1_text.setCurrentText("Network")
|
||||||
@ -518,6 +520,7 @@ widgetLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的图标
|
|||||||
widgetLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的 MimeType 内容(选填):"), 11, 0, 1, 1)
|
widgetLayout.addWidget(QtWidgets.QLabel("要显示的 .desktop 文件的 MimeType 内容(选填):"), 11, 0, 1, 1)
|
||||||
widgetLayout.addWidget(QtWidgets.QLabel("选择打包的 wine 版本(※必选):"), 12, 0, 1, 1)
|
widgetLayout.addWidget(QtWidgets.QLabel("选择打包的 wine 版本(※必选):"), 12, 0, 1, 1)
|
||||||
widgetLayout.addWidget(QtWidgets.QLabel("打包 deb 的保存路径(※必填):"), 13, 0, 1, 1)
|
widgetLayout.addWidget(QtWidgets.QLabel("打包 deb 的保存路径(※必填):"), 13, 0, 1, 1)
|
||||||
|
widgetLayout.addWidget(QtWidgets.QLabel("自动删除选项(选填):"), 14, 0, 1, 1)
|
||||||
widgetLayout.addWidget(e1_text, 0, 1, 1, 1)
|
widgetLayout.addWidget(e1_text, 0, 1, 1, 1)
|
||||||
widgetLayout.addWidget(e2_text, 1, 1, 1, 1)
|
widgetLayout.addWidget(e2_text, 1, 1, 1, 1)
|
||||||
widgetLayout.addWidget(e3_text, 2, 1, 1, 1)
|
widgetLayout.addWidget(e3_text, 2, 1, 1, 1)
|
||||||
@ -535,9 +538,10 @@ widgetLayout.addWidget(e10_text, 11, 1, 1, 1)
|
|||||||
widgetLayout.addLayout(wineFrame, 12, 1, 1, 1)
|
widgetLayout.addLayout(wineFrame, 12, 1, 1, 1)
|
||||||
widgetLayout.addWidget(e12_text, 13, 1, 1, 1)
|
widgetLayout.addWidget(e12_text, 13, 1, 1, 1)
|
||||||
widgetLayout.addWidget(button4, 13, 2, 1, 1)
|
widgetLayout.addWidget(button4, 13, 2, 1, 1)
|
||||||
widgetLayout.addWidget(button5, 14, 1, 1, 1)
|
widgetLayout.addWidget(rmBash, 14, 1, 1, 1)
|
||||||
widgetLayout.addWidget(label13_text, 15, 0, 1, 3)
|
widgetLayout.addWidget(button5, 15, 1, 1, 1)
|
||||||
widgetLayout.addWidget(textbox1, 16, 0, 1, 3)
|
widgetLayout.addWidget(label13_text, 16, 0, 1, 3)
|
||||||
|
widgetLayout.addWidget(textbox1, 17, 0, 1, 3)
|
||||||
menu = window.menuBar()
|
menu = window.menuBar()
|
||||||
programmenu = menu.addMenu("程序")
|
programmenu = menu.addMenu("程序")
|
||||||
help = menu.addMenu("帮助")
|
help = menu.addMenu("帮助")
|
||||||
|
@ -20,9 +20,6 @@ import threading
|
|||||||
import traceback
|
import traceback
|
||||||
import webbrowser
|
import webbrowser
|
||||||
import subprocess
|
import subprocess
|
||||||
import tkinter as tk
|
|
||||||
import tkinter.filedialog
|
|
||||||
import tkinter.messagebox
|
|
||||||
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
|
||||||
@ -185,7 +182,7 @@ def about_this_program()->"显示“关于这个程序”窗口":
|
|||||||
messageLayout.addWidget(ok, 1, 1, 1, 1, QtCore.Qt.AlignBottom | QtCore.Qt.AlignRight)
|
messageLayout.addWidget(ok, 1, 1, 1, 1, QtCore.Qt.AlignBottom | QtCore.Qt.AlignRight)
|
||||||
messageWidget.setLayout(messageLayout)
|
messageWidget.setLayout(messageLayout)
|
||||||
QT.message.setCentralWidget(messageWidget)
|
QT.message.setCentralWidget(messageWidget)
|
||||||
QT.message.resize(messageWidget.frameGeometry().width() * 1.5, messageWidget.frameGeometry().height() * 1.5)
|
QT.message.resize(int(messageWidget.frameGeometry().width() * 1.5), int(messageWidget.frameGeometry().height() * 1.5))
|
||||||
QT.message.show()
|
QT.message.show()
|
||||||
|
|
||||||
# 显示“提示”窗口
|
# 显示“提示”窗口
|
||||||
@ -575,7 +572,7 @@ class UpdateWindow():
|
|||||||
updateWidget.setLayout(updateWidgetLayout)
|
updateWidget.setLayout(updateWidgetLayout)
|
||||||
UpdateWindow.update.setCentralWidget(updateWidget)
|
UpdateWindow.update.setCentralWidget(updateWidget)
|
||||||
UpdateWindow.update.setWindowTitle("检查更新")
|
UpdateWindow.update.setWindowTitle("检查更新")
|
||||||
UpdateWindow.update.resize(updateWidget.frameGeometry().width(), updateWidget.frameGeometry().height() * 1.5)
|
UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5))
|
||||||
UpdateWindow.update.show()
|
UpdateWindow.update.show()
|
||||||
|
|
||||||
def Update():
|
def Update():
|
||||||
@ -840,7 +837,6 @@ class ProgramSetting():
|
|||||||
widget.setLayout(widgetLayout)
|
widget.setLayout(widgetLayout)
|
||||||
ProgramSetting.message.setCentralWidget(widget)
|
ProgramSetting.message.setCentralWidget(widget)
|
||||||
ProgramSetting.message.setWindowTitle(f"设置 wine 运行器 {version}")
|
ProgramSetting.message.setWindowTitle(f"设置 wine 运行器 {version}")
|
||||||
#ProgramSetting.message.resize(ProgramSetting.message.frameSize().width() * 1.2, ProgramSetting.message.frameSize().height())
|
|
||||||
ProgramSetting.message.show()
|
ProgramSetting.message.show()
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -943,13 +939,14 @@ tips = '''提示:
|
|||||||
exe路径\' 参数 \'
|
exe路径\' 参数 \'
|
||||||
即可(单引号需要输入)
|
即可(单引号需要输入)
|
||||||
5、wine 容器如果没有指定,则会默认为 ~/.wine'''
|
5、wine 容器如果没有指定,则会默认为 ~/.wine'''
|
||||||
updateThingsString = '''※1、添加 @delsin 和 @神末shenmo 建议的 postrm 脚本
|
updateThingsString = '''※1、界面大改造,从使用 Tkinter 改为 Qt,参考了 @134******28 和 @sgb76 提供的设计方案和代码
|
||||||
2、将 pip 由阿里源改为华为源,提升下载速度
|
※2、添加了基于 UOS 生态适配活动打包脚本的打包器,以及基于 Virtualbox 的简易 Windows 镜像安装工具
|
||||||
3、优化多屏窗口居中问题,并设置居中选项为选开防止错误
|
※3、将 pip 由阿里源改为华为源,提升下载安装速度,并删除使用 pip 下载库的功能(已不需要,废弃)
|
||||||
4、修复 1.6.0 程序无法保存设置的问题
|
4、添加 @delsin 和 @神末shenmo 建议的 postrm 脚本
|
||||||
5、修复 1.6.0 的更新程序无法正常更新的问题
|
5、优化多屏窗口居中问题
|
||||||
6、界面大改造,从使用 Tkinter 改为 Qt,参考了 @134******28 和 @sgb76 提供的设计方案和代码
|
6、修复 1.6.0 程序无法保存设置的问题
|
||||||
7、添加了基于 UOS 生态适配活动打包脚本的打包器,以及基于 Virtualbox 的简易 Windows 镜像安装工具
|
7、修复 1.6.0 的更新程序无法正常更新的问题
|
||||||
|
8、升级 Geek Uninstaller 版本
|
||||||
'''
|
'''
|
||||||
for i in information["Thank"]:
|
for i in information["Thank"]:
|
||||||
thankText += f"{i}\n"
|
thankText += f"{i}\n"
|
||||||
@ -959,7 +956,6 @@ about = f'''<h1>关于</h1>
|
|||||||
|
|
||||||
版本:{version}
|
版本:{version}
|
||||||
适用平台:{goodRunSystem}
|
适用平台:{goodRunSystem}
|
||||||
tkinter 版本:{tk.TkVersion}
|
|
||||||
Qt 版本:{QtCore.qVersion()}
|
Qt 版本:{QtCore.qVersion()}
|
||||||
程序官网:{programUrl}</pre>
|
程序官网:{programUrl}</pre>
|
||||||
<hr>
|
<hr>
|
||||||
|
Loading…
Reference in New Issue
Block a user