{"id":21325793,"url":"https://github.com/flaviotordini/updater","last_synced_at":"2025-07-12T06:32:41.096Z","repository":{"id":93233320,"uuid":"276847624","full_name":"flaviotordini/updater","owner":"flaviotordini","description":"An updater for desktop Qt apps. Can use Sparkle on macOS.","archived":false,"fork":false,"pushed_at":"2024-02-06T22:33:34.000Z","size":107,"stargazers_count":56,"open_issues_count":0,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T14:25:18.682Z","etag":null,"topics":["qt","update","update-checker","updater"],"latest_commit_sha":null,"homepage":"https://flavio.tordini.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flaviotordini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"flaviotordini","custom":"https://flavio.tordini.org/donate"}},"created_at":"2020-07-03T08:24:14.000Z","updated_at":"2024-04-21T02:02:07.000Z","dependencies_parsed_at":"2023-10-01T22:20:02.358Z","dependency_job_id":null,"html_url":"https://github.com/flaviotordini/updater","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaviotordini%2Fupdater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaviotordini%2Fupdater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaviotordini%2Fupdater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaviotordini%2Fupdater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flaviotordini","download_url":"https://codeload.github.com/flaviotordini/updater/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225802692,"owners_count":17526452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["qt","update","update-checker","updater"],"created_at":"2024-11-21T21:07:27.692Z","updated_at":"2024-11-21T21:07:28.128Z","avatar_url":"https://github.com/flaviotordini.png","language":"C++","funding_links":["https://github.com/sponsors/flaviotordini","https://flavio.tordini.org/donate"],"categories":[],"sub_categories":[],"readme":"# An updater for Qt apps\n\nThis is an extensible updater for Qt apps. It can wrap [Sparkle](https://sparkle-project.org/) on macOS and use its own implementation on Windows and Linux. I use it in my apps at https://flavio.tordini.org .\n\n## Design\n\nThe main interface is [Updater](https://github.com/flaviotordini/updater/blob/master/src/updater.h). A shared Updater subclass instance should be set on startup using `Updater::setInstance()`. Available implementations are:\n\n- [`updater::DefaultUpdater`](https://github.com/flaviotordini/updater/blob/master/src/impl/defaultupdater.h), the default Qt-based implementation.\n\n- [`updater::SparkleUpdater`](https://github.com/flaviotordini/updater/blob/master/src/sparkle/sparkleupdater.h), a Sparkle-based implementation for macOS\n\n## User Interface\n\n### Built-in Widgets\n\nUpdater provides ready-to-use widgets:\n\n- `Updater::getAction()` returns a QAction suitable to be inserted in a QMenu.\n- `Updater::getLabel()` returns a QLabel that automatically changes its message. Typically used in the about box.\n- `Updater::getButton()` returns a QPushButton that autohides or automatically changes its function depending on the Updater status.\n\nWhen the user triggers the action or pushes the button a dialog will show which is dependent on the Updater implementation.\n\n## Entension Points\n\n[updater::DefaultUpdater](https://github.com/flaviotordini/updater/blob/master/src/impl/defaultupdater.h) has a number of extension points so it can be adapted to different release manifest formats and update mechanisms.\n\n### Parser\n\nImplement [updater::Parser](https://github.com/flaviotordini/updater/blob/master/src/impl/parser.h) to parse your own manifest format. There are two ready-to-use parsers:\n\n- [updater::AppcastParser](https://github.com/flaviotordini/updater/blob/master/src/impl/appcastparser.h). This the appcast format also used by Sparkle. It's a RSS feed with Sparkle extensions.\n- [updater::SimpleXmlParser](https://github.com/flaviotordini/updater/blob/master/src/impl/simplexmlparser.h). This is a very simple XML format\n\nSet the desired Parser implementation using `updater::DefaultUpdater::setParser`. The default is [updater::AppcastParser].\n\n### Installer\n\n[updater::Installer](https://github.com/flaviotordini/updater/blob/master/src/impl/installer.h) is the abstraction responsible for preparing and running the update process. Currently the only available Installer implementation is [updater::RunInstaller](https://github.com/flaviotordini/updater/blob/master/src/impl/runinstaller.h). It just runs an executable update payload, optionally with arguments.\n\nInstaller can be implemented in other ways, for example an Installer that unzips a payload and moves files. Or one that invokes an update helper. Another idea is signature validation.\n\nSet the desired Installer implementation using `updater::DefaultUpdater::setInstaller`. The default is [updater::RunInstaller].\n\n## Build Instructions\n\n### qmake\n```\nmkdir build\ncd build\nqmake ..\nmake\n```\n\n## Integration\n\nYou can use this library as a git submodule. For example, add it to your project inside a lib subdirectory:\n\n```\ngit submodule add -b master https://github.com/flaviotordini/updater lib/updater\n```\n\nThen you can update your git submodules like this:\n\n```\ngit submodule update --init --recursive --remote\n```\n\nTo integrate the library in your qmake based project just add this to your .pro file:\n\n```\ninclude(lib/updater/updater.pri)\n```\n\nqmake builds all object files in the same directory. In order to avoid filename clashes use:\n\n```\nCONFIG += object_parallel_to_source\n```\n\n## Examples\n\nExample setup of the shared Updater instance:\n\n```\n#include \"updater.h\"\n#ifdef UPDATER_SPARKLE\n#include \"sparkleupdater.h\"\n#else\n#include \"defaultupdater.h\"\n#endif\n\nvoid setupUpdater() {\n    #ifdef UPDATER_SPARKLE\n        Updater::setInstance(new updater::SparkleUpdater());\n    #else\n        auto updater = new updater::DefaultUpdater();\n        updater-\u003esetManifestUrl(myAppcastUrl);\n        Updater::setInstance(updater);\n    #endif\n}\n```\n\nUpdater provides a QAction instance ready to be used in a menu.\n\n```\nmyMenu-\u003eaddAction(Updater::instance().getAction());\n```\n\nIn the About box you can use the standard widgets provided by Updater. A QLabel and a QPushButton.\n\n```\nmyLayout-\u003eaddWidget(Updater::instance().getLabel());\nmyLayout-\u003eaddWidget(Updater::instance().getButton());\n```\n\n## Security\n\nAlways serve your manifest files and binary updates via HTTPS.\n\n## Support\n\nIf you need more features or integration with your product, I'm available for hire.\n\n## License\n\nYou can use this library under the GPLv3 license terms. If you do, you're welcome contributing your changes and fixes. Donations are welcome at https://flavio.tordini.org/donate\n\nFor commercial projects I ask for a one-time license fee, contact me at flavio.tordini@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaviotordini%2Fupdater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflaviotordini%2Fupdater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaviotordini%2Fupdater/lists"}