-
-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add general packaging script
- Loading branch information
Showing
156 changed files
with
12,854 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Submodule QSimpleUpdater
deleted from
9da294
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# DON'T BE A DICK PUBLIC LICENSE | ||
|
||
> Version 1, December 2009 | ||
> Copyright (C) 2009 Philip Sturgeon <me@philsturgeon.uk> | ||
Everyone is permitted to copy and distribute verbatim or modified | ||
copies of this license document, and changing it is allowed as long | ||
as the name is changed. | ||
|
||
> DON'T BE A DICK PUBLIC LICENSE | ||
> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
1. Do whatever you like with the original work, just don't be a dick. | ||
|
||
Being a dick includes - but is not limited to - the following instances: | ||
|
||
1a. Outright copyright infringement - Don't just copy this and change the name. | ||
1b. Selling the unmodified original with no work done what-so-ever, that's REALLY being a dick. | ||
1c. Modifying the original work to contain hidden harmful content. That would make you a PROPER dick. | ||
|
||
2. If you become rich through modifications, related works/services, or supporting the original work, | ||
share the love. Only a dick would make loads off this work and not buy the original work's | ||
creator(s) a pint. | ||
|
||
3. Code is provided with no warranty. Using somebody else's code and bitching when it goes wrong makes | ||
you a DONKEY dick. Fix the problem yourself. A non-dick would submit the fix back. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# | ||
# Copyright (c) 2014-2016 Alex Spataru <alex_spataru@outlook.com> | ||
# | ||
# This file is part of the QSimpleUpdater library, which is released under | ||
# the DBAD license, you can read a copy of it below: | ||
# | ||
# DON'T BE A DICK PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION | ||
# AND MODIFICATION: | ||
# | ||
# Do whatever you like with the original work, just don't be a dick. | ||
# Being a dick includes - but is not limited to - the following instances: | ||
# | ||
# 1a. Outright copyright infringement - Don't just copy this and change the | ||
# name. | ||
# 1b. Selling the unmodified original with no work done what-so-ever, that's | ||
# REALLY being a dick. | ||
# 1c. Modifying the original work to contain hidden harmful content. | ||
# That would make you a PROPER dick. | ||
# | ||
# If you become rich through modifications, related works/services, or | ||
# supporting the original work, share the love. | ||
# Only a dick would make loads off this work and not buy the original works | ||
# creator(s) a pint. | ||
# | ||
# Code is provided with no warranty. Using somebody else's code and bitching | ||
# when it goes wrong makes you a DONKEY dick. | ||
# Fix the problem yourself. A non-dick would submit the fix back. | ||
|
||
QT += gui | ||
QT += core | ||
QT += network | ||
QT += widgets | ||
|
||
INCLUDEPATH += $$PWD/include | ||
|
||
SOURCES += \ | ||
$$PWD/src/Updater.cpp \ | ||
$$PWD/src/Downloader.cpp \ | ||
$$PWD/src/QSimpleUpdater.cpp | ||
|
||
HEADERS += \ | ||
$$PWD/include/QSimpleUpdater.h \ | ||
$$PWD/src/Updater.h \ | ||
$$PWD/src/Downloader.h | ||
|
||
FORMS += $$PWD/src/Downloader.ui | ||
RESOURCES += $$PWD/etc/resources/qsimpleupdater.qrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# Copyright (c) 2014-2016 Alex Spataru <alex_spataru@outlook.com> | ||
# | ||
# This file is part of the QSimpleUpdater library, which is released under | ||
# the DBAD license, you can read a copy of it below: | ||
# | ||
# DON'T BE A DICK PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION | ||
# AND MODIFICATION: | ||
# | ||
# Do whatever you like with the original work, just don't be a dick. | ||
# Being a dick includes - but is not limited to - the following instances: | ||
# | ||
# 1a. Outright copyright infringement - Don't just copy this and change the | ||
# name. | ||
# 1b. Selling the unmodified original with no work done what-so-ever, that's | ||
# REALLY being a dick. | ||
# 1c. Modifying the original work to contain hidden harmful content. | ||
# That would make you a PROPER dick. | ||
# | ||
# If you become rich through modifications, related works/services, or | ||
# supporting the original work, share the love. | ||
# Only a dick would make loads off this work and not buy the original works | ||
# creator(s) a pint. | ||
# | ||
# Code is provided with no warranty. Using somebody else's code and bitching | ||
# when it goes wrong makes you a DONKEY dick. | ||
# Fix the problem yourself. A non-dick would submit the fix back. | ||
|
||
TEMPLATE = lib | ||
DEFINES += QSU_SHARED | ||
include ($$PWD/QSimpleUpdater.pri) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# QSimpleUpdater | ||
|
||
[![Build Status](https://img.shields.io/travis/alex-spataru/QSimpleUpdater.svg?style=flat-square)](https://travis-ci.org/alex-spataru/QSimpleUpdater) | ||
[![Donate button](https://img.shields.io/badge/bitcoin-donate-brightgreen.svg?style=flat-square)](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?style=flat-square)](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-section) for more information. | ||
|
||
Online documentation can be found [here](http://frc-utilities.github.io/documentation/qsimpleupdater/). | ||
|
||
[![Downloading](etc/screenshots/downloading.png)](etc/screenshots/) | ||
|
||
## Integrating QSimpleUpdater with your projects | ||
1. Copy the QSimpleUpdater folder in your "3rd-party" folder. | ||
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 Section | ||
|
||
### 1. How does the QSimpleUpdater check for updates? | ||
|
||
The QSimpleUpdater downloads an update definition file stored in JSON format. This file specifies the latest version, the download links and changelogs for each platform (you can also register your own platform easily if needed). | ||
|
||
After downloading this file, the library analyzes the local version and the remote version. If the remote version is greater than the local version, then the library infers that there is an update available and notifies the user. | ||
|
||
An example update definition file can be found [here](https://github.com/alex-spataru/QSimpleUpdater/blob/master/tutorial/definitions/updates.json). | ||
|
||
### 2. Can I customize the update notifications shown to the user? | ||
|
||
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. | ||
|
||
```c++ | ||
QString url = "https://MyBadassApplication.com/updates.json"; | ||
|
||
QSimpleUpdater::getInstance()->setNotifyOnUpdate (url, true); | ||
QSimpleUpdater::getInstance()->setNotifyOnFinish (url, false); | ||
|
||
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: | ||
```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? | ||
|
||
The QSimpleUpdater allows you to use different updater instances, which can be accessed with the URL of the update definitions. | ||
While it is not obligatory to use multiple updater instances, this can be useful for applications that make use of plugins or different modules. | ||
|
||
Say that you are developing a game, in this case, you could use the following code: | ||
|
||
```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 = "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 = "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. |
Oops, something went wrong.