评分数据预测+各种小东西

This commit is contained in:
gfdgd xi 2022-09-20 21:53:37 +08:00
parent 2db446a845
commit d498b03a4f
19 changed files with 562 additions and 18 deletions

View File

@ -215,7 +215,7 @@ class make_deb_threading(QtCore.QThread):
"Architecture": "i386",
"Depends": [
f"{wine[wineVersion.currentText()]}, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei",
f"{wine[wineVersion.currentText()]}, spark-dwine-helper (>= 1.6.2), fonts-wqy-microhei, fonts-wqy-zenhei"
f"{wine[wineVersion.currentText()]}, spark-dwine-helper | store.spark-app.spark-dwine-helper, fonts-wqy-microhei, fonts-wqy-zenhei"
][int(chooseWineHelperValue.isChecked())],
"postinst": "",
"postrm": ["", f"""#!/bin/bash
@ -695,7 +695,7 @@ WINEPREFIX=$BOTTLE $EMU $EMU_ARGS $WINE "$EXE" --disable-gpu &""",
print("c")
if os.path.exists(wine[wineVersion.currentText()]):
debInformation[0]["Depends"] = ["deepin-wine-helper (>= 5.1.30-1)",
"spark-dwine-helper (>= 1.6.2)"
"spark-dwine-helper | store.spark-app.spark-dwine-helper"
][int(chooseWineHelperValue.isChecked())] #+ ["", "libasound2 (>= 1.0.16), libc6 (>= 2.28), libglib2.0-0 (>= 2.12.0), libgphoto2-6 (>= 2.5.10), libgphoto2-port12 (>= 2.5.10), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.4.0), liblcms2-2 (>= 2.2+git20110628), libldap-2.4-2 (>= 2.4.7), libmpg123-0 (>= 1.13.7), libopenal1 (>= 1.14), libpcap0.8 (>= 0.9.8), libpulse0 (>= 0.99.1), libudev1 (>= 183), libvkd3d1 (>= 1.0), libx11-6, libxext6, libxml2 (>= 2.9.0), ocl-icd-libopencl1 | libopencl1, udis86, zlib1g (>= 1:1.1.4), libasound2-plugins, libncurses6 | libncurses5 | libncurses, deepin-wine-plugin-virtual\nRecommends: libcapi20-3, libcups2, libdbus-1-3, libfontconfig1, libfreetype6, libglu1-mesa | libglu1, libgnutls30 | libgnutls28 | libgnutls26, libgsm1, libgssapi-krb5-2, libjpeg62-turbo | libjpeg8, libkrb5-3, libodbc1, libosmesa6, libpng16-16 | libpng12-0, libsane | libsane1, libsdl2-2.0-0, libtiff5, libv4l-0, libxcomposite1, libxcursor1, libxfixes3, libxi6, libxinerama1, libxrandr2, libxrender1, libxslt1.1, libxxf86vm1"][]
print("d")
debInformation[0]["run.sh"] = f'''#!/bin/sh
@ -1029,12 +1029,12 @@ def InstallDeb():
def ChangeWine():
useInstallWineArch.setEnabled(os.path.exists(wine[wineVersion.currentText()]))
debDepends.setText([f"{wine[wineVersion.currentText()]}, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei",
f"{wine[wineVersion.currentText()]}, spark-dwine-helper (>= 1.6.2), fonts-wqy-microhei, fonts-wqy-zenhei"
f"{wine[wineVersion.currentText()]}, spark-dwine-helper | store.spark-app.spark-dwine-helper, fonts-wqy-microhei, fonts-wqy-zenhei"
][int(chooseWineHelperValue.isChecked())])
debRecommend.setText("")
if os.path.exists(wine[wineVersion.currentText()]):
debDepends.setText(["deepin-wine-helper (>= 5.1.30-1)",
"spark-dwine-helper (>= 1.6.2)"
"spark-dwine-helper | store.spark-app.spark-dwine-helper"
][int(chooseWineHelperValue.isChecked())])
if "deepin-wine5-stable" in wine[wineVersion.currentText()]:
debDepends.setText("libasound2 (>= 1.0.16), libc6 (>= 2.28), libglib2.0-0 (>= 2.12.0), libgphoto2-6 (>= 2.5.10), libgphoto2-port12 (>= 2.5.10), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.4.0), liblcms2-2 (>= 2.2+git20110628), libldap-2.4-2 (>= 2.4.7), libmpg123-0 (>= 1.13.7), libopenal1 (>= 1.14), libpcap0.8 (>= 0.9.8), libpulse0 (>= 0.99.1), libudev1 (>= 183), libvkd3d1 (>= 1.0), libx11-6, libxext6, libxml2 (>= 2.9.0), ocl-icd-libopencl1 | libopencl1, udis86, zlib1g (>= 1:1.1.4), libasound2-plugins, libncurses6 | libncurses5 | libncurses, deepin-wine-plugin-virtual")

231
dxvk/auto.sh Executable file
View File

@ -0,0 +1,231 @@
#!/usr/bin/env bash
function wait(){
echo ""
}
# default directories
dxvk_lib32=${dxvk_lib32:-"x32"}
dxvk_lib64=${dxvk_lib64:-"x64"}
# figure out where we are
basedir=$(dirname "$(readlink -f $0)")
# figure out which action to perform
action="$1"
case "$action" in
install)
;;
uninstall)
;;
*)
echo "Unrecognized action: $action"
echo "Usage: $0 [install|uninstall] [--without-dxgi] [--with-d3d10] [--symlink]"
wait
exit 1
esac
# process arguments
shift
with_dxgi=true
with_d3d10=false
file_cmd="cp -v"
while (($# > 0)); do
case "$1" in
"--without-dxgi")
with_dxgi=false
;;
"--with-d3d10")
with_d3d10=true
;;
"--symlink")
file_cmd="ln -s -v"
;;
esac
shift
done
# check wine prefix before invoking wine, so that we
# don't accidentally create one if the user screws up
if [ -n "$WINEPREFIX" ] && ! [ -f "$WINEPREFIX/system.reg" ]; then
echo "$WINEPREFIX:"' Not a valid wine prefix.' >&2
wait
exit 1
fi
# find wine executable
export WINEDEBUG=-all
# disable mscoree and mshtml to avoid downloading
# wine gecko and mono
export WINEDLLOVERRIDES="mscoree,mshtml="
# 专门添加,为了可以使用自定义的 wine
wine=$WINE
wine64=$WINE64
wineboot="$WINE wineboot"
if [[ $WINE == "" ]];then
wine="wine"
fi
if [[ $WINE64 == "" ]];then
wine64="wine64"
fi
# $PATH is the way for user to control where wine is located (including custom Wine versions).
# Pure 64-bit Wine (non Wow64) requries skipping 32-bit steps.
# In such case, wine64 and winebooot will be present, but wine binary will be missing,
# however it can be present in other PATHs, so it shouldn't be used, to avoid versions mixing.
wine_path=$(dirname "$(which $wineboot)")
wow64=true
if ! [ -f "$wine_path/$wine" ]; then
wine=$wine64
wow64=false
wineboot="$wine64 wineboot"
fi
# resolve 32-bit and 64-bit system32 path
winever=$($wine --version | grep wine)
if [ -z "$winever" ]; then
echo "$wine:"' Not a wine executable. Check your $wine.' >&2
wait
exit 1
fi
# ensure wine placeholder dlls are recreated
# if they are missing
$wineboot -u
win64_sys_path=$($wine64 winepath -u 'C:\windows\system32' 2> /dev/null)
win64_sys_path="${win64_sys_path/$'\r'/}"
if $wow64; then
win32_sys_path=$($wine winepath -u 'C:\windows\system32' 2> /dev/null)
win32_sys_path="${win32_sys_path/$'\r'/}"
fi
if [ -z "$win32_sys_path" ] && [ -z "$win64_sys_path" ]; then
echo 'Failed to resolve C:\windows\system32.' >&2
wait
exit 1
fi
# create native dll override
overrideDll() {
$wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo -e "Failed to add override for $1"
wait
exit 1
fi
}
# remove dll override
restoreDll() {
$wine reg delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /f > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Failed to remove override for $1"
fi
}
# copy or link dxvk dll, back up original file
installFile() {
dstfile="${1}/${3}.dll"
srcfile="${basedir}/${2}/${3}.dll"
if [ -f "${srcfile}.so" ]; then
srcfile="${srcfile}.so"
fi
if ! [ -f "${srcfile}" ]; then
echo "${srcfile}: File not found. Skipping." >&2
return 1
fi
if [ -n "$1" ]; then
if [ -f "${dstfile}" ] || [ -h "${dstfile}" ]; then
if ! [ -f "${dstfile}.old" ]; then
mv -v "${dstfile}" "${dstfile}.old"
else
rm -v "${dstfile}"
fi
$file_cmd "${srcfile}" "${dstfile}"
else
echo "${dstfile}: File not found in wine prefix" >&2
return 1
fi
fi
return 0
}
# remove dxvk dll, restore original file
uninstallFile() {
dstfile="${1}/${3}.dll"
srcfile="${basedir}/${2}/${3}.dll"
if [ -f "${srcfile}.so" ]; then
srcfile="${srcfile}.so"
fi
if ! [ -f "${srcfile}" ]; then
echo "${srcfile}: File not found. Skipping." >&2
return 1
fi
if ! [ -f "${dstfile}" ] && ! [ -h "${dstfile}" ]; then
echo "${dstfile}: File not found. Skipping." >&2
return 1
fi
if [ -f "${dstfile}.old" ]; then
rm -v "${dstfile}"
mv -v "${dstfile}.old" "${dstfile}"
return 0
else
return 1
fi
}
install() {
installFile "$win64_sys_path" "$dxvk_lib64" "$1"
inst64_ret="$?"
inst32_ret=-1
if $wow64; then
installFile "$win32_sys_path" "$dxvk_lib32" "$1"
inst32_ret="$?"
fi
if (( ($inst32_ret == 0) || ($inst64_ret == 0) )); then
overrideDll "$1"
fi
}
uninstall() {
uninstallFile "$win64_sys_path" "$dxvk_lib64" "$1"
uninst64_ret="$?"
uninst32_ret=-1
if $wow64; then
uninstallFile "$win32_sys_path" "$dxvk_lib32" "$1"
uninst32_ret="$?"
fi
if (( ($uninst32_ret == 0) || ($uninst64_ret == 0) )); then
restoreDll "$1"
fi
}
# skip dxgi during install if not explicitly
# enabled, but always try to uninstall it
if $with_dxgi || [ "$action" == "uninstall" ]; then
$action dxgi
fi
$action d3d9
if $with_d3d10 || [ "$action" == "uninstall" ]; then
$action d3d10
$action d3d10_1
fi
$action d3d10core
$action d3d11
wait

232
dxvk/setup_dxvk.sh Executable file
View File

@ -0,0 +1,232 @@
#!/usr/bin/env bash
function wait(){
echo Press Enter To Exit
read
}
# default directories
dxvk_lib32=${dxvk_lib32:-"x32"}
dxvk_lib64=${dxvk_lib64:-"x64"}
# figure out where we are
basedir=$(dirname "$(readlink -f $0)")
# figure out which action to perform
action="$1"
case "$action" in
install)
;;
uninstall)
;;
*)
echo "Unrecognized action: $action"
echo "Usage: $0 [install|uninstall] [--without-dxgi] [--with-d3d10] [--symlink]"
wait
exit 1
esac
# process arguments
shift
with_dxgi=true
with_d3d10=false
file_cmd="cp -v"
while (($# > 0)); do
case "$1" in
"--without-dxgi")
with_dxgi=false
;;
"--with-d3d10")
with_d3d10=true
;;
"--symlink")
file_cmd="ln -s -v"
;;
esac
shift
done
# check wine prefix before invoking wine, so that we
# don't accidentally create one if the user screws up
if [ -n "$WINEPREFIX" ] && ! [ -f "$WINEPREFIX/system.reg" ]; then
echo "$WINEPREFIX:"' Not a valid wine prefix.' >&2
wait
exit 1
fi
# find wine executable
export WINEDEBUG=-all
# disable mscoree and mshtml to avoid downloading
# wine gecko and mono
export WINEDLLOVERRIDES="mscoree,mshtml="
# 专门添加,为了可以使用自定义的 wine
wine=$WINE
wine64=$WINE64
wineboot="$WINE wineboot"
if [[ $WINE == "" ]];then
wine="wine"
fi
if [[ $WINE64 == "" ]];then
wine64="wine64"
fi
# $PATH is the way for user to control where wine is located (including custom Wine versions).
# Pure 64-bit Wine (non Wow64) requries skipping 32-bit steps.
# In such case, wine64 and winebooot will be present, but wine binary will be missing,
# however it can be present in other PATHs, so it shouldn't be used, to avoid versions mixing.
wine_path=$(dirname "$(which $wineboot)")
wow64=true
if ! [ -f "$wine_path/$wine" ]; then
wine=$wine64
wow64=false
wineboot="$wine64 wineboot"
fi
# resolve 32-bit and 64-bit system32 path
winever=$($wine --version | grep wine)
if [ -z "$winever" ]; then
echo "$wine:"' Not a wine executable. Check your $wine.' >&2
wait
exit 1
fi
# ensure wine placeholder dlls are recreated
# if they are missing
$wineboot -u
win64_sys_path=$($wine64 winepath -u 'C:\windows\system32' 2> /dev/null)
win64_sys_path="${win64_sys_path/$'\r'/}"
if $wow64; then
win32_sys_path=$($wine winepath -u 'C:\windows\system32' 2> /dev/null)
win32_sys_path="${win32_sys_path/$'\r'/}"
fi
if [ -z "$win32_sys_path" ] && [ -z "$win64_sys_path" ]; then
echo 'Failed to resolve C:\windows\system32.' >&2
wait
exit 1
fi
# create native dll override
overrideDll() {
$wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo -e "Failed to add override for $1"
wait
exit 1
fi
}
# remove dll override
restoreDll() {
$wine reg delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /f > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Failed to remove override for $1"
fi
}
# copy or link dxvk dll, back up original file
installFile() {
dstfile="${1}/${3}.dll"
srcfile="${basedir}/${2}/${3}.dll"
if [ -f "${srcfile}.so" ]; then
srcfile="${srcfile}.so"
fi
if ! [ -f "${srcfile}" ]; then
echo "${srcfile}: File not found. Skipping." >&2
return 1
fi
if [ -n "$1" ]; then
if [ -f "${dstfile}" ] || [ -h "${dstfile}" ]; then
if ! [ -f "${dstfile}.old" ]; then
mv -v "${dstfile}" "${dstfile}.old"
else
rm -v "${dstfile}"
fi
$file_cmd "${srcfile}" "${dstfile}"
else
echo "${dstfile}: File not found in wine prefix" >&2
return 1
fi
fi
return 0
}
# remove dxvk dll, restore original file
uninstallFile() {
dstfile="${1}/${3}.dll"
srcfile="${basedir}/${2}/${3}.dll"
if [ -f "${srcfile}.so" ]; then
srcfile="${srcfile}.so"
fi
if ! [ -f "${srcfile}" ]; then
echo "${srcfile}: File not found. Skipping." >&2
return 1
fi
if ! [ -f "${dstfile}" ] && ! [ -h "${dstfile}" ]; then
echo "${dstfile}: File not found. Skipping." >&2
return 1
fi
if [ -f "${dstfile}.old" ]; then
rm -v "${dstfile}"
mv -v "${dstfile}.old" "${dstfile}"
return 0
else
return 1
fi
}
install() {
installFile "$win64_sys_path" "$dxvk_lib64" "$1"
inst64_ret="$?"
inst32_ret=-1
if $wow64; then
installFile "$win32_sys_path" "$dxvk_lib32" "$1"
inst32_ret="$?"
fi
if (( ($inst32_ret == 0) || ($inst64_ret == 0) )); then
overrideDll "$1"
fi
}
uninstall() {
uninstallFile "$win64_sys_path" "$dxvk_lib64" "$1"
uninst64_ret="$?"
uninst32_ret=-1
if $wow64; then
uninstallFile "$win32_sys_path" "$dxvk_lib32" "$1"
uninst32_ret="$?"
fi
if (( ($uninst32_ret == 0) || ($uninst64_ret == 0) )); then
restoreDll "$1"
fi
}
# skip dxgi during install if not explicitly
# enabled, but always try to uninstall it
if $with_dxgi || [ "$action" == "uninstall" ]; then
$action dxgi
fi
$action d3d9
if $with_d3d10 || [ "$action" == "uninstall" ]; then
$action d3d10
$action d3d10_1
fi
$action d3d10core
$action d3d11
wait

BIN
dxvk/x32/d3d10.dll Executable file

Binary file not shown.

BIN
dxvk/x32/d3d10_1.dll Executable file

Binary file not shown.

BIN
dxvk/x32/d3d10core.dll Executable file

Binary file not shown.

BIN
dxvk/x32/d3d11.dll Executable file

Binary file not shown.

BIN
dxvk/x32/d3d9.dll Executable file

Binary file not shown.

BIN
dxvk/x32/dxgi.dll Executable file

Binary file not shown.

BIN
dxvk/x64/d3d10.dll Executable file

Binary file not shown.

BIN
dxvk/x64/d3d10_1.dll Executable file

Binary file not shown.

BIN
dxvk/x64/d3d10core.dll Executable file

Binary file not shown.

BIN
dxvk/x64/d3d11.dll Executable file

Binary file not shown.

BIN
dxvk/x64/d3d9.dll Executable file

Binary file not shown.

BIN
dxvk/x64/dxgi.dll Executable file

Binary file not shown.

View File

@ -1,5 +1,5 @@
{
"Version": "2.2.0-Alpha3",
"Version": "2.2.0",
"Thank": [
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
"感谢 @zhangs https://bbs.deepin.org/post/227948",
@ -23,6 +23,10 @@
"感谢 @云的眼泪 @zhengjl 反馈的 2.0.0 发布忘记把安装包传蓝奏云的问题",
"感谢 @虚幻的早晨 提出的添加 DXVK、VKD3D 的功能VKD3D 暂未实现)",
"感谢 @以勒 修改 Dll 提取工具提示文本的建议",
"感谢 @历山居士 反馈的获取自动配置容器脚本工具无法正常加载数据的问题",
"感谢 @Nick @奋斗ing 反馈的 2.1.0-2 的快捷方式故障",
"感谢 @俊生鹏程 反馈的 2.1.0-2 及以前版本在鲲鹏运行 wine 错误的问题并积极测试",
"感谢 @云的眼泪 反馈的 2.1.0-2 更新死循环的问题可见https://bbs.deepin.org/post/243241以及感谢 @神末shenmo @忘记、过去 和 @历山居士 的讨论",
"感谢统信在 Wine 生态适配活动中提供的打包脚本",
"也感谢 DXVK 的开发者开发了 DXVK 这个程序项目链接https://github.com/doitsujin/dxvk",
"也感谢 WineHQ 开发团队开发的 WineHQ项目网址https://dl.winehq.org/",

View File

@ -1130,9 +1130,13 @@ class GetDllFromWindowsISO:
traceback.print_exc()
QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, "错误", traceback.format_exc())
choose = None
class ProgramRunStatusShow():
msgWindow = None
def ShowWindow():
global choose
choose = None
dateVersion = ""
if not os.path.exists(e2.currentText()):
QtWidgets.QMessageBox.information(widget, "提示", "您输入的 exe 不存在")
return
@ -1143,9 +1147,34 @@ class ProgramRunStatusShow():
r.encoding = "utf-8"
title = r.text
except:
if QtWidgets.QMessageBox.question(widget, QtCore.QCoreApplication.translate("U", "提示"), QtCore.QCoreApplication.translate("U", "暂时还没有该软件的运行情况信息\n是否自己上传该软件的运行情况?")) == QtWidgets.QMessageBox.Yes:
choosemsg = QtWidgets.QMessageBox()
choosemsg.setText("""暂时还没有该软件的运行情况信息,请问需要?""")
choosemsg.setWindowTitle("提示")
def Choose(choices):
global choose
choose = choices
choosemsg.addButton("取消", QtWidgets.QMessageBox.ActionRole).clicked.connect(lambda: Choose(0))
choosemsg.addButton("提交评分", QtWidgets.QMessageBox.ActionRole).clicked.connect(lambda: Choose(1))
choosemsg.addButton("预测评分(不准确)", QtWidgets.QMessageBox.ActionRole).clicked.connect(lambda: Choose(2))
choosemsg.exec_()
if choose == None or choose == 0:
return
if choose == 1:
ProgramRunStatusUpload.ShowWindow(sha)
return
if choose == 2:
try:
lists = [0, 0, 0, 0, 0, 0, 0, 0]
info = json.loads(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL0FJP1NIQTE9").decode("utf-8") + sha).text)
lists[int(info["Fen"])] = 1
dateVersion = info["Version"]
title = "null"
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(window, "错误", "无法获取预测数值")
# QtWidgets.QMessageBox.information(None, "提示", "必须选择一个选项!否则无法进入程序!")
# sys.exit()
informationList = [
"0分无法运行并且也没有报错自己无法解决",
"1分无法运行但有报错自己无法解决",
@ -1156,8 +1185,10 @@ class ProgramRunStatusShow():
"含有不良内容,不宜安装",
"含有病毒、木马等对计算机有害的软件"
]
if title.lower() == "null":
title = "未知应用"
maxHead = lists.index(max(lists))
ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow()
msgWidget = QtWidgets.QWidget()
@ -1168,7 +1199,8 @@ class ProgramRunStatusShow():
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0)
msgWidgetLayout.addLayout(starLayout, 0, 1)
msgWidgetLayout.addWidget(QtWidgets.QLabel(informationList[maxHead]), 1, 0, 1, 2)
msgWidgetLayout.addWidget(uploadButton, 2, 0, 1, 2)
msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2)
msgWidgetLayout.addWidget(uploadButton, 3, 0, 1, 2)
end = 5
if maxHead > 5:
for i in range(end):
@ -1619,6 +1651,26 @@ except:
QtWidgets.QMessageBox.critical(None, "错误", f"无法读取配置,无法继续\n{traceback.format_exc()}")
sys.exit(1)
def getFileFolderSize(fileOrFolderPath):
"""get size for file or folder"""
totalSize = 0
if not os.path.exists(fileOrFolderPath):
return totalSize
if os.path.isfile(fileOrFolderPath):
totalSize = os.path.getsize(fileOrFolderPath) # 5041481
return totalSize
if os.path.isdir(fileOrFolderPath):
with os.scandir(fileOrFolderPath) as dirEntryList:
for curSubEntry in dirEntryList:
curSubEntryFullPath = os.path.join(fileOrFolderPath, curSubEntry.name)
if curSubEntry.is_dir():
curSubFolderSize = getFileFolderSize(curSubEntryFullPath) # 5800007
totalSize += curSubFolderSize
elif curSubEntry.is_file():
curSubFileSize = os.path.getsize(curSubEntryFullPath) # 1891
totalSize += curSubFileSize
return totalSize
# 获取当前语言
def get_now_lang()->"获取当前语言":
return os.getenv('LANG')
@ -1631,8 +1683,8 @@ def GetVersion():
# 编译版本:无版本号
# Gitee/Github……正常版本
programVersionTypeLnk = {
"~spark": "星火应用商店版本",
"~uos": "deepin/UOS 应用商店版本<带签名>"
"spark": "星火应用商店版本",
"uos": "deepin/UOS 应用商店版本<带签名>"
}
programVersionType = "从源码运行的版本"
try:
@ -1647,21 +1699,36 @@ def GetVersion():
continue
if not package:
continue
if fileName[i].replace(" ", "").replace("\n", "") == "":
# 空行,不再考虑
break
# 搜索版本号
try:
if fileName[i][:fileName[i].index(":")] == "Version":
version = fileName[i][fileName[i].index(":") + 1:].strip()
print(f"版本号为:{version}")
if not "~" in version:
if not "-" in version:
programVersionType = "从Gitee/Github/Gitlink等平台获取的版本"
break
programVersionType = programVersionTypeLnk[version[version.index("~"):]]
programVersionType = version[version.index("-") + 1:]
print(programVersionType)
if "-" in programVersionType:
# 考虑到如 2.1.0-2-spark 的情况
programVersionType = programVersionType[programVersionType.index("-") + 1:]
try:
programVersionType = programVersionTypeLnk[programVersionType]
except:
programVersionType = "从Gitee/Github/Gitlink等平台获取的版本"
break
except:
traceback.print_exc()
continue
except:
print("无法读取,当没有处理")
print(programVersionType)
about = about.replace("@VersionForType@", programVersionType)
# 获取程序体积
about = about.replace("@programSize@", str(int(getFileFolderSize(programPath) / 1024 / 1024)))
print(wine)
@ -1701,8 +1768,12 @@ updateThingsString = '''※1、Dll 提取工具支持 NT 6.X 及以上版本的
7基于生态适配活动的打包器更换为 spark-wine-helper 以及添加自动删除残留脚本
8打包器支持从 deb 文件读取信息
9修复在 UOS 专业版鲲鹏无法正常运行的问题
10更新组件安装的离线列表
11不再强制依赖深度终端只做推荐安装
10修复出现星火应用商店和官方应用商店反复提示更新死循环的问题
11新增评分分数预测功能不准
12更新组件安装的离线列表
13不再强制依赖深度终端只做推荐安装
14基于生态活动适配脚本的打包器在打包完成后会弹出对话框提示打包完成
15优化打包器的 spark wine helper 依赖设置方式
<b>以下更新内容旧版本也适用只限 2.1.0 及以上版本</b>
1安装更多Wine的Wine安装工具中上新 Wine
2 Dll 工具上新 Dll
@ -1724,7 +1795,8 @@ about = f'''<h1>关于</h1>
版本{version}
适用平台{goodRunSystem}@VersionForType@
Qt 版本{QtCore.qVersion()}
程序官网{programUrl}</pre>
程序官网{programUrl}
程序占用体积@programSize@MB</pre>
<hr>
<h1>谢明名单</h1>
<pre>{thankText}</pre>

View File

@ -1,3 +1,3 @@
{
"Version": "2.2.0-Alpha3"
"Version": "2.2.0"
}

View File

@ -51,6 +51,7 @@ def DisbledOrEnabled(choose: bool):
class PackageDebThread(QtCore.QThread):
signal = QtCore.pyqtSignal(str)
info = QtCore.pyqtSignal(str)
def __init__(self) -> None:
super().__init__()
@ -96,12 +97,15 @@ export apprun_cmd="deepin-wine6-stable"
text = ""
self.signal.emit(text)
print(text, end="")
self.info.emit("打包完成!")
DisbledOrEnabled(False)
class QT:
run = None
def MessageBoxInformation(text):
QtWidgets.QMessageBox.information(window, "提示", text)
def PackageDeb():
DisbledOrEnabled(True)
for i in [chineseName.text(), englishName.text(), debDescription.text(), typeName.currentText(), exePath.text(), packageName.text(), versionName.text()]:
@ -112,6 +116,7 @@ def PackageDeb():
commandReturn.setText("")
QT.run = PackageDebThread()
QT.run.signal.connect(RunCommand)
QT.run.signal.connect(MessageBoxInformation)
QT.run.start()
def RunCommand(command):
@ -189,7 +194,7 @@ buildDeb.clicked.connect(PackageDeb)
debPath.clicked.connect(OpenPackageFolder)
widget.setLayout(widgetLayout)
window.setCentralWidget(widget)
window.resize(window.frameGeometry().width() * 1.5, window.frameGeometry().height())
window.resize(int(window.frameGeometry().width() * 1.5), int(window.frameGeometry().height()))
window.setWindowIcon(QtGui.QIcon(iconPath))
menu = window.menuBar()
programMenu = menu.addMenu("程序")