diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index 6a7b8add3c4679d0d8a508402253d0ceafed473c..0000000000000000000000000000000000000000
Binary files a/.DS_Store and /dev/null differ
diff --git a/README.md b/README.md
index 373eeb006bbacc2f39c63c422b5aad109f44c200..4dbdf8fc5e785f22d3d03fe0a588c5e62d80c53d 100644
--- a/README.md
+++ b/README.md
@@ -9,23 +9,15 @@
### 组件介绍 ###
-GeneralUpdate是基于.net standard开发的一款(c/s应用)自动升级程序。该组件将更新的核心部分抽离出来方便应用于多种项目当中目前适用于wpf,控制台应用,winfrom。
+GeneralUpdate是立志于成为全平台更新客户端的框架,提供高性能低损耗,断点续传、逐版本更新、二进制差分更新、增量更新功能、配置文件保留更新等特性。
### 支持框架
-理论支撑:https://docs.microsoft.com/zh-cn/dotnet/standard/net-standard
-
-| 框架名称 | 是否支持 |
-| ------------------------------------- | ---------------- |
-| .NET Core 2.0 | 支持 |
-| .NET 5 6 7 | 支持 |
-| .NET Framework 4.6.1 | 支持 |
-| Mono 5.4 | 理论支持,未验证 |
-| Xamarin.iOS | 理论支持,未验证 |
-| Xamarin.Mac | 理论支持,未验证 |
-| Xamarin.Android | 理论支持,未验证 |
-| Universal Windows Platform 10.0.16299 | 理论支持,未验证 |
-| Unity 2018.1 | 理论支持,未验证 |
+| 框架名称 | 是否支持 |
+| -------------------- | -------- |
+| .NET Core 2.0 | 支持 |
+| .NET 5 6 7 | 支持 |
+| .NET Framework 4.6.1 | 支持 |
| UI框架名称 | 是否支持 |
| ----------------- | ----------------------------- |
@@ -35,48 +27,22 @@ GeneralUpdate是基于.net standard开发的一款(c/s应用)自动升级程
| Avalonia | 未验证,等待反馈 |
| WinUI | 未验证,等待反馈 |
| Console(控制台) | 支持 |
+| winform | 支持 |
### 操作系统
| 操作系统名称 | 是否支持 |
| ------------ | -------- |
| Windows | 支持 |
-| Linux | 未验证 |
-| Mac | 未验证 |
+| Linux | 支持 |
+| Mac | 支持 |
| iOS | 暂不支持 |
| Android | 暂不支持 |
-### 功能介绍 ###
-
-- GeneralUpdate.Core:断点续传、逐版本更新。
-- GeneralUpdate.ClientCore:断点续传、逐版本更新、更新组件自更新、便捷启动更新组件
-- GeneralUpdate.AspNetCore:服务端支持更新包下载地址、版本信息等内容。
-- GeneralUpdate.Zip:解压更新包、解压进度通知。
-- GeneralUpdate.Single:应用程序单例运行。
-- GeneralUpdate.Common:组件公共类、方法。
-- 源码"sql"目录下包含mysql数据库表内容的生成脚本。
-
### 帮助文档 ###
- 讲解视频: https://www.bilibili.com/video/BV1aX4y137dd
- 官方网站: http://justerzhu.cn/
-### 讨论组 ###
-GeneralUpdate开源项目讨论QQ群:748744489
-
-.Net技术讨论QQ群:580749909
-
### 开源地址 ###
- https://github.com/WELL-E/AutoUpdater
- https://gitee.com/Juster-zhu/GeneralUpdate
-
-### 更新流程图 ###
-
-
-### 运行效果及更新流程展示 ###
-
-
-## 支持作者 ###
-
-作者:Juster.zhu & Charles.Yu
-
-
\ No newline at end of file
diff --git a/README_en.md b/README_en.md
index ae4f3ad895b5d32961bd447cbef87c4d66f30048..ae98129133bd093a3ed7535de992ddf1bfc8a8ec 100644
--- a/README_en.md
+++ b/README_en.md
@@ -6,23 +6,15 @@
### Component is introduced ###
-GeneralUpdate is an automatic update program (c/s application) developed based on .net standard. This component extracts the core part of the update for easy application in a variety of projects. Currently, it is suitable for wpf, console applications, and winfrom.
+GeneralUpdate is a framework that aims to become a full-platform update client, providing high performance and low loss, breakpoint resuming, version-by-version update, binary differential update, incremental update function, configuration file retention update and other features.
### Support frame
-theoretical support :https://docs.microsoft.com/zh-cn/dotnet/standard/net-standard
-
-| frame name | support |
-| ------------------------------------- | --------------------------------- |
-| .NET Core 2.0 | yes |
-| .NET 5 6 7 | yes |
-| .NET Framework 4.6.1 | yes |
-| Mono 5.4 | theoretical support, not verified |
-| Xamarin.iOS | theoretical support, not verified |
-| Xamarin.Mac | theoretical support, not verified |
-| Xamarin.Android | theoretical support, not verified |
-| Universal Windows Platform 10.0.16299 | theoretical support, not verified |
-| Unity 2018.1 | theoretical support, not verified |
+| frame name | support |
+| -------------------- | ------- |
+| .NET Core 2.0 | yes |
+| .NET 5 6 7 | yes |
+| .NET Framework 4.6.1 | yes |
| UI frame name | support |
| ------------- | ----------------------------------- |
@@ -32,44 +24,22 @@ theoretical support :https://docs.microsoft.com/zh-cn/dotnet/standard/net-stan
| Avalonia | theoretical support, not verified |
| WinUI | theoretical support, not verified |
| Console | yes |
+| winform | yes |
### System
| System name | support |
| ----------- | ------- |
| Windows | yes |
-| Linux | unknow |
-| Mac | unknow |
+| Linux | yes |
+| Mac | yes |
| iOS | no |
| Android | no |
-### Function is introduced ###
-
-- GeneralUpdate.Core:Breakpoint continuation, version by version update.
-- GeneralUpdate.ClientCore:Breakpoint continuation, version-by-version update, update component self-update, easy to start update components.
-- GeneralUpdate.AspNetCore:The server supports updating the download address and version of the package.
-- GeneralUpdate.Zip:Decompress the update package and progress notification.
-- GeneralUpdate.Single:Application singletons run.
-- GeneralUpdate.Common:Component public classes, methods.
-- Source "SQL" directory contains mysql database table content generation script.
-
### Help document ###
- Interpretation of the video: https://www.bilibili.com/video/BV1aX4y137dd
- The official website: http://justerzhu.cn/
-### Discussion groups ###
-GeneralUpdate QQ Group:748744489
-
### Open source address ###
- https://github.com/WELL-E/AutoUpdater
- https://gitee.com/Juster-zhu/GeneralUpdate
-
-### Update flow chart ###
-
-
-### Operation effect and update process display ###
-
-
-## Author ###
-
-Juster.zhu & Charles.Yu
diff --git a/imgs/flow2.png b/imgs/flow2.png
deleted file mode 100644
index f31ca6cc26fce687d6a7d6139d23ffcd1eac3227..0000000000000000000000000000000000000000
Binary files a/imgs/flow2.png and /dev/null differ
diff --git a/imgs/hfs.jpg b/imgs/hfs.jpg
deleted file mode 100644
index 1a5a9dff99577c31aef67d194f229c80545f40c6..0000000000000000000000000000000000000000
Binary files a/imgs/hfs.jpg and /dev/null differ
diff --git a/imgs/money.jpg b/imgs/money.jpg
deleted file mode 100644
index 57e15e66d2e4d69c69689f69195f24e8435487d4..0000000000000000000000000000000000000000
Binary files a/imgs/money.jpg and /dev/null differ
diff --git a/imgs/nuget.jpg b/imgs/nuget.jpg
deleted file mode 100644
index 890d4df9bf5d7c34abebf9fe041ac107020bcd86..0000000000000000000000000000000000000000
Binary files a/imgs/nuget.jpg and /dev/null differ
diff --git a/imgs/run.jpg b/imgs/run.jpg
deleted file mode 100644
index 27c59241a57a9d492a787ab9dec2a6056dd60411..0000000000000000000000000000000000000000
Binary files a/imgs/run.jpg and /dev/null differ
diff --git a/imgs/support.jpg b/imgs/support.jpg
deleted file mode 100644
index 63cc7acae6150e006ab90cca49f7013bb7ff44b7..0000000000000000000000000000000000000000
Binary files a/imgs/support.jpg and /dev/null differ
diff --git a/src/.DS_Store b/src/.DS_Store
deleted file mode 100644
index 6b341cc74a9a2f41fa5612d37df80d81d0fd9505..0000000000000000000000000000000000000000
Binary files a/src/.DS_Store and /dev/null differ
diff --git a/src/.vs/GeneralUpdate/DesignTimeBuild/.dtbcache.v2 b/src/.vs/GeneralUpdate/DesignTimeBuild/.dtbcache.v2
index 61eee4ec08abf20b2f4428cb038c87ca93ebe6fd..a1aa46d7d5172af6a3b88386bff77b25eda2374d 100644
Binary files a/src/.vs/GeneralUpdate/DesignTimeBuild/.dtbcache.v2 and b/src/.vs/GeneralUpdate/DesignTimeBuild/.dtbcache.v2 differ
diff --git a/src/.vs/GeneralUpdate/FileContentIndex/4001e6b6-9667-4f6d-8a24-4c879be812fa.vsidx b/src/.vs/GeneralUpdate/FileContentIndex/4001e6b6-9667-4f6d-8a24-4c879be812fa.vsidx
deleted file mode 100644
index b5af2066521fca8d78814a8f17a8da8db4afd8e0..0000000000000000000000000000000000000000
Binary files a/src/.vs/GeneralUpdate/FileContentIndex/4001e6b6-9667-4f6d-8a24-4c879be812fa.vsidx and /dev/null differ
diff --git a/src/.vs/GeneralUpdate/FileContentIndex/5831e2df-65fd-450b-8f41-959e0a88c9f6.vsidx b/src/.vs/GeneralUpdate/FileContentIndex/5831e2df-65fd-450b-8f41-959e0a88c9f6.vsidx
deleted file mode 100644
index af37b2749ad133aebd737440e5f3bff985cefab0..0000000000000000000000000000000000000000
Binary files a/src/.vs/GeneralUpdate/FileContentIndex/5831e2df-65fd-450b-8f41-959e0a88c9f6.vsidx and /dev/null differ
diff --git a/src/.vs/GeneralUpdate/FileContentIndex/6bcd808e-f6d1-4347-b290-4ce6319dadba.vsidx b/src/.vs/GeneralUpdate/FileContentIndex/6bcd808e-f6d1-4347-b290-4ce6319dadba.vsidx
new file mode 100644
index 0000000000000000000000000000000000000000..9bccb941d966203188fdaae7a4b2d2b4fafa89af
Binary files /dev/null and b/src/.vs/GeneralUpdate/FileContentIndex/6bcd808e-f6d1-4347-b290-4ce6319dadba.vsidx differ
diff --git a/src/.vs/GeneralUpdate/FileContentIndex/a2796b8b-0c59-452c-9a22-d2dc55b9caf9.vsidx b/src/.vs/GeneralUpdate/FileContentIndex/a2796b8b-0c59-452c-9a22-d2dc55b9caf9.vsidx
deleted file mode 100644
index c6a8d968485f47a8cb7cf70f2ddeda26e019b29c..0000000000000000000000000000000000000000
Binary files a/src/.vs/GeneralUpdate/FileContentIndex/a2796b8b-0c59-452c-9a22-d2dc55b9caf9.vsidx and /dev/null differ
diff --git a/src/.vs/GeneralUpdate/FileContentIndex/ab0806e0-a9a1-469b-953d-44e24d30f284.vsidx b/src/.vs/GeneralUpdate/FileContentIndex/ab0806e0-a9a1-469b-953d-44e24d30f284.vsidx
deleted file mode 100644
index 6b91e28b33ac01ed7a174e8f3d5adda56391af5e..0000000000000000000000000000000000000000
Binary files a/src/.vs/GeneralUpdate/FileContentIndex/ab0806e0-a9a1-469b-953d-44e24d30f284.vsidx and /dev/null differ
diff --git a/src/.vs/GeneralUpdate/FileContentIndex/d7fe8368-8bbe-45ff-acd3-285139aaa8c8.vsidx b/src/.vs/GeneralUpdate/FileContentIndex/d7fe8368-8bbe-45ff-acd3-285139aaa8c8.vsidx
new file mode 100644
index 0000000000000000000000000000000000000000..63f142ecdbf759d9ffc2c0a9afe958e572da5dbd
Binary files /dev/null and b/src/.vs/GeneralUpdate/FileContentIndex/d7fe8368-8bbe-45ff-acd3-285139aaa8c8.vsidx differ
diff --git a/src/.vs/GeneralUpdate/config/applicationhost.config b/src/.vs/GeneralUpdate/config/applicationhost.config
deleted file mode 100644
index ae56bfb53a36d903df6e1f76dae49ce52ba9c7e7..0000000000000000000000000000000000000000
--- a/src/.vs/GeneralUpdate/config/applicationhost.config
+++ /dev/null
@@ -1,989 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/.vs/GeneralUpdate/v16/Server/sqlite3/db.lock b/src/.vs/GeneralUpdate/v16/Server/sqlite3/db.lock
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/src/.vs/GeneralUpdate/v16/Server/sqlite3/storage.ide b/src/.vs/GeneralUpdate/v16/Server/sqlite3/storage.ide
deleted file mode 100644
index f1de8ade06ed4fd48b8dbc57b1761f3c71f3f479..0000000000000000000000000000000000000000
Binary files a/src/.vs/GeneralUpdate/v16/Server/sqlite3/storage.ide and /dev/null differ
diff --git a/src/.vs/GeneralUpdate/v17/.futdcache.v1 b/src/.vs/GeneralUpdate/v17/.futdcache.v1
index 854c5033c0d6d8610d894d48f8f2e27d28aab40a..1357be55c88f8258207d43df6b2d756c440f3303 100644
Binary files a/src/.vs/GeneralUpdate/v17/.futdcache.v1 and b/src/.vs/GeneralUpdate/v17/.futdcache.v1 differ
diff --git a/src/.vs/GeneralUpdate/v17/TestStore/0/000.testlog b/src/.vs/GeneralUpdate/v17/TestStore/0/000.testlog
deleted file mode 100644
index c42614f70c35f3f0a033e23c75c3eed24073b1c9..0000000000000000000000000000000000000000
Binary files a/src/.vs/GeneralUpdate/v17/TestStore/0/000.testlog and /dev/null differ
diff --git a/src/.vs/GeneralUpdate/v17/TestStore/0/testlog.manifest b/src/.vs/GeneralUpdate/v17/TestStore/0/testlog.manifest
deleted file mode 100644
index e92ede29d76aefe079835aeae278da5341f6e15c..0000000000000000000000000000000000000000
Binary files a/src/.vs/GeneralUpdate/v17/TestStore/0/testlog.manifest and /dev/null differ
diff --git a/src/.vs/ProjectEvaluation/generalupdate.metadata.v1 b/src/.vs/ProjectEvaluation/generalupdate.metadata.v1
deleted file mode 100644
index 711352220efc90e0acfef881f6b7488d797fa500..0000000000000000000000000000000000000000
Binary files a/src/.vs/ProjectEvaluation/generalupdate.metadata.v1 and /dev/null differ
diff --git a/src/.vs/ProjectEvaluation/generalupdate.metadata.v2 b/src/.vs/ProjectEvaluation/generalupdate.metadata.v2
index f7a94f8e38b04057b4cb8e1e393cf9e51f797beb..5e89472998dd859b26c10f312610d36fb6993a5d 100644
Binary files a/src/.vs/ProjectEvaluation/generalupdate.metadata.v2 and b/src/.vs/ProjectEvaluation/generalupdate.metadata.v2 differ
diff --git a/src/.vs/ProjectEvaluation/generalupdate.projects.v1 b/src/.vs/ProjectEvaluation/generalupdate.projects.v1
deleted file mode 100644
index 575db31806800fc6393ccfad358e3b690aa0023d..0000000000000000000000000000000000000000
Binary files a/src/.vs/ProjectEvaluation/generalupdate.projects.v1 and /dev/null differ
diff --git a/src/.vs/ProjectEvaluation/generalupdate.projects.v2 b/src/.vs/ProjectEvaluation/generalupdate.projects.v2
index c2af29994882c7e2a81cb09fd4bfd7f028d3d786..f17cd7aa3fcc24c0ba820cad8f25c208f0338872 100644
Binary files a/src/.vs/ProjectEvaluation/generalupdate.projects.v2 and b/src/.vs/ProjectEvaluation/generalupdate.projects.v2 differ
diff --git a/src/AutoUpdate.ClientCore/MainWindow.xaml.cs b/src/AutoUpdate.ClientCore/MainWindow.xaml.cs
index 0a3ba617728335518b7eee6d35ea0462a5e130ed..56af54b8fc19d4d00f08a96e00f9630d5cdea9aa 100644
--- a/src/AutoUpdate.ClientCore/MainWindow.xaml.cs
+++ b/src/AutoUpdate.ClientCore/MainWindow.xaml.cs
@@ -1,7 +1,6 @@
using GeneralUpdate.ClientCore;
using GeneralUpdate.ClientCore.Hubs;
using GeneralUpdate.ClientCore.Strategys;
-using GeneralUpdate.Common.Models;
using GeneralUpdate.Core.Models;
using GeneralUpdate.Core.Update;
using System;
@@ -25,7 +24,7 @@ namespace AutoUpdate.ClientCore
public MainWindow()
{
InitializeComponent();
- InitVersionHub();
+ //InitVersionHub();
}
#region VersionHub
@@ -54,7 +53,7 @@ namespace AutoUpdate.ClientCore
Task.Run(async () =>
{
//主程序信息
- var mainVersion = "1.1.1";
+ var mainVersion = "1.1.1.1";
//该对象用于主程序客户端与更新组件进程之间交互用的对象
clientParameter = new ClientParameter();
@@ -66,6 +65,8 @@ namespace AutoUpdate.ClientCore
#region update app.
+ clientParameter.ClientVersion = "1.1.1.1";
+
//客户端类型:1.主程序客户端 2.更新组件
clientParameter.AppType = (int)AppType.UpdateApp;
//更新组件请求验证更新的服务端地址
@@ -104,11 +105,11 @@ namespace AutoUpdate.ClientCore
//整个更新过程出现的任何问题都会通过这个事件通知
generalClientBootstrap.Exception += OnException;
//ClientStrategy该更新策略将完成1.自动升级组件自更新 2.启动更新组件 3.配置好ClientParameter无需再像之前的版本写args数组进程通讯了。
- //generalClientBootstrap.Config(clientParameter).
- generalClientBootstrap.Config(baseUrl).
+ generalClientBootstrap.Config(clientParameter).
+ //generalClientBootstrap.Config(baseUrl).
Option(UpdateOption.DownloadTimeOut, 60).
- Option(UpdateOption.CompressEncoding, Encoding.Default).
- Option(UpdateOption.CompressFormat, "zip").
+ Option(UpdateOption.Encoding, Encoding.Default).
+ Option(UpdateOption.Format, "zip").
Strategy();
await generalClientBootstrap.LaunchTaskAsync();
});
diff --git a/src/AutoUpdate.Differential/App.xaml b/src/AutoUpdate.Differential/App.xaml
new file mode 100644
index 0000000000000000000000000000000000000000..97c196f4e28818130c51e8d11eee0f02b947b8e6
--- /dev/null
+++ b/src/AutoUpdate.Differential/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/src/AutoUpdate.Differential/App.xaml.cs b/src/AutoUpdate.Differential/App.xaml.cs
new file mode 100644
index 0000000000000000000000000000000000000000..920ca532325520413d4ab6b6eb6dcbdcc0a70415
--- /dev/null
+++ b/src/AutoUpdate.Differential/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace AutoUpdate.Differential
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/src/AutoUpdate.Differential/AssemblyInfo.cs b/src/AutoUpdate.Differential/AssemblyInfo.cs
new file mode 100644
index 0000000000000000000000000000000000000000..22112342ead3cc40cbd4be95b3f91a26277f5989
--- /dev/null
+++ b/src/AutoUpdate.Differential/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly:ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/src/AutoUpdate.Differential/AutoUpdate.Differential.csproj b/src/AutoUpdate.Differential/AutoUpdate.Differential.csproj
index db711a45ffb6b90ba69d7963729e9ed7429affcc..8c521b926121fa147e75872e2d17c396c3a0a185 100644
--- a/src/AutoUpdate.Differential/AutoUpdate.Differential.csproj
+++ b/src/AutoUpdate.Differential/AutoUpdate.Differential.csproj
@@ -1,23 +1,14 @@
-
+
- Exe
- net6.0
- enable
+ WinExe
+ net5.0-windows
enable
+ true
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
-
diff --git a/src/AutoUpdate.Differential/MainWindow.xaml b/src/AutoUpdate.Differential/MainWindow.xaml
new file mode 100644
index 0000000000000000000000000000000000000000..d3afc140bdcd9774238d0cc16030b204de71dff2
--- /dev/null
+++ b/src/AutoUpdate.Differential/MainWindow.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/AutoUpdate.Differential/MainWindow.xaml.cs b/src/AutoUpdate.Differential/MainWindow.xaml.cs
new file mode 100644
index 0000000000000000000000000000000000000000..cd8afd875e26ac046b13f15fad039fb08d01d9d0
--- /dev/null
+++ b/src/AutoUpdate.Differential/MainWindow.xaml.cs
@@ -0,0 +1,70 @@
+using GeneralUpdate.Differential;
+using GeneralUpdate.Differential.Config;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace AutoUpdate.Differential
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+
+ private void BtnClean_Click(object sender, RoutedEventArgs e)
+ {
+ Task.Run(async () =>
+ {
+ var path1 = @"D:\TestCode\compare\source";
+ var path2 = @"D:\TestCode\compare\target";
+ var path3 = @"D:\TestCode\compare\patchs";
+ await DifferentialCore.Instance.Clean(path1, path2, path3);
+ });
+ }
+
+ private void BtnDrity_Click(object sender, RoutedEventArgs e)
+ {
+ Task.Run(async () =>
+ {
+ var path1 = @"D:\TestCode\compare\source";
+ //var path2 = @"D:\TestCode\compare\target";
+ var path3 = @"D:\TestCode\compare\patchs";
+ await DifferentialCore.Instance.Drity(path1, path3);
+ });
+ }
+
+ private void BtnScan_Click(object sender, RoutedEventArgs e)
+ {
+ Task.Run(async () =>
+ {
+ var path1 = @"D:\TestCode\compare\source";
+ var path2 = @"D:\TestCode\compare\target";
+ await ConfigFactory.Instance.Scan(path1, path2);
+ });
+ }
+
+ private void BtnDeploy_Click(object sender, RoutedEventArgs e)
+ {
+ Task.Run(async () =>
+ {
+ await ConfigFactory.Instance.Deploy();
+ });
+ }
+ }
+}
diff --git a/src/AutoUpdate.Differential/Program.cs b/src/AutoUpdate.Differential/Program.cs
deleted file mode 100644
index 69e124a22de534c4a547ef97cc497181f58543f5..0000000000000000000000000000000000000000
--- a/src/AutoUpdate.Differential/Program.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-//Task.Run(async () =>
-//{
-// var path1 = @"D:\TestCode\compare\source";
-// var path2 = @"D:\TestCode\compare\target";
-// var path3 = @"D:\TestCode\compare\patchs";
-// await DifferentialCore.Instance.Clean(path1, path2, path3);
-//});
-
-//Task.Run(async () =>
-//{
-// var path1 = @"D:\TestCode\compare\source";
-// //var path2 = @"D:\TestCode\compare\target";
-// var path3 = @"D:\TestCode\compare\patchs";
-// await DifferentialCore.Instance.Drity(path1, path3);
-//});
-
-//Task.Run(async () =>
-//{
-// var path1 = @"D:\TestCode\compare\source";
-// var path2 = @"D:\TestCode\compare\target";
-// await ConfigFactory.Instance.Scan(path1, path2);
-// await ConfigFactory.Instance.Deploy();
-//});
-
-Console.Read();
\ No newline at end of file
diff --git a/src/AutoUpdate.Differential/Properties/launchSettings.json b/src/AutoUpdate.Differential/Properties/launchSettings.json
deleted file mode 100644
index 33504c948ad25129e1ebbfedc701556fecb1e037..0000000000000000000000000000000000000000
--- a/src/AutoUpdate.Differential/Properties/launchSettings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "profiles": {
- "WSL": {
- "commandName": "WSL2",
- "distributionName": ""
- }
- }
-}
\ No newline at end of file
diff --git a/src/AutoUpdate.MD5/MainWindow.xaml.cs b/src/AutoUpdate.MD5/MainWindow.xaml.cs
index 0dd268a24eb9998b0a969075f8f8000181682b7a..0ecd36226243c3deacaac5e5b749966b79abd266 100644
--- a/src/AutoUpdate.MD5/MainWindow.xaml.cs
+++ b/src/AutoUpdate.MD5/MainWindow.xaml.cs
@@ -25,7 +25,7 @@ namespace AutoUpdate.MD5
{
OpenFileDialog openFile = new OpenFileDialog();
bool? isOpen = openFile.ShowDialog(this);
- if (isOpen.Value)
+ if (isOpen != null && isOpen.Value)
{
var name = openFile.FileName;
var md5 = GetFileMD5(name);
diff --git a/src/AutoUpdate.MinimalService/AutoUpdate.MinimalService.csproj b/src/AutoUpdate.MinimalService/AutoUpdate.MinimalService.csproj
index a1da3082fb6e4dc1e10908e7c6c6ad7ff01f6c28..127f417bd9aba115f36e4a14f17490aa40196048 100644
--- a/src/AutoUpdate.MinimalService/AutoUpdate.MinimalService.csproj
+++ b/src/AutoUpdate.MinimalService/AutoUpdate.MinimalService.csproj
@@ -7,7 +7,6 @@
-
diff --git a/src/AutoUpdate.MinimalService/Program.cs b/src/AutoUpdate.MinimalService/Program.cs
index 6bf4534575ec15df5e1d55ae11dd8ccc2a7730a6..0aaa2caccff487f38286c74829bbe04e87dd69cc 100644
--- a/src/AutoUpdate.MinimalService/Program.cs
+++ b/src/AutoUpdate.MinimalService/Program.cs
@@ -1,6 +1,6 @@
using GeneralUpdate.AspNetCore.Hubs;
using GeneralUpdate.AspNetCore.Services;
-using GeneralUpdate.Common.DTOs;
+using GeneralUpdate.Core.DTOs;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSingleton();
@@ -39,15 +39,15 @@ async Task> UpdateVersions(int clientType, string clientV
{
//TODO:Link database query information.Different version information can be returned according to the 'clientType' of request.
var results = new List();
- results.Add(new UpdateVersionDTO("42e815e326616841f08851c7967dfde2", 1626711760, "9.1.3.0",
- "http://192.168.50.170/Update1.zip",
+ results.Add(new UpdateVersionDTO("5fb75e44d7c45e3fc9d6aa47c05a0e9a", 1626711760, "9.1.3.0",
+ "http://192.168.50.170/patchs.zip",
"updatepacket1"));
- results.Add(new UpdateVersionDTO("d9a3785f08ed3dd92872bd807ebfb917", 1626711820, "9.1.4.0",
- "http://192.168.50.170/Update2.zip",
- "updatepacket2"));
- results.Add(new UpdateVersionDTO("224da586553d60315c55e689a789b7bd", 1626711880, "9.1.5.0",
- "http://192.168.50.170/Update3.zip",
- "updatepacket3"));
+ //results.Add(new UpdateVersionDTO("d9a3785f08ed3dd92872bd807ebfb917", 1626711820, "9.1.4.0",
+ //"http://192.168.50.170/Update2.zip",
+ //"updatepacket2"));
+ //results.Add(new UpdateVersionDTO("224da586553d60315c55e689a789b7bd", 1626711880, "9.1.5.0",
+ //"http://192.168.50.170/Update3.zip",
+ //"updatepacket3"));
return await Task.FromResult(results);
}
@@ -55,9 +55,9 @@ async Task> GetValidateInfos(int clientType, string clien
{
//TODO:Link database query information.Different version information can be returned according to the 'clientType' of request.
var results = new List();
- results.Add(new UpdateVersionDTO("42e815e326616841f08851c7967dfde2", 1626711760, "9.1.3.0", null, null));
- results.Add(new UpdateVersionDTO("d9a3785f08ed3dd92872bd807ebfb917", 1626711820, "9.1.4.0", null, null));
- results.Add(new UpdateVersionDTO("224da586553d60315c55e689a789b7bd", 1626711880, "9.1.5.0", null, null));
+ results.Add(new UpdateVersionDTO("5fb75e44d7c45e3fc9d6aa47c05a0e9a", 1626711760, "9.1.3.0", null, null));
+ //results.Add(new UpdateVersionDTO("d9a3785f08ed3dd92872bd807ebfb917", 1626711820, "9.1.4.0", null, null));
+ //results.Add(new UpdateVersionDTO("224da586553d60315c55e689a789b7bd", 1626711880, "9.1.5.0", null, null));
return await Task.FromResult(results);
}
diff --git a/src/AutoUpdate.WpfNet6-Sample/App.xaml b/src/AutoUpdate.WpfNet6-Sample/App.xaml
index af590cfd315f622750300a6234ab9947de4049e0..a666f5f9db20ca7889e8d5e7b69bc48d2c4989b5 100644
--- a/src/AutoUpdate.WpfNet6-Sample/App.xaml
+++ b/src/AutoUpdate.WpfNet6-Sample/App.xaml
@@ -1,7 +1,6 @@
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
\ No newline at end of file
diff --git a/src/AutoUpdate.WpfNet6-Sample/App.xaml.cs b/src/AutoUpdate.WpfNet6-Sample/App.xaml.cs
index 63c6834260f282617893516f8b2d1e48712545cb..e2599348eb0dfd58be76308577985f83533816ad 100644
--- a/src/AutoUpdate.WpfNet6-Sample/App.xaml.cs
+++ b/src/AutoUpdate.WpfNet6-Sample/App.xaml.cs
@@ -1,4 +1,5 @@
-using System.Windows;
+using AutoUpdate.Core;
+using System.Windows;
namespace AutoUpdate.WpfNet6_Sample
{
@@ -9,7 +10,10 @@ namespace AutoUpdate.WpfNet6_Sample
{
protected override void OnStartup(StartupEventArgs e)
{
- var args = e.Args;
+ //var args = e.Args;
+ var args = "eyJBcHBUeXBlIjoxLCJBcHBOYW1lIjoiQXV0b1VwZGF0ZS5DbGllbnRDb3JlIiwiTWFpbkFwcE5hbWUiOm51bGwsIkluc3RhbGxQYXRoIjoiRDpcXFVwZGF0ZXRlc3RfaHViXFxSdW5fYXBwIiwiQ2xpZW50VmVyc2lvbiI6IjEuMS4xIiwiTGFzdFZlcnNpb24iOiI5LjEuMy4wIiwiVXBkYXRlTG9nVXJsIjpudWxsLCJJc1VwZGF0ZSI6ZmFsc2UsIlVwZGF0ZVVybCI6bnVsbCwiVmFsaWRhdGVVcmwiOm51bGwsIk1haW5VcGRhdGVVcmwiOiJodHRwOi8vMTI3LjAuMC4xOjUwMDEvdmVyc2lvbnMvMS8xLjEuMS4xIiwiTWFpblZhbGlkYXRlVXJsIjoiaHR0cDovLzEyNy4wLjAuMTo1MDAxL3ZhbGlkYXRlLzEvMS4xLjEuMSIsIkNvbXByZXNzRW5jb2RpbmciOjcsIkNvbXByZXNzRm9ybWF0IjoiLnppcCIsIkRvd25sb2FkVGltZU91dCI6NjAsIlVwZGF0ZVZlcnNpb25zIjpbeyJQdWJUaW1lIjoxNjI2NzExNzYwLCJOYW1lIjpudWxsLCJNRDUiOiI1ZmI3NWU0NGQ3YzQ1ZTNmYzlkNmFhNDdjMDVhMGU5YSIsIlZlcnNpb24iOiI5LjEuMy4wIiwiVXJsIjpudWxsLCJJc1VuWmlwIjpmYWxzZX1dfQ==";
+ MainWindow window = new MainWindow(args);
+ window.ShowDialog();
base.OnStartup(e);
}
}
diff --git a/src/AutoUpdate.WpfNet6-Sample/AutoUpdate.Core.csproj b/src/AutoUpdate.WpfNet6-Sample/AutoUpdate.Core.csproj
index 3a4b79e8d0e1f24cac7dd84e604229a36bfd0441..f0b5b967c5390b80237d58fb2cfca9b04cbec5a1 100644
--- a/src/AutoUpdate.WpfNet6-Sample/AutoUpdate.Core.csproj
+++ b/src/AutoUpdate.WpfNet6-Sample/AutoUpdate.Core.csproj
@@ -27,7 +27,6 @@
-
diff --git a/src/AutoUpdate.WpfNet6-Sample/TestView.xaml.cs b/src/AutoUpdate.WpfNet6-Sample/TestView.xaml.cs
index f9c95f06308e34e14d346c9966ef0c64bf180522..83aa50cf57cd39d013c038bd0f3dcdbf843c3812 100644
--- a/src/AutoUpdate.WpfNet6-Sample/TestView.xaml.cs
+++ b/src/AutoUpdate.WpfNet6-Sample/TestView.xaml.cs
@@ -14,11 +14,6 @@ namespace AutoUpdate.WpfNet6_Sample
private void BtnTest_Click(object sender, RoutedEventArgs e)
{
- //var setup = Config.Stage(new TestClass()).
- // Stage(new TestClass2());
- //PipelineBuilder.Create(setup);
- //await ConfigFactory.Instance.Scan();
-
//var context = new BaseContext();
//context.TargetPath = "123";
//context.SourcePath = "123";
diff --git a/src/AutoUpdate.WpfNet6-Sample/ViewModels/MainViewModel.cs b/src/AutoUpdate.WpfNet6-Sample/ViewModels/MainViewModel.cs
index bdde40897fab9ca866c947fcc6c50d21d40414b1..ad299ed3657fc56a9c331ca576237184002d358e 100644
--- a/src/AutoUpdate.WpfNet6-Sample/ViewModels/MainViewModel.cs
+++ b/src/AutoUpdate.WpfNet6-Sample/ViewModels/MainViewModel.cs
@@ -26,9 +26,9 @@ namespace AutoUpdate.Core.ViewModels
bootStrap.MutiDownloadStatistics += OnMutiDownloadStatistics;
bootStrap.Exception += OnException;
bootStrap.Strategy().
- Option(UpdateOption.CompressEncoding, Encoding.Default).
+ Option(UpdateOption.Encoding, Encoding.Default).
Option(UpdateOption.DownloadTimeOut, 60).
- Option(UpdateOption.CompressFormat, "zip").
+ Option(UpdateOption.Format, "zip").
RemoteAddressBase64(args);
await bootStrap.LaunchTaskAsync();
});
diff --git a/src/AutoUpdate.ZIP/MainWindow.xaml.cs b/src/AutoUpdate.ZIP/MainWindow.xaml.cs
index 92ab8b11a609e896859443fe0ab16708d67dfa8b..89b621730b50a1f6ceaeb36f1f59ba84f01873b9 100644
--- a/src/AutoUpdate.ZIP/MainWindow.xaml.cs
+++ b/src/AutoUpdate.ZIP/MainWindow.xaml.cs
@@ -1,6 +1,6 @@
-using GeneralUpdate.Common.Models;
-using GeneralUpdate.Zip;
+using GeneralUpdate.Zip;
using GeneralUpdate.Zip.Events;
+using GeneralUpdate.Zip.Factory;
using System;
using System.Diagnostics;
using System.Windows;
diff --git a/src/GeneralUpdate.AspNetCore/.DS_Store b/src/GeneralUpdate.AspNetCore/.DS_Store
deleted file mode 100644
index 6fa6aeedf55c40dee0918c64f6d820055a06af50..0000000000000000000000000000000000000000
Binary files a/src/GeneralUpdate.AspNetCore/.DS_Store and /dev/null differ
diff --git a/src/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj b/src/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj
index 89ee4e60c8c20f41d3e98319bc03487d3345d2d6..fb37e5e8fb98039df3e869778b4efb7e9f59898a 100644
--- a/src/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj
+++ b/src/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj
@@ -4,13 +4,27 @@
netstandard2.0
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
diff --git a/src/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs b/src/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs
index ba6311f535d495d7188550fd99e04d937dbc0b73..dad5c4fe174b48f7802dd9c87946605c748f9785 100644
--- a/src/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs
+++ b/src/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs
@@ -1,4 +1,4 @@
-using GeneralUpdate.Common.Utils;
+using GeneralUpdate.Core.Utils;
using Microsoft.AspNetCore.SignalR;
using System;
using System.Threading.Tasks;
diff --git a/src/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs b/src/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs
index bb05b8ed72cdb8b6a18bca2ce6cf40e48318ce39..33a86533a372c0d9f90c5cabf0d02e68b830d5be 100644
--- a/src/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs
+++ b/src/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs
@@ -1,5 +1,5 @@
using GeneralUpdate.AspNetCore.Models;
-using GeneralUpdate.Common.DTOs;
+using GeneralUpdate.Core.DTOs;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using System;
diff --git a/src/GeneralUpdate.AspNetCore/Services/IUpdateService.cs b/src/GeneralUpdate.AspNetCore/Services/IUpdateService.cs
index 24e49498f88f64329818213162eeef7ec3d7d025..3328164e8a907758856d9d64683cb8d5ac413e25 100644
--- a/src/GeneralUpdate.AspNetCore/Services/IUpdateService.cs
+++ b/src/GeneralUpdate.AspNetCore/Services/IUpdateService.cs
@@ -1,4 +1,4 @@
-using GeneralUpdate.Common.DTOs;
+using GeneralUpdate.Core.DTOs;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
diff --git a/src/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs b/src/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs
index 5236d32d38cee8ac8c318aa30a11119da487d453..9238346cb879c24c6130088def91bbe80d3dd393 100644
--- a/src/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs
+++ b/src/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs
@@ -1,9 +1,8 @@
-using GeneralUpdate.Common.DTOs;
-using GeneralUpdate.Common.Models;
-using GeneralUpdate.Common.Utils;
using GeneralUpdate.Core.Bootstrap;
+using GeneralUpdate.Core.DTOs;
using GeneralUpdate.Core.Models;
using GeneralUpdate.Core.Strategys;
+using GeneralUpdate.Core.Utils;
using System;
using System.Diagnostics;
using System.IO;
diff --git a/src/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj b/src/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj
index cef00eb73284a1a323bd4e2add591fe8f6cbd4f9..e6a65251521507dae825b1a51b18609c965b7677 100644
--- a/src/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj
+++ b/src/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj
@@ -22,34 +22,42 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -57,6 +65,11 @@
+
+
+
+
+
@@ -82,6 +95,7 @@
+
@@ -96,7 +110,6 @@
-
@@ -104,12 +117,20 @@
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/GeneralUpdate.ClientCore/Hubs/VersionHub.cs b/src/GeneralUpdate.ClientCore/Hubs/VersionHub.cs
index ec6bb0dec08e203980a9052f0b2b14b47eaf5251..20cbc1a10d03e6759867b75cb5a7eb0e8376e0c0 100644
--- a/src/GeneralUpdate.ClientCore/Hubs/VersionHub.cs
+++ b/src/GeneralUpdate.ClientCore/Hubs/VersionHub.cs
@@ -1,4 +1,4 @@
-using GeneralUpdate.Common.Utils;
+using GeneralUpdate.Core.Utils;
using Microsoft.AspNetCore.SignalR.Client;
using System;
using System.Threading.Tasks;
diff --git a/src/GeneralUpdate.ClientCore/Models/UpdateConfig.cs b/src/GeneralUpdate.ClientCore/Models/UpdateConfig.cs
deleted file mode 100644
index 7a10c74a3a27b87cc57d5e5f47ac5941e8647414..0000000000000000000000000000000000000000
--- a/src/GeneralUpdate.ClientCore/Models/UpdateConfig.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace GeneralUpdate.ClientCore.Models
-{
- public class UpdateConfig
- {
- ///
- /// 是否更新完成
- ///
- public bool IsDone { get; set; }
-
- ///
- /// 更新完成日期
- ///
- public string DoneDate { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/GeneralUpdate.ClientCore/Strategys/ClientStrategy.cs b/src/GeneralUpdate.ClientCore/Strategys/ClientStrategy.cs
index bac9af374ba9cae1fd1d4b91665a8e95b3f606a0..d8f5b4ae2b6c4cf3c760344784bfacc19453d600 100644
--- a/src/GeneralUpdate.ClientCore/Strategys/ClientStrategy.cs
+++ b/src/GeneralUpdate.ClientCore/Strategys/ClientStrategy.cs
@@ -1,6 +1,6 @@
-using GeneralUpdate.Common.DTOs;
-using GeneralUpdate.Common.Models;
-using GeneralUpdate.Common.Utils;
+using GeneralUpdate.Core.DTOs;
+using GeneralUpdate.Core.Models;
+using GeneralUpdate.Core.Utils;
using GeneralUpdate.Core.Strategys;
using GeneralUpdate.Core.Update;
using System;
@@ -47,7 +47,7 @@ namespace GeneralUpdate.ClientCore.Strategys
clientParameter.MainUpdateUrl = Packet.MainUpdateUrl;
clientParameter.AppName = Packet.MainAppName;
clientParameter.AppType = 1;
- clientParameter.CompressEncoding = ConvertUtil.ToEncodingType(Packet.CompressEncoding);
+ clientParameter.CompressEncoding = ConvertUtil.ToEncodingType(Packet.Encoding);
clientParameter.CompressFormat = Packet.Format;
clientParameter.DownloadTimeOut = Packet.DownloadTimeOut;
clientParameter.UpdateVersions = ConvertUtil.ToUpdateVersions(body.UpdateVersions);
diff --git a/src/GeneralUpdate.Common/GeneralUpdate.Common.csproj b/src/GeneralUpdate.Common/GeneralUpdate.Common.csproj
deleted file mode 100644
index e7402ced35bbd22465d770142789d6bef38c5e40..0000000000000000000000000000000000000000
--- a/src/GeneralUpdate.Common/GeneralUpdate.Common.csproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- netstandard2.0
-
-
-
-
-
-
-
diff --git a/src/GeneralUpdate.Core/.vs/GeneralUpdate.Core/v16/Server/sqlite3/db.lock b/src/GeneralUpdate.Core/.vs/GeneralUpdate.Core/v16/Server/sqlite3/db.lock
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/src/GeneralUpdate.Core/.vs/GeneralUpdate.Core/v16/Server/sqlite3/storage.ide b/src/GeneralUpdate.Core/.vs/GeneralUpdate.Core/v16/Server/sqlite3/storage.ide
deleted file mode 100644
index bebd6f152d77a5b5448533c791d1ba85788acd87..0000000000000000000000000000000000000000
Binary files a/src/GeneralUpdate.Core/.vs/GeneralUpdate.Core/v16/Server/sqlite3/storage.ide and /dev/null differ
diff --git a/src/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs b/src/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs
index ce64719d4b328019adff7e2a43a9e30743a4bd0c..13c908bd62f81c69844aafea06e341e11346bba5 100644
--- a/src/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs
+++ b/src/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs
@@ -1,10 +1,9 @@
-using GeneralUpdate.Common.DTOs;
-using GeneralUpdate.Common.Models;
-using GeneralUpdate.Common.Utils;
-using GeneralUpdate.Core.Download;
+using GeneralUpdate.Core.Download;
+using GeneralUpdate.Core.DTOs;
using GeneralUpdate.Core.Models;
using GeneralUpdate.Core.Strategys;
using GeneralUpdate.Core.Update;
+using GeneralUpdate.Core.Utils;
using System;
using System.Collections.Concurrent;
using System.Diagnostics.Contracts;
@@ -93,9 +92,9 @@ namespace GeneralUpdate.Core.Bootstrap
new MutiDownloadProgressChangedEventArgs(null, ProgressType.Check, $"Check update failed :{ updateResp.Message }."));
}
if (Packet.UpdateVersions == null || Packet.UpdateVersions.Count == 0) throw new Exception("Request to update content failed!");
- var pacektFormat = GetOption(UpdateOption.CompressFormat) ?? DefaultFormat;
+ var pacektFormat = GetOption(UpdateOption.Format) ?? DefaultFormat;
Packet.Format = $".{pacektFormat}";
- Packet.CompressEncoding = GetOption(UpdateOption.CompressEncoding) ?? Encoding.Default;
+ Packet.Encoding = GetOption(UpdateOption.Encoding) ?? Encoding.Default;
Packet.DownloadTimeOut = GetOption(UpdateOption.DownloadTimeOut);
Packet.AppName = Packet.AppName ?? GetOption(UpdateOption.MainApp);
Packet.TempPath = $"{ FileUtil.GetTempDirectory(Packet.LastVersion) }\\";
diff --git a/src/GeneralUpdate.Common/CustomAwaiter/IAwaitable.cs b/src/GeneralUpdate.Core/CustomAwaiter/IAwaitable.cs
similarity index 68%
rename from src/GeneralUpdate.Common/CustomAwaiter/IAwaitable.cs
rename to src/GeneralUpdate.Core/CustomAwaiter/IAwaitable.cs
index 319ad5ffc3c57794e323e515f87cbe9093f66280..25081aa2c1df8de1b86cce260ae181265879a6bd 100644
--- a/src/GeneralUpdate.Common/CustomAwaiter/IAwaitable.cs
+++ b/src/GeneralUpdate.Core/CustomAwaiter/IAwaitable.cs
@@ -1,4 +1,8 @@
-namespace GeneralUpdate.Common.CustomAwaiter
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace GeneralUpdate.Core.CustomAwaiter
{
public interface IAwaitable where TAwaiter : IAwaiter
{
@@ -9,4 +13,4 @@
{
TAwaiter GetAwaiter();
}
-}
\ No newline at end of file
+}
diff --git a/src/GeneralUpdate.Common/CustomAwaiter/IAwaiter.cs b/src/GeneralUpdate.Core/CustomAwaiter/IAwaiter.cs
similarity index 63%
rename from src/GeneralUpdate.Common/CustomAwaiter/IAwaiter.cs
rename to src/GeneralUpdate.Core/CustomAwaiter/IAwaiter.cs
index c9f18aaf19a1bcd1bd2f750f9ba753226944f60b..bf917d05ba584aae9909390abfbb8cf419a48c96 100644
--- a/src/GeneralUpdate.Common/CustomAwaiter/IAwaiter.cs
+++ b/src/GeneralUpdate.Core/CustomAwaiter/IAwaiter.cs
@@ -1,6 +1,9 @@
-using System.Runtime.CompilerServices;
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using System.Text;
-namespace GeneralUpdate.Common.CustomAwaiter
+namespace GeneralUpdate.Core.CustomAwaiter
{
public interface IAwaiter : INotifyCompletion
{
@@ -15,4 +18,4 @@ namespace GeneralUpdate.Common.CustomAwaiter
TResult GetResult();
}
-}
\ No newline at end of file
+}
diff --git a/src/GeneralUpdate.Common/CustomAwaiter/ICriticalAwaiter.cs b/src/GeneralUpdate.Core/CustomAwaiter/ICriticalAwaiter.cs
similarity index 56%
rename from src/GeneralUpdate.Common/CustomAwaiter/ICriticalAwaiter.cs
rename to src/GeneralUpdate.Core/CustomAwaiter/ICriticalAwaiter.cs
index 1302c4e33e2326c39ad4976ece3c56c87321132a..b4d36916083e87ce35603a0b130305c158eccaa5 100644
--- a/src/GeneralUpdate.Common/CustomAwaiter/ICriticalAwaiter.cs
+++ b/src/GeneralUpdate.Core/CustomAwaiter/ICriticalAwaiter.cs
@@ -1,6 +1,9 @@
-using System.Runtime.CompilerServices;
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using System.Text;
-namespace GeneralUpdate.Common.CustomAwaiter
+namespace GeneralUpdate.Core.CustomAwaiter
{
public interface ICriticalAwaiter : IAwaiter, ICriticalNotifyCompletion
{
@@ -9,4 +12,4 @@ namespace GeneralUpdate.Common.CustomAwaiter
public interface ICriticalAwaiter : IAwaiter, ICriticalNotifyCompletion
{
}
-}
\ No newline at end of file
+}
diff --git a/src/GeneralUpdate.Common/DTOs/BaseRequestDTO.cs b/src/GeneralUpdate.Core/DTOs/BaseRequestDTO.cs
similarity index 82%
rename from src/GeneralUpdate.Common/DTOs/BaseRequestDTO.cs
rename to src/GeneralUpdate.Core/DTOs/BaseRequestDTO.cs
index bb372ac9f2a2739c707073fad37830b7ef744e26..129355111bb966261d5fa78d84f5e9472e96bf27 100644
--- a/src/GeneralUpdate.Common/DTOs/BaseRequestDTO.cs
+++ b/src/GeneralUpdate.Core/DTOs/BaseRequestDTO.cs
@@ -1,4 +1,4 @@
-namespace GeneralUpdate.Common.DTOs
+namespace GeneralUpdate.Core.DTOs
{
public class BaseRequestDTO : IRequest
{
diff --git a/src/GeneralUpdate.Common/DTOs/BaseResponseDTO.cs b/src/GeneralUpdate.Core/DTOs/BaseResponseDTO.cs
similarity index 82%
rename from src/GeneralUpdate.Common/DTOs/BaseResponseDTO.cs
rename to src/GeneralUpdate.Core/DTOs/BaseResponseDTO.cs
index d95edad5d0c5651e1a039a41aaf2f455d014dab4..7732ed044d947e25f384f0693eb0f981a8be54a9 100644
--- a/src/GeneralUpdate.Common/DTOs/BaseResponseDTO.cs
+++ b/src/GeneralUpdate.Core/DTOs/BaseResponseDTO.cs
@@ -1,4 +1,4 @@
-namespace GeneralUpdate.Common.DTOs
+namespace GeneralUpdate.Core.DTOs
{
public class BaseResponseDTO : IResponse
{
diff --git a/src/GeneralUpdate.Common/DTOs/IRequest.cs b/src/GeneralUpdate.Core/DTOs/IRequest.cs
similarity index 53%
rename from src/GeneralUpdate.Common/DTOs/IRequest.cs
rename to src/GeneralUpdate.Core/DTOs/IRequest.cs
index 7767356fc1fb007ddfe97e25e4b79741018eb3e0..65ae65c567e6a373b52959e6a021ef60aa1e62e5 100644
--- a/src/GeneralUpdate.Common/DTOs/IRequest.cs
+++ b/src/GeneralUpdate.Core/DTOs/IRequest.cs
@@ -1,4 +1,4 @@
-namespace GeneralUpdate.Common.DTOs
+namespace GeneralUpdate.Core.DTOs
{
public interface IRequest
{
diff --git a/src/GeneralUpdate.Common/DTOs/IResponse.cs b/src/GeneralUpdate.Core/DTOs/IResponse.cs
similarity index 54%
rename from src/GeneralUpdate.Common/DTOs/IResponse.cs
rename to src/GeneralUpdate.Core/DTOs/IResponse.cs
index 32d34aaea99b1fea1c9c43426203809d9012ecd1..d9793b5abe28f4e6077c160d81a5e90b8c966f71 100644
--- a/src/GeneralUpdate.Common/DTOs/IResponse.cs
+++ b/src/GeneralUpdate.Core/DTOs/IResponse.cs
@@ -1,4 +1,4 @@
-namespace GeneralUpdate.Common.DTOs
+namespace GeneralUpdate.Core.DTOs
{
public interface IResponse
{
diff --git a/src/GeneralUpdate.Common/DTOs/UpdateValidateReqDTO.cs b/src/GeneralUpdate.Core/DTOs/UpdateValidateReqDTO.cs
similarity index 66%
rename from src/GeneralUpdate.Common/DTOs/UpdateValidateReqDTO.cs
rename to src/GeneralUpdate.Core/DTOs/UpdateValidateReqDTO.cs
index 7851de10c6ab2752991097966415dfd54c6b165a..801f72674c330aba644977d3ad9da5f0020bec45 100644
--- a/src/GeneralUpdate.Common/DTOs/UpdateValidateReqDTO.cs
+++ b/src/GeneralUpdate.Core/DTOs/UpdateValidateReqDTO.cs
@@ -1,4 +1,4 @@
-namespace GeneralUpdate.Common.DTOs
+namespace GeneralUpdate.Core.DTOs
{
public class UpdateValidateReqDTO : BaseRequestDTO
{
diff --git a/src/GeneralUpdate.Common/DTOs/UpdateValidateRespDTO.cs b/src/GeneralUpdate.Core/DTOs/UpdateValidateRespDTO.cs
similarity index 93%
rename from src/GeneralUpdate.Common/DTOs/UpdateValidateRespDTO.cs
rename to src/GeneralUpdate.Core/DTOs/UpdateValidateRespDTO.cs
index 7e2a2d8ff5167fed191af4898849687989d388af..4fa2f5c953ffcd00de0c14739475b5a95c6453e4 100644
--- a/src/GeneralUpdate.Common/DTOs/UpdateValidateRespDTO.cs
+++ b/src/GeneralUpdate.Core/DTOs/UpdateValidateRespDTO.cs
@@ -1,6 +1,6 @@
using System.Collections.Generic;
-namespace GeneralUpdate.Common.DTOs
+namespace GeneralUpdate.Core.DTOs
{
public class UpdateValidateRespDTO : BaseResponseDTO
{
diff --git a/src/GeneralUpdate.Common/DTOs/UpdateVersionDTO.cs b/src/GeneralUpdate.Core/DTOs/UpdateVersionDTO.cs
similarity index 92%
rename from src/GeneralUpdate.Common/DTOs/UpdateVersionDTO.cs
rename to src/GeneralUpdate.Core/DTOs/UpdateVersionDTO.cs
index 91279d95c5fe796b56b920692d0638bb11fd3dd9..802dcf7c24170731ddf1b06440968b905b431205 100644
--- a/src/GeneralUpdate.Common/DTOs/UpdateVersionDTO.cs
+++ b/src/GeneralUpdate.Core/DTOs/UpdateVersionDTO.cs
@@ -1,4 +1,4 @@
-namespace GeneralUpdate.Common.DTOs
+namespace GeneralUpdate.Core.DTOs
{
public class UpdateVersionDTO
{
diff --git a/src/GeneralUpdate.Common/DTOs/UpdateVersionsReqDTO.cs b/src/GeneralUpdate.Core/DTOs/UpdateVersionsReqDTO.cs
similarity index 57%
rename from src/GeneralUpdate.Common/DTOs/UpdateVersionsReqDTO.cs
rename to src/GeneralUpdate.Core/DTOs/UpdateVersionsReqDTO.cs
index cffb1dfcaabd8b53c556d151238903a1825fbd2a..98ae8b4b3e00c9c5f45d40bed0fff15176b68bf9 100644
--- a/src/GeneralUpdate.Common/DTOs/UpdateVersionsReqDTO.cs
+++ b/src/GeneralUpdate.Core/DTOs/UpdateVersionsReqDTO.cs
@@ -1,4 +1,4 @@
-namespace GeneralUpdate.Common.DTOs
+namespace GeneralUpdate.Core.DTOs
{
public class UpdateVersionsReqDTO
{
diff --git a/src/GeneralUpdate.Common/DTOs/UpdateVersionsRespDTO.cs b/src/GeneralUpdate.Core/DTOs/UpdateVersionsRespDTO.cs
similarity index 86%
rename from src/GeneralUpdate.Common/DTOs/UpdateVersionsRespDTO.cs
rename to src/GeneralUpdate.Core/DTOs/UpdateVersionsRespDTO.cs
index 413cba616182ecb8b34cf1a9f8a44f19b4f25ea4..a804239bc62863c38eb9ec9830beba37c33a4fe3 100644
--- a/src/GeneralUpdate.Common/DTOs/UpdateVersionsRespDTO.cs
+++ b/src/GeneralUpdate.Core/DTOs/UpdateVersionsRespDTO.cs
@@ -1,6 +1,6 @@
using System.Collections.Generic;
-namespace GeneralUpdate.Common.DTOs
+namespace GeneralUpdate.Core.DTOs
{
public class UpdateVersionsRespDTO : BaseResponseDTO
{ }
diff --git a/src/GeneralUpdate.Core/Download/DownloadTask.cs b/src/GeneralUpdate.Core/Download/DownloadTask.cs
index 3327bf87855c173fb6eecbce6b4820acc22f6379..edeb4b03ddb765b9816aa77f7a78039fdb027408 100644
--- a/src/GeneralUpdate.Core/Download/DownloadTask.cs
+++ b/src/GeneralUpdate.Core/Download/DownloadTask.cs
@@ -1,4 +1,4 @@
-using GeneralUpdate.Common.CustomAwaiter;
+using GeneralUpdate.Core.CustomAwaiter;
using GeneralUpdate.Core.Update;
using System;
using System.Globalization;
diff --git a/src/GeneralUpdate.Core/GeneralUpdate.Core.csproj b/src/GeneralUpdate.Core/GeneralUpdate.Core.csproj
index 1fc7f4ce97aef1da00a5df64f24e22e8658f7832..183931e566e2557fafa696fa71a60eff7d4b265e 100644
--- a/src/GeneralUpdate.Core/GeneralUpdate.Core.csproj
+++ b/src/GeneralUpdate.Core/GeneralUpdate.Core.csproj
@@ -32,7 +32,6 @@
-
diff --git a/src/GeneralUpdate.Core/GeneralUpdateBootstrap.cs b/src/GeneralUpdate.Core/GeneralUpdateBootstrap.cs
index e69b52f112b4f7f0a3ce6d0bbc11a9af32acf72e..77aa67a908f398107c1882b160dafd7878a4689d 100644
--- a/src/GeneralUpdate.Core/GeneralUpdateBootstrap.cs
+++ b/src/GeneralUpdate.Core/GeneralUpdateBootstrap.cs
@@ -1,5 +1,5 @@
-using GeneralUpdate.Common.Models;
-using GeneralUpdate.Common.Utils;
+using GeneralUpdate.Core.Models;
+using GeneralUpdate.Core.Utils;
using GeneralUpdate.Core.Bootstrap;
using GeneralUpdate.Core.Strategys;
using System;
@@ -45,7 +45,7 @@ namespace GeneralUpdate.Core
Packet.UpdateUrl = ClientParameter.UpdateUrl;
Packet.UpdateLogUrl = ClientParameter.UpdateLogUrl;
Packet.UpdateVersions = ClientParameter.UpdateVersions;
- Packet.CompressEncoding = ConvertUtil.ToEncoding(ClientParameter.CompressEncoding);
+ Packet.Encoding = ConvertUtil.ToEncoding(ClientParameter.CompressEncoding);
Packet.Format = ClientParameter.CompressFormat;
Packet.DownloadTimeOut = ClientParameter.DownloadTimeOut;
Packet.MainUpdateUrl = ClientParameter.MainUpdateUrl;
diff --git a/src/GeneralUpdate.Common/Models/ClientParameter.cs b/src/GeneralUpdate.Core/Models/ClientParameter.cs
similarity index 98%
rename from src/GeneralUpdate.Common/Models/ClientParameter.cs
rename to src/GeneralUpdate.Core/Models/ClientParameter.cs
index eb1edc79d17fcaf9041f8d245ddd08a4d1fe1e87..2f007c5b1d64558ac26fe7884294ddb3a28376f0 100644
--- a/src/GeneralUpdate.Common/Models/ClientParameter.cs
+++ b/src/GeneralUpdate.Core/Models/ClientParameter.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace GeneralUpdate.Common.Models
+namespace GeneralUpdate.Core.Models
{
[Serializable]
public class ClientParameter
diff --git a/src/GeneralUpdate.Core/Models/FileBase.cs b/src/GeneralUpdate.Core/Models/FileBase.cs
index ff8487b2378c6d2a78b24b17c0859f49aeb0166b..eef08a880b395c2335c13f0e75f7b37a1006da69 100644
--- a/src/GeneralUpdate.Core/Models/FileBase.cs
+++ b/src/GeneralUpdate.Core/Models/FileBase.cs
@@ -54,10 +54,5 @@ namespace GeneralUpdate.Core.Models
/// 下载文件临时存储路径(用于更新文件逻辑)
///
public string TempPath { get; set; }
-
- ///
- /// 文件当前路径(用于增量文件逻辑)
- ///
- public string Path { get; set; }
}
}
\ No newline at end of file
diff --git a/src/GeneralUpdate.Core/Models/UpdatePacket.cs b/src/GeneralUpdate.Core/Models/UpdatePacket.cs
index bef5158232764b5e8570b88aa1e265f0f4224a5e..97f90db9b704fd229b2aaadcb704064a6fffd5d3 100644
--- a/src/GeneralUpdate.Core/Models/UpdatePacket.cs
+++ b/src/GeneralUpdate.Core/Models/UpdatePacket.cs
@@ -1,5 +1,4 @@
-using GeneralUpdate.Common.Models;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Text;
namespace GeneralUpdate.Core.Models
@@ -71,7 +70,7 @@ namespace GeneralUpdate.Core.Models
///
public List UpdateVersions { get; set; }
- public Encoding CompressEncoding { get; set; }
+ public Encoding Encoding { get; set; }
public int DownloadTimeOut { get; set; }
}
diff --git a/src/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs b/src/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs
index 9ee31755b3d50441bceb74ff0899b80d73615974..405945feb11c83893dcb027232dbc7799197aec4 100644
--- a/src/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs
+++ b/src/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs
@@ -1,4 +1,4 @@
-using GeneralUpdate.Common.Models;
+using GeneralUpdate.Core.Models;
using GeneralUpdate.Core.Update;
using System;
using System.Text;
diff --git a/src/GeneralUpdate.Core/Pipelines/Middleware/ConfigMiddleware.cs b/src/GeneralUpdate.Core/Pipelines/Middleware/ConfigMiddleware.cs
index 02fcbda46464c56b9e28ce26c07fee68742e32e7..40eba8c3fa900a97d2f11647b25e9f823de3ed4b 100644
--- a/src/GeneralUpdate.Core/Pipelines/Middleware/ConfigMiddleware.cs
+++ b/src/GeneralUpdate.Core/Pipelines/Middleware/ConfigMiddleware.cs
@@ -19,7 +19,7 @@ namespace GeneralUpdate.Core.Pipelines.Middleware
}
catch (Exception ex)
{
- var exception = new Exception($"An exception occurred while updating the configuration file : { ex.Message } !", ex.InnerException);
+ var exception = new Exception($"{ ex.Message } !", ex.InnerException);
context.OnExceptionEventAction(this, exception);
throw exception;
}
diff --git a/src/GeneralUpdate.Core/Pipelines/Middleware/MD5Middleware.cs b/src/GeneralUpdate.Core/Pipelines/Middleware/MD5Middleware.cs
index cd2136df873fbed29832354a6765a45fec2ea2e9..d83de5ab383e37ac4e25e4775df1748d924828b2 100644
--- a/src/GeneralUpdate.Core/Pipelines/Middleware/MD5Middleware.cs
+++ b/src/GeneralUpdate.Core/Pipelines/Middleware/MD5Middleware.cs
@@ -1,4 +1,4 @@
-using GeneralUpdate.Common.Utils;
+using GeneralUpdate.Core.Utils;
using GeneralUpdate.Core.Pipelines.Context;
using GeneralUpdate.Core.Update;
using System;
@@ -20,9 +20,9 @@ namespace GeneralUpdate.Core.Pipelines.Middleware
var node = stack.Pop();
if (node != null) await node.Next.Invoke(context, stack);
}
- catch
+ catch(Exception ex)
{
- context.OnExceptionEventAction(this, exception);
+ context.OnExceptionEventAction(this, exception ?? ex);
throw exception;
}
}
diff --git a/src/GeneralUpdate.Core/Pipelines/Middleware/PatchMiddleware.cs b/src/GeneralUpdate.Core/Pipelines/Middleware/PatchMiddleware.cs
index bca5398a9282d2f0472b6d384749aabbebfd98d2..03e12b496852d8b139d28a78fbb4eac4632d404a 100644
--- a/src/GeneralUpdate.Core/Pipelines/Middleware/PatchMiddleware.cs
+++ b/src/GeneralUpdate.Core/Pipelines/Middleware/PatchMiddleware.cs
@@ -19,7 +19,7 @@ namespace GeneralUpdate.Core.Pipelines.Middleware
}
catch (Exception ex)
{
- var exception = new Exception($"An exception occurred while updating the patch file : { ex.Message } !", ex.InnerException);
+ var exception = new Exception($"{ ex.Message } !", ex.InnerException);
context.OnExceptionEventAction(this, exception);
throw exception;
}
diff --git a/src/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs b/src/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs
index cc9880180406624b6d1e97e326030d92c84798d1..c86082c723fdf845a870099a3eb0af17cfb67385 100644
--- a/src/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs
+++ b/src/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs
@@ -1,8 +1,8 @@
-using GeneralUpdate.Common.Models;
-using GeneralUpdate.Core.Pipelines.Context;
+using GeneralUpdate.Core.Pipelines.Context;
using GeneralUpdate.Core.Update;
using GeneralUpdate.Differential.Config;
using GeneralUpdate.Zip;
+using GeneralUpdate.Zip.Factory;
using System;
using System.Threading.Tasks;
@@ -18,14 +18,15 @@ namespace GeneralUpdate.Core.Pipelines.Middleware
context.OnProgressEventAction(this, ProgressType.Updatefile, "In the unzipped file ...");
var version = context.Version;
bool isUnzip = UnZip(context);
- if (!isUnzip) throw exception = new Exception($"Unzip file failed ! Version-{ version.Version } MD5-{ version.MD5 } .");
+ if (!isUnzip) throw exception = new Exception($"Unzip file failed , Version-{ version.Version } MD5-{ version.MD5 } !");
await ConfigFactory.Instance.Scan(context.SourcePath, context.TargetPath);
var node = stack.Pop();
if (node != null) await node.Next.Invoke(context, stack);
}
- catch
+ catch(Exception ex)
{
+ exception = exception ?? ex;
context.OnExceptionEventAction(this, exception);
throw exception;
}
@@ -44,12 +45,9 @@ namespace GeneralUpdate.Core.Pipelines.Middleware
{
bool isComplated = false;
var generalZipfactory = new GeneralZipFactory();
- generalZipfactory.UnZipProgress += (sender, e) =>
- {
- context.OnProgressEventAction(this, ProgressType.Updatefile, "Updatting file...");
- };
+ generalZipfactory.UnZipProgress += (sender, e) => context.OnProgressEventAction(this, ProgressType.Updatefile, "Updatting file...");
generalZipfactory.Completed += (sender, e) => isComplated = true;
- generalZipfactory.CreatefOperate(MatchType(context.Format), context.ZipfilePath, context.SourcePath, false, context.Encoding).
+ generalZipfactory.CreatefOperate(MatchType(context.Format), context.ZipfilePath, context.TargetPath, false, context.Encoding).
UnZip();
return isComplated;
}
diff --git a/src/GeneralUpdate.Core/Pipelines/Pipeline/IPipelineBuilder.cs b/src/GeneralUpdate.Core/Pipelines/Pipeline/IPipelineBuilder.cs
index f39761704e6ec89ee8ace34ecfb629133dd8269f..fee59bdc8f7bb245b1614c5a593d5131e2bf590b 100644
--- a/src/GeneralUpdate.Core/Pipelines/Pipeline/IPipelineBuilder.cs
+++ b/src/GeneralUpdate.Core/Pipelines/Pipeline/IPipelineBuilder.cs
@@ -1,4 +1,5 @@
using GeneralUpdate.Core.Pipelines.Middleware;
+using System.Threading.Tasks;
namespace GeneralUpdate.Core.Pipelines.Pipeline
{
@@ -6,6 +7,6 @@ namespace GeneralUpdate.Core.Pipelines.Pipeline
{
IPipelineBuilder Use(IMiddleware middleware);
- IPipelineBuilder Launch();
+ Task Launch();
}
}
\ No newline at end of file
diff --git a/src/GeneralUpdate.Core/Pipelines/PipelineBuilder.cs b/src/GeneralUpdate.Core/Pipelines/PipelineBuilder.cs
index 0a0fb66e457f080d0ef4116be44865db3037bc3b..59ab97999975dd0370622c66d4a13956de7dc438 100644
--- a/src/GeneralUpdate.Core/Pipelines/PipelineBuilder.cs
+++ b/src/GeneralUpdate.Core/Pipelines/PipelineBuilder.cs
@@ -3,6 +3,7 @@ using GeneralUpdate.Core.Pipelines.Middleware;
using GeneralUpdate.Core.Pipelines.Pipeline;
using System;
using System.Collections.Generic;
+using System.Threading.Tasks;
namespace GeneralUpdate.Core.Pipelines
{
@@ -25,11 +26,11 @@ namespace GeneralUpdate.Core.Pipelines
return this;
}
- public IPipelineBuilder Launch()
+ public async Task Launch()
{
if (nodes == null || nodes.Count == 0) throw new ArgumentNullException(nameof(nodes));
_components = new MiddlewareStack(nodes);
- _components.Pop().Next.Invoke(_context, _components);
+ await _components.Pop().Next.Invoke(_context, _components);
return this;
}
}
diff --git a/src/GeneralUpdate.Core/Strategys/Strategy.cs b/src/GeneralUpdate.Core/Strategys/Strategy.cs
index cf47d2631004a8e7d8494949fda806c10523e08f..911010b36ef34c2c0560f3f650016c280e4d35ce 100644
--- a/src/GeneralUpdate.Core/Strategys/Strategy.cs
+++ b/src/GeneralUpdate.Core/Strategys/Strategy.cs
@@ -1,13 +1,14 @@
-using GeneralUpdate.Common.Models;
-using GeneralUpdate.Common.Utils;
-using GeneralUpdate.Core.Models;
+using GeneralUpdate.Core.Models;
using GeneralUpdate.Core.Update;
-using GeneralUpdate.Zip;
using System;
-using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
+using GeneralUpdate.Core.Pipelines;
+using GeneralUpdate.Core.Pipelines.Context;
+using GeneralUpdate.Core.Pipelines.Middleware;
+using GeneralUpdate.Core.Utils;
+using System.Threading.Tasks;
namespace GeneralUpdate.Core.Strategys
{
@@ -15,12 +16,14 @@ namespace GeneralUpdate.Core.Strategys
{
#region Private Members
+ private const string PATCHS = "patchs";
+ private const string DIFF_FORMAT = ".patch";
+ private BaseContext _context;
+
protected UpdatePacket Packet { get; set; }
protected Action