2.4.0 end

This commit is contained in:
gfdgd xi 2022-10-26 21:50:59 +08:00
parent bd945e5b86
commit 509cf86d76
34 changed files with 580 additions and 282 deletions

View File

@ -88,6 +88,78 @@ class ProgramRunStatusUpload():
traceback.print_exc()
QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
class InformationWindow():
def ShowWindow():
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
try:
get = requests.get(f"{urlSources}/information/{fileName}.txt")
if get.status_code / 100 != 2 and get.status_code / 100 != 3:
int("Bad")
about = get.text
if not "<" in about:
# 非 Html 标签
for i in about.splitlines():
about += f"<p>{i}</p>\n"
#about = f"<pre>{about}</pre>"
about = f"<h1>关于“{choose}”的介绍</h1>\n{about}"
except:
traceback.print_exc()
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
try:
import requests as r
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
tipsInfo = ""
except:
fenlists = [0, 0, 0, 0, 0]
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
maxHead = fenlists.index(max(fenlists))
allNumber = 0
for i in fenlists:
allNumber += i
try:
maxNumber = max(fenlists) / allNumber * 100
if tipsInfo == "":
tipsInfo = f"{maxNumber}%的用户选择了这个评分"
except:
pass
end = 5
starHtml = ""
if maxHead > 5:
for i in range(end):
starHtml += f"<img src='{programPath}/Icon/BadStar.svg' width=50>\n"
else:
for i in range(maxHead):
starHtml += f"<img src='{programPath}/Icon/Star.svg' width=50>\n"
head = maxHead
for i in range(head, end):
starHtml += f"<img src='{programPath}/Icon/UnStar.svg' width=50>"
about += f"\n<hr/><h1>评分情况</h1>\n<p align='center'>{starHtml}</p>\n<p align='center'>{tipsInfo}</p>"
message = QtWidgets.QDialog()
messageLayout = QtWidgets.QVBoxLayout()
informationText = QtWidgets.QTextBrowser()
uploadFen = QtWidgets.QPushButton("提交评分")
uploadFen.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
informationText.setHtml(about)
messageLayout.addWidget(informationText)
messageLayout.addWidget(uploadFen)
message.setWindowTitle(f"关于“{choose}”的介绍")
message.resize(int(message.frameSize().width() * 1.5), int(message.frameSize().height()))
message.setLayout(messageLayout)
#message.setWindowModality(ApplicationModal);
message.show()
message.exec_()
class ProgramRunStatusShow():
msgWindow = None
def ShowWindow():
@ -105,7 +177,6 @@ class ProgramRunStatusShow():
fileName = i[1]
break
try:
#fenlists = requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/bashapp/{fileName}/all.json").json()
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
#r = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8"))
#r.encoding = "utf-8"
@ -271,6 +342,7 @@ if __name__ == "__main__":
# 连接信号和槽
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
ui.uploadFen.clicked.connect(UploadFen)
ui.getInfoButton.clicked.connect(InformationWindow.ShowWindow)
ui.runBotton.clicked.connect(Connect.RunBotton_Clicked)
ui.openFile.triggered.connect(Connect.OpenFile_Triggered)
ui.exitProgram.triggered.connect(window.close)

View File

@ -62,7 +62,7 @@ build:
cp -rv InstallDll.py deb/opt/apps/deepin-wine-runner/LANG
cp -rv ConfigLanguareRunner.py deb/opt/apps/deepin-wine-runner
cp -rv AutoConfig.py deb/opt/apps/deepin-wine-runner
cp -rv UI/*.py deb/opt/apps/deepin-wine-runner/UI
cp -rv UI deb/opt/apps/deepin-wine-runner/
cp -rv InstallDll.py deb/opt/apps/deepin-wine-runner
cp -rv Model deb/opt/apps/deepin-wine-runner
cp -rv API deb/opt/apps/deepin-wine-runner

View File

@ -35,6 +35,9 @@ class Ui_MainWindow(object):
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem)
self.getInfoButton = QtWidgets.QPushButton(self.centralwidget)
self.getInfoButton.setObjectName("getInfoButton")
self.horizontalLayout_2.addWidget(self.getInfoButton)
self.getFen = QtWidgets.QPushButton(self.centralwidget)
self.getFen.setObjectName("getFen")
self.horizontalLayout_2.addWidget(self.getFen)
@ -73,6 +76,7 @@ class Ui_MainWindow(object):
MainWindow.setWindowTitle(_translate("MainWindow", "自动部署脚本"))
self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
self.saerchBotton.setText(_translate("MainWindow", "搜索"))
self.getInfoButton.setText(_translate("MainWindow", "获取选中项介绍"))
self.getFen.setText(_translate("MainWindow", "获取选中项的评分"))
self.uploadFen.setText(_translate("MainWindow", "提交选中项的评分"))
self.runBotton.setText(_translate("MainWindow", "部署此方案"))

View File

@ -54,6 +54,13 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="getInfoButton">
<property name="text">
<string>获取选中项介绍</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="getFen">
<property name="text">

345
check-deb.sh Executable file
View File

@ -0,0 +1,345 @@
#!/bin/bash
BASE_DIR=$1
DEBIAN_DIR="$BASE_DIR/DEBIAN"
OPT_DIR="${BASE_DIR}/opt"
declare -a dir_list
PACKAGE_IS_NULL=""
PACKAGE=""
VERSION=""
ARCH=""
DESC=""
LINE_IS_NULL=""
# 判断参数数量
if [ $# -ne 1 ];then
echo "USAGE: $0 DIR"
exit 1
fi
# 判断目录
if [ ! -d $1 ];then
echo "$1 不是目录或者该目录不存在."
exit 2
fi
function fail(){
echo -e "$1 \t\t\t[\033[31mFAIL\033[0m]"
}
function ok(){
echo -e "$1 \t\t\t[\033[32mOK\033[0m]"
}
function scan_dir(){
echo "-----------------------目录检查开始-------------------------"
# 扫描目录
for i in `ls $BASE_DIR`;do
dir_list[${#dir_list[*]}]=$i
done
# 打印目录
dirs=""
for i in ${dir_list[*]};do
if [ $i == "DEBIAN" ];then
dirs=$dirs+$i
elif [ $i == "opt" ];then
dirs=$dirs+$i
else
dirs=$dirs+$i
echo -e "\033[31mInfo: 扫描到不合规目录$i,请检查是否必要。\033[0m"
fi
done
#echo "所有目录:$dirs" | tr '+' ' '
# 检查DEBIAN目录是否存在
if [ ! -d $DEBIAN_DIR ];then
fail "检查DEBIAN目录是否存在\t\t"
echo -e "ERROR: ${DEBIAN_DIR}目录不存在\n"
else
ok "检查DEBIAN目录是否存在\t\t"
fi
# 检查control文件是否存在
if [ ! -f ${DEBIAN_DIR}/control ];then
fail "检查control文件是否存在\t\t"
echo -e "ERROR: ${DEBIAN_DIR}/control文件不存在\n"
else
ok "检查control文件是否存在\t\t"
fi
# 检查是否有钩子脚本
script_num=`ls ${DEBIAN_DIR}/*rm ${DEBIAN_DIR}/*inst 2>/dev/null |wc -l`
if [ ${script_num} -gt 0 ];then
fail "检查是否有钩子脚本\t\t"
echo -e "Note: ${DEBIAN_DIR}/下有钩子脚本,请手动检查是否合规.\n"
else
ok "检查是否有钩子脚本\t\t"
fi
# 检查opt目录是否存在
if [ ! -d $OPT_DIR ];then
fail "检查opt目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}目录不存在\n"
else
ok "检查opt目录是否存在\t\t"
fi
# 检查opt/apps目录是否存在
if [ ! -d $OPT_DIR/apps ];then
fail "检查opt/apps目录是否存在\t"
echo -e "ERROR: ${OPT_DIR}/apps目录不存在\n"
else
ok "检查opt/apps目录是否存在\t"
fi
# 检查PACKAGE目录名是否正确
if [ ! -d ${OPT_DIR}/apps/${PACKAGE} ];then
fail "检查程序目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}目录不存在,可能与control文件中包名不一致,终止后续检查.\n"
exit 100
else
ok "检查程序目录是否存在\t\t"
fi
# 检查entries目录
if [ ! -d ${OPT_DIR}/apps/${PACKAGE}/entries ];then
fail "检查entries目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries目录不存在\n"
else
ok "检查entries目录是否存在\t\t"
fi
# 检查applications目录
if [ ! -d ${OPT_DIR}/apps/${PACKAGE}/entries/applications ];then
fail "检查applications目录是否存在\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/applications目录不存在\n"
else
ok "检查applications目录是否存在\t"
fi
#检查desktop文件
if [ ! -f ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop ];then
fail "检查desktop文件是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop文件不存在\n"
else
ok "检查desktop文件是否存在\t\t"
fi
# 检查icons目录
if [ ! -d ${OPT_DIR}/apps/${PACKAGE}/entries/icons ];then
fail "检查icons目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/icons目录不存在\n"
else
ok "检查icons目录是否存在\t\t"
fi
# 检查hicolor目录
if [ ! -d ${OPT_DIR}/apps/${PACKAGE}/entries/icons/hicolor ];then
fail "检查hicolor目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/icons/hicolor目录不存在\n"
else
ok "检查hicolor目录是否存在\t\t"
fi
# 检查files目录
if [ ! -d ${OPT_DIR}/apps/${PACKAGE}/files ];then
fail "检查files目录是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/files目录不存在\n"
else
ok "检查files目录是否存在\t\t"
fi
#检查info文件
if [ ! -f ${OPT_DIR}/apps/${PACKAGE}/info ];then
fail "检查info文件是否存在\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/info文件不存在\n"
else
ok "检查info文件是否存在\t\t"
fi
echo -e "-----------------------目录检查结束-------------------------\n"
}
function check_icon_type(){
real_extent_name=`file $1 2>/dev/null| grep -E "SVG|JPEG|PNG" -o`
if [ ${real_extent_name} == "SVG" ];then
real_extent_name="svg"
elif [ ${real_extent_name} == "PNG" ];then
real_extent_name="png"
elif [ ${real_extent_name} == "JPEG" ];then
real_extent_name="jpg"
fi
if [ ${real_extent_name} == ${icon_type} ];then
ok "检查Icon字段\t\t\t"
else
fail "检查Icon字段\t\t\t"
echo -e "ERROR: $1文件扩展名为${icon_type},但实际文件类型为${real_extent_name},可能会影响图标显示.\n"
fi
}
function check_control(){
echo "-------------------control文件检查开始----------------------"
# 包名是否为空
PACKAGE_IS_NULL=`grep Package ${DEBIAN_DIR}/control | awk -F ": " '{print $2}'`
if [ -z $PACKAGE_IS_NULL ];then
fail "检查Package字段是否为空\t\t"
echo -e "ERROR: Package字段参数不能为空且:后必须有一个空格.\n"
else
ok "检查Package字段是否为空\t\t"
fi
# 包名是否是域名倒置
PACKAGE=`grep Package ${DEBIAN_DIR}/control | awk -F ": " '{print $2}' |grep -E "^(com|cn|edu|org|net|gov)(\.[a-Z0-9]+)+"`
if [ -z $PACKAGE ];then
fail "检查Package是否域名倒置\t\t"
echo -e "ERROR: Package字段参数必须是域名倒置.\n"
else
ok "检查Package是否域名倒置\t\t"
fi
# 版本
VERSION=`grep Version ${DEBIAN_DIR}/control | awk -F ": " '{print $2}'`
if [ -z $VERSION ];then
fail "检查Version字段\t\t\t"
echo -e "ERROR: Version字段不能为空且:后必须有一个空格.\n"
else
ok "检查Version字段\t\t\t"
fi
# 架构
ARCH=`grep Architecture ${DEBIAN_DIR}/control | awk -F ": " '{print $2}'`
if [ -z $ARCH ];then
fail "检查Architecture字段\t\t"
echo -e "ERROR: Architecture字段不能为空且:后必须有一个空格.\n"
else
if [ ${ARCH} != "amd64" -a ${ARCH} != "arm64" -a ${ARCH} != "mips64el" -a ${ARCH} != "sw_64" -a ${ARCH} != "all" -a ${ARCH} != "any" ];then
fail "检查Architecture字段\t\t"
echo -e "ERROR: Architecture字段只能{arm64|amd64|mips64el|sw_64|all|any}\n"
else
ok "检查Architecture字段\t\t"
fi
fi
# 描述
DESC=`grep Description ${DEBIAN_DIR}/control | awk -F ": " '{print $2}'`
if [ -z "$DESC" ];then
fail "检查Description字段\t\t"
echo -e "ERROR: Description字段不能为空且:后必须有一个空格.\n"
else
ok "检查Description字段\t\t"
fi
# 分类
SECTION=`grep Section ${DEBIAN_DIR}/control | awk -F ": " '{print $2}'`
if [ -z "$SECTION" ];then
fail "检查Section字段\t\t\t"
echo -e "ERROR: Section字段不能为空且:后必须有一个空格.\n"
else
ok "检查Section字段\t\t\t"
fi
# 是否有空行1表示没有空行0有空行
grep ^$ ${DEBIAN_DIR}/control 1>/dev/null 2>&1
LINE_IS_NULL=$?
if [ ! $LINE_IS_NULL -eq 1 ];then
fail "检查是否有空行\t\t\t"
echo -e "ERROE: control文件中不能有空行.\n"
else
ok "检查是否有空行\t\t\t"
fi
echo -e "-------------------control文件检查结束----------------------\n"
}
function check_desktop_file(){
echo -e "-------------------desktop文件检查开始----------------------"
# 检查Icon文件是否存在
icon_path=`grep Icon ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop 2>/dev/null|awk -F "=" '{print $2}'`
icon_is_full_path=`echo ${icon_path} | cut -c 1`
icon_type=`echo ${icon_path} |rev |cut -c 1-6 |rev | awk -F '.' '{print $2}'`
if [ -f ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop ];then
if [ ${icon_type} != "png" -a ${icon_type} != "svg" -a ${icon_type} != "jpg" ];then
fail "检查Icon文件类型\t\t"
echo -e "ERROR: Icon文件类型必须是jpg/png/svg,您desktop文件中可能没有扩展名。\n"
else
ok "检查Icon文件类型\t\t"
if [ -z $icon_path ];then
fail "检查Icon字段\t\t\t"
echo -e "ERROR: Icon字段不能为空且:后面要有一个空格.\n"
else
if [ ${icon_is_full_path} == '/' ];then
if [ ! -f ${BASE_DIR}${icon_path} ];then
fail "检查Icon字段\t\t\t"
echo -e "ERROR: ${BASE_DIR}${icon_path}文件不存在.\n"
else
check_icon_type ${BASE_DIR}${icon_path}
fi
else
image_dir="${OPT_DIR}/apps/${PACKAGE}/entries/icons/hicolor/"
if [ -f ${image_dir}16x16/apps/${icon_path} ];then
check_icon_type ${image_dir}16x16/apps/${icon_path}
elif [ -f ${image_dir}24x24/apps/${icon_path} ];then
check_icon_type ${image_dir}24x24/apps/${icon_path}
elif [ -f ${image_dir}32x32/apps/${icon_path} ];then
check_icon_type ${image_dir}32x32/apps/${icon_path}
elif [ -f ${image_dir}48x48/apps/${icon_path} ];then
check_icon_type ${image_dir}48x48/apps/${icon_path}
elif [ -f ${image_dir}128x128/apps/${icon_path} ];then
check_icon_type ${image_dir}128x128/apps/${icon_path}
elif [ -f ${image_dir}256x256/apps/${icon_path} ];then
check_icon_type ${image_dir}256x256/apps/${icon_path}
elif [ -f ${image_dir}512x512/apps/${icon_path} ];then
check_icon_type ${image_dir}512x512/apps/${icon_path}
elif [ -f ${image_dir}scalable/apps/${icon_path} ];then
check_icon_type ${image_dir}scalable/apps/${icon_path}
else
fail "检查Icon字段\t\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/icons/hicolor/{scalable|16x16|32x32|48x48...512}/apps/${icon_path}文件不存在.\n"
fi
fi
fi
fi
# 检查Exec启动程序是否存在
exec_path=`grep Exec ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop 2>/dev/null |awk -F "=" '{print $2}' |awk '{print $1}'`
if [ ! -f ${BASE_DIR}${exec_path} ];then
fail "检查Exec字段\t\t\t"
echo -e "ERROR: ${BASE_DIR}${exec_path}文件不存在.\n"
else
ok "检查Exec字段\t\t\t"
fi
else
fail "检查Icon文件类型\t\t"
fail "检查Exec字段\t\t\t"
echo -e "ERROR: ${OPT_DIR}/apps/${PACKAGE}/entries/applications/${PACKAGE}.desktop文件不存在\n"
fi
echo -e "-------------------desktop文件检查结束----------------------\n"
}
function check_info_file(){
echo -e "---------------------info文件检查开始-----------------------"
appid=`grep appid ${OPT_DIR}/apps/${PACKAGE}/info 2>/dev/null|awk -F ":" '{print $2}' |tr -d "\"" |tr -d , | tr -d ' '`
arch_num=`grep arch ${OPT_DIR}/apps/${PACKAGE}/info 2>/dev/null |tr -d "[]" |awk -F ',' '{print (NF-1)}'`
arch=`grep arch ${OPT_DIR}/apps/${PACKAGE}/info 2>/dev/null`
# 检查appid字段
if [ -z $appid ];then
fail "检查appid字段\t\t\t"
echo -e "ERROR: appid字段不能为空.\n"
else
if [ ${PACKAGE} != `echo ${appid} |tr -d "$" |tr -d "\r"` ];then
fail "检查appid字段\t\t\t"
echo -e "ERROR: appid字段参数与Package字段参数不一致.\n"
else
ok "检查appid字段\t\t\t"
fi
fi
# 检查arch字段
if [ $arch_num -eq "1" ];then
if [ $ARCH == `echo $arch | awk -F ":" '{print $2}' | tr -d "[],\""` ];then
ok "检查arch字段\t\t\t"
else
fail "检查arch字段\t\t\t"
echo -e "ERROR: arch字段参数与control中不一致.\n"
fi
elif [ $arch_num -eq "2" ];then
fail "检查arch字段\t\t\t"
echo -e "ERROR: arch字段参数与control中不一致.\n"
elif [ $arch_num -eq "3" ];then
if [ $ARCH == "any" -o $ARCH == "all" ];then
echo $arch | grep "amd64" |grep "arm64" | grep "mips64el" -q
if [ $? -eq 0 ];then
ok "检查arch字段\t\t\t"
else
fail "检查arch字段\t\t\t"
echo -e "ERROR: arch字段参数与control中不一致.\n"
fi
else
fail "检查arch字段\t\t\t"
echo -e "ERROR: arch字段参数与control中不一致.\n"
fi
else
fail "检查arch字段\t\t\t"
echo -e "ERROR: arch字段参数太多或\n"
fi
# 检查json语法
tail -n 2 ${OPT_DIR}/apps/${PACKAGE}/info | grep -q ","
if [ $? -eq 0 ];then
fail "检查json语法\t\t\t"
echo -e "ERROR: info文件倒数第二行有多余的,号.\n"
else
ok "检查json语法\t\t\t"
fi
echo -e "---------------------info文件检查结束-----------------------\n"
}
check_control
scan_dir
check_desktop_file
check_info_file

View File

@ -1,5 +1,5 @@
Package: spark-deepin-wine-runner
Version: 2.4.0-spark
Version: 2.4.0
Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢
Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner, https://github.com/gfdgd-xi/deep-wine-runner, https://gitlink.org.cn/gfdgd_xi/deep-wine-runner
Architecture: all
@ -7,9 +7,9 @@ Priority: optional
Depends: python3, python3-pil, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar, unzip, python3-requests, fakeroot, bash, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip
Recommends: winbind, wimtools
Section: utils
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
Installed-Size: 26976
Installed-Size: 29616
Description: gfdgd xi、为什么您不喜欢熊出没和阿布呢 制作的 wine 运行器
2.4.0 更新内容:
※1、新增 VB Runtime 组件安装工具
@ -18,6 +18,9 @@ Description: gfdgd xi、为什么您不喜欢熊出没和阿布呢 制作的 win
※4、修复在 arm 架构运行 Wine 时提示无法解压资源的问题
※5、修复右键无法找到 Wine 运行器打开方式的问题
※6、修复了容器自动配置脚本 GUI 解析器无法指定 Wine、容器以及位数的功能
※7、容器自动配置脚本支持评分功能
更新时间2022年10月24日1024版
※7、容器自动配置脚本支持评分功能以及脚本内容介绍功能
※8、支持添加自定义安装的 Wine
※9、打包器打包的 arm 包支持同时支持 UOS 的 box86 和 exagear
※10、提供了 Python 的自动配置脚本 API
更新时间2022年10月25日
作者gfdgd xi、为什么您不喜欢熊出没和阿布呢

View File

@ -2,17 +2,17 @@
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本2.1.0
# 更新时间2022年08月25日
# 版本2.4.0
# 更新时间2022年10月25日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 构建
###########################################################################################
#################
# 引入所需的库
#################
from fileinput import filename
import os
import sys
import base64
import json
import traceback
import req as requests
@ -80,14 +80,86 @@ class ProgramRunStatusUpload():
try:
#if ProgramRunStatusUpload.sha1Value == "":
#ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText())
QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), json.loads(requests.post("http://120.25.153.144:30250/bash", {
QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL2Jhc2g=").decode("utf-8"), {
"BashName": ProgramRunStatusUpload.sha1Value,
"Fen": ProgramRunStatusUpload.fen.currentIndex()
}).text)["Error"])
}).json()["Error"])
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
class InformationWindow():
def ShowWindow():
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
try:
get = requests.get(f"{urlSources}/information/{fileName}.txt")
if get.status_code / 100 != 2 and get.status_code / 100 != 3:
int("Bad")
about = get.text
if not "<" in about:
# 非 Html 标签
for i in about.splitlines():
about += f"<p>{i}</p>\n"
#about = f"<pre>{about}</pre>"
about = f"<h1>关于“{choose}”的介绍</h1>\n{about}"
except:
traceback.print_exc()
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
try:
import requests as r
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
tipsInfo = ""
except:
fenlists = [0, 0, 0, 0, 0]
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
maxHead = fenlists.index(max(fenlists))
allNumber = 0
for i in fenlists:
allNumber += i
try:
maxNumber = max(fenlists) / allNumber * 100
if tipsInfo == "":
tipsInfo = f"{maxNumber}%的用户选择了这个评分"
except:
pass
end = 5
starHtml = ""
if maxHead > 5:
for i in range(end):
starHtml += f"<img src='{programPath}/Icon/BadStar.svg' width=50>\n"
else:
for i in range(maxHead):
starHtml += f"<img src='{programPath}/Icon/Star.svg' width=50>\n"
head = maxHead
for i in range(head, end):
starHtml += f"<img src='{programPath}/Icon/UnStar.svg' width=50>"
about += f"\n<hr/><h1>评分情况</h1>\n<p align='center'>{starHtml}</p>\n<p align='center'>{tipsInfo}</p>"
message = QtWidgets.QDialog()
messageLayout = QtWidgets.QVBoxLayout()
informationText = QtWidgets.QTextBrowser()
uploadFen = QtWidgets.QPushButton("提交评分")
uploadFen.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
informationText.setHtml(about)
messageLayout.addWidget(informationText)
messageLayout.addWidget(uploadFen)
message.setWindowTitle(f"关于“{choose}”的介绍")
message.resize(int(message.frameSize().width() * 1.5), int(message.frameSize().height()))
message.setLayout(messageLayout)
#message.setWindowModality(ApplicationModal);
message.show()
message.exec_()
class ProgramRunStatusShow():
msgWindow = None
def ShowWindow():
@ -105,7 +177,7 @@ class ProgramRunStatusShow():
fileName = i[1]
break
try:
fenlists = requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/bashapp/{fileName}/all.json").json()
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
#r = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8"))
#r.encoding = "utf-8"
#title = r.text
@ -270,6 +342,7 @@ if __name__ == "__main__":
# 连接信号和槽
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
ui.uploadFen.clicked.connect(UploadFen)
ui.getInfoButton.clicked.connect(InformationWindow.ShowWindow)
ui.runBotton.clicked.connect(Connect.RunBotton_Clicked)
ui.openFile.triggered.connect(Connect.OpenFile_Triggered)
ui.exitProgram.triggered.connect(window.close)

View File

@ -35,6 +35,9 @@ class Ui_MainWindow(object):
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem)
self.getInfoButton = QtWidgets.QPushButton(self.centralwidget)
self.getInfoButton.setObjectName("getInfoButton")
self.horizontalLayout_2.addWidget(self.getInfoButton)
self.getFen = QtWidgets.QPushButton(self.centralwidget)
self.getFen.setObjectName("getFen")
self.horizontalLayout_2.addWidget(self.getFen)
@ -73,6 +76,7 @@ class Ui_MainWindow(object):
MainWindow.setWindowTitle(_translate("MainWindow", "自动部署脚本"))
self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
self.saerchBotton.setText(_translate("MainWindow", "搜索"))
self.getInfoButton.setText(_translate("MainWindow", "获取选中项介绍"))
self.getFen.setText(_translate("MainWindow", "获取选中项的评分"))
self.uploadFen.setText(_translate("MainWindow", "提交选中项的评分"))
self.runBotton.setText(_translate("MainWindow", "部署此方案"))

View File

@ -54,6 +54,27 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="getInfoButton">
<property name="text">
<string>获取选中项介绍</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="getFen">
<property name="text">
<string>获取选中项的评分</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="uploadFen">
<property name="text">
<string>提交选中项的评分</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="runBotton">
<property name="text">
@ -71,7 +92,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>36</height>
<height>33</height>
</rect>
</property>
<widget class="QMenu" name="menu">

View File

@ -55,9 +55,9 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="saveButton">
<widget class="QPushButton" name="delectButton">
<property name="text">
<string>保存</string>
<string>删除</string>
</property>
</widget>
</item>

View File

@ -22,7 +22,7 @@
<item>
<widget class="QLabel" name="addTips">
<property name="text">
<string>暂时只支持 Ctrl+Alt+? 和 Alt+? 的组合
<string>暂时只支持特定组合
文本框内的只能输入单字母</string>
</property>
</widget>

View File

@ -1538,7 +1538,7 @@ widget.setLayout(widgetLayout)
window.setCentralWidget(widget)
window.setWindowTitle(f"wine 应用打包器 {version}")
window.setWindowIcon(QtGui.QIcon(iconPath))
window.resize(int(window.frameSize().width() * 2.1), window.frameSize().height())
window.resize(int(window.frameSize().width() * 2.1), int(window.frameSize().height()))
window.show()
sys.exit(app.exec_())
# Flag解包只读control和解包全部读取

View File

@ -1851,11 +1851,14 @@ updateThingsString = '''※1、新增 VB Runtime 组件安装工具
※4、修复在 arm 架构运行 Wine 时提示无法解压资源的问题
※5、修复右键无法找到 Wine 运行器打开方式的问题
※6、修复了容器自动配置脚本 GUI 解析器无法指定 Wine、容器以及位数的功能
※7、容器自动配置脚本支持评分功能
※7、容器自动配置脚本支持评分功能以及脚本内容介绍功能
※8、支持添加自定义安装的 Wine
※9、打包器打包的 arm 包支持同时支持 UOS 的 box86 和 exagear
※10、提供了 Python 的自动配置脚本 API
'''
for i in information["Thank"]:
thankText += f"{i}\n"
updateTime = "2022年10月24日"
updateTime = "2022年10月25日"
about = f'''<h1>关于</h1>
<p>一个能让Linux用户更加方便运行Windows应用的程序内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</p>
<p>同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具可以做到只需要用户下载系统镜像并点击安装即可无需顾及虚拟机安装、创建、虚拟机的分区等等</p>

View File

@ -1,5 +1,5 @@
{
"Version": "2.4.0~alpha1",
"Version": "2.4.0",
"Thank": [
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
"感谢 @zhangs https://bbs.deepin.org/post/227948",
@ -28,6 +28,8 @@
"感谢 @俊生鹏程 反馈的 2.1.0-2 及以前版本在鲲鹏运行 wine 错误的问题并积极测试,以及组件安装工具在 arm 架构的异常",
"感谢 @云的眼泪 反馈的 2.1.0-2 更新死循环的问题可见https://bbs.deepin.org/post/243241以及感谢 @神末shenmo @忘记、过去 和 @历山居士 的讨论",
"感谢 @186******75 反馈的 2.2.0 基于生态适配脚本打包器对话框异常的问题",
"感谢微信用户 @华为 @办公助手 @白水 @北冥没有鱼 @俊生鹏程 @^♀莫離♪^ @姚洪安 @гυи @杨飞 在 arm飞腾/鲲鹏)架构上提供提供测试与帮助",
"感谢 @办公助手 提供的 2.4.0 打包器支持生成的 arm 架构 deb 包同时支持 UOS box86+exagear 的建议",
"",
"感谢统信在 Wine 生态适配活动中提供的打包脚本",
"也感谢 DXVK 的开发者开发了 DXVK 这个程序项目链接https://github.com/doitsujin/dxvk",

View File

@ -1,76 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'AutoConfig.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 600)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.searchTips = QtWidgets.QLabel(self.centralwidget)
self.searchTips.setObjectName("searchTips")
self.horizontalLayout.addWidget(self.searchTips)
self.searchThings = QtWidgets.QLineEdit(self.centralwidget)
self.searchThings.setObjectName("searchThings")
self.horizontalLayout.addWidget(self.searchThings)
self.saerchBotton = QtWidgets.QPushButton(self.centralwidget)
self.saerchBotton.setObjectName("saerchBotton")
self.horizontalLayout.addWidget(self.saerchBotton)
self.verticalLayout_3.addLayout(self.horizontalLayout)
self.searchList = QtWidgets.QListView(self.centralwidget)
self.searchList.setObjectName("searchList")
self.verticalLayout_3.addWidget(self.searchList)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem)
self.runBotton = QtWidgets.QPushButton(self.centralwidget)
self.runBotton.setObjectName("runBotton")
self.horizontalLayout_2.addWidget(self.runBotton)
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 36))
self.menubar.setObjectName("menubar")
self.menu = QtWidgets.QMenu(self.menubar)
self.menu.setObjectName("menu")
MainWindow.setMenuBar(self.menubar)
self.about = QtWidgets.QAction(MainWindow)
self.about.setObjectName("about")
self.exitProgram = QtWidgets.QAction(MainWindow)
self.exitProgram.setObjectName("exitProgram")
self.help = QtWidgets.QAction(MainWindow)
self.help.setObjectName("help")
self.openFile = QtWidgets.QAction(MainWindow)
self.openFile.setObjectName("openFile")
self.menu.addAction(self.openFile)
self.menu.addSeparator()
self.menu.addAction(self.exitProgram)
self.menubar.addAction(self.menu.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "自动部署脚本"))
self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
self.saerchBotton.setText(_translate("MainWindow", "搜索"))
self.runBotton.setText(_translate("MainWindow", "部署此方案"))
self.menu.setTitle(_translate("MainWindow", "程序"))
self.about.setText(_translate("MainWindow", "关于"))
self.exitProgram.setText(_translate("MainWindow", "退出程序"))
self.help.setText(_translate("MainWindow", "帮助"))
self.openFile.setText(_translate("MainWindow", "打开本地部署脚本"))

View File

@ -1,85 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'KeyAddGui.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(692, 314)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName("verticalLayout")
self.tips = QtWidgets.QLabel(self.centralwidget)
self.tips.setObjectName("tips")
self.verticalLayout.addWidget(self.tips)
self.keyBoardList = QtWidgets.QListView(self.centralwidget)
self.keyBoardList.setObjectName("keyBoardList")
self.verticalLayout.addWidget(self.keyBoardList)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem)
self.addButton = QtWidgets.QPushButton(self.centralwidget)
self.addButton.setObjectName("addButton")
self.horizontalLayout.addWidget(self.addButton)
self.editButton = QtWidgets.QPushButton(self.centralwidget)
self.editButton.setObjectName("editButton")
self.horizontalLayout.addWidget(self.editButton)
self.saveButton = QtWidgets.QPushButton(self.centralwidget)
self.saveButton.setObjectName("saveButton")
self.horizontalLayout.addWidget(self.saveButton)
self.verticalLayout.addLayout(self.horizontalLayout)
MainWindow.setCentralWidget(self.centralwidget)
self.menuBar = QtWidgets.QMenuBar(MainWindow)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 692, 33))
self.menuBar.setObjectName("menuBar")
self.menu = QtWidgets.QMenu(self.menuBar)
self.menu.setObjectName("menu")
MainWindow.setMenuBar(self.menuBar)
self.action = QtWidgets.QAction(MainWindow)
self.action.setObjectName("action")
self.serverTips = QtWidgets.QAction(MainWindow)
self.serverTips.setEnabled(False)
self.serverTips.setObjectName("serverTips")
self.startServer = QtWidgets.QAction(MainWindow)
self.startServer.setObjectName("startServer")
self.stopServer = QtWidgets.QAction(MainWindow)
self.stopServer.setObjectName("stopServer")
self.setAutoStart = QtWidgets.QAction(MainWindow)
self.setAutoStart.setObjectName("setAutoStart")
self.setUnautoStart = QtWidgets.QAction(MainWindow)
self.setUnautoStart.setObjectName("setUnautoStart")
self.menu.addAction(self.serverTips)
self.menu.addSeparator()
self.menu.addAction(self.startServer)
self.menu.addAction(self.stopServer)
self.menu.addSeparator()
self.menu.addAction(self.setAutoStart)
self.menu.addAction(self.setUnautoStart)
self.menuBar.addAction(self.menu.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "编辑快捷键"))
self.tips.setText(_translate("MainWindow", "<html><head/><body><p>此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键<br/>Deepin/UOS将会使用默认的快捷键服务其它发行版将使用此运行器提供的快捷键服务<br>Deepin/UOS将只会提供快捷键添加功能请在控制中心进行快捷键的修改管理</p></body></html>"))
self.addButton.setText(_translate("MainWindow", "添加"))
self.editButton.setText(_translate("MainWindow", "编辑"))
self.saveButton.setText(_translate("MainWindow", "保存"))
self.menu.setTitle(_translate("MainWindow", "设置快捷键服务"))
self.action.setText(_translate("MainWindow", "关于"))
self.serverTips.setText(_translate("MainWindow", "此内容只支持非Deepin/UOS发行版"))
self.startServer.setText(_translate("MainWindow", "启动服务"))
self.stopServer.setText(_translate("MainWindow", "停止服务"))
self.setAutoStart.setText(_translate("MainWindow", "设置开机自启"))
self.setUnautoStart.setText(_translate("MainWindow", "关闭开机自启动"))

View File

@ -1,86 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'KeyAddKeyboardGui.ui'
#
# Created by: PyQt5 UI code generator 5.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(800, 195)
icon = QtGui.QIcon.fromTheme("..")
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName("verticalLayout")
self.addTips = QtWidgets.QLabel(self.centralwidget)
self.addTips.setObjectName("addTips")
self.verticalLayout.addWidget(self.addTips)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.exeNameTips = QtWidgets.QLabel(self.centralwidget)
self.exeNameTips.setObjectName("exeNameTips")
self.horizontalLayout_3.addWidget(self.exeNameTips)
self.exeName = QtWidgets.QLineEdit(self.centralwidget)
self.exeName.setObjectName("exeName")
self.horizontalLayout_3.addWidget(self.exeName)
self.verticalLayout.addLayout(self.horizontalLayout_3)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.localTips = QtWidgets.QLabel(self.centralwidget)
self.localTips.setObjectName("localTips")
self.horizontalLayout.addWidget(self.localTips)
self.localKeyboardChoose = QtWidgets.QComboBox(self.centralwidget)
self.localKeyboardChoose.setObjectName("localKeyboardChoose")
self.horizontalLayout.addWidget(self.localKeyboardChoose)
self.addTips_2 = QtWidgets.QLabel(self.centralwidget)
self.addTips_2.setObjectName("addTips_2")
self.horizontalLayout.addWidget(self.addTips_2)
self.localKey = QtWidgets.QLineEdit(self.centralwidget)
self.localKey.setObjectName("localKey")
self.horizontalLayout.addWidget(self.localKey)
self.wineTips = QtWidgets.QLabel(self.centralwidget)
self.wineTips.setObjectName("wineTips")
self.horizontalLayout.addWidget(self.wineTips)
self.wineKeyboardChoose = QtWidgets.QComboBox(self.centralwidget)
self.wineKeyboardChoose.setObjectName("wineKeyboardChoose")
self.horizontalLayout.addWidget(self.wineKeyboardChoose)
self.addTipsWine = QtWidgets.QLabel(self.centralwidget)
self.addTipsWine.setObjectName("addTipsWine")
self.horizontalLayout.addWidget(self.addTipsWine)
self.wineKey = QtWidgets.QLineEdit(self.centralwidget)
self.wineKey.setObjectName("wineKey")
self.horizontalLayout.addWidget(self.wineKey)
self.verticalLayout.addLayout(self.horizontalLayout)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem1)
self.addButton = QtWidgets.QPushButton(self.centralwidget)
self.addButton.setObjectName("addButton")
self.horizontalLayout_2.addWidget(self.addButton)
self.verticalLayout.addLayout(self.horizontalLayout_2)
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "添加快捷键"))
self.addTips.setText(_translate("MainWindow", "暂时只支持 Ctrl+Alt+? 和 Alt+? 的组合\n"
"文本框内的只能输入单字母"))
self.exeNameTips.setText(_translate("MainWindow", "可这执行文件名称:"))
self.localTips.setText(_translate("MainWindow", "本地映射:"))
self.addTips_2.setText(_translate("MainWindow", "+"))
self.wineTips.setText(_translate("MainWindow", "Wine 容器映射内容:"))
self.addTipsWine.setText(_translate("MainWindow", "+"))
self.addButton.setText(_translate("MainWindow", "添加快捷键"))

View File

@ -16,18 +16,22 @@ badUrl = [
class Respon:
text = ""
def get(url): # -> requests.Response:
def get(url, timeout=None): # -> requests.Response:
if unConnect:
# 筛选 Url只有特定的 url 才会被拦截
for i in badUrl:
if i in url:
raise Exception("52专版不支持连接作者服务器")
return requests.get(url)
if timeout == None:
return requests.get(url)
return requests.get(url, timeout=timeout)
def post(url, data):
def post(url, data, timeout=None):
if unConnect:
# 筛选 Url只有特定的 url 才会被拦截
for i in badUrl:
if i in url:
raise Exception("52专版不支持连接作者服务器")
return requests.post(url, data)
if timeout == None:
return requests.post(url, data)
return requests.post(url, data, timeout=timeout)

View File

@ -114,8 +114,9 @@ def InstallOtherWine():
name = os.path.basename(os.path.dirname(os.path.dirname(path[0])))
if name == "" or name == None:
name = f"useradd-wine-{random.randint(0, 99999)}"
binPath = os.path.dirname(os.path.dirname(path[0]))
if os.system(f"ln -s '{binPath}' '{programPath}/{name}'") != 0:
#binPath = os.path.dirname(os.path.dirname(path[0]))
os.makedirs(f"{programPath}/{name}/bin")
if os.system(f"ln -s '{path[0]}' '{programPath}/{name}/bin/wine'") != 0:
QtWidgets.QMessageBox.critical(window, "新建wine映射失败")
# C++ 版注释:不直接用 readwrite 是因为不能覆盖写入
file = open(f"{programPath}/winelist.json", "w")

View File

@ -1538,7 +1538,7 @@ widget.setLayout(widgetLayout)
window.setCentralWidget(widget)
window.setWindowTitle(f"wine 应用打包器 {version}")
window.setWindowIcon(QtGui.QIcon(iconPath))
window.resize(int(window.frameSize().width() * 2.1), window.frameSize().height())
window.resize(int(window.frameSize().width() * 2.1), int(window.frameSize().height()))
window.show()
sys.exit(app.exec_())
# Flag解包只读control和解包全部读取

View File

@ -1,5 +1,5 @@
{
"Version": "2.4.0~alpha1",
"Version": "2.4.0",
"Thank": [
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
"感谢 @zhangs https://bbs.deepin.org/post/227948",
@ -28,6 +28,8 @@
"感谢 @俊生鹏程 反馈的 2.1.0-2 及以前版本在鲲鹏运行 wine 错误的问题并积极测试,以及组件安装工具在 arm 架构的异常",
"感谢 @云的眼泪 反馈的 2.1.0-2 更新死循环的问题可见https://bbs.deepin.org/post/243241以及感谢 @神末shenmo @忘记、过去 和 @历山居士 的讨论",
"感谢 @186******75 反馈的 2.2.0 基于生态适配脚本打包器对话框异常的问题",
"感谢微信用户 @华为 @办公助手 @白水 @北冥没有鱼 @俊生鹏程 @^♀莫離♪^ @姚洪安 @гυи @杨飞 在 arm飞腾/鲲鹏)架构上提供提供测试与帮助",
"感谢 @办公助手 提供的 2.4.0 打包器支持生成的 arm 架构 deb 包同时支持 UOS box86+exagear 的建议",
"",
"感谢统信在 Wine 生态适配活动中提供的打包脚本",
"也感谢 DXVK 的开发者开发了 DXVK 这个程序项目链接https://github.com/doitsujin/dxvk",

View File

@ -1851,7 +1851,7 @@ updateThingsString = '''※1、新增 VB Runtime 组件安装工具
4修复在 arm 架构运行 Wine 时提示无法解压资源的问题
5修复右键无法找到 Wine 运行器打开方式的问题
6修复了容器自动配置脚本 GUI 解析器无法指定 Wine容器以及位数的功能
7容器自动配置脚本支持评分功能
7容器自动配置脚本支持评分功能以及脚本内容介绍功能
8支持添加自定义安装的 Wine
9打包器打包的 arm 包支持同时支持 UOS box86 exagear
10提供了 Python 的自动配置脚本 API

Binary file not shown.

View File

@ -1,3 +1,3 @@
{
"Version": "2.4.0~alpha1"
"Version": "2.4.0"
}

View File

@ -16,18 +16,22 @@ badUrl = [
class Respon:
text = ""
def get(url): # -> requests.Response:
def get(url, timeout=None): # -> requests.Response:
if unConnect:
# 筛选 Url只有特定的 url 才会被拦截
for i in badUrl:
if i in url:
raise Exception("52专版不支持连接作者服务器")
return requests.get(url)
if timeout == None:
return requests.get(url)
return requests.get(url, timeout=timeout)
def post(url, data):
def post(url, data, timeout=None):
if unConnect:
# 筛选 Url只有特定的 url 才会被拦截
for i in badUrl:
if i in url:
raise Exception("52专版不支持连接作者服务器")
return requests.post(url, data)
if timeout == None:
return requests.post(url, data)
return requests.post(url, data, timeout=timeout)