112 lines
9.9 KiB
HTML
112 lines
9.9 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.11"/>
|
|
<title>QSimpleUpdater: Introduction</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { init_search(); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="icon.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">QSimpleUpdater
|
|
</div>
|
|
<div id="projectbrief">A simple auto-updater system for Qt applications</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.11 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li class="current"><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">Introduction </div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><p><a class="el" href="class_q_simple_updater.html" title="Manages the updater instances. ">QSimpleUpdater</a> 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 <a class="el" href="class_q_simple_updater.html" title="Manages the updater instances. ">QSimpleUpdater</a> allows you to check for updates for different "modules" of your application. Check the WTFs for more information.</p>
|
|
<h2>Integrating <a class="el" href="class_q_simple_updater.html" title="Manages the updater instances. ">QSimpleUpdater</a> with your projects</h2>
|
|
<ol type="1">
|
|
<li>Copy the <a class="el" href="class_q_simple_updater.html" title="Manages the updater instances. ">QSimpleUpdater</a> folder in your "3rd-party" folder.</li>
|
|
<li>Include the <a class="el" href="class_q_simple_updater.html" title="Manages the updater instances. ">QSimpleUpdater</a> project include (<em>pri</em>) file using the include() function.</li>
|
|
<li>That's all! Check the tutorial project as a reference for your project.</li>
|
|
</ol>
|
|
<h2>WTFs Section</h2>
|
|
<h3>1. How does the <a class="el" href="class_q_simple_updater.html" title="Manages the updater instances. ">QSimpleUpdater</a> check for updates?</h3>
|
|
<p>The <a class="el" href="class_q_simple_updater.html" title="Manages the updater instances. ">QSimpleUpdater</a> 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).</p>
|
|
<p>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.</p>
|
|
<h3>2. Can I customize the update notifications shown to the user?</h3>
|
|
<p>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 <a class="el" href="class_q_simple_updater.html" title="Manages the updater instances. ">QSimpleUpdater</a>.</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> QString url = "https://MyBadassApplication.com/updates.json";</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> QSimpleUpdater::getInstance()->setNotifyOnUpdate (url, true);</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> QSimpleUpdater::getInstance()->setNotifyOnFinish (url, false);</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> QSimpleUpdater::getInstance()->checkForUpdates (url);</div></div><!-- fragment --><h3>3. Is the application able to download the updates directly?</h3>
|
|
<p>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:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> QString url = "https://MyBadassApplication.com/updates.json";</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> QSimpleUpdater::getInstance()->setDownloaderEnabled (url, true);</div></div><!-- fragment --><h3>4. Why do I need to specify an URL for each function of the library?</h3>
|
|
<p>The <a class="el" href="class_q_simple_updater.html" title="Manages the updater instances. ">QSimpleUpdater</a> 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.</p>
|
|
<p>Say that you are developing a game, in this case, you could use the following code:</p>
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> // Update the game textures</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> QString textures_url = "https://MyBadassGame.com/textures.json"</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> QSimpleUpdater::getInstance()->setModuleName (textures_url, "textures");</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> QSimpleUpdater::getInstance()->setModuleVersion (textures_url, "0.4");</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> QSimpleUpdater::getInstance()->checkForUpdates (textures_url);</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> </div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> // Update the game sounds</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> QString sounds_url = "https://MyBadassGame.com/sounds.json"</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> QSimpleUpdater::getInstance()->setModuleName (sounds_url, "sounds");</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> QSimpleUpdater::getInstance()->setModuleVersion (sounds_url, "0.6");</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> QSimpleUpdater::getInstance()->checkForUpdates (sounds_url);</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> // Update the client (name & versions are already stored in qApp)</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> QString client_url = "https://MyBadassGame.com/client.json"</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> QSimpleUpdater::getInstance()->checkForUpdates (client_url);</div></div><!-- fragment --><h2>License</h2>
|
|
<p><a class="el" href="class_q_simple_updater.html" title="Manages the updater instances. ">QSimpleUpdater</a> is free and open-source software, it is released under the Don't Be A Dick License. </p>
|
|
</div></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.11
|
|
</small></address>
|
|
</body>
|
|
</html>
|