Auto-updater

This commit is contained in:
RipleyTom 2019-09-11 09:55:43 +02:00 committed by Megamouse
parent 56e6dd1c46
commit 9f9ac4b696
31 changed files with 2068 additions and 52 deletions

View file

@ -172,6 +172,13 @@ void main_window::Init()
// Fix possible hidden game list columns. The game list has to be visible already. Use this after show()
m_gameListFrame->FixNarrowColumns();
#if defined(_WIN32) || defined(__linux__)
if (guiSettings->GetValue(gui::m_check_upd_start).toBool())
{
m_updater.check_for_updates(true, this);
}
#endif
}
// returns appIcon
@ -423,8 +430,7 @@ void main_window::InstallPkg(const QString& dropPath, bool is_bulk)
const std::string fileName = sstr(QFileInfo(filePath).fileName());
const std::string path = sstr(filePath);
progress_dialog pdlg(tr("Installing package ... please wait ..."), tr("Cancel"), 0, 1000, this);
pdlg.setWindowTitle(tr("RPCS3 Package Installer"));
progress_dialog pdlg(tr("RPCS3 Package Installer"), tr("Installing package ... please wait ..."), tr("Cancel"), 0, 1000, this);
pdlg.show();
// Synchronization variable
@ -563,8 +569,7 @@ void main_window::InstallPup(const QString& dropPath)
return;
}
progress_dialog pdlg(tr("Installing firmware version %1\nPlease wait...").arg(qstr(version_string)), tr("Cancel"), 0, static_cast<int>(updatefilenames.size()), this);
pdlg.setWindowTitle(tr("RPCS3 Firmware Installer"));
progress_dialog pdlg(tr("RPCS3 Firmware Installer"), tr("Installing firmware version %1\nPlease wait...").arg(qstr(version_string)), tr("Cancel"), 0, static_cast<int>(updatefilenames.size()), this);
pdlg.show();
// Synchronization variable
@ -1411,6 +1416,20 @@ void main_window::CreateConnects()
}
});
connect(ui->updateAct, &QAction::triggered, [=]()
{
#if !defined(_WIN32) && !defined(__linux__)
QMessageBox::warning(this, tr("Auto-updater"), tr("The auto-updater currently isn't available for your os."));
return;
#endif
if(!Emu.IsStopped())
{
QMessageBox::warning(this, tr("Auto-updater"), tr("Please stop the emulation before trying to update."));
return;
}
m_updater.check_for_updates(false, this);
});
connect(ui->aboutAct, &QAction::triggered, [this]
{
about_dialog dlg(this);