一、元件簡介
GeneralUpdate是基于.net standard 開發的一款(c/s應用)自動更新程式。該元件将更新的核心部分抽離出來友善應用于多種項目當中目前适用于wpf,控制台應用,winfrom。
- 本元件(除Single元件僅支援Framework以外)均支援架構版本 .NET Framework 4.6.1 | .NET Core 2.0 | .NET 5
- 如果有任何使用問題可以在Github的issues上進行提問,每周會解決并解答bug或者問題。
- 每次疊代新版本doc檔案夾中的幫助文檔也會随之更新,各位開發者請多關注。
- 如果該元件能夠幫助到您,希望可以點個Strat和關注一下文檔末尾的聯系方式。您的支援是對開源作者的動力。
使用:
Gitee(碼雲)位址:
- https://gitee.com/Juster-zhu/GeneralUpdate
Nuget位址:
- https://www.nuget.org/packages/GeneralUpdate.Core/
- https://www.nuget.org/packages/GeneralUpdate.Single/
- https://www.nuget.org/packages/GeneralUpdate.Zip/
GitHub位址:
- Address:https://github.com/WELL-E/AutoUpdater/tree/autoupdate2
- Issues:https://github.com/WELL-E/AutoUpdater/issues
二、版本更新2021-3-18
(1)聲明
- 本元件将支援以下架構開發的應用程式。.NET Framework 4.6.1 | .NET Core 2.0 | .NET 5
- GeneralUpdate.Single元件目前僅支援wpf和.NET Framework架構。
(2)新增
- GeneralUpdate.Core-3.2.1版本,新增更新失敗復原功能。
- 新增了元件 GeneralUpdate.Zip-1.0.0,它将為程式帶來壓縮檔案和解壓壓縮包的功能且能獨立使用。
(3)修複、修改
- 修複事件多線程操作時,不通知問題。
- 元件的架構版本從.NET Framework4.5.2修改為.net standard 2.0。(支援架構參考:https://docs.microsoft.com/zh-cn/dotnet/standard/net-standard)
(4)移除
- 移除7zip第三方元件的依賴
- 移除RegistryUtil工具類
三、GeneralUpdate Quick start
args = new string[6] {
"0.0.0.0",
"1.1.1.1",
"https://github.com/WELL-E",
"http://192.168.50.225:7000/update.zip",
@"E:\PlatformPath",
"509f0ede227de4a662763a4abe3d8470",
};
GeneralUpdateBootstrap bootstrap = new GeneralUpdateBootstrap();
bootstrap.DownloadStatistics += OnDownloadStatistics;
bootstrap.ProgressChanged += OnProgressChanged;
bootstrap.Strategy<DefultStrategy>().
Option(UpdateOption.Format, "zip").
Option(UpdateOption.MainApp, "your application name").
Option(UpdateOption.DownloadTimeOut,60).
RemoteAddress(args).
Launch();