github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

seboslaw / wmautoupdate

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 4
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

An auto-update application framework for the .NET Compact Framework — Read more

  cancel

http://www.earlybirdapplications.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

rc1 
seboslaw (author)
Mon Sep 21 12:46:13 -0700 2009
commit  a667bf6baabd0fff1566cb9527119df751833888
tree    f0f31228bde28b1a616e57023d8aef1a768fd17f
parent  5c853b6a5c1dc043b02289ead4f2b9ddf6ee4391
wmautoupdate /
name age
history
message
file README Mon Sep 21 12:46:13 -0700 2009 rc1 [seboslaw]
directory example/ Mon Sep 21 12:46:13 -0700 2009 rc1 [seboslaw]
directory lib/ Mon Sep 21 12:46:13 -0700 2009 rc1 [seboslaw]
README
WmAutoUpdate
============
WmAutoUpdate is an auto-update application framework, which can be used in .NET Compact Framework applications.

Usage
============
Consider the example folder for a simple example of how to use the framework. The application simply consists of a form, 
which displays the string "old Version".

  static void Main()
    {
      Updater updater = new Updater("http://www.myupdateurl.com/update.xml");
      updater.CheckForNewVersion();

      Application.Run(new Form1());
    }
  
Upon start, the WmAutoUpdate framework kicks in and downloads the XML file "update.xml" from the update server. The 
update.xml file looks as follows:

  <?xml version="1.0" encoding="utf-8" ?> 
  <updates>
    <download name="WmAutoUpdateExample">
      <version maj="3" min="0" bld="0000"/>
      <message>Important Update. My very important release/update note. This will be displayed within the Update 
      Form</message>
      <link>http://www.myupdateurl.com/update.zip</link>
    </download>
  </updates>

Pretty self-explanatory. Afterwards, the user can choose whether to update now, or skip the update for now. If the 
former is chosen, the file described in the "link" tag is downloaded and unpacked into a temporary folder (Unpacking is 
facilitated through the http://www.codeplex.com/DotNetZip lib).
Next, these files are moved from the temporary folder into the application folder, replacing the outdated files (the 
outdated files are copied into a backup folder, beforehand). If everything goes well, WmAutoUpdate creates a file called 
"success" within the backup folder. Lastly, the application is restarted (right now this is implemented via a call to 
CeRunAppAtTime; Unfortunately, the minimum time-frame this function accepts is 11 seconds. Thus, it will take 11 secs 
for your app to restart). Upon restart WmAutoUpdate checks for the "success" file within the backup folder. If found, 
the entire backup folder is deleted. If not, all files within the backup folder are copied back into the application 
folder (rollback).
 
Both update.zip (which simply contains the same application, but with a form saying "new Version" and the Assembly 
Version set to 3.0.0) and update.xml can be found in the "Server Files" directory within the example folder. Both files 
need to be put into the according server web directory.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server