is a C++ cross-platform framework to update desktop software.
- Framework checks the URL you specified for info about versions and download it. This URL is called InfoUrl in the framework. Info about versions is presented as a simple XML file
- Framework parse versions info XML file and try to find the next version for the application.
- If there is a new version of the application is available in the version info XML file then the framework will download the data from the URL specified in XML for that version.
- After the downloading is completed then the framework will check the SHA-512 signature of data.
- Framework will make execute installer operation for Windows with specified arguments in XML.
- Framework will make execute installer operation for Linux with specified arguments in XML.
- Framework will make install DMG operation for macOS.
<updateInfo>
<channel type="alpha">
<version id="0.0.0.1" unixtime="0" size="1023" active="true" critical="false" url="" notes="First version" signature=""></version>
<version id="0.0.1.1" unixtime="1095292800" size="1023" active="false" critical="true" url="" notes="" signature=""></version>
<version id="0.0.1.1" unixtime="1095292801" size="1023" active="true" critical="false" url="" notes="Active critical version \nInstall It \nAny String" signature=""></version>
<version
id="0.1.1.1" // id - [required] main info about version
unixtime="1095292802" // unixtime - [optional] helps to decide which version newer if ids equals
size="29696808" // size - [optional] helps to show correct downloading progress
active="true" // active - [required] enabled/disabled version to update
critical="false" // critical - [required] if critical is true then this version will downloaded even there is newer version exists
url="https://..." // url - [required] url where the installer is placed
notes="" // notes - [optional] just notes. Not used in framework yet
signature="...." // signature - [required] SHA-512 hash of installer
updateargs="" // updateargs- [optional] extra options when installer started
></version>
</channel>
<channel type="beta"></channel>
<channel type="test"></channel>
</updateInfo>
Windows
macOS
Linux
It built with some other open source libraries:
https://gitlab.com/desktopsoftwareupdater/updaterlib/-/blob/master/.gitlab-ci.yml#L11
apt-get install -y git cmake build-essential autoconf libtool pkg-config libssl-dev
- install Xcode with git. Just try
git
it will install Xcode with git if need. - install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install autoconf automake libtool openssl cmake
- use header
#include <updaterInterface.h>
- link library
appUpdaterShared
- get the updater instance
auto updater = getUpdaterInstance();
- set the current version info
//current version
std::string version("0.0.0.1");
setCurrentVersion(updater, version.c_str(), version.length());
//url where the fileInfo is placed
const std::string infoUrl("https://gitlab.com/desktopsoftwareupdater/updaterexamples/-/raw/master/appUpdateSample_Win.xml");
setInfoUrl(updater, infoUrl.c_str(), infoUrl.length());
//channel ("alpha", "beta", "rc", "stable", or any other string to identify particular version)
setChannel(updater, "alpha", 5);
- check and update for a new version in one command
checkAndUpdate(updater);
You may find more details in other examples.
updateExample all projects
example with separate commands
example with all-in-one commnad
example with downloading pause
QML example