Updater Installation Instructions

Build Instructions

qmake

mkdir build
cd build
qmake ..
make

Integration

You can use this library as a git submodule. For example, add it to your project inside a lib subdirectory:

git submodule add -b master https://github.com/flaviotordini/updater lib/updater

Then you can update your git submodules like this:

git submodule update --init --recursive --remote

To integrate the library in your qmake based project just add this to your .pro file:

include(lib/updater/updater.pri)

qmake builds all object files in the same directory. In order to avoid filename clashes use:

CONFIG += object_parallel_to_source

Examples

Example setup of the shared Updater instance:

#include "updater.h"
#ifdef UPDATER_SPARKLE
#include "sparkleupdater.h"
#else
#include "defaultupdater.h"
#endif

void setupUpdater() {
    #ifdef UPDATER_SPARKLE
        Updater::setInstance(new updater::SparkleUpdater());
    #else
        auto updater = new updater::DefaultUpdater();
        updater->setManifestUrl(myAppcastUrl);
        Updater::setInstance(updater);
    #endif
}

Updater provides a QAction instance ready to be used in a menu.

myMenu->addAction(Updater::instance().getAction());

In the About box you can use the standard widgets provided by Updater. A QLabel and a QPushButton.

myLayout->addWidget(Updater::instance().getLabel());
myLayout->addWidget(Updater::instance().getButton());

 

Back to Qt Marketplace