Compare commits
2 Commits
218e1456f2
...
WindowsDef
Author | SHA1 | Date | |
---|---|---|---|
a3708d496a | |||
0b8d48e714 |
@@ -137,16 +137,16 @@
|
||||
<Reference Include="System.Configuration" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Update.cs">
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Update.Designer.cs">
|
||||
<DependentUpon>Update.cs</DependentUpon>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Update.resx">
|
||||
<DependentUpon>Update.cs</DependentUpon>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
@@ -184,23 +184,22 @@
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="7z.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<EmbeddedResource Include="7z-x86.dll" />
|
||||
<EmbeddedResource Include="7z-x64.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用"NuGet 程序包还原"可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('packages\Fody.6.9.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Fody.6.9.2\build\Fody.targets'))" />
|
||||
<Error Condition="!Exists('packages\Costura.Fody.6.0.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.6.0.0\build\Costura.Fody.props'))" />
|
||||
<Error Condition="!Exists('packages\Costura.Fody.6.0.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.6.0.0\build\Costura.Fody.targets'))" />
|
||||
<!-- <Error Condition="!Exists('packages\SevenZipSharp.Interop.19.1.0\build\SevenZipSharp.Interop.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\SevenZipSharp.Interop.19.1.0\build\SevenZipSharp.Interop.targets'))" /> -->
|
||||
<!-- <Error Condition="!Exists('packages\SevenZipExtractor.1.0.19\build\SevenZipExtractor.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\SevenZipExtractor.1.0.19\build\SevenZipExtractor.targets'))" /> -->
|
||||
<Error Condition="!Exists('packages\Fody.6.9.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Fody.6.9.2\build\Fody.targets'))" />
|
||||
<Error Condition="!Exists('packages\SevenZipSharp.Interop.19.1.0\build\SevenZipSharp.Interop.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\SevenZipSharp.Interop.19.1.0\build\SevenZipSharp.Interop.targets'))" />
|
||||
<Error Condition="!Exists('packages\SevenZipExtractor.1.0.19\build\SevenZipExtractor.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\SevenZipExtractor.1.0.19\build\SevenZipExtractor.targets'))" />
|
||||
</Target>
|
||||
<Import Project="packages\Fody.6.9.2\build\Fody.targets" Condition="Exists('packages\Fody.6.9.2\build\Fody.targets')" />
|
||||
<Import Project="packages\Costura.Fody.6.0.0\build\Costura.Fody.targets" Condition="Exists('packages\Costura.Fody.6.0.0\build\Costura.Fody.targets')" />
|
||||
<!-- <Import Project="packages\SevenZipSharp.Interop.19.1.0\build\SevenZipSharp.Interop.targets" Condition="Exists('packages\SevenZipSharp.Interop.19.1.0\build\SevenZipSharp.Interop.targets')" /> -->
|
||||
<!-- <Import Project="packages\SevenZipExtractor.1.0.19\build\SevenZipExtractor.targets" Condition="Exists('packages\SevenZipExtractor.1.0.19\build\SevenZipExtractor.targets')" /> -->
|
||||
<Import Project="packages\Fody.6.9.2\build\Fody.targets" Condition="Exists('packages\Fody.6.9.2\build\Fody.targets')" />
|
||||
<Import Project="packages\SevenZipSharp.Interop.19.1.0\build\SevenZipSharp.Interop.targets" Condition="Exists('packages\SevenZipSharp.Interop.19.1.0\build\SevenZipSharp.Interop.targets')" />
|
||||
<Import Project="packages\SevenZipExtractor.1.0.19\build\SevenZipExtractor.targets" Condition="Exists('packages\SevenZipExtractor.1.0.19\build\SevenZipExtractor.targets')" />
|
||||
</Project>
|
19
Update.Designer.cs → Form1.Designer.cs
generated
19
Update.Designer.cs → Form1.Designer.cs
generated
@@ -28,12 +28,22 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.Update_Text = new System.Windows.Forms.Label();
|
||||
this.Update_Pro = new System.Windows.Forms.ProgressBar();
|
||||
this.Status_Box = new System.Windows.Forms.Label();
|
||||
this.Count_Box = new System.Windows.Forms.Label();
|
||||
this.Size_Box = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// Update_Text
|
||||
//
|
||||
this.Update_Text.AutoSize = true;
|
||||
this.Update_Text.Location = new System.Drawing.Point(12, 12);
|
||||
this.Update_Text.Name = "Update_Text";
|
||||
this.Update_Text.Size = new System.Drawing.Size(59, 12);
|
||||
this.Update_Text.TabIndex = 0;
|
||||
this.Update_Text.Text = "更新状态:";
|
||||
//
|
||||
// Update_Pro
|
||||
//
|
||||
this.Update_Pro.Location = new System.Drawing.Point(12, 36);
|
||||
@@ -43,9 +53,10 @@
|
||||
//
|
||||
// Status_Box
|
||||
//
|
||||
this.Status_Box.Location = new System.Drawing.Point(12, 12);
|
||||
this.Status_Box.AutoSize = false;
|
||||
this.Status_Box.Location = new System.Drawing.Point(72, 12);
|
||||
this.Status_Box.Name = "Status_Box";
|
||||
this.Status_Box.Size = new System.Drawing.Size(148, 12);
|
||||
this.Status_Box.Size = new System.Drawing.Size(94, 12);
|
||||
this.Status_Box.TabIndex = 2;
|
||||
this.Status_Box.Text = "...";
|
||||
//
|
||||
@@ -75,6 +86,7 @@
|
||||
this.Controls.Add(this.Count_Box);
|
||||
this.Controls.Add(this.Status_Box);
|
||||
this.Controls.Add(this.Update_Pro);
|
||||
this.Controls.Add(this.Update_Text);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
@@ -84,10 +96,13 @@
|
||||
this.TopMost = true;
|
||||
this.Load += new System.EventHandler(this.Update_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label Update_Text;
|
||||
private System.Windows.Forms.ProgressBar Update_Pro;
|
||||
private System.Windows.Forms.Label Status_Box;
|
||||
private System.Windows.Forms.Label Count_Box;
|
File diff suppressed because it is too large
Load Diff
@@ -1,120 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
130
README.md
130
README.md
@@ -32,8 +32,8 @@
|
||||
|
||||
## 用户界面
|
||||
|
||||
- **实时进度显示**:通过进度条、已完成数量/总数以及 **已下载总量(实时速度)** 的形式清晰地展示更新进度。已下载总量会包含已存在于临时目录的有效文件,速度则只计算运行时下载的部分。
|
||||
- **简洁的状态反馈**:界面会以 `下载:文件名...` 的格式显示当前任务,过长的文件名会被自动截断,避免信息刷屏。
|
||||
- **实时进度显示**:通过进度条、已完成数量/总数、下载速度等信息,清晰地展示更新进度。
|
||||
- **简洁的状态反馈**:界面只显示当前正在处理的文件名等核心信息,避免被冗长的日志刷屏。
|
||||
- **友好的错误提示**:当发生严重错误时,会弹出简明扼要的错误信息窗口,而不是难以理解的完整堆栈跟踪。
|
||||
- **自动定位与退出**:窗体启动时会自动停靠在屏幕右下角,更新完成后会自动关闭,对用户干扰极小。
|
||||
|
||||
@@ -53,43 +53,45 @@
|
||||
## 🚀 主要功能
|
||||
|
||||
### 📥 多源下载支持
|
||||
- **123盘云存储**: (UID: `1826795402`, Path: `/1826795402/KeyAuth`) 支持主备域名自动切换,提供高可用性下载服务。
|
||||
- **阿里云OSS**: 备用下载源,确保文件下载的可靠性。
|
||||
- **智能DNS解析**: 使用多个DNS服务器提高域名解析成功率。
|
||||
- **123盘云存储**: 支持主备域名自动切换,提供高可用性下载服务
|
||||
- **阿里云OSS**: 备用下载源,确保文件下载的可靠性
|
||||
- **智能DNS解析**: 使用多个DNS服务器提高域名解析成功率
|
||||
|
||||
### 🔄 智能更新机制
|
||||
- **MD5完整性验证**: 下载前后进行MD5校验,确保文件完整性。
|
||||
- **增量更新**: 仅下载已变更的文件,节省带宽和时间。
|
||||
- **断点续传支持**: 通过检查本地临时文件实现,若文件已存在且MD5匹配,则跳过下载。
|
||||
- **并发下载**: 可配置的多线程并发下载,显著提升下载速度。
|
||||
- **MD5完整性验证**: 下载前后进行MD5校验,确保文件完整性
|
||||
- **增量更新**: 仅下载已变更的文件,节省带宽和时间
|
||||
- **断点续传**: 支持网络中断后继续下载,提高下载成功率
|
||||
- **并发下载**: 可配置的多线程并发下载,显著提升下载速度
|
||||
|
||||
### 🛡️ 文件处理与安全
|
||||
- **文件占用处理**: 智能检测并处理被占用的文件,并创建延迟替换脚本。
|
||||
- **临时文件管理**: 自动清理临时文件,保持系统整洁。
|
||||
- **路径智能识别**: 基于MD5数据自动识别项目基准目录。
|
||||
- **文件占用处理**: 智能检测并处理被占用的文件
|
||||
- **批处理脚本**: 为被占用文件创建延迟替换脚本
|
||||
- **临时文件管理**: 自动清理临时文件,保持系统整洁
|
||||
- **路径智能识别**: 基于MD5数据自动识别项目基准目录
|
||||
|
||||
### 📦 自动解压功能
|
||||
- **7z格式支持**: 内置7z解压引擎,支持多种压缩格式。
|
||||
- **自动权限设置**: 解压后自动为exe文件设置管理员运行权限。
|
||||
- **多架构兼容**: 自动选择32位/64位解压库,适配不同运行环境。
|
||||
- **7z格式支持**: 内置7z解压引擎,支持多种压缩格式
|
||||
- **自动权限设置**: 解压后自动为exe文件设置管理员运行权限
|
||||
- **覆盖解压**: 支持覆盖模式解压,确保文件更新
|
||||
- **多架构兼容**: 自动选择32位/64位解压库,适配不同运行环境
|
||||
|
||||
### 🔧 错误处理与重试
|
||||
- **多次重试机制**: 下载失败自动重试,可配置重试次数。
|
||||
- **异常处理**: 完善的异常捕获和处理机制。
|
||||
- **状态实时显示**: 实时显示下载进度、状态和错误信息。
|
||||
- **多次重试机制**: 下载失败自动重试,可配置重试次数
|
||||
- **异常处理**: 完善的异常捕获和处理机制
|
||||
- **状态实时显示**: 实时显示下载进度、状态和错误信息
|
||||
|
||||
## 🏗️ 技术架构
|
||||
|
||||
### 核心组件
|
||||
- **.NET Framework**: 基于稳定的.NET Framework构建。
|
||||
- **异步编程**: 全面采用async/await模式,确保UI响应性。
|
||||
- **多线程下载**: 使用SemaphoreSlim控制并发数量。
|
||||
- **资源嵌入**: 将依赖库嵌入程序,实现单文件部署。
|
||||
- **.NET Framework 4.7.2**: 基于稳定的.NET Framework构建
|
||||
- **异步编程**: 全面采用async/await模式,确保UI响应性
|
||||
- **多线程下载**: 使用SemaphoreSlim控制并发数量
|
||||
- **资源嵌入**: 将依赖库嵌入程序,实现单文件部署
|
||||
|
||||
### 依赖库
|
||||
- **Aliyun.OSS.SDK**: 阿里云对象存储服务支持。
|
||||
- **Newtonsoft.Json**: JSON数据处理。
|
||||
- **SevenZipExtractor**: 7z压缩文件解压支持。
|
||||
- **Aliyun.OSS.SDK**: 阿里云对象存储服务支持
|
||||
- **Newtonsoft.Json**: JSON数据处理
|
||||
- **SevenZipExtractor**: 7z压缩文件解压支持
|
||||
|
||||
## 📋 配置说明
|
||||
|
||||
@@ -113,29 +115,79 @@
|
||||
"version": "1.0.0",
|
||||
"data": {
|
||||
"program.exe": "5d41402abc4b2a76b9719d911017c592",
|
||||
"lib/library.dll": "098f6bcd4621d373cade4e832627b4f6"
|
||||
"lib/library.dll": "098f6bcd4621d373cade4e832627b4f6",
|
||||
"config/settings.ini": "5e40d4c123456789abcdef1234567890"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 🔄 工作流程
|
||||
|
||||
1. **启动检查**: 程序启动时清理旧的更新文件 (`.new` 后缀)。
|
||||
2. **下载MD5**: 从云存储下载最新的MD5文件。
|
||||
3. **文件比较**: 对比本地文件与在线MD5,识别需要更新的文件。
|
||||
4. **并发下载**: 使用多线程下载需要更新的文件到临时目录。
|
||||
5. **完整性验证**: 验证下载文件的MD5值。
|
||||
6. **文件替换**: 将新文件移动到目标位置,对被占用文件创建替换脚本。
|
||||
7. **7z解压**: 自动检测并解压`tim.7z`文件(如果存在)。
|
||||
8. **权限设置**: 为解压的exe文件设置管理员运行权限。
|
||||
9. **清理完成**: 清理临时目录,显示完成状态后退出。
|
||||
1. **启动检查**: 程序启动时清理旧的临时文件
|
||||
2. **下载MD5**: 从云存储下载最新的MD5文件
|
||||
3. **文件比较**: 对比本地文件与在线MD5,识别需要更新的文件
|
||||
4. **并发下载**: 使用多线程下载需要更新的文件
|
||||
5. **完整性验证**: 验证下载文件的MD5值
|
||||
6. **文件替换**: 将新文件移动到目标位置
|
||||
7. **7z解压**: 自动检测并解压tim.7z文件
|
||||
8. **权限设置**: 为解压的exe文件设置管理员运行权限
|
||||
9. **清理完成**: 清理临时文件,显示完成状态
|
||||
|
||||
## 🎯 使用场景
|
||||
|
||||
- **软件自动更新**: 为桌面应用程序提供自动更新功能。
|
||||
- **文件同步**: 在不同设备间同步文件和配置。
|
||||
- **游戏更新**: 游戏客户端的增量更新和补丁分发。
|
||||
- **软件自动更新**: 为桌面应用程序提供自动更新功能
|
||||
- **文件同步**: 在不同设备间同步文件和配置
|
||||
- **批量部署**: 企业环境下的软件批量部署和更新
|
||||
- **游戏更新**: 游戏客户端的增量更新和补丁分发
|
||||
|
||||
## 🛠️ 开发特性
|
||||
|
||||
### 网络优化
|
||||
- **静态HttpClient**: 避免套接字耗尽问题
|
||||
- **连接池复用**: 提高网络请求效率
|
||||
- **超时控制**: 合理的超时设置,避免长时间等待
|
||||
|
||||
### 内存管理
|
||||
- **流式处理**: 大文件下载使用流式处理,控制内存占用
|
||||
- **及时释放**: 及时释放不再使用的资源
|
||||
- **临时文件**: 合理使用临时文件,避免内存溢出
|
||||
|
||||
### 用户体验
|
||||
- **进度显示**: 实时显示下载进度和文件信息
|
||||
- **状态反馈**: 详细的状态信息和错误提示
|
||||
- **窗口定位**: 智能定位到屏幕右下角,不影响用户操作
|
||||
|
||||
## 📈 性能特点
|
||||
|
||||
- **高效下载**: 多线程并发下载,充分利用网络带宽
|
||||
- **智能重试**: 失败文件智能重试,提高成功率
|
||||
- **资源节约**: 仅下载变更文件,节省网络流量
|
||||
- **快速启动**: 优化的启动流程,快速进入工作状态
|
||||
|
||||
## 🔒 安全性
|
||||
|
||||
- **MD5验证**: 确保文件在传输过程中没有被篡改
|
||||
- **用户权限**: 在当前用户权限下操作,避免权限滥用
|
||||
- **临时目录**: 使用用户临时目录,避免权限问题
|
||||
- **异常处理**: 完善的异常处理,避免程序崩溃
|
||||
|
||||
## 📝 版本历史
|
||||
|
||||
### 最新版本特性
|
||||
- ✅ 添加7z自动解压功能
|
||||
- ✅ 支持解压后程序自动设置管理员权限
|
||||
- ✅ 优化多线程下载性能
|
||||
- ✅ 增强错误处理和重试机制
|
||||
- ✅ 改进用户界面和状态显示
|
||||
- ✅ 过滤 .db / .db3 数据库文件,避免占用导致失败
|
||||
- ✅ 更新列表或压缩包中出现 tim.dll 时,自动结束 tim.exe 后替换
|
||||
- ✅ 所有文件匹配与进程检测均采用大小写不敏感逻辑,避免大小写差异造成的更新失败
|
||||
- ✅ 精简 Status_Box 文本,并在失败时弹窗展示核心错误信息
|
||||
|
||||
## 🤝 技术支持
|
||||
|
||||
如需技术支持或报告问题,请联系开发团队。
|
||||
|
||||
---
|
||||
|
||||
**注意**: 本程序需要网络连接以下载更新文件。首次运行时可能需要较长时间来下载所有必要的文件。
|
||||
**注意**: 本程序需要网络连接以下载更新文件。首次运行时可能需要较长时间来下载必要的文件。
|
@@ -9,8 +9,6 @@
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.6" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
|
||||
<package id="SevenZipExtractor" version="1.0.19" targetFramework="net472" />
|
||||
<package id="SevenZipSharp" version="0.64" targetFramework="net472" />
|
||||
<package id="SevenZipSharp.Interop" version="19.1.0" targetFramework="net472" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
||||
<package id="System.IO.Pipelines" version="9.0.6" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
|
||||
|
Reference in New Issue
Block a user