mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-03-25 23:09:44 +08:00
!353 update:更新版本号为4.8.1~test2,修复更新器安装软件完成后仍然显示下载完成的问题
Merge pull request !353 from momen/dev
This commit is contained in:
@@ -1,29 +1,21 @@
|
||||
### 星火软件更新器
|
||||
### Spark Software Updater
|
||||
|
||||
#### 简介
|
||||
#### Introduction
|
||||
|
||||
欢迎使用星火软件更新器!本工具可帮助您便捷地更新 Linux 计算机上的各类程序。
|
||||
Welcome to Spark Software Updater! This tool helps you conveniently update various applications on your Linux system.
|
||||
|
||||
本版本专为仅包含 Qt5 的 Linux 发行版设计。
|
||||
**请在 root 权限下运行本程序。**
|
||||
This version is specifically designed for Linux distributions with Qt5 support.
|
||||
**Please run with root privileges (recommended to use `sudo`).**
|
||||
|
||||
#### 当前支持的 Linux 发行版
|
||||
#### Currently Supported Linux Distributions
|
||||
|
||||
- [x] GXDE OS
|
||||
- [x] Ubuntu
|
||||
- [x] deepin
|
||||
- [ ] Kylin
|
||||
|
||||
#### 功能清单
|
||||
// ... existing Chinese feature table ...
|
||||
|
||||
| 功能模块 | 描述 |
|
||||
|------------------|--------------------------------------|
|
||||
| 应用名识别 | 基于 `ss-do-upgrade.sh` 部分代码实现 |
|
||||
| 应用包大小识别 | 通过 dpkg 获取包大小信息 |
|
||||
| 获取应用图标 | 利用 QDesktopServices 实现 |
|
||||
| 支持 ACE 兼容环境| |
|
||||
| 多线程下载 | 基于 aptss 方案 |
|
||||
#### Contact & Feedback
|
||||
|
||||
#### 联系与反馈
|
||||
|
||||
如有问题或建议,欢迎联系:momen@momen.world
|
||||
For any issues or suggestions, please contact: momen@momen.world
|
||||
|
||||
30
src/spark-update-tool/README.zh.md
Normal file
30
src/spark-update-tool/README.zh.md
Normal file
@@ -0,0 +1,30 @@
|
||||
### 星火软件更新器
|
||||
|
||||
#### 简介
|
||||
|
||||
欢迎使用星火软件更新器!本工具可帮助您便捷地更新 Linux 计算机上的各类程序。
|
||||
|
||||
本版本专为仅包含 Qt5 的 Linux 发行版设计。
|
||||
**请在 root 权限下运行本程序。**
|
||||
|
||||
#### 当前支持的 Linux 发行版
|
||||
|
||||
- [x] GXDE OS
|
||||
- [x] Ubuntu
|
||||
- [x] deepin
|
||||
- [ ] Kylin
|
||||
|
||||
#### 功能清单
|
||||
|
||||
| 功能模块 | 描述 |
|
||||
|------------------|--------------------------------------|
|
||||
| 应用名识别 | 基于 `ss-do-upgrade.sh` 部分代码实现 |
|
||||
| 应用包大小识别 | 通过 dpkg 获取包大小信息 |
|
||||
| 获取应用图标 | 利用 QDesktopServices 实现 |
|
||||
| 支持 ACE 兼容环境| |
|
||||
| 多线程下载 | 基于 aptss 方案 |
|
||||
|
||||
如您已安装星火应用商店,则会附带本程序。
|
||||
#### 联系与反馈
|
||||
|
||||
如有问题或建议,欢迎联系:momen@momen.world
|
||||
@@ -12,14 +12,14 @@ AppDelegate::AppDelegate(QObject *parent)
|
||||
: QStyledItemDelegate(parent), m_downloadManager(new DownloadManager(this)), m_installProcess(nullptr) {
|
||||
connect(m_downloadManager, &DownloadManager::downloadFinished, this,
|
||||
[this](const QString &packageName, bool success) {
|
||||
if (m_downloads.contains(packageName)) {
|
||||
m_downloads[packageName].isDownloading = false;
|
||||
emit updateDisplay(packageName);
|
||||
qDebug() << (success ? "下载完成:" : "下载失败:") << packageName;
|
||||
if (success) {
|
||||
enqueueInstall(packageName);
|
||||
}
|
||||
}
|
||||
if (m_downloads.contains(packageName)) {
|
||||
m_downloads[packageName].isDownloading = false;
|
||||
emit updateDisplay(packageName);
|
||||
qDebug() << (success ? "下载完成:" : "下载失败:") << packageName;
|
||||
if (success) {
|
||||
enqueueInstall(packageName);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
connect(m_downloadManager, &DownloadManager::downloadProgress, this,
|
||||
@@ -276,18 +276,19 @@ void AppDelegate::startNextInstall() {
|
||||
qDebug().noquote() << QString::fromLocal8Bit(err);
|
||||
});
|
||||
connect(m_installProcess, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
this, [this, packageName, logFile](int /*exitCode*/, QProcess::ExitStatus /*status*/) {
|
||||
if (logFile) logFile->close();
|
||||
// 若未检测到“软件包已安装”,此处兜底
|
||||
if (!m_downloads[packageName].isInstalled) {
|
||||
m_downloads[packageName].isInstalling = false;
|
||||
}
|
||||
emit updateDisplay(packageName);
|
||||
m_installProcess->deleteLater();
|
||||
m_installProcess = nullptr;
|
||||
m_installingPackage.clear();
|
||||
startNextInstall();
|
||||
});
|
||||
this, [this, packageName, logFile](int exitCode, QProcess::ExitStatus status) {
|
||||
if (logFile) logFile->close();
|
||||
m_downloads[packageName].isInstalling = false;
|
||||
if (exitCode == 0) {
|
||||
m_downloads[packageName].isInstalled = true; // 安装成功
|
||||
}
|
||||
emit updateDisplay(packageName);
|
||||
m_installProcess->deleteLater();
|
||||
m_installProcess = nullptr;
|
||||
m_installingPackage.clear();
|
||||
startNextInstall();
|
||||
});
|
||||
|
||||
} else {
|
||||
// 日志文件无法打开时,仍然要连接原有信号
|
||||
connect(m_installProcess, &QProcess::readyReadStandardOutput, this, [this, packageName]() {
|
||||
|
||||
Reference in New Issue
Block a user