Update Readme.md
This commit is contained in:
parent
a9b6d24695
commit
7076abd9cb
48
Readme.md
48
Readme.md
@ -4,7 +4,7 @@
|
||||
[![BitCoin donate button](https://img.shields.io/badge/bitcoin-donate-yellow.svg)](https://blockchain.info/address/1K85yLxjuqUmhkjP839R7C23XFhSxrefMx "Donate once-off to this project using BitCoin")
|
||||
[![Github downloads](https://img.shields.io/github/downloads/alex-spataru/qsimpleupdater/total.svg)](https://github.com/alex-spataru/qsimpleupdater/releases/latest)
|
||||
|
||||
QSimpleUpdater is an implementation of an auto-updating system to be used with Qt projects. It allows you to easily check for updates, download them and install them. Additionally, the QSimpleUpdater allows you to check for updates for different "modules" of your application. Check the [WTFs section](#wtfs) for more information.
|
||||
QSimpleUpdater is an implementation of an auto-updating system to be used with Qt projects. It allows you to easily check for updates, download them and install them. Additionally, the QSimpleUpdater allows you to check for updates for different "modules" of your application. Check the [WTFs Section](#wtfs-section) for more information.
|
||||
|
||||
[![Downloading](etc/screenshots/downloading.png)](etc/screenshots/)
|
||||
|
||||
@ -13,7 +13,7 @@ QSimpleUpdater is an implementation of an auto-updating system to be used with Q
|
||||
2. Include the QSimpleUpdater project include (*pri*) file using the include() function.
|
||||
3. That's all! Check the [tutorial project](/tutorial) as a reference for your project.
|
||||
|
||||
## WTFs
|
||||
## WTFs Section
|
||||
|
||||
### 1. How does the QSimpleUpdater check for updates?
|
||||
|
||||
@ -27,19 +27,23 @@ An example update definition file can be found [here](https://github.com/alex-sp
|
||||
|
||||
Yes! You can "toggle" which notifications to show using the library's functions or re-implement by yourself the notifications by "reacting" to the signals emitted by the QSimpleUpdater.
|
||||
|
||||
QString url = "http://MyBadassApplication.com/updates.json";
|
||||
```c++
|
||||
QString url = "https://MyBadassApplication.com/updates.json";
|
||||
|
||||
QSimpleUpdater::getInstance()->setNotifyOnUpdate (url, true);
|
||||
QSimpleUpdater::getInstance()->setNotifyOnFinish (url, false);
|
||||
QSimpleUpdater::getInstance()->setNotifyOnUpdate (url, true);
|
||||
QSimpleUpdater::getInstance()->setNotifyOnFinish (url, false);
|
||||
|
||||
QSimpleUpdater::getInstance()->checkForUpdates (url);
|
||||
QSimpleUpdater::getInstance()->checkForUpdates (url);
|
||||
```
|
||||
|
||||
### 3. Is the application able to download the updates directly?
|
||||
|
||||
Yes. If there is an update available, the library will prompt the user if he/she wants to download the update. You can enable or disable the integrated downloader with the following code:
|
||||
|
||||
QString url = "http://MyBadassApplication.com/updates.json";
|
||||
QSimpleUpdater::getInstance()->setDownloaderEnabled (url, true);
|
||||
```c++
|
||||
QString url = "https://MyBadassApplication.com/updates.json";
|
||||
QSimpleUpdater::getInstance()->setDownloaderEnabled (url, true);
|
||||
```
|
||||
|
||||
### 4. Why do I need to specify an URL for each function of the library?
|
||||
|
||||
@ -48,21 +52,23 @@ While it is not obligatory to use multiple updater instances, this can be useful
|
||||
|
||||
Say that you are developing a game, in this case, you could use the following code:
|
||||
|
||||
// Update the game textures
|
||||
QString textures_url = "http://MyBadassGame.com/textures.json"
|
||||
QSimpleUpdater::getInstance()->setModuleName (textures_url, "textures");
|
||||
QSimpleUpdater::getInstance()->setModuleVersion (textures_url, "0.4");
|
||||
QSimpleUpdater::getInstance()->checkForUpdates (textures_url);
|
||||
```c++
|
||||
// Update the game textures
|
||||
QString textures_url = "https://MyBadassGame.com/textures.json"
|
||||
QSimpleUpdater::getInstance()->setModuleName (textures_url, "textures");
|
||||
QSimpleUpdater::getInstance()->setModuleVersion (textures_url, "0.4");
|
||||
QSimpleUpdater::getInstance()->checkForUpdates (textures_url);
|
||||
|
||||
// Update the game sounds
|
||||
QString sounds_url = "http://MyBadassGame.com/sounds.json"
|
||||
QSimpleUpdater::getInstance()->setModuleName (sounds_url, "sounds");
|
||||
QSimpleUpdater::getInstance()->setModuleVersion (sounds_url, "0.6");
|
||||
QSimpleUpdater::getInstance()->checkForUpdates (sounds_url);
|
||||
// Update the game sounds
|
||||
QString sounds_url = "https://MyBadassGame.com/sounds.json"
|
||||
QSimpleUpdater::getInstance()->setModuleName (sounds_url, "sounds");
|
||||
QSimpleUpdater::getInstance()->setModuleVersion (sounds_url, "0.6");
|
||||
QSimpleUpdater::getInstance()->checkForUpdates (sounds_url);
|
||||
|
||||
// Update the client (name & versions are already stored in qApp)
|
||||
QString client_url = "http://MyBadassGame.com/client.json"
|
||||
QSimpleUpdater::getInstance()->checkForUpdates (client_url);
|
||||
// Update the client (name & versions are already stored in qApp)
|
||||
QString client_url = "https://MyBadassGame.com/client.json"
|
||||
QSimpleUpdater::getInstance()->checkForUpdates (client_url);
|
||||
```
|
||||
|
||||
## License
|
||||
QSimpleUpdater is free and open-source software, it is released under the [DBAD](COPYING.md) license.
|
||||
|
Loading…
Reference in New Issue
Block a user