/wpfUpdater

Server in php and library in C# to check for program updates

Primary LanguageC#

CsUpdater
---------

CsUpdater is a dll that checks for updates for a program.
To use it you need to install the server on a web server.

Server installation:
--------------------
-Set the db host, name, user and password in the file opendb.php
-Create on the MySql database the table "updater_applications" (you can find the create statement in the file db/db_create.txt)
-Copy the server folder to a web server
-Insert into the database table the row containing the informations on the program (there's no web page to do this, just use an insert statement)

Client usage:
-------------
-Link CsUpdater.dll to your project.
-Create an instance of Updater:
  m_Updater = new Updater(new Uri("url_to_updater.php"), "ProgramName", "ProgramPlatform");

-If you want an incremental changelog (including all changelogs from the current version to the newest one) set the current version number:
  m_Updater.AppCurrentVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();

-Set the delegate:
  m_Updater.CheckCompletedDelegate += CheckCompleted;

-Check for updates:
  m_Updater.Check();

-In the delegate do what you need ;)
    private void CheckCompleted(UpdaterApp app)
    {
      m_App = app;
      if (m_App != null && m_App.Version > Assembly.GetExecutingAssembly().GetName().Version)
        ...
      }
    }