Auto_updater.auto-update-desktop
1.0.0
dotnet add package Auto_updater.auto-update-desktop --version 1.0.0
NuGet\Install-Package Auto_updater.auto-update-desktop -Version 1.0.0
<PackageReference Include="Auto_updater.auto-update-desktop" Version="1.0.0" />
<PackageVersion Include="Auto_updater.auto-update-desktop" Version="1.0.0" />
<PackageReference Include="Auto_updater.auto-update-desktop" />
paket add Auto_updater.auto-update-desktop --version 1.0.0
#r "nuget: Auto_updater.auto-update-desktop, 1.0.0"
#:package Auto_updater.auto-update-desktop@1.0.0
#addin nuget:?package=Auto_updater.auto-update-desktop&version=1.0.0
#tool nuget:?package=Auto_updater.auto-update-desktop&version=1.0.0
Auto Update Library
To use it create instance of the AutoUpdater
class and pass instance of the ApplicationInfo
to the constructor. ApplicationInfo
class has following properties that must be provided during object creation:
ApplicationAssembly
ApplicationIcon
ApplicationId
ApplicationName
UpdateXmlLocation
ApplicationId
must match with the appId
provided in the update.xml
described later in this text, while ApplicationName
is used in the update UI to state which application is updated. UpdateXmlLocation
is Uri
object that contains url to the manifest file.
AutoUpdater
class has two public methods, CheckForUpdate*
and DoUpdate
. Both do not take any parameters.
CheckForUpdate
checks if there is update for the application at the provided url in the ApplicationInfo
.
DoUpdate
, that actually updates application by downloading files from the url specified in the update.xml
in the url
tag. It downloads files over HTTP so HTTP file server is needed as described in the following section.
Example usage:
AutoUpdater update = new AutoUpdater(new ApplicationInfo
{
ApplicationAssembly = Assembly.GetExecutingAssembly(),
ApplicationIcon = null,
ApplicationId = "app",
ApplicationName = "App",
UpdateXmlLocation = new Uri("http://127.0.0.1:8080/manifest/app/update.xml")
});
if (update.CheckForUpdate())
update.DoUpdate();
Update Server and Update manifest generator
Update server is currently used to generate update.xml
file which is later used to compare application version and files. This file can be written manually as well just make sure that it has following structure.
<?xml version="1.0" encoding="UTF-8"?>
<AutoUpdate>
<update appId="appID">
<version value="1.2.3" />
<url value="path to the app's update directory" />
<exe value="name of the exe file to be launched after install" />
<description value="about app" />
<launchArgs value="launch arguments" />
<directory name="root">
<directory name="dir name">
<directory name="dir name">
<file name="file name" md5="ddc36f7deac22766a012bef7442dbf9a" />
<file name="file name" md5="0f4db4016badbd2995f7a216f76173f4" />
<file name="file name" md5="679bf008d7dcccdd8d4c72316ca9c189" />
</directory>
<directory name="dir name">
<directory name="dir name" />
<directory name="dir name" />
<directory name="dir name" />
</directory>
<file name="file name" md5="d4879237ba9d9bb4859e33b0b1742cef" />
<file name="file name" md5="e0c5adf8e536b6663a2bad267bf6dffc" />
</directory>
</directory>
</update>
</AutoUpdate>
As HTTP file server HFS is used. Setup it and provide its URI to the AutoUpdate
class through ApplicationInfo
class.
Complete documentation can be found at: documentation. Download page: download.
Manifest generator tool download page: GitHub.
You are ready to go!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0 | 1,968 | 12/2/2017 |