diff --git a/mainwindow.py b/mainwindow.py
index d57db1e..e2152d3 100755
--- a/mainwindow.py
+++ b/mainwindow.py
@@ -1329,22 +1329,7 @@ exe路径\' 参数 \'
千万不要中断后不删除源的情况下 apt upgrade !!!中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示
N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。
'''
-updateThingsString = '''※1、修复了重复路径一直自动重复增加的问题
-※2、修复了两个打包器打包错误的问题(非基于生态活动脚本的为 wine 导入错误,基于生态活动脚本的为架构有误导致打包出的 deb 无法打包)
-※3、适配了部分非 i386、amd64 架构计算机的 UOS 系统使用的 wine 并支持打包非 i386、amd64 架构计算机的 UOS 系统使用的 wine 程序 deb 包
-※4、支持安装 dxvk(遵守 Zlib 开源协议)
-※5、运行器、打包器(包括非基于生态适配活动脚本制作的)支持使用 Wine 生态适配活动的容器清理脚本
-※6、支持更加简易的安装最新版的 WineHQ
-※7、增加字体商店
-※8、新增查看可执行文件运行情况的功能
-9、支持不显示没有安装的 Wine,方便用户识别
-10、修改了 Wine 的顺序使其更加合理
-11、支持删除安装 exe 后在启动器的快捷方式
-12、优化了 Wine 打包器(非基于生态活动脚本)对容器的处理
-13、修复了 Wine 打包器(非基于生态活动脚本)打包出的 deb 安装时显示为解压缩后会消耗 0 B 的额外空间以及 postrm 的一些问题
-14、支持删除无需使用的程序组件
-15、支持组件/运行库下载后缓存方便下次使用(可以清理)
-16、点击获取图标按钮后会自动读取 exe 框的程序图标(不支持相对路径和包内路径,只支持绝对路径)
+updateThingsString = '''※
'''
for i in information["Thank"]:
thankText += f"{i}\n"
diff --git a/wine-source/downloadthread.cpp b/wine-source/downloadthread.cpp
index 2c67c1c..e60f9d4 100644
--- a/wine-source/downloadthread.cpp
+++ b/wine-source/downloadthread.cpp
@@ -63,7 +63,7 @@ void DownloadThread::run(){
conf.setPeerVerifyMode(QSslSocket::VerifyNone);
conf.setProtocol(QSsl::TlsV1_1);
req.setSslConfiguration(conf);
- req.setUrl(QUrl("https://code.gitlink.org.cn/gfdgd_xi/wine-mirrors/raw/branch/master/spark-wine7-devel-7.14.7z"));
+ req.setUrl(QUrl(fileUrl));
// 下载文件
QNetworkReply *reply = m.get(req);
QEventLoop loop;
diff --git a/wine/Makefile b/wine/Makefile
index 5c7398c..fa2bc21 100644
--- a/wine/Makefile
+++ b/wine/Makefile
@@ -54,11 +54,13 @@ OBJECTS_DIR = ./
SOURCES = ../wine-source/main.cpp \
../wine-source/mainwindow.cpp \
- ../wine-source/downloadthread.cpp moc_mainwindow.cpp
+ ../wine-source/downloadthread.cpp moc_mainwindow.cpp \
+ moc_downloadthread.cpp
OBJECTS = main.o \
mainwindow.o \
downloadthread.o \
- moc_mainwindow.o
+ moc_mainwindow.o \
+ moc_downloadthread.o
DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
@@ -432,14 +434,19 @@ compiler_moc_predefs_clean:
moc_predefs.h: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
g++ -pipe -O2 -std=gnu++11 -Wall -Wextra -dM -E -o moc_predefs.h /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
-compiler_moc_header_make_all: moc_mainwindow.cpp
+compiler_moc_header_make_all: moc_mainwindow.cpp moc_downloadthread.cpp
compiler_moc_header_clean:
- -$(DEL_FILE) moc_mainwindow.cpp
+ -$(DEL_FILE) moc_mainwindow.cpp moc_downloadthread.cpp
moc_mainwindow.cpp: ../wine-source/mainwindow.h \
moc_predefs.h \
/usr/lib/qt5/bin/moc
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/gfdgd_xi/Desktop/deep-wine-runner/wine/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/gfdgd_xi/Desktop/deep-wine-runner/wine-source -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include ../wine-source/mainwindow.h -o moc_mainwindow.cpp
+moc_downloadthread.cpp: ../wine-source/downloadthread.h \
+ moc_predefs.h \
+ /usr/lib/qt5/bin/moc
+ /usr/lib/qt5/bin/moc $(DEFINES) --include /home/gfdgd_xi/Desktop/deep-wine-runner/wine/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/gfdgd_xi/Desktop/deep-wine-runner/wine-source -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include ../wine-source/downloadthread.h -o moc_downloadthread.cpp
+
compiler_moc_objc_header_make_all:
compiler_moc_objc_header_clean:
compiler_moc_source_make_all:
@@ -475,6 +482,9 @@ downloadthread.o: ../wine-source/downloadthread.cpp ../wine-source/downloadthrea
moc_mainwindow.o: moc_mainwindow.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
+moc_downloadthread.o: moc_downloadthread.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_downloadthread.o moc_downloadthread.cpp
+
####### Install
install_target: first FORCE
diff --git a/wine/downloadthread.o b/wine/downloadthread.o
index a3c0971..64f4c6f 100644
Binary files a/wine/downloadthread.o and b/wine/downloadthread.o differ
diff --git a/wine/installwine b/wine/installwine
index 7df2cba..d7322c1 100755
Binary files a/wine/installwine and b/wine/installwine differ
diff --git a/wine/installwine.py b/wine/installwine.py
new file mode 100644
index 0000000..8342efb
--- /dev/null
+++ b/wine/installwine.py
@@ -0,0 +1,18 @@
+# 本来是用C++写的,但在非deepin/UOS编译/运行就是下载不了https文件,只能用python重写
+import sys
+import PyQt5.QtWidgets as QtWidgets
+
+import mainwindowui
+
+# 继承至界面文件的主窗口类
+class MyMainWindow(mainwindowui.Ui_MainWindow):
+ def __init__(self, parent=None):
+ #pass
+ super(MyMainWindow, self).__init__(parent)
+ #self.setupUi(self)
+
+if __name__ == "__main__":
+ app = QtWidgets.QApplication(sys.argv)
+ window = MyMainWindow()
+ window.show()
+ app.exec_()
\ No newline at end of file
diff --git a/wine/mainwindow.o b/wine/mainwindow.o
index 840102e..8de9d17 100644
Binary files a/wine/mainwindow.o and b/wine/mainwindow.o differ
diff --git a/wine/mainwindowui.py b/wine/mainwindowui.py
new file mode 100644
index 0000000..5f41903
--- /dev/null
+++ b/wine/mainwindowui.py
@@ -0,0 +1,258 @@
+import os
+import sys
+import json
+import requests
+from PyQt5 import QtCore, QtGui, QtWidgets
+
+class Ui_MainWindow(object):
+ def setupUi(self, MainWindow):
+ MainWindow.setObjectName("MainWindow")
+ MainWindow.resize(693, 404)
+ self.centralWidget = QtWidgets.QWidget(MainWindow)
+ self.centralWidget.setObjectName("centralWidget")
+ self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralWidget)
+ self.verticalLayout_2.setContentsMargins(11, 11, 11, 11)
+ self.verticalLayout_2.setSpacing(6)
+ self.verticalLayout_2.setObjectName("verticalLayout_2")
+ self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_2.setSpacing(6)
+ self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ self.localWineList = QtWidgets.QListView(self.centralWidget)
+ self.localWineList.setObjectName("localWineList")
+ self.horizontalLayout_2.addWidget(self.localWineList)
+ self.verticalLayout = QtWidgets.QVBoxLayout()
+ self.verticalLayout.setSpacing(6)
+ self.verticalLayout.setObjectName("verticalLayout")
+ spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
+ self.verticalLayout.addItem(spacerItem)
+ self.addButton = QtWidgets.QPushButton(self.centralWidget)
+ self.addButton.setObjectName("addButton")
+ self.verticalLayout.addWidget(self.addButton)
+ self.delButton = QtWidgets.QPushButton(self.centralWidget)
+ self.delButton.setObjectName("delButton")
+ self.verticalLayout.addWidget(self.delButton)
+ spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
+ self.verticalLayout.addItem(spacerItem1)
+ self.horizontalLayout_2.addLayout(self.verticalLayout)
+ self.internetWineList = QtWidgets.QListView(self.centralWidget)
+ self.internetWineList.setObjectName("internetWineList")
+ self.horizontalLayout_2.addWidget(self.internetWineList)
+ self.verticalLayout_2.addLayout(self.horizontalLayout_2)
+ self.horizontalLayout = QtWidgets.QHBoxLayout()
+ self.horizontalLayout.setSpacing(6)
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ self.unzip = QtWidgets.QCheckBox(self.centralWidget)
+ self.unzip.setObjectName("unzip")
+ self.horizontalLayout.addWidget(self.unzip)
+ self.deleteZip = QtWidgets.QCheckBox(self.centralWidget)
+ self.deleteZip.setChecked(True)
+ self.deleteZip.setTristate(False)
+ self.deleteZip.setObjectName("deleteZip")
+ self.horizontalLayout.addWidget(self.deleteZip)
+ spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
+ self.horizontalLayout.addItem(spacerItem2)
+ self.verticalLayout_2.addLayout(self.horizontalLayout)
+ MainWindow.setCentralWidget(self.centralWidget)
+
+ self.retranslateUi(MainWindow)
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+ def retranslateUi(self, MainWindow):
+ _translate = QtCore.QCoreApplication.translate
+ MainWindow.setWindowTitle(_translate("MainWindow", "下载 Wine"))
+ self.addButton.setText(_translate("MainWindow", "<<"))
+ self.delButton.setText(_translate("MainWindow", ">>"))
+ self.unzip.setText(_translate("MainWindow", "不解压Wine资源文件"))
+ self.deleteZip.setText(_translate("MainWindow", "删除下载的资源包,只解压保留(两个选项都选相互抵消)"))
+
+def ReadLocalInformation():
+ global localJsonList
+ file = open(f"{programPath}/winelist.json", "r")
+ localJsonList = json.loads(file.read())
+ nmodel = QtGui.QStandardItemModel(window)
+ for i in localJsonList:
+ item = QtGui.QStandardItem(i)
+ nmodel.appendRow(item)
+ ui.localWineList.setModel(nmodel)
+ file.close()
+
+def ReadInternetInformation():
+ global internetJsonList
+ # C++ 版本是用 curl 的,考虑到 Python 用 requests 反而方便,于是不用 curl
+ internetJsonList = json.loads(requests.get(f"{internetWineSource}/information.json").text)
+ nmodel = QtGui.QStandardItemModel(window)
+ for i in internetJsonList:
+ item = QtGui.QStandardItem(i[0])
+ nmodel.appendRow(item)
+ ui.internetWineList.setModel(nmodel)
+
+class DownloadThread(QtCore.QThread):
+ MessageBoxInfo = QtCore.pyqtSignal(str)
+ MessageBoxError = QtCore.pyqtSignal(str)
+ ChangeDialog = QtCore.pyqtSignal(QtWidgets.QProgressDialog, int, int, int)
+ Finish = QtCore.pyqtSignal()
+ def __init__(self, progressDialog: QtWidgets.QProgressDialog,
+ url: str, savePath: str, fileName: str, view: QtWidgets.QListView, deleteZip: bool,
+ unzip: bool, localList) -> None:
+ self.dialog = progressDialog
+ self.fileUrl = url
+ self.fileSavePath = savePath
+ self.fileSaveName = fileName
+ self.localView = view
+ self.downloadDeleteZip = deleteZip
+ self.downloadUnzip = unzip
+ self.localJsonList = localList
+ super().__init__()
+
+ def ReadLocalInformation(self):
+ file = open(f"{programPath}/winelist.json", "r");
+ nmodel = QtGui.QStandardItemModel()
+ localJsonList = json.loads(file.read())
+ for i in localJsonList:
+ nmodel.appendRow(QtGui.QStandardItem(i))
+ self.localView.setModel(nmodel)
+ file.close()
+
+ def run(self):
+ # 创建文件夹
+ dir = QtCore.QDir()
+ savePath = f"{programPath}/{self.fileSaveName}"
+ # 文件下载
+ timeout = 0
+ f = requests.get(self.fileUrl, stream=True)
+ allSize = int(f.headers["content-length"]) # 文件总大小
+ bytesRead = 0
+ with open(savePath, "wb") as filePart:
+ for chunk in f.iter_content(chunk_size=1024):
+ if chunk:
+ #progressbar.update(int(part / show))
+ filePart.write(chunk)
+ bytesRead += 1024
+ self.ChangeDialog.emit(self.dialog, bytesRead / allSize * 100, bytesRead / 1024 / 1024, allSize / 1024 / 1024)
+ # 写入配置文件
+ rfile = open(f"{programPath}/winelist.json", "r")
+ list = json.loads(rfile.read())
+ rfile.close()
+ # C++ 版注释:不直接用 readwrite 是因为不能覆盖写入
+ file = open(f"{programPath}/winelist.json", "w")
+ list.append(self.fileSaveName.replace(".7z", ""))
+ file.write(json.dumps(list))
+ file.close()
+ # 读取配置文件
+ self.ReadLocalInformation()
+ self.localJsonList = list
+ # 解压文件
+ shellCommand = ""
+ if self.downloadUnzip:
+ path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}"
+ shellCommand += f"""mkdir -p \"{path}\"
+7z x \"{savePath}\" -o\"{path}\"
+"""
+ if self.downloadDeleteZip:
+ shellCommand += f"rm -rf \"{savePath}\"\n"
+ shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w")
+ shellFile.write(shellCommand)
+ shellFile.close()
+ process = QtCore.QProcess()
+ command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"]
+ process.start(f"{programPath}/../launch.sh", command)
+ process.waitForFinished()
+ self.Finish.emit()
+
+
+def MessageBoxInfo(info):
+ QtWidgets.QMessageBox.information(window, "提示", info)
+
+def MessageBoxError(info):
+ QtWidgets.QMessageBox.critical(window, "错误", info)
+
+def ChangeDialog(dialog: QtWidgets.QProgressDialog, value, downloadBytes, totalBytes):
+ dialog.setValue(value)
+ dialog.setLabelText(f"{downloadBytes}MB/{totalBytes}MB")
+
+def DownloadFinish():
+ ui.centralWidget.setEnabled(True)
+
+class QT:
+ thread = None
+
+def on_addButton_clicked():
+ choose = ui.internetWineList.currentIndex().row()
+ if choose < 0:
+ QtWidgets.QMessageBox.information(window, "提示", "您未选中任何项,无法继续")
+ return
+ downloadName = internetJsonList[choose][1]
+ ReadLocalInformation()
+ for i in localJsonList:
+ if i == internetJsonList[choose][0]:
+ QtWidgets.QMessageBox.information(window, "提示", "您已经安装了这个Wine了!无需重复安装!")
+ return
+ if(ui.deleteZip.isChecked() + ui.unzip.isChecked() == 2):
+ ui.deleteZip.setChecked(False)
+ ui.unzip.setChecked(False)
+ downloadUrl = internetWineSource + downloadName
+ dialog = QtWidgets.QProgressDialog()
+ cancel = QtWidgets.QPushButton("取消")
+ cancel.setDisabled(True)
+ dialog.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
+ dialog.setCancelButton(cancel)
+ dialog.setWindowTitle(f"正在下载“{internetJsonList[choose][0]}”")
+ QT.thread = DownloadThread(
+ dialog,
+ downloadUrl,
+ "",
+ internetJsonList[choose][1],
+ ui.localWineList,
+ ui.deleteZip.isChecked(),
+ not ui.unzip.isChecked(),
+ localJsonList
+ )
+ QT.thread.MessageBoxInfo.connect(MessageBoxInfo)
+ QT.thread.MessageBoxError.connect(MessageBoxError)
+ QT.thread.ChangeDialog.connect(ChangeDialog)
+ QT.thread.Finish.connect(DownloadFinish)
+ ui.centralWidget.setDisabled(True)
+ QT.thread.start()
+
+def on_delButton_clicked():
+ if QtWidgets.QMessageBox.question(window, "提示", "你确定要删除吗?") == QtWidgets.QMessageBox.No:
+ return
+ if ui.localWineList.currentIndex().row() < 0:
+ QtWidgets.QMessageBox.information(window, "提示", "您未选择任何项")
+ return
+ name = f"{programPath}/{localJsonList[ui.localWineList.currentIndex().row()]}"
+ dir = QtCore.QDir(name)
+ dir.removeRecursively()
+ QtCore.QFile.remove(name + ".7z")
+ del localJsonList[ui.localWineList.currentIndex().row()]
+ file = open(f"{programPath}/winelist.json", "w")
+ file.write(json.dumps(localJsonList))
+ file.close()
+ ReadLocalInformation()
+ QtWidgets.QMessageBox.information(window, "提示", "删除成功!")
+
+if __name__ == "__main__":
+ localJsonList = []
+ internetJsonList = []
+ internetWineSource = "https://code.gitlink.org.cn/gfdgd_xi/wine-mirrors/raw/branch/master/"
+ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
+ app = QtWidgets.QApplication(sys.argv)
+ # 窗口构建
+ window = QtWidgets.QMainWindow()
+ ui = Ui_MainWindow()
+ ui.setupUi(window)
+ window.show()
+ # 连接信号
+ ui.addButton.clicked.connect(on_addButton_clicked)
+ ui.delButton.clicked.connect(on_delButton_clicked)
+ ## 加载内容
+ # 设置列表双击不会编辑
+ ui.localWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
+ ui.internetWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
+ # 读取信息
+ ReadLocalInformation()
+ ReadInternetInformation()
+ # 图标
+ ui.centralWidget.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
+
+ app.exec_()
\ No newline at end of file
diff --git a/wine/moc_downloadthread.cpp b/wine/moc_downloadthread.cpp
new file mode 100644
index 0000000..cd836f9
--- /dev/null
+++ b/wine/moc_downloadthread.cpp
@@ -0,0 +1,207 @@
+/****************************************************************************
+** Meta object code from reading C++ file 'downloadthread.h'
+**
+** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.3)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#include
+#include "../wine-source/downloadthread.h"
+#include
+#include
+#if !defined(Q_MOC_OUTPUT_REVISION)
+#error "The header file 'downloadthread.h' doesn't include ."
+#elif Q_MOC_OUTPUT_REVISION != 67
+#error "This file was generated using the moc from 5.15.3. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+QT_BEGIN_MOC_NAMESPACE
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
+struct qt_meta_stringdata_DownloadThread_t {
+ QByteArrayData data[12];
+ char stringdata0[127];
+};
+#define QT_MOC_LITERAL(idx, ofs, len) \
+ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
+ qptrdiff(offsetof(qt_meta_stringdata_DownloadThread_t, stringdata0) + ofs \
+ - idx * sizeof(QByteArrayData)) \
+ )
+static const qt_meta_stringdata_DownloadThread_t qt_meta_stringdata_DownloadThread = {
+ {
+QT_MOC_LITERAL(0, 0, 14), // "DownloadThread"
+QT_MOC_LITERAL(1, 15, 14), // "MessageBoxInfo"
+QT_MOC_LITERAL(2, 30, 0), // ""
+QT_MOC_LITERAL(3, 31, 4), // "info"
+QT_MOC_LITERAL(4, 36, 15), // "MessageBoxError"
+QT_MOC_LITERAL(5, 52, 12), // "ChangeDialog"
+QT_MOC_LITERAL(6, 65, 16), // "QProgressDialog*"
+QT_MOC_LITERAL(7, 82, 6), // "dialog"
+QT_MOC_LITERAL(8, 89, 5), // "value"
+QT_MOC_LITERAL(9, 95, 13), // "downloadBytes"
+QT_MOC_LITERAL(10, 109, 10), // "totalBytes"
+QT_MOC_LITERAL(11, 120, 6) // "Finish"
+
+ },
+ "DownloadThread\0MessageBoxInfo\0\0info\0"
+ "MessageBoxError\0ChangeDialog\0"
+ "QProgressDialog*\0dialog\0value\0"
+ "downloadBytes\0totalBytes\0Finish"
+};
+#undef QT_MOC_LITERAL
+
+static const uint qt_meta_data_DownloadThread[] = {
+
+ // content:
+ 8, // revision
+ 0, // classname
+ 0, 0, // classinfo
+ 4, 14, // methods
+ 0, 0, // properties
+ 0, 0, // enums/sets
+ 0, 0, // constructors
+ 0, // flags
+ 4, // signalCount
+
+ // signals: name, argc, parameters, tag, flags
+ 1, 1, 34, 2, 0x06 /* Public */,
+ 4, 1, 37, 2, 0x06 /* Public */,
+ 5, 4, 40, 2, 0x06 /* Public */,
+ 11, 0, 49, 2, 0x06 /* Public */,
+
+ // signals: parameters
+ QMetaType::Void, QMetaType::QString, 3,
+ QMetaType::Void, QMetaType::QString, 3,
+ QMetaType::Void, 0x80000000 | 6, QMetaType::Int, QMetaType::Int, QMetaType::Int, 7, 8, 9, 10,
+ QMetaType::Void,
+
+ 0 // eod
+};
+
+void DownloadThread::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
+{
+ if (_c == QMetaObject::InvokeMetaMethod) {
+ auto *_t = static_cast(_o);
+ (void)_t;
+ switch (_id) {
+ case 0: _t->MessageBoxInfo((*reinterpret_cast< QString(*)>(_a[1]))); break;
+ case 1: _t->MessageBoxError((*reinterpret_cast< QString(*)>(_a[1]))); break;
+ case 2: _t->ChangeDialog((*reinterpret_cast< QProgressDialog*(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< int(*)>(_a[4]))); break;
+ case 3: _t->Finish(); break;
+ default: ;
+ }
+ } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
+ switch (_id) {
+ default: *reinterpret_cast(_a[0]) = -1; break;
+ case 2:
+ switch (*reinterpret_cast(_a[1])) {
+ default: *reinterpret_cast(_a[0]) = -1; break;
+ case 0:
+ *reinterpret_cast(_a[0]) = qRegisterMetaType< QProgressDialog* >(); break;
+ }
+ break;
+ }
+ } else if (_c == QMetaObject::IndexOfMethod) {
+ int *result = reinterpret_cast(_a[0]);
+ {
+ using _t = void (DownloadThread::*)(QString );
+ if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DownloadThread::MessageBoxInfo)) {
+ *result = 0;
+ return;
+ }
+ }
+ {
+ using _t = void (DownloadThread::*)(QString );
+ if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DownloadThread::MessageBoxError)) {
+ *result = 1;
+ return;
+ }
+ }
+ {
+ using _t = void (DownloadThread::*)(QProgressDialog * , int , int , int );
+ if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DownloadThread::ChangeDialog)) {
+ *result = 2;
+ return;
+ }
+ }
+ {
+ using _t = void (DownloadThread::*)();
+ if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DownloadThread::Finish)) {
+ *result = 3;
+ return;
+ }
+ }
+ }
+}
+
+QT_INIT_METAOBJECT const QMetaObject DownloadThread::staticMetaObject = { {
+ QMetaObject::SuperData::link(),
+ qt_meta_stringdata_DownloadThread.data,
+ qt_meta_data_DownloadThread,
+ qt_static_metacall,
+ nullptr,
+ nullptr
+} };
+
+
+const QMetaObject *DownloadThread::metaObject() const
+{
+ return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
+}
+
+void *DownloadThread::qt_metacast(const char *_clname)
+{
+ if (!_clname) return nullptr;
+ if (!strcmp(_clname, qt_meta_stringdata_DownloadThread.stringdata0))
+ return static_cast(this);
+ return QThread::qt_metacast(_clname);
+}
+
+int DownloadThread::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
+{
+ _id = QThread::qt_metacall(_c, _id, _a);
+ if (_id < 0)
+ return _id;
+ if (_c == QMetaObject::InvokeMetaMethod) {
+ if (_id < 4)
+ qt_static_metacall(this, _c, _id, _a);
+ _id -= 4;
+ } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
+ if (_id < 4)
+ qt_static_metacall(this, _c, _id, _a);
+ _id -= 4;
+ }
+ return _id;
+}
+
+// SIGNAL 0
+void DownloadThread::MessageBoxInfo(QString _t1)
+{
+ void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))) };
+ QMetaObject::activate(this, &staticMetaObject, 0, _a);
+}
+
+// SIGNAL 1
+void DownloadThread::MessageBoxError(QString _t1)
+{
+ void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))) };
+ QMetaObject::activate(this, &staticMetaObject, 1, _a);
+}
+
+// SIGNAL 2
+void DownloadThread::ChangeDialog(QProgressDialog * _t1, int _t2, int _t3, int _t4)
+{
+ void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))), const_cast(reinterpret_cast(std::addressof(_t2))), const_cast(reinterpret_cast(std::addressof(_t3))), const_cast(reinterpret_cast(std::addressof(_t4))) };
+ QMetaObject::activate(this, &staticMetaObject, 2, _a);
+}
+
+// SIGNAL 3
+void DownloadThread::Finish()
+{
+ QMetaObject::activate(this, &staticMetaObject, 3, nullptr);
+}
+QT_WARNING_POP
+QT_END_MOC_NAMESPACE
diff --git a/wine/moc_downloadthread.o b/wine/moc_downloadthread.o
new file mode 100644
index 0000000..3d8eb16
Binary files /dev/null and b/wine/moc_downloadthread.o differ
diff --git a/wine/moc_mainwindow.cpp b/wine/moc_mainwindow.cpp
index d6eba22..f3f8541 100644
--- a/wine/moc_mainwindow.cpp
+++ b/wine/moc_mainwindow.cpp
@@ -22,8 +22,8 @@ QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_MainWindow_t {
- QByteArrayData data[6];
- char stringdata0[99];
+ QByteArrayData data[16];
+ char stringdata0[218];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
@@ -37,12 +37,25 @@ QT_MOC_LITERAL(1, 11, 20), // "on_addButton_clicked"
QT_MOC_LITERAL(2, 32, 0), // ""
QT_MOC_LITERAL(3, 33, 20), // "ReadLocalInformation"
QT_MOC_LITERAL(4, 54, 23), // "ReadInternetInformation"
-QT_MOC_LITERAL(5, 78, 20) // "on_delButton_clicked"
+QT_MOC_LITERAL(5, 78, 20), // "on_delButton_clicked"
+QT_MOC_LITERAL(6, 99, 14), // "MessageBoxInfo"
+QT_MOC_LITERAL(7, 114, 4), // "info"
+QT_MOC_LITERAL(8, 119, 15), // "MessageBoxError"
+QT_MOC_LITERAL(9, 135, 12), // "ChangeDialog"
+QT_MOC_LITERAL(10, 148, 16), // "QProgressDialog*"
+QT_MOC_LITERAL(11, 165, 6), // "dialog"
+QT_MOC_LITERAL(12, 172, 5), // "value"
+QT_MOC_LITERAL(13, 178, 13), // "downloadBytes"
+QT_MOC_LITERAL(14, 192, 10), // "totalBytes"
+QT_MOC_LITERAL(15, 203, 14) // "DownloadFinish"
},
"MainWindow\0on_addButton_clicked\0\0"
"ReadLocalInformation\0ReadInternetInformation\0"
- "on_delButton_clicked"
+ "on_delButton_clicked\0MessageBoxInfo\0"
+ "info\0MessageBoxError\0ChangeDialog\0"
+ "QProgressDialog*\0dialog\0value\0"
+ "downloadBytes\0totalBytes\0DownloadFinish"
};
#undef QT_MOC_LITERAL
@@ -52,7 +65,7 @@ static const uint qt_meta_data_MainWindow[] = {
8, // revision
0, // classname
0, 0, // classinfo
- 4, 14, // methods
+ 8, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
@@ -60,15 +73,23 @@ static const uint qt_meta_data_MainWindow[] = {
0, // signalCount
// slots: name, argc, parameters, tag, flags
- 1, 0, 34, 2, 0x08 /* Private */,
- 3, 0, 35, 2, 0x08 /* Private */,
- 4, 0, 36, 2, 0x08 /* Private */,
- 5, 0, 37, 2, 0x08 /* Private */,
+ 1, 0, 54, 2, 0x08 /* Private */,
+ 3, 0, 55, 2, 0x08 /* Private */,
+ 4, 0, 56, 2, 0x08 /* Private */,
+ 5, 0, 57, 2, 0x08 /* Private */,
+ 6, 1, 58, 2, 0x0a /* Public */,
+ 8, 1, 61, 2, 0x0a /* Public */,
+ 9, 4, 64, 2, 0x0a /* Public */,
+ 15, 0, 73, 2, 0x0a /* Public */,
// slots: parameters
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
+ QMetaType::Void,
+ QMetaType::Void, QMetaType::QString, 7,
+ QMetaType::Void, QMetaType::QString, 7,
+ QMetaType::Void, 0x80000000 | 10, QMetaType::Int, QMetaType::Int, QMetaType::Int, 11, 12, 13, 14,
QMetaType::Void,
0 // eod
@@ -84,10 +105,24 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
case 1: _t->ReadLocalInformation(); break;
case 2: _t->ReadInternetInformation(); break;
case 3: _t->on_delButton_clicked(); break;
+ case 4: _t->MessageBoxInfo((*reinterpret_cast< QString(*)>(_a[1]))); break;
+ case 5: _t->MessageBoxError((*reinterpret_cast< QString(*)>(_a[1]))); break;
+ case 6: _t->ChangeDialog((*reinterpret_cast< QProgressDialog*(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< int(*)>(_a[4]))); break;
+ case 7: _t->DownloadFinish(); break;
default: ;
}
+ } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
+ switch (_id) {
+ default: *reinterpret_cast(_a[0]) = -1; break;
+ case 6:
+ switch (*reinterpret_cast(_a[1])) {
+ default: *reinterpret_cast(_a[0]) = -1; break;
+ case 0:
+ *reinterpret_cast(_a[0]) = qRegisterMetaType< QProgressDialog* >(); break;
+ }
+ break;
+ }
}
- (void)_a;
}
QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = { {
@@ -119,13 +154,13 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
- if (_id < 4)
+ if (_id < 8)
qt_static_metacall(this, _c, _id, _a);
- _id -= 4;
+ _id -= 8;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
- if (_id < 4)
- *reinterpret_cast(_a[0]) = -1;
- _id -= 4;
+ if (_id < 8)
+ qt_static_metacall(this, _c, _id, _a);
+ _id -= 8;
}
return _id;
}
diff --git a/wine/moc_mainwindow.o b/wine/moc_mainwindow.o
index 9f0cb18..9e83f9e 100644
Binary files a/wine/moc_mainwindow.o and b/wine/moc_mainwindow.o differ