欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

GeneralUpdate 2021.08.14更新公告

发布时间:2023/12/4 52 豆豆
生活随笔 收集整理的这篇文章主要介绍了 GeneralUpdate 2021.08.14更新公告 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

GeneralUpdate是基于.net standard2.0开发的一款(c/s应用)自动升级程序。该组件将更新的核心部分抽离出来方便应用于多种项目当中目前适用于wpf,控制台应用,winfrom。

1.Notice

  • 预计会使用Blazor开发GeneralUpdate官网,介绍组件结构、更新流程、快速启动、参数等内容。

  • 1.主程序启动时检测升级程序是否需要更新2.需要更新则把升级程序版本号上传并逐版本更新3.升级程序更完成后或不需要更新,则进行判断主程序是否需要更新如果需要更新则启动升级程序4.请求主程序更新版本5.请求到主版本多个更新包并逐版本更新6.更新完成后关闭升级程序启动主程序

  • 以上更新、下载过程均支持断点续传和逐版本更新。

  • 逐版本下载功能是根据版本发布时间进行排序的发布时间越早的版本越先更新(具体信息见源码中的sql脚本字段内容)。

  • 逐版本下载的更新包最大测试过1G更新内容。

2.Nuget

  • (New)https://www.nuget.org/packages/GeneralUpdate.Common/

  • (New)https://www.nuget.org/packages/GeneralUpdate.ClientCore/

  • (New)https://www.nuget.org/packages/GeneralUpdate.AspNetCore/

  • https://www.nuget.org/packages/GeneralUpdate.Zip/

  • https://www.nuget.org/packages/GeneralUpdate.Single/

  • (Update)https://www.nuget.org/packages/GeneralUpdate.Core/

3.Issues & Git 、Gitee

欢迎在以下地址提出issues提出时尽可能的描述清楚异常发生的原因或缺陷详情,check周期为每周的周五。

  • https://gitee.com/Juster-zhu/GeneralUpdate

  • https://github.com/WELL-E/AutoUpdater/tree/autoupdate2

  • https://github.com/WELL-E/AutoUpdater/issues

  • https://gitee.com/Juster-zhu/GeneralUpdate/issues

4.New

  • GeneralUpdate.Core添加逐版本更新功能

  • GeneralUpdate.Core新增事件ExceptionEvent、MutiDownloadStatisticsEvent、MutiDownloadErrorEvent、MutiDownloadCompletedEvent、MutiDownloadProgressEvent、MutiAllDownloadCompletedEvent。

  • GeneralUpdate.Core新增RemoteAddressBase64方法。

  • 新增ClientParameter类,用于组件之间进程通讯传递参数。

  • 新增组件GeneralUpdate.AspNetCore,具有根据升级类型返回更新版本信息的功能并支持管道依赖注入使用,但需要自己编写查库的方法。

  • 新增组件GeneralUpdate.ClientCore,

    • (1)具有更新升级组件版本功能(更新程序更新自己)

    • (2)支持升级组件的逐版本更新(多更新包同时下载)

    • (3)便捷启动升级程序,摆脱之前的繁琐进程启动和传参。

  • 新增组件GeneralUpdate.Common 该库整合了组件内使用的所有公共类和辅助方法(该组件为必须组件,该组件更新频率非常低不推荐打包在更新包中)。

  • 新增mysql脚本,用于创建GeneralUpdate.AspNetCore服务端使用的update_version表。

5.Remove

  • 移除GeneralUpdate.Core中所有的通知事件替换为MutixxxxEvent.

  • 移除GeneralUpdate.Core中GeneralUpdateBootstrap启动中通过进程传递参数的方法RemoteAddress方法。

  • 移除更新失败版本回滚功能,该功能导致在C盘回滚更新时因权限不够发生致命异常问题,该功能考虑后续开放。

6.Fix

  • 修复https ssl访问失败问题。

  • 修复其他.net框架版本注册事件begininvoke通知异常问题。

  • 修改多处类名单词拼写错误问题。

  • 对若干Model类删除了不必要字段。

7.Quick Start

(1) Example GeneralUpdate.ClientCore

//Clinet version.var mainVersion = "1.1.1";var mianType = 1;//Updater versionclientParameter = new ClientParameter();clientParameter.ClientVersion = "1.1.1";clientParameter.ClientType = 2;clientParameter.AppName = "AutoUpdate.ConsoleApp";clientParameter.MainAppName = "AutoUpdate.Test";clientParameter.InstallPath = @"D:\update_test";clientParameter.UpdateLogUrl = "https://www.baidu.com/";clientParameter.ValidateUrl = $"https://127.0.0.1:5001/api/update/getUpdateValidate/{ clientParameter.ClientType }/{ clientParameter.ClientVersion }";clientParameter.UpdateUrl = $"https://127.0.0.1:5001/api/update/getUpdateVersions/{ clientParameter.ClientType }/{ clientParameter.ClientVersion }";clientParameter.MainValidateUrl = $"https://127.0.0.1:5001/api/update/getUpdateValidate/{ mianType }/{ mainVersion }";clientParameter.MainUpdateUrl = $"https://127.0.0.1:5001/api/update/getUpdateVersions/{ mianType }/{ mainVersion }";generalClientBootstrap = new GeneralClientBootstrap();generalClientBootstrap.MutiDownloadProgressChanged += OnMutiDownloadProgressChanged;generalClientBootstrap.MutiDownloadStatistics += OnMutiDownloadStatistics;generalClientBootstrap.MutiDownloadCompleted += OnMutiDownloadCompleted;generalClientBootstrap.MutiAllDownloadCompleted += OnMutiAllDownloadCompleted;generalClientBootstrap.MutiDownloadError += OnMutiDownloadError;generalClientBootstrap.Exception += OnException;generalClientBootstrap.Config(clientParameter).Strategy<ClientStrategy>();await generalClientBootstrap.LaunchTaskAsync();

(2) Example GeneralUpdate.Core

static void Main(string[] args){var resultBase64 = args[0];var bootstrap = new GeneralUpdateBootstrap();bootstrap.Exception += OnException;bootstrap.MutiDownloadError += OnMutiDownloadError;bootstrap.MutiDownloadCompleted += OnMutiDownloadCompleted;bootstrap.MutiDownloadStatistics += OnMutiDownloadStatistics;bootstrap.MutiDownloadProgressChanged += OnMutiDownloadProgressChanged;bootstrap.MutiAllDownloadCompleted += OnMutiAllDownloadCompleted;bootstrap.Strategy<DefaultStrategy>().Option(UpdateOption.DownloadTimeOut, 60).RemoteAddressBase64(resultBase64).LaunchAsync();}

(3) Example GeneralUpdate.AspNetCore

Startup.cspublic void ConfigureServices(IServiceCollection services){services.AddControllers();services.AddSingleton<IUpdateService, GeneralUpdateService>();}UpdateController.csprivate readonly ILogger<UpdateController> _logger;private readonly IUpdateService _updateService;public UpdateController(ILogger<UpdateController> logger, IUpdateService updateService){_logger = logger;_updateService = updateService;}/// <summary>/// https://localhost:5001/api/update/getUpdateVersions/1/1.1.1/// </summary>/// <param name="clientType"> 1:ClientApp 2:UpdateApp</param>/// <param name="clientVersion"></param>/// <returns></returns>[HttpGet("getUpdateVersions/{clientType}/{clientVersion}")]public async Task<IActionResult> GetUpdateVersions(int clientType, string clientVersion){_logger.LogInformation("Client request 'GetUpdateVersions'.");var resultJson = await _updateService.UpdateVersionsTaskAsync(clientType, clientVersion, UpdateVersions);return Ok(resultJson);}/// <summary>/// https://localhost:5001/api/update/getUpdateValidate/1/1.1.1/// </summary>/// <param name="clientType"> 1:ClientApp 2:UpdateApp</param>/// <param name="clientVersion"></param>/// <returns></returns>[HttpGet("getUpdateValidate/{clientType}/{clientVersion}")]public async Task<IActionResult> GetUpdateValidate(int clientType, string clientVersion){_logger.LogInformation("Client request 'GetUpdateValidate'.");var lastVersion = GetLastVersion();var resultJson = await _updateService.UpdateValidateTaskAsync(clientType, clientVersion, lastVersion, true, GetValidateInfos);return Ok(resultJson);}

8.Recruit

  • (1)招募志同道合的小伙伴一起参加GeneralUpdate组件开源。

  • (2)招募设计师,为GeneralUpdate组件设计logo。该招募为付费招募价格、耗时由设计者定。

  • 以上有意向的小伙伴可以通过邮件联系zhuzhen723723@outlook.com

设计需求如下

需求一:

使用场景,博客、微信公众号、微信、QQ的头像。尺寸:200X200 或 300 X 300 文件格式:jpg 元素:宇航员、宇宙、飞船一类。寓意:在编程的技术里探索。参考内容:https://www.douban.com/note/688440600/

需求二:

使用场景:自动更新软件图标。文件格式、尺寸:(icon 4545)、(jpg 300300) 元素:不限、更新。寓意:现代化、极简、自动、更新。软件名称:GeneralUpdate

总结

以上是生活随笔为你收集整理的GeneralUpdate 2021.08.14更新公告的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。