feat: 新增一键构建脚本 (v2.0.1)

- 添加 build.ps1 PowerShell 构建脚本
- 添加 build.bat 批处理入口(双击一键构建)
- 支持 Debug/Release 配置切换
- 支持自包含模式发布
- 自动检测 .NET SDK、清理输出、编译打包
This commit is contained in:
miao-moe
2026-06-28 07:14:37 +00:00
parent 8dd1eed519
commit bb0c8832a0
41 changed files with 811 additions and 38 deletions

View File

@@ -17,6 +17,9 @@
<!-- 输出路径:解决方案目录下的 Output\Installer\ -->
<OutputPath>$(SolutionDir)Output\Installer\</OutputPath>
<!-- 启用 Windows Forms 支持(文件夹浏览对话框) -->
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
<ItemGroup>

View File

@@ -130,8 +130,6 @@
Fill="None"
Stroke="{DynamicResource SuccessBrush}"
StrokeThickness="3"
StrokeLineCap="Round"
StrokeLineJoin="Round"
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"

View File

@@ -293,16 +293,17 @@ namespace Better_Seewo.Installer.Pages
TxtProgress.Text = $"{_currentProgress}%";
// 更新进度条宽度(使用动画)
var parentWidth = ((FrameworkElement)ProgressFill.Parent).ActualWidth;
var widthAnimation = new DoubleAnimation
{
From = (ProgressFill.ActualWidth > 0 ? ProgressFill.ActualWidth : 0),
To = (_currentProgress / 100.0) * ProgressFill.Parent.ActualWidth,
To = (_currentProgress / 100.0) * parentWidth,
Duration = TimeSpan.FromMilliseconds(300),
EasingFunction = new CubicEase { EasingMode = EasingMode.EaseOut }
};
// 如果父容器尚未布局完成,直接设置宽度
if (ProgressFill.Parent.ActualWidth == 0)
if (parentWidth == 0)
{
// 等待布局完成后设置
ProgressFill.Loaded += (s, e) =>
@@ -310,7 +311,7 @@ namespace Better_Seewo.Installer.Pages
var loadedAnimation = new DoubleAnimation
{
From = 0,
To = (_currentProgress / 100.0) * ProgressFill.Parent.ActualWidth,
To = (_currentProgress / 100.0) * ((FrameworkElement)ProgressFill.Parent).ActualWidth,
Duration = TimeSpan.FromMilliseconds(300),
EasingFunction = new CubicEase { EasingMode = EasingMode.EaseOut }
};

View File

@@ -87,11 +87,11 @@
<!-- ===== 动画参数 ===== -->
<!-- 标准动画时长300ms -->
<sys:Duration x:Key="AnimationDuration">0:0:0.300</sys:Duration>
<Duration x:Key="AnimationDuration">0:0:0.300</Duration>
<!-- 快速动画时长200ms -->
<sys:Duration x:Key="FastAnimationDuration">0:0:0.200</sys:Duration>
<Duration x:Key="FastAnimationDuration">0:0:0.200</Duration>
<!-- 慢速动画时长500ms -->
<sys:Duration x:Key="SlowAnimationDuration">0:0:0.500</sys:Duration>
<Duration x:Key="SlowAnimationDuration">0:0:0.500</Duration>
<!-- ===== 圆角参数 ===== -->
<!-- 标准圆角半径 -->