<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Roland Li &#187; Programming</title>
	<atom:link href="http://www.rolandli.com/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://www.rolandli.com</link>
	<description>Designer + Coder</description>
	<lastBuildDate>Mon, 06 Sep 2010 19:18:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Portfolio Updated</title>
		<link>http://www.rolandli.com/2009/09/30/portfolio-updated</link>
		<comments>http://www.rolandli.com/2009/09/30/portfolio-updated#comments</comments>
		<pubDate>Wed, 30 Sep 2009 17:28:10 +0000</pubDate>
		<dc:creator>rolandli</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.rolandli.com/?p=566</guid>
		<description><![CDATA[It&#8217;s been a couple busy months. I just added two slides into the Portfolio section. They are from the projects I have been working on recently.  SugarCRM customization and a crawler for SEO purposes.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a couple busy months. I just added two slides into the <a title="Portfolio" href="http://www.rolandli.com/portfolio">Portfolio</a> section. They are from the projects I have been working on recently.  SugarCRM customization and a crawler for SEO purposes.</p>
<p style="text-align: center;"><a href="http://www.rolandli.com/portfolio"><img class="img_border aligncenter" title="Portfolio Page" src="http://www.rolandli.com/wp-content/uploads/2009/09/portfolio_page.png" alt="Portfolio Page" width="600" height="406" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rolandli.com/2009/09/30/portfolio-updated/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Qt with OpenSSL</title>
		<link>http://www.rolandli.com/2009/05/22/building-qt-with-openssl</link>
		<comments>http://www.rolandli.com/2009/05/22/building-qt-with-openssl#comments</comments>
		<pubDate>Fri, 22 May 2009 17:28:53 +0000</pubDate>
		<dc:creator>rolandli</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://www.rolandli.com/?p=527</guid>
		<description><![CDATA[A project I&#8217;ve been working on requires the ability to visit SSL sites (sites with https in the URL). So I had to rebuild Qt with OpenSSL support since by default Qt does not have SSL. After a few failure, here are the steps. Please not this is for Qt 4.5 only: 1. If you [...]]]></description>
			<content:encoded><![CDATA[<p>A project I&#8217;ve been working on requires the ability to visit SSL sites (sites with https in the URL). So I had to rebuild Qt with OpenSSL support since by default Qt does not have SSL.</p>
<p>After a few failure, here are the steps. Please not this is for Qt 4.5 only:</p>
<p>1. If you don&#8217;t have Qt already, go download it at http://www.qtsoftware.com/downloads</p>
<p>2. Download OpenSSL here http://www.openssl.org/source/You can build it by following the instructions or get the binaries.</p>
<p>3. In command line, go to your Qt folder, configure the build with</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">configure -openssl -I:path_to_openssl_include_folder -L:path_to_openssl_library_folder</pre></div></div>

<p>If you want the OpelSSL libraries linked, use &#8220;-openssl-link&#8221; instead.</p>
<p>4. Then you can start compiling with &#8220;make&#8221; or &#8220;nmake&#8221; depending on your OS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rolandli.com/2009/05/22/building-qt-with-openssl/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Implement an auto update system</title>
		<link>http://www.rolandli.com/2009/04/19/implement-an-auto-update-system</link>
		<comments>http://www.rolandli.com/2009/04/19/implement-an-auto-update-system#comments</comments>
		<pubDate>Sun, 19 Apr 2009 21:32:39 +0000</pubDate>
		<dc:creator>rolandli</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[auto]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.rolandli.com/?p=396</guid>
		<description><![CDATA[Auto update is widely used in modern software development. It simplifies and speeds up product upgrade to enhance features and fix problems. I have been working on an application which is still in alpha version and testers need to update it incrementally and frequently. The testers are not computer professionals, so I have to make [...]]]></description>
			<content:encoded><![CDATA[<p>Auto update is widely used in modern software development. It simplifies and speeds up product upgrade to enhance features and fix problems. I have been working on an application which is still in alpha version and testers need to update it incrementally and frequently. The testers are not computer professionals, so I have to make the update process as easy as possible. Below is the basic design and code. The toolkit that&#8217;s being used is QT 4.5. But the concept is universal.</p>
<p>To design such system, the following steps are considered:</p>
<ol>
<li>A server that contains the latest version and a list of updated files.</li>
<li>The application should connect to the server to retrieve the list and compare the versions.</li>
<li>If there is a new version, download the updated files to replace the new ones.</li>
<li>Clean up.</li>
</ol>
<p>Let&#8217;s work on it step-by-step. To save space, I will only post relevant code:<br />
<span id="more-396"></span></p>
<h3>1. Server Side</h3>
<p>The directory set up is as the following:<br />
<img src="http://www.rolandli.com/wp-content/uploads/2009/04/dir-structure-thumb.jpg" alt="dir_structure" title="dir_structure" width="375" height="182" class="size-full wp-image-418" /><br />
I used an XML file <em>latest.xml</em> to store the version and file list. It&#8217;s pretty self-explanatory.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #00bbdd;">&lt;!DOCTYPE XML&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;appname<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;0.5.1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;files<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;app.exe&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;some.dll&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;file</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;another.dll&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/files<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/appname<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.rolandli.com/2009/04/19/implement-an-auto-update-system/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
