Prompt reboot when runing the auto update.
authoralex-z <blackslayer4@gmail.com>
Wed, 8 Sep 2021 13:13:22 +0000 (16:13 +0300)
committerallexzander (Rebase PR Action) <allexzander@users.noreply.github.com>
Thu, 9 Sep 2021 07:20:19 +0000 (07:20 +0000)
Signed-off-by: alex-z <blackslayer4@gmail.com>
src/gui/updater/ocupdater.cpp

index f70641e0a55b1fc585f01020c913728daa5c7c1f..6d5ee549d1af37353a2f52a8b64d3fc202c8cd07 100644 (file)
@@ -107,7 +107,7 @@ bool OCUpdater::performUpdate()
         const auto messageBoxStartInstaller = new QMessageBox(QMessageBox::Information,
             tr("New %1 update ready").arg(Theme::instance()->appNameGUI()),
             tr("A new update for %1 is about to be installed. The updater may ask "
-               "for additional privileges during the process.")
+               "for additional privileges during the process. Your computer may reboot to complete the installation.")
                 .arg(Theme::instance()->appNameGUI()),
             QMessageBox::Ok,
             nullptr);
@@ -214,7 +214,7 @@ void OCUpdater::slotStartInstaller()
         };
 
         QString msiLogFile = cfg.configPath() + "msi.log";
-        QString command = QString("&{msiexec /norestart /passive /i '%1' /L*V '%2'| Out-Null ; &'%3'}")
+        QString command = QString("&{msiexec /promptrestart /passive /i '%1' /L*V '%2'| Out-Null ; &'%3'}")
              .arg(preparePathForPowershell(updateFile))
              .arg(preparePathForPowershell(msiLogFile))
              .arg(preparePathForPowershell(QCoreApplication::applicationFilePath()));
@@ -453,7 +453,7 @@ void NSISUpdater::showUpdateErrorDialog(const QString &targetVersion)
     ico->setPixmap(infoIcon.pixmap(iconSize));
     auto lbl = new QLabel;
     QString txt = tr("<p>A new version of the %1 Client is available but the updating process failed.</p>"
-                     "<p><b>%2</b> has been downloaded. The installed version is %3.</p>")
+                     "<p><b>%2</b> has been downloaded. The installed version is %3. If you confirm restart and upate, your computer may reboot to complete the installation.</p>")
                       .arg(Utility::escape(Theme::instance()->appNameGUI()),
                           Utility::escape(targetVersion), Utility::escape(clientVersion()));