Skip to content

Commit

Permalink
升级到 v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuLing-zhang committed Feb 10, 2025
1 parent 3dc626c commit a8fa1d9
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 62 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## [2.2.6] 2024-09-25
## [2.3.0] 2025-02-10
### 🔥 更新说明
*新增流式配置
* 🌀 修改:显式指定图标路径为空时使用默认图标
*新增:支持通过 `GitHub Release` 方式更新
* 🌀 重构:优化代码逻辑

### 💬 [历史更新](CHANGELOG_FULL.md)
5 changes: 5 additions & 0 deletions CHANGELOG_FULL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [2.3.0] 2025-02-10
### 🔥 更新说明
* ⚡ 新增:支持通过 `GitHub Release` 方式更新
* 🌀 重构:优化代码逻辑

## [2.2.6] 2024-09-25
### 🔥 更新说明
* ⚡ 新增流式配置
Expand Down
65 changes: 38 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

👾 一个简单、易用的自动更新组件。 👉👉[English Version](./README_en.md)

**🤖 [v2.1 到 v2.2 升级指南](./v2.1_to_v2.2.md)**
**🤖 [v2.1 以前的版本进行升级](./v2.1_to_v2.2.md)**

<div align="center">
<img src="https://github.com/JiuLing-zhang/JiuLing.AutoUpgrade/raw/main/docs/resources/images/demo1.png" width="40%">
Expand All @@ -27,6 +27,7 @@
\- 🔥 组件支持自更新
\- 🌈 支持 `HTTP`
\- 🌀 支持 `FTP`
\- ⚡ 支持 `GitHub Release`
\- ⭐ 版本过期后禁止运行

## 运行方式
Expand All @@ -45,20 +46,24 @@
🟢 通过 [`Release`](https://github.com/JiuLing-zhang/JiuLing.AutoUpgrade/releases) 下载。

## 使用
1️⃣ 导入命名空间
### 1️⃣ 导入命名空间
```C#
using JiuLing.AutoUpgrade.Shell;
```
2️⃣ 创建更新程序
### 2️⃣ 创建更新程序
```C#
// HTTP 方式
IUpgradeApp app = UpgradeFactory.CreateHttpApp("url");

// FTP 方式
IUpgradeApp app = UpgradeFactory.CreateFtpApp("path", "username", "password");

// GitHub Release 方式
// assetName: update.zip
IUpgradeApp app = UpgradeFactory.CreateGitHubApp("owner", "repo", "assetName");
```

3️⃣ 启动
### 3️⃣ 启动
```C#
app.Run();
// or
Expand All @@ -70,29 +75,35 @@ await app.RunAsync();
await UpgradeFactory.CreateHttpApp("url").RunAsync();
```

**💠 自动更新接口需要返回如下格式的 `json` 内容。**

- Version: ❗[必须] 最新的版本号
- DownloadUrl: ❗[必须] 程序的下载路径
- FileLength: 文件大小,字节
- MinVersion: 程序运行的最低版本号,低于此版本将无法运行
- Log: 更新日志
- CreateTime: 时间
- SignType: 文件校验的签名方式
- SignValue: 文件校验的签名值

```json
{
"Version": "1.2.0",
"DownloadUrl": "xxxxx/update.zip",
"FileLength": 1887436,
"MinVersion": "1.1.0",
"Log": "1、修复了若干bug。2、新增了若干需求。",
"CreateTime": "2022-01-16 12:12:12",
"SignType": "MD5",
"SignValue": "f42c6cb229a0a1237c9945448342d59e"
}
```
### 4️⃣ 服务端配置
* `HTTP``FTP` 方式
**💠 自动更新接口需要返回如下格式的 `json` 内容。**

- Version: ❗[必须] 最新的版本号
- DownloadUrl: ❗[必须] 程序的下载路径
- FileLength: 文件大小,字节
- MinVersion: 程序运行的最低版本号,低于此版本将无法运行
- Log: 更新日志
- CreateTime: 时间
- SignType: 文件校验的签名方式
- SignValue: 文件校验的签名值

```json
{
"Version": "1.2.0",
"DownloadUrl": "xxxxx/update.zip",
"FileLength": 1887436,
"MinVersion": "1.1.0",
"Log": "1、修复了若干bug。2、新增了若干需求。",
"CreateTime": "2022-01-16 12:12:12",
"SignType": "MD5",
"SignValue": "f42c6cb229a0a1237c9945448342d59e"
}
```

* `GitHub Release` 方式
- 版本号: 获取 `Release` 的名称
- 程序下载路径: 获取 `Release` 中 `Assets Name` 匹配的文件地址

## 🔨 高级设置

Expand Down
67 changes: 39 additions & 28 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

A simple and easy-to-use automatic update component。 👉👉[中文版](./README.md)

**🤖 [Upgrade Guide from v2.1 to v2.2](./v2.1_to_v2.2.md)**
**🤖 [Upgrade from versions prior to v2.1](./v2.1_to_v2.2.md)**

<div align="center">
<img src="https://github.com/JiuLing-zhang/JiuLing.AutoUpgrade/raw/main/docs/resources/images/demo1.png" width="40%">
Expand All @@ -27,13 +27,14 @@ The core program is developed using `.NET Framework 4.7` (`x64`). Before using t
\- 🔥 Component supports self-update
\- 🌈 Supports HTTP
\- 🌀 Supports FTP
\- ⚡ Supports GitHub Release
\- ⭐ Prohibits running after version expiration

## How to Run

1. 🕐 Download the update package from the server (if updates are available)
2. 🕑 Close the main application
3. 🕒 Extract the update package and copy the contents to the main applications root directory
3. 🕒 Extract the update package and copy the contents to the main application's root directory
4. 🕓 Restart the main application

**🎈If the minimum version is specified and the main program version is lower than the minimum version, the automatic update program will not be allowed to skip this update. If the automatic update program is closed directly without updating, the main program will also be closed.**
Expand All @@ -47,19 +48,23 @@ The core program is developed using `.NET Framework 4.7` (`x64`). Before using t
🟢 From [`Release`](https://github.com/JiuLing-zhang/JiuLing.AutoUpgrade/releases)

## Getting Started
1️⃣ Import namespace
### 1️⃣ Import namespace
```C#
using JiuLing.AutoUpgrade.Shell;
```
2️⃣ Create upgrade app
### 2️⃣ Create upgrade app
```C#
// HTTP model
IUpgradeApp app = UpgradeFactory.CreateHttpApp("url");

// FTP model
IUpgradeApp app = UpgradeFactory.CreateFtpApp("path", "username", "password");

// GitHub Release model
// assetName: update.zip
IUpgradeApp app = UpgradeFactory.CreateGitHubApp("owner", "repo", "assetName");
```
3️⃣ Do update
### 3️⃣ Do update
```C#
app.Run();
// or
Expand All @@ -70,29 +75,35 @@ await app.RunAsync();
await UpgradeFactory.CreateHttpApp("url").RunAsync();
```

**💠 The update API should return the following json format:**

- Version: ❗[Required] The latest version number
- DownloadUrl: ❗[Required] The download URL of the application
- FileLength: File length (byte)
- MinVersion: The minimum version required for the application to run; versions below this will not be able to run
- Log: Update log
- CreateTime: Timestamp
- SignType: Signature type used for file verification
- SignValue: Signature value for file verification

```json
{
"Version": "1.2.0",
"DownloadUrl": "xxxxx/update.zip",
"FileLength": 1887436,
"MinVersion": "1.1.0",
"Log": "1、修复了若干bug。2、新增了若干需求。",
"CreateTime": "2022-01-16 12:12:12",
"SignType": "MD5",
"SignValue": "f42c6cb229a0a1237c9945448342d59e"
}
```
### 4️⃣ Server configuration
* `HTTP` and `FTP` model
**💠 The update API should return the following json format:**

- Version: ❗[Required] The latest version number
- DownloadUrl: ❗[Required] The download URL of the application
- FileLength: File length (byte)
- MinVersion: The minimum version required for the application to run; versions below this will not be able to run
- Log: Update log
- CreateTime: Timestamp
- SignType: Signature type used for file verification
- SignValue: Signature value for file verification

```json
{
"Version": "1.2.0",
"DownloadUrl": "xxxxx/update.zip",
"FileLength": 1887436,
"MinVersion": "1.1.0",
"Log": "1、修复了若干bug。2、新增了若干需求。",
"CreateTime": "2022-01-16 12:12:12",
"SignType": "MD5",
"SignValue": "f42c6cb229a0a1237c9945448342d59e"
}
```

* `GitHub Release` model
- Version: `Release Name`
- DownloadUrl: Get the file URL matching the `Assets Name` in the `Release`

## 🔨 Advanced Settings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<PackageId>JiuLing.AutoUpgrade</PackageId>
<Version>2.2.6</Version>
<Version>2.3.0</Version>
<Authors>九零</Authors>
<Product>JiuLing.AutoUpgrade</Product>
<Description>一个简单的.Net下的自动更新组件。</Description>
<Description>一个简单的.NET架构下的自动更新组件。支持通过HTTP、FTP、GitHub Release方式进行程序更新。</Description>
<PackageProjectUrl>https://github.com/JiuLing-zhang/JiuLing.AutoUpgrade</PackageProjectUrl>
<PackageIcon>nuget_icon.png</PackageIcon>
<RootNamespace>$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
Expand Down
4 changes: 2 additions & 2 deletions src/JiuLing.AutoUpgrade/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.6.0")]
[assembly: AssemblyFileVersion("2.2.6.0")]
[assembly: AssemblyVersion("2.3.0.0")]
[assembly: AssemblyFileVersion("2.3.0.0")]

0 comments on commit a8fa1d9

Please sign in to comment.