From 6aa9bd0f77dcb5128167fae62e32aa5252fe85c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 2 Dec 2013 00:55:24 +0100 Subject: Renew the updater branch Now with some actual consensus on what the updater will do! --- MultiMC.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'MultiMC.h') diff --git a/MultiMC.h b/MultiMC.h index cae6eee0..0ab7a8b5 100644 --- a/MultiMC.h +++ b/MultiMC.h @@ -17,6 +17,7 @@ class IconList; class QNetworkAccessManager; class ForgeVersionList; class JavaVersionList; +class GoUpdate; #if defined(MMC) #undef MMC @@ -84,6 +85,11 @@ public: return m_metacache; } + std::shared_ptr goupdate() + { + return m_go_update; + } + std::shared_ptr lwjgllist(); std::shared_ptr forgelist(); @@ -106,6 +112,7 @@ private: std::shared_ptr m_mmc_translator; std::shared_ptr m_settings; std::shared_ptr m_instances; + std::shared_ptr m_go_update; std::shared_ptr m_accounts; std::shared_ptr m_icons; std::shared_ptr m_qnam; -- cgit v1.2.3 From bf94aaea7527a8f5b9f3b8c1ab6ff4e88cbd748f Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 4 Dec 2013 12:34:12 -0600 Subject: Rework the update checking system --- MultiMC.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'MultiMC.h') diff --git a/MultiMC.h b/MultiMC.h index 0ab7a8b5..659104ba 100644 --- a/MultiMC.h +++ b/MultiMC.h @@ -17,7 +17,7 @@ class IconList; class QNetworkAccessManager; class ForgeVersionList; class JavaVersionList; -class GoUpdate; +class UpdateChecker; #if defined(MMC) #undef MMC @@ -85,9 +85,9 @@ public: return m_metacache; } - std::shared_ptr goupdate() + std::shared_ptr updateChecker() { - return m_go_update; + return m_updateChecker; } std::shared_ptr lwjgllist(); @@ -112,7 +112,7 @@ private: std::shared_ptr m_mmc_translator; std::shared_ptr m_settings; std::shared_ptr m_instances; - std::shared_ptr m_go_update; + std::shared_ptr m_updateChecker; std::shared_ptr m_accounts; std::shared_ptr m_icons; std::shared_ptr m_qnam; -- cgit v1.2.3 From 6ac94ddcb6f64ffae3948bed778bccc33a92f0fd Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 6 Dec 2013 12:59:58 -0600 Subject: Finish implementing update installation. Also add the option to update on exit. --- MultiMC.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'MultiMC.h') diff --git a/MultiMC.h b/MultiMC.h index 659104ba..22cea029 100644 --- a/MultiMC.h +++ b/MultiMC.h @@ -98,6 +98,22 @@ public: std::shared_ptr javalist(); + /*! + * Installs update from the given update files directory. + */ + void installUpdates(const QString& updateFilesDir, bool restartOnFinish=false); + + /*! + * Sets MultiMC to install updates from the given directory when it exits. + */ + void setUpdateOnExit(const QString& updateFilesDir); + + /*! + * Gets the path to install updates from on exit. + * If this is an empty string, no updates should be installed on exit. + */ + QString getExitUpdatePath() const; + private: void initLogger(); @@ -124,6 +140,8 @@ private: QsLogging::DestinationPtr m_fileDestination; QsLogging::DestinationPtr m_debugDestination; + QString m_updateOnExitPath; + Status m_status = MultiMC::Failed; MultiMCVersion m_version; }; -- cgit v1.2.3