mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-09-06 03:12:21 +08:00
feat: 星火应用商店检测更新
This commit is contained in:
parent
971a5dcc63
commit
2df5363c2c
@ -1090,34 +1090,9 @@ void Widget::on_pushButton_updateApt_clicked()
|
|||||||
ui->pushButton_updateApt->setEnabled(false);
|
ui->pushButton_updateApt->setEnabled(false);
|
||||||
ui->label_aptserver->setText(tr("Updating, please wait..."));
|
ui->label_aptserver->setText(tr("Updating, please wait..."));
|
||||||
|
|
||||||
QProcess runupdate;
|
QString storeSpk = "spk://store/tools/spark-store";
|
||||||
runupdate.start("pkexec" , QStringList() << "aptss" << "ssupdate");
|
openUrl(storeSpk);
|
||||||
runupdate.waitForFinished();
|
ui->label_aptserver->setText(tr(""));
|
||||||
QString error = runupdate.readAllStandardError();
|
|
||||||
|
|
||||||
QStringList everyError = error.split("\n");
|
|
||||||
bool haveError = false;
|
|
||||||
for(int i = 0; i < everyError.size(); i++)
|
|
||||||
{
|
|
||||||
if(everyError[i].left(2) == "E:")
|
|
||||||
{
|
|
||||||
haveError = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!haveError)
|
|
||||||
{
|
|
||||||
ui->label_aptserver->setText(tr("Update finished"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ui->label_aptserver->setText(tr("Apt has reported an error. Please use apt update in terminal to locate the problem."));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ui->pushButton_updateApt->setEnabled(true);
|
ui->pushButton_updateApt->setEnabled(true);
|
||||||
});
|
});
|
||||||
|
@ -1220,7 +1220,7 @@
|
|||||||
<string notr="true">color:#808080</string>
|
<string notr="true">color:#808080</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p>The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. </p></body></html></string>
|
<string><html><head/><body><p>Jump to the Spark app store home page to check for updates. </p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -1237,7 +1237,7 @@
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Source Server</string>
|
<string>Spark Store Update</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -349,7 +349,7 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.ui" line="1223"/>
|
<location filename="../src/widget.ui" line="1223"/>
|
||||||
<source><html><head/><body><p>The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. </p></body></html></source>
|
<source><html><head/><body><p>Jump to the Spark app store home page to check for updates. </p></body></html></source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -359,7 +359,7 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.ui" line="1240"/>
|
<location filename="../src/widget.ui" line="1240"/>
|
||||||
<source>Source Server</source>
|
<source>Spark Store Update</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -370,7 +370,7 @@ Nous sommes nés pour le changement.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.ui" line="1223"/>
|
<location filename="../src/widget.ui" line="1223"/>
|
||||||
<source><html><head/><body><p>The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. </p></body></html></source>
|
<source><html><head/><body><p>Jump to the Spark app store home page to check for updates. </p></body></html></source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -380,7 +380,7 @@ Nous sommes nés pour le changement.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.ui" line="1240"/>
|
<location filename="../src/widget.ui" line="1240"/>
|
||||||
<source>Source Server</source>
|
<source>Spark Store Update</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -557,15 +557,15 @@ Nous sommes nés pour le changement.</translation>
|
|||||||
<translation type="vanished">Redémarrez pour prendre effet</translation>
|
<translation type="vanished">Redémarrez pour prendre effet</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source><html><head/><body><p>源服务器的作用是保证软件更新,并且支持使用apt工具获取软件。通常我们更建议你使用第一个线路作为更新源,一般是最稳定的。</p></body></html></source>
|
<source><html><head/><body><p>跳转到星火应用商店主页检测更新。</p></body></html></source>
|
||||||
<translation type="vanished"><html><head/><body><p>Le rôle du serveur source est de s'assurer que le logiciel est mis à jour et prend en charge l'utilisation de l'outil apt pour obtenir le logiciel. Nous préférons généralement que vous utilisiez la première ligne comme source de mise à jour, qui est généralement la plus stable. </p></body></html></translation>
|
<translation type="vanished"><html><head/><body><p>Le rôle du serveur source est de s'assurer que le logiciel est mis à jour et prend en charge l'utilisation de l'outil apt pour obtenir le logiciel. Nous préférons généralement que vous utilisiez la première ligne comme source de mise à jour, qui est généralement la plus stable. </p></body></html></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>更新源</source>
|
<source>跳转更新</source>
|
||||||
<translation type="vanished">Mettre à jour la source APT</translation>
|
<translation type="vanished">Mettre à jour la source APT</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>更新源服务器:</source>
|
<source>星火应用商店更新检测:</source>
|
||||||
<translation type="vanished">Source APT: </translation>
|
<translation type="vanished">Source APT: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -380,18 +380,18 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.ui" line="1223"/>
|
<location filename="../src/widget.ui" line="1223"/>
|
||||||
<source><html><head/><body><p>The role of the source server is to ensure that the software is updated, and supports the use of the apt tool to get the software. We usually prefer that you use the first line as the update source, which is generally the most stable. </p></body></html></source>
|
<source><html><head/><body><p>Jump to the Spark app store home page to check for updates. </p></body></html></source>
|
||||||
<translation><html><head/><body><p>源服务器的作用是保证软件更新,并且支持使用apt工具获取软件。通常我们更建议你使用第一个线路作为更新源,一般是最稳定的。</p></body></html></translation>
|
<translation><html><head/><body><p>跳转到星火应用商店主页检测更新。</p></body></html></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.ui" line="1233"/>
|
<location filename="../src/widget.ui" line="1233"/>
|
||||||
<source>Update</source>
|
<source>Update</source>
|
||||||
<translation>更新源</translation>
|
<translation>跳转更新</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.ui" line="1240"/>
|
<location filename="../src/widget.ui" line="1240"/>
|
||||||
<source>Source Server</source>
|
<source>Spark Store Update</source>
|
||||||
<translation>更新源服务器</translation>
|
<translation>星火应用商店更新检测</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/widget.ui" line="1260"/>
|
<location filename="../src/widget.ui" line="1260"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user