mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
修复bug
This commit is contained in:
parent
e0085096ea
commit
020e1d27db
@ -23,4 +23,4 @@ fi
|
||||
# 设置目录权限,让用户可读可写,方便后续删除组件
|
||||
chmod 777 -R /opt/apps/deepin-wine-runner
|
||||
# 向服务器返回安装数加1(不显示内容且忽略错误)
|
||||
curl http://120.25.153.144/spark-deepin-wine-runner/Install.php?Version=2.1.0 -s > /dev/null | true
|
||||
curl https://304626p927.goho.co/spark-deepin-wine-runner/Install.php?Version=2.1.0 -s > /dev/null | true
|
||||
|
@ -27,7 +27,7 @@ import PyQt5.QtWidgets as QtWidgets
|
||||
#################
|
||||
|
||||
def button1_cl():
|
||||
path = QtWidgets.QFileDialog.getExistingDirectory(QtCore.QCoreApplication.translate("U", "选择 wine 容器"), f"{get_home()}/.deepinwine")
|
||||
path = QtWidgets.QFileDialog.getExistingDirectory(widget, QtCore.QCoreApplication.translate("U", "选择 wine 容器"), f"{get_home()}/.deepinwine")
|
||||
if path != "":
|
||||
e6_text.setText(path)
|
||||
|
||||
@ -207,7 +207,7 @@ class make_deb_threading(QtCore.QThread):
|
||||
f"{wine[wineVersion.currentText()]}, spark-dwine-helper (>= 1.6.2), fonts-wqy-microhei, fonts-wqy-zenhei"
|
||||
][int(chooseWineHelperValue.isChecked())],
|
||||
"postinst": "",
|
||||
"postrm": ["", f"""#!/bin/bash..
|
||||
"postrm": ["", f"""#!/bin/bash
|
||||
|
||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
|
||||
|
||||
@ -345,12 +345,12 @@ fi
|
||||
|
||||
##############<<<<<<<<<屏蔽mono和gecko安装器开始
|
||||
##默认屏蔽mono和gecko安装器
|
||||
if [ "$APPRUN_CMD" = "spark-wine7-devel" ];then
|
||||
#if [ "$APPRUN_CMD" = "spark-wine7-devel" ];then
|
||||
|
||||
export WINEDLLOVERRIDES="mscoree,mshtml="
|
||||
echo "为了降低打包体积,默认关闭gecko和momo,如有需要,注释此行(仅对spark-wine7-devel有效)"
|
||||
#export WINEDLLOVERRIDES="mscoree,mshtml="
|
||||
#echo "为了降低打包体积,默认关闭gecko和momo,如有需要,注释此行(仅对spark-wine7-devel有效)"
|
||||
|
||||
fi
|
||||
#fi
|
||||
##############>>>>>>>>>屏蔽mono和gecko安装器结束
|
||||
|
||||
#########################执行段
|
||||
@ -928,6 +928,8 @@ Description: {e3_text.text()}
|
||||
self.label.emit("完成构建!")
|
||||
self.disabled_or_NORMAL_all.emit(True)
|
||||
self.infoMsg.emit("打包完毕!")
|
||||
global change
|
||||
change = False
|
||||
except:
|
||||
traceback.print_exc()
|
||||
self.errorMsg.emit("程序出现错误,错误信息:\n{}".format(traceback.format_exc()))
|
||||
@ -1018,6 +1020,37 @@ def ChangeWine():
|
||||
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")
|
||||
debRecommend.setText("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")
|
||||
|
||||
# 获取用户桌面目录
|
||||
def get_desktop_path():
|
||||
for line in open(get_home() + "/.config/user-dirs.dirs"): # 以行来读取配置文件
|
||||
desktop_index = line.find("XDG_DESKTOP_DIR=\"") # 寻找是否有对应项,有返回 0,没有返回 -1
|
||||
if desktop_index != -1: # 如果有对应项
|
||||
break # 结束循环
|
||||
if desktop_index == -1: # 如果是提前结束,值一定≠-1,如果是没有提前结束,值一定=-1
|
||||
return -1
|
||||
else:
|
||||
get = line[17:-2] # 截取桌面目录路径
|
||||
get_index = get.find("$HOME") # 寻找是否有对应的项,需要替换内容
|
||||
if get != -1: # 如果有
|
||||
get = get.replace("$HOME", get_home()) # 则把其替换为用户目录(~)
|
||||
return get # 返回目录
|
||||
|
||||
change = False
|
||||
autoChange = True # 有第一次的路径自动设置
|
||||
def AutoPathSet():
|
||||
global autoChange
|
||||
autoChange = True
|
||||
architecture = ["i386", "arm64", "arm64"]
|
||||
if not change:
|
||||
e12_text.setText(f"{get_desktop_path()}/{e1_text.text()}_{e2_text.text()}_{architecture[debArch.currentIndex()]}.deb")
|
||||
|
||||
def UserPathSet():
|
||||
global change
|
||||
global autoChange
|
||||
if autoChange:
|
||||
autoChange = False
|
||||
return
|
||||
change = True
|
||||
|
||||
###############
|
||||
# 程序信息
|
||||
@ -1107,7 +1140,6 @@ button5.clicked.connect(make_deb)
|
||||
buildDebDir.clicked.connect(lambda: make_deb(True))
|
||||
installDeb.clicked.connect(InstallDeb)
|
||||
wineFrame.addWidget(wineVersion)
|
||||
debArch.currentIndexChanged.connect(ChangeArchCombobox)
|
||||
# 创建控件
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要打包的 deb 包的包名(※必填):")), 0, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "要打包的 deb 包的版本号(※必填):")), 1, 0, 1, 1)
|
||||
@ -1173,6 +1205,11 @@ widgetLayout.addWidget(buildDebDir, 16, 3)
|
||||
useInstallWineArch.setDisabled(True)
|
||||
wineVersion.currentTextChanged.connect(ChangeWine)
|
||||
chooseWineHelperValue.stateChanged.connect(ChangeWine)
|
||||
e1_text.textChanged.connect(AutoPathSet)
|
||||
e2_text.textChanged.connect(AutoPathSet)
|
||||
debArch.currentIndexChanged.connect(AutoPathSet)
|
||||
debArch.currentIndexChanged.connect(ChangeArchCombobox)
|
||||
e12_text.textChanged.connect(UserPathSet)
|
||||
# 菜单栏
|
||||
menu = window.menuBar()
|
||||
programmenu = menu.addMenu(QtCore.QCoreApplication.translate("U", "程序"))
|
||||
@ -1190,6 +1227,7 @@ try:
|
||||
wineVersion.setCurrentText(sys.argv[2])
|
||||
except:
|
||||
pass
|
||||
e12_text.setText(f"{get_desktop_path()}/demo_1.0.0_i386.deb")
|
||||
widget.setLayout(widgetLayout)
|
||||
window.setCentralWidget(widget)
|
||||
window.setWindowTitle(f"wine 应用打包器 {version}")
|
||||
|
@ -735,7 +735,7 @@ class UpdateWindow():
|
||||
cancel = QtWidgets.QPushButton("取消")
|
||||
cancel.clicked.connect(UpdateWindow.update.close)
|
||||
try:
|
||||
UpdateWindow.data = json.loads(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci91cGRhdGUuanNvbg==").decode("utf-8")).text)
|
||||
UpdateWindow.data = json.loads(requests.get(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vc3BhcmstZGVlcGluLXdpbmUtcnVubmVyL3VwZGF0ZS5qc29u").decode("utf-8")).text)
|
||||
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:{UpdateWindow.data['Version']}\n更新内容:")
|
||||
if UpdateWindow.data["Version"] == version:
|
||||
updateText.setText(QtCore.QCoreApplication.translate("U", "此为最新版本,无需更新"))
|
||||
@ -979,8 +979,8 @@ class ProgramRunStatusShow():
|
||||
return
|
||||
try:
|
||||
sha = ProgramRunStatusUpload.GetSHA1(e2.currentText())
|
||||
lists = json.loads(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).text)
|
||||
r = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8"))
|
||||
lists = json.loads(requests.get(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vc3BhcmstZGVlcGluLXdpbmUtcnVubmVyL2FwcC8=").decode("utf-8") + sha + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).text)
|
||||
r = requests.get(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vc3BhcmstZGVlcGluLXdpbmUtcnVubmVyL2FwcC8=").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8"))
|
||||
r.encoding = "utf-8"
|
||||
title = r.text
|
||||
except:
|
||||
@ -1097,7 +1097,7 @@ class ProgramRunStatusUpload():
|
||||
try:
|
||||
if ProgramRunStatusUpload.sha1Value == "":
|
||||
ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText())
|
||||
QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), json.loads(requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUw").decode("utf-8"), {
|
||||
QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), json.loads(requests.post(base64.b64decode("aHR0cDovL2dmZGdkeGkucWljcC52aXA6Mjc1MDI=").decode("utf-8"), {
|
||||
"SHA1": ProgramRunStatusUpload.sha1Value,
|
||||
"Name": ProgramRunStatusUpload.programName.text(),
|
||||
"Fen": ProgramRunStatusUpload.fen.currentIndex(),
|
||||
@ -1420,7 +1420,7 @@ Qt 版本:{QtCore.qVersion()}
|
||||
title = "Wine 运行器 {}".format(version)
|
||||
updateThings = "{} 更新内容:\n{}\n更新时间:{}".format(version, updateThingsString, updateTime, time.strftime("%Y"))
|
||||
try:
|
||||
threading.Thread(target=requests.get, args=[parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9vcGVuL0luc3RhbGwucGhw").decode("utf-8")) + "?Version=" + version]).start()
|
||||
threading.Thread(target=requests.get, args=[parse.unquote(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vc3BhcmstZGVlcGluLXdpbmUtcnVubmVyL29wZW4vSW5zdGFsbC5waHA=").decode("utf-8")) + "?Version=" + version]).start()
|
||||
except:
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user