chore:调用更新时分开开发者和普通用户的调用方式

This commit is contained in:
2025-08-05 13:59:00 +08:00
parent a2018df6fa
commit 9a14b38d14

View File

@@ -526,6 +526,7 @@ void MainWindow::notify(QObject *receiver, QEvent *event)
void MainWindow::on_pushButton_14_clicked()
{
QString appPath;
#ifdef QT_DEBUG
appPath = QCoreApplication::applicationDirPath() ;
QDir dir(appPath);
dir.cdUp();
@@ -540,4 +541,13 @@ void MainWindow::on_pushButton_14_clicked()
QStringList arguments;
arguments << appPath <<"--silent";
process->start(appPath, {"--silent"});
#else
appPath = QStandardPaths::findExecutable("spark-update-tool");
QString program = "pkexec";
QStringList arguments;
arguments << appPath << "--silent";
process->start(program, arguments);
#endif
}