diff --git a/monero b/monero index 566e6e1..b45c66e 160000 --- a/monero +++ b/monero @@ -1 +1 @@ -Subproject commit 566e6e1904f20d7537c8f4c7f50caf1a5ee86bf8 +Subproject commit b45c66e9c62d7e8f24abbcb447f408e618bfd450 diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 8f4cd97..c9276ee 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1345,9 +1345,10 @@ void MainWindow::onCheckUpdatesComplete(const QString &version, const QString &b void MainWindow::onShowUpdateCheck(const QString &version, const QString &binaryFilename, const QString &hash, const QString &signer) { - QString downloadUrl = QString("https://featherwallet.org/files/releases/%1/%2").arg(this->getPlatformTag(), binaryFilename); + QString platformTag = this->getPlatformTag(); + QString downloadUrl = QString("https://featherwallet.org/files/releases/%1/%2").arg(platformTag, binaryFilename); - UpdateDialog updateDialog{this, version, downloadUrl, hash, signer}; + UpdateDialog updateDialog{this, version, downloadUrl, hash, signer, platformTag}; connect(&updateDialog, &UpdateDialog::restartWallet, m_windowManager, &WindowManager::restartApplication); updateDialog.exec(); } diff --git a/src/dialog/UpdateDialog.cpp b/src/dialog/UpdateDialog.cpp index 9836da2..57cb9ec 100644 --- a/src/dialog/UpdateDialog.cpp +++ b/src/dialog/UpdateDialog.cpp @@ -14,13 +14,14 @@ #include "zip.h" -UpdateDialog::UpdateDialog(QWidget *parent, QString version, QString downloadUrl, QString hash, QString signer) +UpdateDialog::UpdateDialog(QWidget *parent, QString version, QString downloadUrl, QString hash, QString signer, QString platformTag) : QDialog(parent) , ui(new Ui::UpdateDialog) , m_version(std::move(version)) , m_downloadUrl(std::move(downloadUrl)) , m_hash(std::move(hash)) , m_signer(std::move(signer)) + , m_platformTag(std::move(platformTag)) { ui->setupUi(this); @@ -179,6 +180,10 @@ void UpdateDialog::onInstallUpdate() { QDir applicationDir(Utils::applicationPath()); QString filePath = applicationDir.filePath(name); + if (m_platformTag == "win-installer") { + filePath = QString("%1/%2").arg(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation), name); + } + m_updatePath = filePath; QFile file(filePath); @@ -200,7 +205,11 @@ void UpdateDialog::onInstallUpdate() { return; } - this->setStatus("Installation successful. Do you want to restart Feather now?"); + if (m_platformTag == "win-installer") { + this->setStatus("Installer written. Click 'restart' to close Feather and start the installer."); + } else { + this->setStatus("Installation successful. Do you want to restart Feather now?"); + } ui->btn_restart->show(); } diff --git a/src/dialog/UpdateDialog.h b/src/dialog/UpdateDialog.h index 800fcbd..6738a24 100644 --- a/src/dialog/UpdateDialog.h +++ b/src/dialog/UpdateDialog.h @@ -16,7 +16,7 @@ class UpdateDialog : public QDialog Q_OBJECT public: - explicit UpdateDialog(QWidget *parent, QString version, QString downloadUrl, QString hash, QString signer); + explicit UpdateDialog(QWidget *parent, QString version, QString downloadUrl, QString hash, QString signer, QString platformTag); ~UpdateDialog() override; private slots: @@ -41,6 +41,7 @@ private: QString m_downloadUrl; QString m_hash; QString m_signer; + QString m_platformTag; QString m_updatePath;