diff --git a/Better-EN5/Better-EN5.csproj b/Better-EN5/Better-EN5.csproj
index 8bd159f..ae85a20 100644
--- a/Better-EN5/Better-EN5.csproj
+++ b/Better-EN5/Better-EN5.csproj
@@ -7,8 +7,8 @@
enable
BetterEN5
Better-EN5
- 1.1.0
- 1.1.0
+ 1.1.1
+ 1.1.1
雾启工作室
雾启工作室
雾启工作室
diff --git a/Better-EN5/Program.cs b/Better-EN5/Program.cs
index 68216be..1cc13f0 100644
--- a/Better-EN5/Program.cs
+++ b/Better-EN5/Program.cs
@@ -35,7 +35,7 @@ namespace BetterEN5
private async void Run()
{
await Task.Delay(TimeSpan.FromSeconds(3));
- TouchFixService.ApplyFixAsync();
+ await TouchFixService.ApplyFixAsync();
ExportUIItems();
}
diff --git a/Better-EN5/Services/InkService.cs b/Better-EN5/Services/InkService.cs
index 4a1fd7d..ac83275 100644
--- a/Better-EN5/Services/InkService.cs
+++ b/Better-EN5/Services/InkService.cs
@@ -11,11 +11,11 @@ namespace BetterEN5.Services
{
await Task.Run(() =>
{
- dynamic? board = GetENProperty("CurrentBoardApi");
+ var board = GetENProperty("CurrentBoardApi");
if (board == null) return;
- dynamic? slides = board.Slides;
- if (slides == null || slides.Count == 0) return;
+ dynamic slides = board.Slides;
+ if (slides == null) return;
var inkData = new InkPackage();
foreach (var slide in slides)
@@ -58,7 +58,7 @@ namespace BetterEN5.Services
var inkData = System.Text.Json.JsonSerializer.Deserialize(json);
if (inkData == null) return;
- dynamic? board = GetENProperty("CurrentBoardApi");
+ var board = GetENProperty("CurrentBoardApi");
if (board == null) return;
foreach (var slideData in inkData.Slides)
diff --git a/Better-EN5/manifest.coin b/Better-EN5/manifest.coin
index ef1e257..63642c5 100644
--- a/Better-EN5/manifest.coin
+++ b/Better-EN5/manifest.coin
@@ -24,5 +24,5 @@ Preinstalled
False
>
Version
-1.1.0
+1.1.1
>
diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md
index bd94daf..aad8ea8 100644
--- a/DEVELOPER_GUIDE.md
+++ b/DEVELOPER_GUIDE.md
@@ -252,6 +252,39 @@ Better-EN5/bin/Release/net6.0-windows/
## 许可证
+## 构建方法
+
+### 前置条件
+1. 已安装 **希沃白板 5**(版本 5.2.2.653 ~ 5.3.0.0)
+2. 已安装 **.NET SDK 6.0**(推荐 `C:\Program Files\dotnet`)
+3. 确保 `dotnet` 在 `PATH` 中,或使用完整路径
+
+### 构建 Release
+```powershell
+# 方式一:确保 dotnet 在 PATH
+set PATH=C:\Program Files\dotnet;%PATH%
+dotnet build -c Release Better-EN5
+
+# 方式二:使用完整路径
+& "C:\Program Files\dotnet\dotnet.exe" build -c Release Better-EN5
+```
+
+### 安装到希沃白板
+```powershell
+# 管理员身份运行
+.\scripts\install.ps1
+```
+
+### 构建输出
+| 文件 | 说明 |
+|------|------|
+| `Better-EN5\bin\Release\net6.0-windows\Better-EN5.dll` | 插件 DLL |
+| `Better-EN5\bin\Release\net6.0-windows\Better-EN5.exe` | 宿主程序 |
+| `bin\Release\Better-Seewo 增强插件.X.X.X.exe` | 安装包 |
+| `bin\Release\Better-Seewo 增强插件.X.X.X.zip` | 插件包 (.enp) |
+
+## 许可协议
+
本项目仅供 **学习交流** 使用。
## 致谢
diff --git a/scripts/build-release.ps1 b/scripts/build-release.ps1
new file mode 100644
index 0000000..3ad5829
--- /dev/null
+++ b/scripts/build-release.ps1
@@ -0,0 +1,43 @@
+# Better-EN5 自动构建与发布脚本
+param(
+ [string]$Version = "1.1.0",
+ [switch]$Push
+)
+
+$ErrorActionPreference = "Stop"
+$dotnet = "C:\Program Files\dotnet\dotnet.exe"
+$repoDir = Split-Path -Parent $PSScriptRoot
+echo $ENV:output_folder
+# 设置 PATH
+$env:Path = "C:\Program Files\dotnet;C:\Program Files\Git\bin;$env:Path"
+
+Write-Host "=== Better-EN5 构建脚本 ===" -ForegroundColor Cyan
+Write-Host "版本: $Version" -ForegroundColor White
+Write-Host ""
+
+# 1. 构建
+Write-Host "[1/3] 构建项目..." -ForegroundColor Yellow
+& $dotnet build -c Release "$repoDir\Better-EN5"
+if (-not $?) { Write-Host "构建失败" -ForegroundColor Red; exit 1 }
+Write-Host "构建成功" -ForegroundColor Green
+
+# 2. 安装到希沃白板
+Write-Host "[2/3] 安装到希沃白板..." -ForegroundColor Yellow
+& "$repoDir\scripts\install.ps1" -BuildConfig Release
+if (-not $?) { Write-Host "安装失败" -ForegroundColor Red; exit 1 }
+Write-Host "安装成功" -ForegroundColor Green
+
+# 3. Git 提交与推送
+if ($Push) {
+ Write-Host "[3/3] 推送至远程仓库..." -ForegroundColor Yellow
+ Set-Location $repoDir
+ git add -A
+ git commit -m "v$Version: 自动构建发布"
+ git tag "v$Version"
+ git push origin main --tags
+ Write-Host "推送成功" -ForegroundColor Green
+}
+
+Write-Host ""
+Write-Host "=== 完成 ===" -ForegroundColor Green
+Write-Host "安装文件: $repoDir\bin\Release\Better-Seewo 增强插件.$Version.exe" -ForegroundColor Cyan
diff --git a/scripts/install.ps1 b/scripts/install.ps1
new file mode 100644
index 0000000..51926cc
--- /dev/null
+++ b/scripts/install.ps1
@@ -0,0 +1,54 @@
+# Better-EN5 插件安装脚本
+# 以管理员身份运行
+param(
+ [string]$BuildConfig = "Release"
+)
+
+$ErrorActionPreference = "Stop"
+
+$pluginName = "Better-EN5"
+$seewoPath = "$env:ProgramFiles(x86)\Seewo\EasiNote5"
+$dotnet = "C:\Program Files\dotnet\dotnet.exe"
+
+# 查找最新版本目录
+$versionDirs = Get-ChildItem "$seewoPath\EasiNote5_*" -Directory | Sort-Object Name -Descending
+if ($versionDirs.Count -eq 0) {
+ Write-Host "未找到希沃白板安装目录" -ForegroundColor Red
+ exit 1
+}
+
+$targetDir = Join-Path $versionDirs[0].FullName "Main\Extensions\$pluginName"
+$sourceDir = Join-Path $PSScriptRoot "..\Better-EN5\bin\$BuildConfig\net6.0-windows"
+
+Write-Host "安装到: $targetDir" -ForegroundColor Cyan
+
+# 检查构建输出
+if (-not (Test-Path $sourceDir)) {
+ Write-Host "未找到构建输出,正在构建..." -ForegroundColor Yellow
+ if (Test-Path $dotnet) {
+ $env:Path = "C:\Program Files\dotnet;$env:Path"
+ & $dotnet build -c $BuildConfig (Join-Path $PSScriptRoot "..\Better-EN5")
+ if (-not $?) { exit 1 }
+ } else {
+ Write-Host "找不到 dotnet 编译器" -ForegroundColor Red
+ exit 1
+ }
+}
+
+# 创建插件目录
+New-Item -ItemType Directory -Path $targetDir -Force | Out-Null
+
+# 复制插件文件
+Copy-Item "$sourceDir\*" $targetDir -Recurse -Force
+Write-Host "插件文件已复制" -ForegroundColor Green
+
+# 复制 manifest.coin
+$manifestSource = Join-Path $PSScriptRoot "..\Better-EN5\manifest.coin"
+if (Test-Path $manifestSource) {
+ Copy-Item $manifestSource $targetDir -Force
+ Write-Host "manifest.coin 已复制" -ForegroundColor Green
+}
+
+Write-Host ""
+Write-Host "安装完成!请重启希沃白板以加载插件。" -ForegroundColor Green
+Write-Host "在希沃白板的右键菜单中可以找到 'Better-Seewo 设置' 入口。" -ForegroundColor Cyan