feat(update): add self-update check via Gitea releases API
tests / build-test (push) Has been cancelled

Adds an UpdateManager that queries the Gitea releases API once per day,
stores the last check state in a JSON file, and offers to pull + rebuild
the source repository when a newer version exists. The running binary is
left untouched until the next launch.

Also sets the app version from the version file at build time instead of
the hardcoded 1.0.0, and copies the version file next to the executable.
This commit is contained in:
BlackAngelTV committed 2026-09-09 19:49:45 +02:00
1 parent 9b357cde63
commit 44a7e5b396
6 files changed
+424 -6

No files matched your search

+6
View File
@@ -18,6 +18,7 @@
#include "pacman-manager.h"
#include "plugin-manager.h"
#include "history-manager.h"
#include "update-manager.h"
class QStackedWidget;
class QTableWidget;
@@ -110,6 +111,10 @@ private slots:
void onToggleProvider();
void onRescanProviders();
void onInstallProviderTool();
void onCheckForUpdates();
void onUpdateCheckFinished(bool hasUpdate, const QString& latestVersion,
const QString& errorMessage);
void onSelfUpdateFinished(bool success, const QString& message);
private:
enum BrowseMode { ModeSearch, ModeInstalled, ModeUpdates };
@@ -224,6 +229,7 @@ private:
PacmanManager* m_pacman = nullptr; // non-owning, used for sudo credentials/logs
PluginManager* m_pluginManager = nullptr; // owns every provider
HistoryManager* m_historyManager = nullptr;
UpdateManager* m_updateManager = nullptr; // checks Gitea releases (owned)
BrowseMode m_browseMode = ModeSearch;
// Settings