From f0e3373cb2c0239e5227c833122357e3dad96eea Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 6 Aug 2020 22:37:30 +1000 Subject: [PATCH] Qt: Add message about unofficial builds auto-update incompatibility --- src/duckstation-qt/mainwindow.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 374662089..510de9def 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -836,7 +836,27 @@ void MainWindow::checkForUpdates(bool display_message) if (!AutoUpdaterDialog::isSupported()) { if (display_message) - QMessageBox::critical(this, tr("Updater Error"), tr("Updates are not supported on this build.")); + { + QMessageBox mbox(this); + mbox.setWindowTitle(tr("Updater Error")); + mbox.setTextFormat(Qt::RichText); + + QString message; +#ifdef WIN32 + message = + tr("

Sorry, you are trying to update a DuckStation version which is not an official GitHub release. To " + "prevent incompatibilities, the auto-updater is only enabled on official builds.

" + "

To obtain an official build, please follow the instructions under \"Downloading and Running\" at the " + "link below:

" + "

https://github.com/stenzek/duckstation/

"); +#else + message = tr("Automatic updating is not supported on the current platform."); +#endif + + mbox.setText(message); + mbox.setIcon(QMessageBox::Critical); + mbox.exec(); + } return; }