mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-09-04 02: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->label_aptserver->setText(tr("Updating, please wait..."));
|
||||
|
||||
QProcess runupdate;
|
||||
runupdate.start("pkexec" , QStringList() << "aptss" << "ssupdate");
|
||||
runupdate.waitForFinished();
|
||||
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."));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QString storeSpk = "spk://store/tools/spark-store";
|
||||
openUrl(storeSpk);
|
||||
ui->label_aptserver->setText(tr(""));
|
||||
|
||||
ui->pushButton_updateApt->setEnabled(true);
|
||||
});
|
||||
|
@ -1220,7 +1220,7 @@
|
||||
<string notr="true">color:#808080</string>
|
||||
</property>
|
||||
<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 name="wordWrap">
|
||||
<bool>true</bool>
|
||||
@ -1237,7 +1237,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Source Server</string>
|
||||
<string>Spark Store Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -349,7 +349,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<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>
|
||||
</message>
|
||||
<message>
|
||||
@ -359,7 +359,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget.ui" line="1240"/>
|
||||
<source>Source Server</source>
|
||||
<source>Spark Store Update</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
|
@ -370,7 +370,7 @@ Nous sommes nés pour le changement.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<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>
|
||||
</message>
|
||||
<message>
|
||||
@ -380,7 +380,7 @@ Nous sommes nés pour le changement.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget.ui" line="1240"/>
|
||||
<source>Source Server</source>
|
||||
<source>Spark Store Update</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
@ -557,15 +557,15 @@ Nous sommes nés pour le changement.</translation>
|
||||
<translation type="vanished">Redémarrez pour prendre effet</translation>
|
||||
</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>
|
||||
</message>
|
||||
<message>
|
||||
<source>更新源</source>
|
||||
<source>跳转更新</source>
|
||||
<translation type="vanished">Mettre à jour la source APT</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>更新源服务器:</source>
|
||||
<source>星火应用商店更新检测:</source>
|
||||
<translation type="vanished">Source APT: </translation>
|
||||
</message>
|
||||
<message>
|
||||
|
@ -380,18 +380,18 @@
|
||||
</message>
|
||||
<message>
|
||||
<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>
|
||||
<translation><html><head/><body><p>源服务器的作用是保证软件更新,并且支持使用apt工具获取软件。通常我们更建议你使用第一个线路作为更新源,一般是最稳定的。</p></body></html></translation>
|
||||
<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>跳转到星火应用商店主页检测更新。</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget.ui" line="1233"/>
|
||||
<source>Update</source>
|
||||
<translation>更新源</translation>
|
||||
<translation>跳转更新</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget.ui" line="1240"/>
|
||||
<source>Source Server</source>
|
||||
<translation>更新源服务器</translation>
|
||||
<source>Spark Store Update</source>
|
||||
<translation>星火应用商店更新检测</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget.ui" line="1260"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user