diff --git a/src/.vs/GeneralUpdate/DesignTimeBuild/.dtbcache.v2 b/src/.vs/GeneralUpdate/DesignTimeBuild/.dtbcache.v2 index a1aa46d7d5172af6a3b88386bff77b25eda2374d..c4487f91527c37cd2a1c214031700a5d14821694 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/6b23afbd-2f9a-4306-b242-056621ec929a.vsidx b/src/.vs/GeneralUpdate/FileContentIndex/6b23afbd-2f9a-4306-b242-056621ec929a.vsidx new file mode 100644 index 0000000000000000000000000000000000000000..cf731c14c35a09148f34cf7d5311be4a03342005 Binary files /dev/null and b/src/.vs/GeneralUpdate/FileContentIndex/6b23afbd-2f9a-4306-b242-056621ec929a.vsidx 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 deleted file mode 100644 index 9bccb941d966203188fdaae7a4b2d2b4fafa89af..0000000000000000000000000000000000000000 Binary files a/src/.vs/GeneralUpdate/FileContentIndex/6bcd808e-f6d1-4347-b290-4ce6319dadba.vsidx and /dev/null differ diff --git a/src/.vs/GeneralUpdate/FileContentIndex/77172633-2739-432b-80ae-18ccc4e33b77.vsidx b/src/.vs/GeneralUpdate/FileContentIndex/77172633-2739-432b-80ae-18ccc4e33b77.vsidx new file mode 100644 index 0000000000000000000000000000000000000000..9fb13c91c1fdcaaf880e0eebceb1953aab97db66 Binary files /dev/null and b/src/.vs/GeneralUpdate/FileContentIndex/77172633-2739-432b-80ae-18ccc4e33b77.vsidx differ diff --git a/src/.vs/GeneralUpdate/FileContentIndex/7c25f3cb-57ca-4ded-99d6-722ef675ba6e.vsidx b/src/.vs/GeneralUpdate/FileContentIndex/7c25f3cb-57ca-4ded-99d6-722ef675ba6e.vsidx new file mode 100644 index 0000000000000000000000000000000000000000..152bde02836d8e7acfd8165006c79b4d62bdc0ab Binary files /dev/null and b/src/.vs/GeneralUpdate/FileContentIndex/7c25f3cb-57ca-4ded-99d6-722ef675ba6e.vsidx 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 deleted file mode 100644 index 63f142ecdbf759d9ffc2c0a9afe958e572da5dbd..0000000000000000000000000000000000000000 Binary files a/src/.vs/GeneralUpdate/FileContentIndex/d7fe8368-8bbe-45ff-acd3-285139aaa8c8.vsidx and /dev/null differ diff --git a/src/.vs/GeneralUpdate/FileContentIndex/dbfaa5a7-3a3e-4678-b4c0-dea20ccba18a.vsidx b/src/.vs/GeneralUpdate/FileContentIndex/dbfaa5a7-3a3e-4678-b4c0-dea20ccba18a.vsidx new file mode 100644 index 0000000000000000000000000000000000000000..4556f911c077e7b4a1b4dba17b540287a9af4118 Binary files /dev/null and b/src/.vs/GeneralUpdate/FileContentIndex/dbfaa5a7-3a3e-4678-b4c0-dea20ccba18a.vsidx differ diff --git a/src/.vs/GeneralUpdate/config/applicationhost.config b/src/.vs/GeneralUpdate/config/applicationhost.config new file mode 100644 index 0000000000000000000000000000000000000000..cdd2df8fe1edaf5831e6f1ed619f30e1875d0443 --- /dev/null +++ b/src/.vs/GeneralUpdate/config/applicationhost.config @@ -0,0 +1,1026 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/.vs/GeneralUpdate/v17/.futdcache.v1 b/src/.vs/GeneralUpdate/v17/.futdcache.v1 index 1357be55c88f8258207d43df6b2d756c440f3303..c42fab8ebca455a0cd9f1e226bc9989adf2ae392 100644 Binary files a/src/.vs/GeneralUpdate/v17/.futdcache.v1 and b/src/.vs/GeneralUpdate/v17/.futdcache.v1 differ diff --git a/src/.vs/ProjectEvaluation/generalupdate.metadata.v2 b/src/.vs/ProjectEvaluation/generalupdate.metadata.v2 index 5e89472998dd859b26c10f312610d36fb6993a5d..e2b77df171e210e583106724c8179305cada6703 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.v2 b/src/.vs/ProjectEvaluation/generalupdate.projects.v2 index f17cd7aa3fcc24c0ba820cad8f25c208f0338872..0abbd14b9b69e45a777364e6e896204693122490 100644 Binary files a/src/.vs/ProjectEvaluation/generalupdate.projects.v2 and b/src/.vs/ProjectEvaluation/generalupdate.projects.v2 differ diff --git a/src/AutoUpdate.Differential/App.xaml b/src/AutoUpdate.Differential/App.xaml index 97c196f4e28818130c51e8d11eee0f02b947b8e6..4842651522798eae470ad28e93764c4e8feb5d52 100644 --- a/src/AutoUpdate.Differential/App.xaml +++ b/src/AutoUpdate.Differential/App.xaml @@ -1,9 +1,7 @@  - - + \ No newline at end of file diff --git a/src/AutoUpdate.Differential/App.xaml.cs b/src/AutoUpdate.Differential/App.xaml.cs index 920ca532325520413d4ab6b6eb6dcbdcc0a70415..f6b578a014e5744f2bd54e49ea566967b391afc8 100644 --- a/src/AutoUpdate.Differential/App.xaml.cs +++ b/src/AutoUpdate.Differential/App.xaml.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; +using System.Windows; namespace AutoUpdate.Differential { @@ -14,4 +8,4 @@ namespace AutoUpdate.Differential public partial class App : Application { } -} +} \ No newline at end of file diff --git a/src/AutoUpdate.Differential/AssemblyInfo.cs b/src/AutoUpdate.Differential/AssemblyInfo.cs index 22112342ead3cc40cbd4be95b3f91a26277f5989..bfbf6e201ec7acf337b0164fbf261a446bcb9e1e 100644 --- a/src/AutoUpdate.Differential/AssemblyInfo.cs +++ b/src/AutoUpdate.Differential/AssemblyInfo.cs @@ -1,10 +1,10 @@ using System.Windows; -[assembly:ThemeInfo( +[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) -)] +)] \ No newline at end of file diff --git a/src/AutoUpdate.Differential/MainWindow.xaml b/src/AutoUpdate.Differential/MainWindow.xaml index d3afc140bdcd9774238d0cc16030b204de71dff2..7643a7e7b47ef9056bdc5cde98f545817b4710d5 100644 --- a/src/AutoUpdate.Differential/MainWindow.xaml +++ b/src/AutoUpdate.Differential/MainWindow.xaml @@ -1,17 +1,16 @@  - + - + \ No newline at end of file diff --git a/src/AutoUpdate.Differential/MainWindow.xaml.cs b/src/AutoUpdate.Differential/MainWindow.xaml.cs index cd8afd875e26ac046b13f15fad039fb08d01d9d0..44363aa64f36c2349c4f37a0aebda1d7a8d8e868 100644 --- a/src/AutoUpdate.Differential/MainWindow.xaml.cs +++ b/src/AutoUpdate.Differential/MainWindow.xaml.cs @@ -1,19 +1,7 @@ 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 { @@ -67,4 +55,4 @@ namespace AutoUpdate.Differential }); } } -} +} \ No newline at end of file diff --git a/src/AutoUpdate.ZIP/MainWindow.xaml.cs b/src/AutoUpdate.ZIP/MainWindow.xaml.cs index 89b621730b50a1f6ceaeb36f1f59ba84f01873b9..acf301b86887d95ebc2504530e987cceddaff632 100644 --- a/src/AutoUpdate.ZIP/MainWindow.xaml.cs +++ b/src/AutoUpdate.ZIP/MainWindow.xaml.cs @@ -31,7 +31,7 @@ namespace AutoUpdate.ZIP { var factory = new GeneralZipFactory(); factory.CompressProgress += OnCompressProgress; - //压缩该路径下所有的文件:D:\Updatetest_hub\Run_app , D:\Updatetest_hub + //Compress all files in this path:D:\Updatetest_hub\Run_app , D:\Updatetest_hub factory.CreatefOperate(GetOperationType(), TxtZipPath.Text, TxtUnZipPath.Text). CreatZip(); } @@ -53,7 +53,7 @@ namespace AutoUpdate.ZIP var factory = new GeneralZipFactory(); factory.UnZipProgress += OnUnZipProgress; factory.Completed += OnCompleted; - //解压文件包:D:\Updatetest_hub\Run_app\1.zip , D:\Updatetest_hub + //D:\Updatetest_hub\Run_app\1.zip , D:\Updatetest_hub factory.CreatefOperate(GetOperationType(), TxtZipPath.Text, TxtUnZipPath.Text, true). UnZip(); } diff --git a/src/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj b/src/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj index fb37e5e8fb98039df3e869778b4efb7e9f59898a..b192c416ebe64f1df67a878f4181d367b23edff5 100644 --- a/src/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj +++ b/src/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj @@ -1,9 +1,23 @@ - + netstandard2.0 + GeneralUpdate.ico + Snipaste_128.png + True + 1.1.0.0 + 1.1.0.0 + 1.1.0 + https://github.com/WELL-E/AutoUpdater + Copyright © 2022 + Provide update information proofreading and download update package services. + juster.zhu + + + + @@ -17,6 +31,10 @@ + + + + @@ -27,4 +45,11 @@ + + + True + \ + + + diff --git a/src/GeneralUpdate.AspNetCore/GeneralUpdate.ico b/src/GeneralUpdate.AspNetCore/GeneralUpdate.ico new file mode 100644 index 0000000000000000000000000000000000000000..7cb4a86c1bbf84baf7b783ab21b4a7e1cf700455 Binary files /dev/null and b/src/GeneralUpdate.AspNetCore/GeneralUpdate.ico differ diff --git a/src/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs b/src/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs index 33a86533a372c0d9f90c5cabf0d02e68b830d5be..8e521fb6a9d7d5c989637aad53b2a301c830738f 100644 --- a/src/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs +++ b/src/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs @@ -88,6 +88,12 @@ namespace GeneralUpdate.AspNetCore.Services return JsonConvert.SerializeObject(respDTO); } + /// + /// TODO: To be perfected, not available. + /// + /// + /// + /// public async Task UploadPatchPacket(HttpContext context, Func insertLastVserion) { //file root dir path 文件保存目录路径 @@ -151,18 +157,9 @@ namespace GeneralUpdate.AspNetCore.Services private void ParameterVerification(int clientType, string clientVersion, string serverLastVersion) { - if (clientType == 0) - { - throw new Exception(@"'clientType' cannot both be 0!"); - } - else if (string.IsNullOrWhiteSpace(clientVersion)) - { - throw new ArgumentNullException(@"'clientVersion' cannot be null!"); - } - else if (string.IsNullOrWhiteSpace(serverLastVersion)) - { - throw new ArgumentNullException(@"'serverLastVersion' cannot be null!"); - } + if (clientType <= 0) throw new Exception(@"'clientType' cannot be less than or equal to 0 !"); + if (string.IsNullOrWhiteSpace(clientVersion)) throw new ArgumentNullException(@"'clientVersion' cannot be null !"); + if (string.IsNullOrWhiteSpace(serverLastVersion)) throw new ArgumentNullException(@"'serverLastVersion' cannot be null !"); } } } \ No newline at end of file diff --git a/src/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj b/src/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj index e6a65251521507dae825b1a51b18609c965b7677..263e08baef99665601f0d584f90eac8297f0fba5 100644 --- a/src/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj +++ b/src/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj @@ -2,11 +2,18 @@ netstandard2.0 - 1.1.2.0 - 1.1.2.0 - 1.1.2 + 2.3.6.0 + 2.3.6.0 + 2.3.6 juster.chu - Updateable and automatically update the component itself. + Provides functions related to upgrade and update programs. + GeneralUpdate.ico + Snipaste_128.png + False + True + https://github.com/WELL-E/AutoUpdater + Copyright © 2022 + Provides high-performance, low-loss, resume-breakpoint, version-by-version update, binary differential update, incremental update function, configuration file retention update and other features @@ -18,6 +25,7 @@ + @@ -133,4 +141,11 @@ + + + True + \ + + + diff --git a/src/GeneralUpdate.ClientCore/GeneralUpdate.ico b/src/GeneralUpdate.ClientCore/GeneralUpdate.ico new file mode 100644 index 0000000000000000000000000000000000000000..7cb4a86c1bbf84baf7b783ab21b4a7e1cf700455 Binary files /dev/null and b/src/GeneralUpdate.ClientCore/GeneralUpdate.ico differ diff --git a/src/GeneralUpdate.ClientCore/Strategys/ClientStrategy.cs b/src/GeneralUpdate.ClientCore/Strategys/ClientStrategy.cs index d8f5b4ae2b6c4cf3c760344784bfacc19453d600..31bd50936af4b20f8aeb9cd7d49e754d4abfc749 100644 --- a/src/GeneralUpdate.ClientCore/Strategys/ClientStrategy.cs +++ b/src/GeneralUpdate.ClientCore/Strategys/ClientStrategy.cs @@ -1,8 +1,8 @@ using GeneralUpdate.Core.DTOs; using GeneralUpdate.Core.Models; -using GeneralUpdate.Core.Utils; using GeneralUpdate.Core.Strategys; using GeneralUpdate.Core.Update; +using GeneralUpdate.Core.Utils; using System; using System.Diagnostics; using System.Threading.Tasks; diff --git a/src/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs b/src/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs index 13c908bd62f81c69844aafea06e341e11346bba5..f2f0cc7cb96d3621313faa9f2f1dccefea0b2b3c 100644 --- a/src/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs +++ b/src/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs @@ -153,6 +153,13 @@ namespace GeneralUpdate.Core.Bootstrap #region Config option. + /// + /// Setting update configuration. + /// + /// + /// Configuration Action Enumeration. + /// Value + /// public virtual TBootstrap Option(UpdateOption option, T value) { Contract.Requires(option != null); diff --git a/src/GeneralUpdate.Core/CustomAwaiter/IAwaitable.cs b/src/GeneralUpdate.Core/CustomAwaiter/IAwaitable.cs index 25081aa2c1df8de1b86cce260ae181265879a6bd..0c854044ef59f2bba3f9a7787cdd875e50f047cd 100644 --- a/src/GeneralUpdate.Core/CustomAwaiter/IAwaitable.cs +++ b/src/GeneralUpdate.Core/CustomAwaiter/IAwaitable.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace GeneralUpdate.Core.CustomAwaiter +namespace GeneralUpdate.Core.CustomAwaiter { public interface IAwaitable where TAwaiter : IAwaiter { @@ -13,4 +9,4 @@ namespace GeneralUpdate.Core.CustomAwaiter { TAwaiter GetAwaiter(); } -} +} \ No newline at end of file diff --git a/src/GeneralUpdate.Core/CustomAwaiter/IAwaiter.cs b/src/GeneralUpdate.Core/CustomAwaiter/IAwaiter.cs index bf917d05ba584aae9909390abfbb8cf419a48c96..42255ef04049a95f5be13fe959d3edc71465c842 100644 --- a/src/GeneralUpdate.Core/CustomAwaiter/IAwaiter.cs +++ b/src/GeneralUpdate.Core/CustomAwaiter/IAwaiter.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Text; +using System.Runtime.CompilerServices; namespace GeneralUpdate.Core.CustomAwaiter { @@ -18,4 +15,4 @@ namespace GeneralUpdate.Core.CustomAwaiter TResult GetResult(); } -} +} \ No newline at end of file diff --git a/src/GeneralUpdate.Core/CustomAwaiter/ICriticalAwaiter.cs b/src/GeneralUpdate.Core/CustomAwaiter/ICriticalAwaiter.cs index b4d36916083e87ce35603a0b130305c158eccaa5..f4876ca403c570162f726608567068b5a6108ed2 100644 --- a/src/GeneralUpdate.Core/CustomAwaiter/ICriticalAwaiter.cs +++ b/src/GeneralUpdate.Core/CustomAwaiter/ICriticalAwaiter.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Text; +using System.Runtime.CompilerServices; namespace GeneralUpdate.Core.CustomAwaiter { @@ -12,4 +9,4 @@ namespace GeneralUpdate.Core.CustomAwaiter public interface ICriticalAwaiter : IAwaiter, ICriticalNotifyCompletion { } -} +} \ No newline at end of file diff --git a/src/GeneralUpdate.Core/GeneralUpdate.Core.csproj b/src/GeneralUpdate.Core/GeneralUpdate.Core.csproj index 183931e566e2557fafa696fa71a60eff7d4b265e..59d4d94e45d68cc009ce05a13457ea016f2dc0b0 100644 --- a/src/GeneralUpdate.Core/GeneralUpdate.Core.csproj +++ b/src/GeneralUpdate.Core/GeneralUpdate.Core.csproj @@ -2,11 +2,20 @@ netstandard2.0 Library - F35F100D-B8E9-4F20-8572-7AB549913D69 - 2.0.1 - juster.chu - none + $(AssemblyName) + 4.10.12 + juster.zhu + juster.zhu false + GeneralUpdate.ico + Snipaste_128.png + True + Copyright © 2022 + This section describes how to upgrade client applications. + Provides high-performance, low-loss, resume-breakpoint, version-by-version update, binary differential update, incremental update function, configuration file retention update and other features. + https://github.com/WELL-E/AutoUpdater + GeneralUpdate.Core + GeneralUpdate.Core @@ -28,9 +37,16 @@ + + + + True + \ + + diff --git a/src/GeneralUpdate.Core/GeneralUpdate.ico b/src/GeneralUpdate.Core/GeneralUpdate.ico new file mode 100644 index 0000000000000000000000000000000000000000..7cb4a86c1bbf84baf7b783ab21b4a7e1cf700455 Binary files /dev/null and b/src/GeneralUpdate.Core/GeneralUpdate.ico differ diff --git a/src/GeneralUpdate.Core/GeneralUpdateBootstrap.cs b/src/GeneralUpdate.Core/GeneralUpdateBootstrap.cs index 77aa67a908f398107c1882b160dafd7878a4689d..059b99b41e61f177353094abe663e1c2c5fad972 100644 --- a/src/GeneralUpdate.Core/GeneralUpdateBootstrap.cs +++ b/src/GeneralUpdate.Core/GeneralUpdateBootstrap.cs @@ -1,7 +1,7 @@ -using GeneralUpdate.Core.Models; -using GeneralUpdate.Core.Utils; -using GeneralUpdate.Core.Bootstrap; +using GeneralUpdate.Core.Bootstrap; +using GeneralUpdate.Core.Models; using GeneralUpdate.Core.Strategys; +using GeneralUpdate.Core.Utils; using System; namespace GeneralUpdate.Core diff --git a/src/GeneralUpdate.Core/Models/ClientParameter.cs b/src/GeneralUpdate.Core/Models/ClientParameter.cs index 2f007c5b1d64558ac26fe7884294ddb3a28376f0..5d15f8792eb2c7744d005445c52dd0062ce3a218 100644 --- a/src/GeneralUpdate.Core/Models/ClientParameter.cs +++ b/src/GeneralUpdate.Core/Models/ClientParameter.cs @@ -96,7 +96,5 @@ namespace GeneralUpdate.Core.Models public string Version { get; set; } public string Url { get; set; } - - public bool IsUnZip { get; set; } } } \ No newline at end of file diff --git a/src/GeneralUpdate.Core/Models/FileBase.cs b/src/GeneralUpdate.Core/Models/FileBase.cs index eef08a880b395c2335c13f0e75f7b37a1006da69..c5c5349a1febcc002307a817b733418c978b4065 100644 --- a/src/GeneralUpdate.Core/Models/FileBase.cs +++ b/src/GeneralUpdate.Core/Models/FileBase.cs @@ -1,5 +1,4 @@ using GeneralUpdate.Core.Update; -using System; namespace GeneralUpdate.Core.Models { @@ -8,50 +7,50 @@ namespace GeneralUpdate.Core.Models /// /// 文件名 /// - public string Name { get; set; } + //public string Name { get; set; } /// /// MD5校验码 /// - public string MD5 { get; set; } + //public string MD5 { get; set; } /// - /// 当前版本 + /// Client current version. /// public string ClientVersion { get; set; } /// - /// 最新版本 + /// The latest version. /// public string LastVersion { get; set; } /// /// 文件唯一id /// - public string Guid { get; set; } + //public string Guid { get; set; } /// /// 文件大小 /// - public long Size { get; set; } + //public long Size { get; set; } /// /// 下载的文件大小 /// - public long? TotalSize { get; set; } + //public long? TotalSize { get; set; } /// /// 时间 /// - public DateTime Date { get; set; } + //public DateTime Date { get; set; } /// - /// 安装路径(用于更新文件逻辑) + /// installation path (for update file logic). /// public string InstallPath { get; set; } /// - /// 下载文件临时存储路径(用于更新文件逻辑) + /// Download file temporary storage path (for update file logic). /// public string TempPath { get; set; } } diff --git a/src/GeneralUpdate.Core/Models/UpdateConfig.cs b/src/GeneralUpdate.Core/Models/UpdateConfig.cs index e1da6d9d5ac43a76c170f03c8a258ee0508b8ba7..1e3395dcedb9a689da2a5d2ff7e545b63dd9da6c 100644 --- a/src/GeneralUpdate.Core/Models/UpdateConfig.cs +++ b/src/GeneralUpdate.Core/Models/UpdateConfig.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace GeneralUpdate.Core.Models +namespace GeneralUpdate.Core.Models { public class UpdateConfig { @@ -18,4 +12,4 @@ namespace GeneralUpdate.Core.Models /// public string DoneDate { get; set; } } -} +} \ No newline at end of file diff --git a/src/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs b/src/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs index 405945feb11c83893dcb027232dbc7799197aec4..44fc8ccecc574cce270db7f5b6e94ce113575a7b 100644 --- a/src/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs +++ b/src/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs @@ -5,6 +5,9 @@ using System.Text; namespace GeneralUpdate.Core.Pipelines.Context { + /// + /// Pipeline common content. + /// public class BaseContext { private Action ProgressEventAction { get; set; } diff --git a/src/GeneralUpdate.Core/Pipelines/Middleware/MD5Middleware.cs b/src/GeneralUpdate.Core/Pipelines/Middleware/MD5Middleware.cs index d83de5ab383e37ac4e25e4775df1748d924828b2..b3153f1d1f8b4b4635d65a121aca3edbd6d682de 100644 --- a/src/GeneralUpdate.Core/Pipelines/Middleware/MD5Middleware.cs +++ b/src/GeneralUpdate.Core/Pipelines/Middleware/MD5Middleware.cs @@ -1,6 +1,6 @@ -using GeneralUpdate.Core.Utils; -using GeneralUpdate.Core.Pipelines.Context; +using GeneralUpdate.Core.Pipelines.Context; using GeneralUpdate.Core.Update; +using GeneralUpdate.Core.Utils; using System; using System.Threading.Tasks; @@ -20,7 +20,7 @@ namespace GeneralUpdate.Core.Pipelines.Middleware var node = stack.Pop(); if (node != null) await node.Next.Invoke(context, stack); } - catch(Exception ex) + catch (Exception ex) { context.OnExceptionEventAction(this, exception ?? ex); throw exception; diff --git a/src/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs b/src/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs index c86082c723fdf845a870099a3eb0af17cfb67385..81433a6ee408f6f30808d455d05ddd51f9091298 100644 --- a/src/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs +++ b/src/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs @@ -24,7 +24,7 @@ namespace GeneralUpdate.Core.Pipelines.Middleware var node = stack.Pop(); if (node != null) await node.Next.Invoke(context, stack); } - catch(Exception ex) + catch (Exception ex) { exception = exception ?? ex; context.OnExceptionEventAction(this, exception); diff --git a/src/GeneralUpdate.Core/Pipelines/MiddlewareResolver/ActivatorMiddlewareResolver.cs b/src/GeneralUpdate.Core/Pipelines/MiddlewareResolver/ActivatorMiddlewareResolver.cs index c993d7ceac3481b2c87e03ec4f5cb50c01c69591..55f2c79f3863df4f8e1c0e8b46ad3a1c56d4f546 100644 --- a/src/GeneralUpdate.Core/Pipelines/MiddlewareResolver/ActivatorMiddlewareResolver.cs +++ b/src/GeneralUpdate.Core/Pipelines/MiddlewareResolver/ActivatorMiddlewareResolver.cs @@ -4,9 +4,6 @@ namespace GeneralUpdate.Core.Pipelines.MiddlewareResolver { public class ActivatorMiddlewareResolver { - public static object Resolve(Type type) - { - return Activator.CreateInstance(type); - } + public static object Resolve(Type type) => Activator.CreateInstance(type); } } \ No newline at end of file diff --git a/src/GeneralUpdate.Core/Pipelines/Pipeline/IPipelineBuilder.cs b/src/GeneralUpdate.Core/Pipelines/Pipeline/IPipelineBuilder.cs index fee59bdc8f7bb245b1614c5a593d5131e2bf590b..d7d1e92918ca0f5ab0a6289c9050d9efb2fea2b7 100644 --- a/src/GeneralUpdate.Core/Pipelines/Pipeline/IPipelineBuilder.cs +++ b/src/GeneralUpdate.Core/Pipelines/Pipeline/IPipelineBuilder.cs @@ -5,8 +5,17 @@ namespace GeneralUpdate.Core.Pipelines.Pipeline { public interface IPipelineBuilder { + /// + /// reference middleware. + /// + /// + /// IPipelineBuilder Use(IMiddleware middleware); + /// + /// start the pipeline. + /// + /// Task Launch(); } } \ No newline at end of file diff --git a/src/GeneralUpdate.Core/Strategys/Strategy.cs b/src/GeneralUpdate.Core/Strategys/Strategy.cs index 911010b36ef34c2c0560f3f650016c280e4d35ce..7f9b995d0962a2a7fa6d784c57c0e9f33daab802 100644 --- a/src/GeneralUpdate.Core/Strategys/Strategy.cs +++ b/src/GeneralUpdate.Core/Strategys/Strategy.cs @@ -1,13 +1,13 @@ using GeneralUpdate.Core.Models; +using GeneralUpdate.Core.Pipelines; +using GeneralUpdate.Core.Pipelines.Context; +using GeneralUpdate.Core.Pipelines.Middleware; using GeneralUpdate.Core.Update; +using GeneralUpdate.Core.Utils; using System; 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 @@ -23,7 +23,7 @@ namespace GeneralUpdate.Core.Strategys protected UpdatePacket Packet { get; set; } protected Action ProgressEventAction { get; set; } protected Action ExceptionEventAction { get; set; } - + #endregion Private Members #region Public Methods @@ -40,7 +40,7 @@ namespace GeneralUpdate.Core.Strategys { try { - Task.Run(async () => + Task.Run(async () => { var updateVersions = Packet.UpdateVersions.OrderBy(x => x.PubTime).ToList(); var patchPath = FileUtil.GetTempDirectory(PATCHS); diff --git a/src/GeneralUpdate.Core/Utils/FileUtil.cs b/src/GeneralUpdate.Core/Utils/FileUtil.cs index be79edf9ade6ad0dc9418e0836cbefab153c6a79..110c3d3e9c9b43666c51b5e874bd2543d325e4a4 100644 --- a/src/GeneralUpdate.Core/Utils/FileUtil.cs +++ b/src/GeneralUpdate.Core/Utils/FileUtil.cs @@ -9,17 +9,6 @@ namespace GeneralUpdate.Core.Utils { public static class FileUtil { - public static void Update32Or64Libs(string currentDir) - { - var is64XSystem = Environment.Is64BitOperatingSystem; - var sourceDir = Path.Combine(currentDir, is64XSystem ? "x64" : "x32"); - var destDir = Path.Combine(currentDir, "dlls"); - - if (!Directory.Exists(sourceDir)) return; - DirectoryCopy(sourceDir, destDir, true, true, null); - Directory.Delete(sourceDir); - } - public static string GetFileMD5(string fileName) { try diff --git a/src/GeneralUpdate.Differential/Binary/BinaryHandle.cs b/src/GeneralUpdate.Differential/Binary/BinaryHandle.cs index e137d57a42083160de5058129afe92ed02aa89ae..4c6e76b898e551606843b27e863d0f48ea8711cb 100644 --- a/src/GeneralUpdate.Differential/Binary/BinaryHandle.cs +++ b/src/GeneralUpdate.Differential/Binary/BinaryHandle.cs @@ -17,6 +17,14 @@ namespace GeneralUpdate.Differential.Binary #region Public Methods + /// + /// Clean out the files that need to be updated and generate the update package. + /// + /// Old version file path. + /// New version file path + /// Patch file generation path. + /// + /// public async Task Clean(string oldfilePath, string newfilePath, string patchPath) { _oldfilePath = oldfilePath; @@ -205,6 +213,15 @@ namespace GeneralUpdate.Differential.Binary } } + /// + /// Update the patch file to the client application. + /// + /// + /// + /// + /// + /// + /// public async Task Drity(string oldfilePath, string newfilePath, string patchPath) { _oldfilePath = oldfilePath; diff --git a/src/GeneralUpdate.Differential/Common/Filefilter.cs b/src/GeneralUpdate.Differential/Common/Filefilter.cs index 95bc459b18b467d03b4dfd609e9740cac8320df0..1e5f11b06e99e58b2cdcd8785c1eeef949d186a2 100644 --- a/src/GeneralUpdate.Differential/Common/Filefilter.cs +++ b/src/GeneralUpdate.Differential/Common/Filefilter.cs @@ -4,10 +4,11 @@ namespace GeneralUpdate.Differential.Common { public class Filefilter { - public static readonly List All = new List() { ".db", ".xml", ".ini", ".json", ".config" }; - public static readonly List Temp = new List() { ".json" }; - public static readonly List Diff = new List() { ".patch", ".7z", ".zip", ".rar" , ".tar", ".db", ".xml", ".ini", ".json", ".config" }; + /// + /// File formats to avoid when doing differential updates. + /// + public static readonly List Diff = new List() { ".patch", ".7z", ".zip", ".rar", ".tar", ".db", ".xml", ".ini", ".json", ".config" }; } } \ No newline at end of file diff --git a/src/GeneralUpdate.Differential/Config/ConfigFactory.cs b/src/GeneralUpdate.Differential/Config/ConfigFactory.cs index 038dde3aa995432215e135cf7f080d6947c7c477..8f2cf681b482e49681801c5259fcff6830471bf6 100644 --- a/src/GeneralUpdate.Differential/Config/ConfigFactory.cs +++ b/src/GeneralUpdate.Differential/Config/ConfigFactory.cs @@ -93,6 +93,10 @@ namespace GeneralUpdate.Differential.Config /// /// Scan configuration files and cache, backup. /// + /// The application directory that needs to be updated. + /// update package directory. + /// + /// public async Task Scan(string appPath = null, string scanPath = null) { try diff --git a/src/GeneralUpdate.Differential/DifferentialCore.cs b/src/GeneralUpdate.Differential/DifferentialCore.cs index 739f30373a6038b3c515299f303c3849f3000003..de2a755bf8c8f71c29d3284e1494671e82739349 100644 --- a/src/GeneralUpdate.Differential/DifferentialCore.cs +++ b/src/GeneralUpdate.Differential/DifferentialCore.cs @@ -131,7 +131,7 @@ namespace GeneralUpdate.Differential { //Only the difference file (.patch) can be updated here. var findFile = patchFiles.FirstOrDefault(f => Path.GetFileNameWithoutExtension(f.Name).Equals(Path.GetFileNameWithoutExtension(oldFile.Name))); - if (findFile != null) + if (findFile != null) { var extensionName = Path.GetExtension(findFile.FullName); if (!extensionName.Equals(PATCH_FORMAT)) continue; @@ -197,7 +197,10 @@ namespace GeneralUpdate.Differential #region Private Methods - private void OnCompressProgress(object sender, BaseCompressProgressEventArgs e) => _compressProgressCallback(sender, e); + private void OnCompressProgress(object sender, BaseCompressProgressEventArgs e) + { + if (_compressProgressCallback != null) _compressProgressCallback(sender, e); + } #endregion Private Methods } diff --git a/src/GeneralUpdate.Differential/GeneralUpdate.Differential.csproj b/src/GeneralUpdate.Differential/GeneralUpdate.Differential.csproj index 75906870611de8cb6a5f49f4ffe974ddd5aff8f7..bd38043893bcc8f50a453c07642742b66752adf2 100644 --- a/src/GeneralUpdate.Differential/GeneralUpdate.Differential.csproj +++ b/src/GeneralUpdate.Differential/GeneralUpdate.Differential.csproj @@ -2,8 +2,18 @@ netstandard2.0 + GeneralUpdate.ico + Snipaste_128.png + True + https://github.com/WELL-E/AutoUpdater + The binary differential update function is provided, but the configuration file update function is reserved. + juster.zhu + + + + @@ -22,6 +32,13 @@ + + + True + \ + + + diff --git a/src/GeneralUpdate.Differential/GeneralUpdate.ico b/src/GeneralUpdate.Differential/GeneralUpdate.ico new file mode 100644 index 0000000000000000000000000000000000000000..7cb4a86c1bbf84baf7b783ab21b4a7e1cf700455 Binary files /dev/null and b/src/GeneralUpdate.Differential/GeneralUpdate.ico differ diff --git a/src/GeneralUpdate.Single/GeneralUpdate.Single.csproj b/src/GeneralUpdate.Single/GeneralUpdate.Single.csproj index 3dd641c04d81b34156a279c354ebbcb921e4e90d..665ab4b074f67d823963ecc834d7b5b86a9f63e1 100644 --- a/src/GeneralUpdate.Single/GeneralUpdate.Single.csproj +++ b/src/GeneralUpdate.Single/GeneralUpdate.Single.csproj @@ -37,6 +37,10 @@ + + + + diff --git a/src/GeneralUpdate.Single/GeneralUpdate.ico b/src/GeneralUpdate.Single/GeneralUpdate.ico new file mode 100644 index 0000000000000000000000000000000000000000..7cb4a86c1bbf84baf7b783ab21b4a7e1cf700455 Binary files /dev/null and b/src/GeneralUpdate.Single/GeneralUpdate.ico differ diff --git a/src/GeneralUpdate.Zip/Factory/IFactory.cs b/src/GeneralUpdate.Zip/Factory/IFactory.cs index 41c6ca0f706da79b1bc0bfa58a4521e46703eb7c..d1b43b4ae6ef999d96684744deecc465de07ba0d 100644 --- a/src/GeneralUpdate.Zip/Factory/IFactory.cs +++ b/src/GeneralUpdate.Zip/Factory/IFactory.cs @@ -6,8 +6,16 @@ namespace GeneralUpdate.Zip.Factory { IFactory CreatefOperate(OperationType type, string sourcePath, string destinationPath, bool includeBaseDirectory = false, Encoding encoding = null); + /// + /// Create a compressed package. + /// + /// IFactory CreatZip(); + /// + /// unzip + /// + /// IFactory UnZip(); } } \ No newline at end of file diff --git a/src/GeneralUpdate.Zip/Factory/IOperation.cs b/src/GeneralUpdate.Zip/Factory/IOperation.cs index 805c6964af857fff1c0124926ef901ceb5e25b6c..e05dc6e6fe86cbf3b33bbad3a8cdbcff6966de50 100644 --- a/src/GeneralUpdate.Zip/Factory/IOperation.cs +++ b/src/GeneralUpdate.Zip/Factory/IOperation.cs @@ -5,10 +5,25 @@ namespace GeneralUpdate.Zip.Factory { public interface IOperation { + /// + /// Configure compression parameters. + /// + /// path to be packaged. + /// unzip path. + /// Compressed Content Coding Format. + /// Whether to include the root directory when packaging. void Configs(string sourcePath, string destinationPath, Encoding encoding, bool includeBaseDirectory = false); + /// + /// Create a compressed package. + /// + /// bool CreatZip(); + /// + /// unzip + /// + /// bool UnZip(); void OnCompressProgressEventHandler(object sender, BaseCompressProgressEventArgs e); diff --git a/src/GeneralUpdate.Zip/GeneralUpdate.Zip.csproj b/src/GeneralUpdate.Zip/GeneralUpdate.Zip.csproj index 250e23ad13fded9c48a841c95cf048c75d36f71e..868d996ce9a53096606ae5bc27272654ca42a1e4 100644 --- a/src/GeneralUpdate.Zip/GeneralUpdate.Zip.csproj +++ b/src/GeneralUpdate.Zip/GeneralUpdate.Zip.csproj @@ -5,7 +5,12 @@ GeneralUpdate.Zip juster.chu Decompress the compressed file with progress notification. - Copyright © 2021 + Copyright © 2022 + GeneralUpdate.ico + Snipaste_128.png + True + 2.2.0 + https://github.com/WELL-E/AutoUpdater @@ -15,11 +20,19 @@ + + + + True + \ + + + diff --git a/src/GeneralUpdate.Zip/GeneralUpdate.ico b/src/GeneralUpdate.Zip/GeneralUpdate.ico new file mode 100644 index 0000000000000000000000000000000000000000..7cb4a86c1bbf84baf7b783ab21b4a7e1cf700455 Binary files /dev/null and b/src/GeneralUpdate.Zip/GeneralUpdate.ico differ diff --git a/src/GeneralUpdate.Zip/GeneralZipFactory.cs b/src/GeneralUpdate.Zip/GeneralZipFactory.cs index d30eeb600bca87b55770f933905ef6cd39466ed5..4e47f28200cb7a5ca0c9550b4105e7326757b1f1 100644 --- a/src/GeneralUpdate.Zip/GeneralZipFactory.cs +++ b/src/GeneralUpdate.Zip/GeneralZipFactory.cs @@ -75,10 +75,6 @@ namespace GeneralUpdate.Zip if (CompressProgress != null) CompressProgress(sender, e); } - /// - /// Creat zip. - /// - /// public IFactory CreatZip() { try @@ -92,10 +88,6 @@ namespace GeneralUpdate.Zip return this; } - /// - /// Un zip. - /// - /// public IFactory UnZip() { try