app updater feature

checks online version file
offers download of new version of slicer
download with notification
opens instalator or target folder
This commit is contained in:
David Kocik 2022-01-12 16:21:16 +01:00
parent 1d2339fbce
commit 43124979e5
13 changed files with 1250 additions and 36 deletions

View file

@ -37,6 +37,42 @@ private:
};
class AppUpdateAvailableDialog : public MsgDialog
{
public:
AppUpdateAvailableDialog(const Semver& ver_current, const Semver& ver_online);
AppUpdateAvailableDialog(AppUpdateAvailableDialog&&) = delete;
AppUpdateAvailableDialog(const AppUpdateAvailableDialog&) = delete;
AppUpdateAvailableDialog& operator=(AppUpdateAvailableDialog&&) = delete;
AppUpdateAvailableDialog& operator=(const AppUpdateAvailableDialog&) = delete;
virtual ~AppUpdateAvailableDialog();
// Tells whether the user checked the "don't bother me again" checkbox
bool disable_version_check() const;
static wxSize AUAD_size;
private:
wxCheckBox* cbox;
};
class AppUpdateDownloadDialog : public MsgDialog
{
public:
AppUpdateDownloadDialog(const Semver& ver_online);
AppUpdateDownloadDialog(AppUpdateDownloadDialog&&) = delete;
AppUpdateDownloadDialog(const AppUpdateDownloadDialog&) = delete;
AppUpdateDownloadDialog& operator=(AppUpdateDownloadDialog&&) = delete;
AppUpdateDownloadDialog& operator=(const AppUpdateDownloadDialog&) = delete;
virtual ~AppUpdateDownloadDialog();
// Tells whether the user checked the "don't bother me again" checkbox
bool run_after_download() const;
bool select_download_path() const;
private:
wxCheckBox* cbox_run;
wxCheckBox* cbox_path;
};
// Confirmation dialog informing about configuration update. Lists updated bundles & their versions.
class MsgUpdateConfig : public MsgDialog
{
@ -129,6 +165,18 @@ public:
~MsgNoUpdates();
};
// Informs about absence of new version online.
class MsgNoAppUpdates : public MsgDialog
{
public:
MsgNoAppUpdates();
MsgNoAppUpdates(MsgNoAppUpdates&&) = delete;
MsgNoAppUpdates(const MsgNoAppUpdates&) = delete;
MsgNoAppUpdates& operator=(MsgNoUpdates&&) = delete;
MsgNoAppUpdates& operator=(const MsgNoAppUpdates&) = delete;
~MsgNoAppUpdates();
};
}
}