shadPS4/src/qt_gui/check_update.h
DanielSvoboda f79da986e3
Auto Update (#1006)
* Updater

* clang

* Adding Updater icon

* Updater

* TR

* settings_dialog.ui

* Changelog for Pre-release only

* Adding Dump and Download icons

* Forgot this...

* fix linux and resize

* powershell_unzip | changelog fix

Does not use zlin-ng to unpack, now uses powershell on windows and on linux/mac uses unzip or 7z, and if it does not find it, it will ask if you want to install it before extracting.

Do not show the changelog button if: The current version is a pre-release and the version to be downloaded is a release.

* Clang

* formatting

* links fixed

---------

Co-authored-by: Xphalnos <164882787+Xphalnos@users.noreply.github.com>
2024-09-24 23:03:15 +03:00

40 lines
1.1 KiB
C++

// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef CHECKUPDATE_H
#define CHECKUPDATE_H
#include <QCheckBox>
#include <QDialog>
#include <QNetworkAccessManager>
#include <QPushButton>
class CheckUpdate : public QDialog {
Q_OBJECT
public:
explicit CheckUpdate(const bool showMessage, QWidget* parent = nullptr);
~CheckUpdate();
private slots:
void CheckForUpdates(const bool showMessage);
void DownloadUpdate(const QString& url);
void Install();
private:
void setupUI(const QString& downloadUrl, const QString& latestDate, const QString& latestRev,
const QString& currentDate, const QString& currentRev);
void requestChangelog(const QString& currentRev, const QString& latestRev,
const QString& downloadUrl, const QString& latestDate,
const QString& currentDate);
QCheckBox* autoUpdateCheckBox;
QPushButton* yesButton;
QPushButton* noButton;
QString updateDownloadUrl;
QNetworkAccessManager* networkManager;
};
#endif // CHECKUPDATE_H