Giter VIP home page Giter VIP logo

sharpupdate's Introduction

SharpUpdate

SharpUpdate is written in C#. It reads a xml file on the server that contains update information such as version, MD5, and update log, download the update, close the current app, and open the updated app in 5 seconds.

[Note 1] This is used and further improved in the project SimpeEpub2. The improved version supports DotNetBar UI framework, multilingual UI, high DPI etc. If interested, please check out SimpleEpub2 by visiting https://github.com/henryxrl/SimpleEpub2

[Note 2] To create the xml file automatically (i.e, a UI for user-input update log, update date filled automatically, MD5 checked automatically etc), please check out "GenereateUpdateXML" project, which is a sub project under "SimpleEpub2".

Update History

Update 2018-10-07

  • Support for updating multiple files
  • Support three types of update jobs:
    1. Update: replace the older version local file by the newer version from the server
    2. Add: download a file from the server
    3. Remove: remove a local file

How to use?

WinForms

For example, in a simple WinForms class, simply add:

public partial class Form1 : Form
{
    private SharpUpdater updater;

    public Form1()
    {
        InitializeComponent();

        updater = new SharpUpdater(Assembly.GetExecutingAssembly(), this, new Uri("update-xml-location"));
    }

    private void button1_Click(object sender, EventArgs e)
    {
        updater.DoUpdate();
    }
}

XML

For details on the xml on the server with update information, please check out the sample "project.xml". A basic structure is as following:

<?xml version="1.0"?> 
<sharpUpdate> 
    <update> 
        <version></version> 
        <url></url> 
        <filePath></filePath>
        <md5></md5>
        <description></description> 
        <launchArgs></launchArgs> 
    </update>
    
    <add> 
        <version></version> 
        <url></url> 
        <filePath></filePath>
        <md5></md5>
        <description></description> 
        <launchArgs></launchArgs> 
    </add>
    
    <remove>
        <filePath></filePath>
        <description></description> 
        <launchArgs></launchArgs> 
    </remove>
</sharpUpdate>

Acknowledgments

SharpUpdate is modified from AutoUpdater by BetterCoder on Youtube. His tutorial can be found here: http://goo.gl/n7btY

sharpupdate's People

Contributors

henryxrl avatar

Watchers

James Cloos avatar Julio Manuel de Jesus Beltrán Meza avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.