NewLife/LuckyClover

统一发布脚本并支持 net10.0-windows 框架

统一 dotnet publish 命令格式,调整发布和复制路径以适配 net10.0-windows。build.bat、buildAot.bat、buildAot86.bat 脚本同步更新。LuckyAOT.csproj 和 LuckyClover.csproj 增加 net10.0-windows 支持,并为 LuckyClover.csproj 新增 AOT 相关包引用。
大石头 authored at 2026-05-01 20:58:31
4a484d6
Tree
1 Parent(s) 42c2954
Summary: 5 changed files with 18 additions and 18 deletions.
Modified +6 -6
Modified +4 -4
Modified +4 -4
Modified +1 -1
Modified +3 -3
Modified +6 -6
diff --git a/Doc/build.bat b/Doc/build.bat
index bf837e2..8350b7d 100644
--- a/Doc/build.bat
+++ b/Doc/build.bat
@@ -12,17 +12,17 @@ copy %base%\net48\clover.exe %dest%\clover48.exe /y
 rem copy %base%\publish-windows\clover.exe %dest%\clover80.exe /y
 
 pushd ..\LuckyClover
-dotnet publish -c Release -f net6.0 -r win-x64 --self-contained false /p:PublishSingleFile=true
+dotnet publish -c Release -f net6.0 -r win-x64 /p:SelfContained=false /p:PublishSingleFile=true
 popd
 copy %base%\net6.0\win-x64\publish\clover.exe %dest%\clover60.exe /y
 
 pushd ..\LuckyClover
-dotnet publish -c Release -f net8.0 -r win-x64 --self-contained false /p:PublishSingleFile=true
+dotnet publish -c Release -f net8.0 -r win-x64 /p:SelfContained=false /p:PublishSingleFile=true
 popd
 copy %base%\net8.0\win-x64\publish\clover.exe %dest%\clover80.exe /y
 
 pushd ..\LuckyClover
-dotnet publish -c Release -f net10.0 -r win-x64 --self-contained false /p:PublishSingleFile=true
+dotnet publish -c Release -f net10.0 -r win-x64 /p:SelfContained=false /p:PublishSingleFile=true
 popd
 copy %base%\net10.0\win-x64\publish\clover.exe %dest%\clover10.exe /y
 
@@ -32,6 +32,6 @@ del %dest%\LuckyClover45.zip /f
 del %dest%\LuckyClover.zip /f
 del %dest%\LuckyClover2.zip /f
 
-%base%\net8.0\clover.exe zip %dest%\LuckyClover45.zip %base%\Installer45\*.exe %base%\Installer45\*.exe.config %base%\Installer45\*.dll
-%base%\net8.0\clover.exe zip %dest%\LuckyClover.zip %base%\Installer4\*.exe %base%\Installer4\*.exe.config %base%\Installer4\*.dll
-%base%\net8.0\clover.exe zip %dest%\LuckyClover2.zip %base%\Installer\*.exe %base%\Installer\*.exe.config %base%\Installer\*.dll
+%dest%\clover80.exe zip %dest%\LuckyClover45.zip %base%\Installer45\*.exe %base%\Installer45\*.exe.config %base%\Installer45\*.dll
+%dest%\clover80.exe zip %dest%\LuckyClover.zip %base%\Installer4\*.exe %base%\Installer4\*.exe.config %base%\Installer4\*.dll
+%dest%\clover80.exe zip %dest%\LuckyClover2.zip %base%\Installer\*.exe %base%\Installer\*.exe.config %base%\Installer\*.dll
Modified +4 -4
diff --git a/Doc/buildAot.bat b/Doc/buildAot.bat
index ad35e57..df62940 100644
--- a/Doc/buildAot.bat
+++ b/Doc/buildAot.bat
@@ -4,13 +4,13 @@ set dest=%base%\publish
 mkdir %dest%
 
 pushd ..\LuckyClover
-dotnet publish -c Release -f net10.0 -r win-x64 --self-contained
+dotnet publish -c Release -f net10.0-windows -r win-x64 --self-contained
 popd
 
-copy %base%\net10.0\win-x64\publish\clover.exe %dest%\clover90.exe /y
+copy %base%\net10.0-windows\win-x64\publish\clover.exe %dest%\clover10.exe /y
 
 pushd ..\LuckyAOT
-dotnet publish -c Release -f net10.0 -r win-x64 --self-contained
+dotnet publish -c Release -f net10.0-windows -r win-x64 --self-contained
 popd
 
-copy %base%\net10.0\win-x64\publish\cloverAot.exe %dest%\cloverAot.exe /y
+copy %base%\net10.0-windows\win-x64\publish\cloverAot.exe %dest%\cloverAot.exe /y
Modified +4 -4
diff --git a/Doc/buildAot86.bat b/Doc/buildAot86.bat
index cc4b413..db3869a 100644
--- a/Doc/buildAot86.bat
+++ b/Doc/buildAot86.bat
@@ -4,13 +4,13 @@ set dest=%base%\publish
 mkdir %dest%
 
 pushd ..\LuckyClover
-dotnet publish -c Release -f net9.0-windows -r win-x86 --self-contained
+dotnet publish -c Release -f net10.0-windows -r win-x86 --self-contained
 popd
 
-copy %base%\net9.0-windows\win-x86\publish\clover.exe %dest%\clover90-x86.exe /y
+copy %base%\net10.0-windows\win-x86\publish\clover.exe %dest%\clover10-x86.exe /y
 
 pushd ..\LuckyAOT
-dotnet publish -c Release -f net9.0-windows -r win-x86 --self-contained
+dotnet publish -c Release -f net10.0-windows -r win-x86 --self-contained
 popd
 
-copy %base%\net9.0-windows\win-x86\publish\cloverAot.exe %dest%\cloverAot-x86.exe /y
+copy %base%\net10.0-windows\win-x86\publish\cloverAot.exe %dest%\cloverAot-x86.exe /y
Modified +1 -1
diff --git a/LuckyAOT/LuckyAOT.csproj b/LuckyAOT/LuckyAOT.csproj
index b5406d0..fa99acd 100644
--- a/LuckyAOT/LuckyAOT.csproj
+++ b/LuckyAOT/LuckyAOT.csproj
@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <OutputType>Exe</OutputType>
-    <TargetFrameworks>net8.0;net10.0</TargetFrameworks>
+    <TargetFrameworks>net8.0;net10.0;net10.0-windows</TargetFrameworks>
     <AssemblyName>cloverAot</AssemblyName>
     <AssemblyTitle>幸运草</AssemblyTitle>
     <Description>检测并安装主流.NET运行时,协助打包发布。</Description>
Modified +3 -3
diff --git a/LuckyClover/LuckyClover.csproj b/LuckyClover/LuckyClover.csproj
index 1a05210..0a1123f 100644
--- a/LuckyClover/LuckyClover.csproj
+++ b/LuckyClover/LuckyClover.csproj
@@ -1,8 +1,8 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
     <OutputType>Exe</OutputType>
-    <TargetFrameworks>net20;net40;net45;net48;net6.0;net8.0;net10.0</TargetFrameworks>
+    <TargetFrameworks>net20;net40;net45;net48;net6.0;net8.0;net10.0;net10.0-windows</TargetFrameworks>
     <AssemblyName>clover</AssemblyName>
     <AssemblyTitle>幸运草</AssemblyTitle>
     <Description>检测并安装主流.NET运行时,协助打包发布。</Description>
@@ -53,7 +53,7 @@
     <None Remove="res\MicrosoftRootCertificateAuthority2011.cer" />
   </ItemGroup>
 
-  <ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)'=='net10.0-windows'">
     <PackageReference Include="PublishAotCompressed" Version="1.0.5" />
     <PackageReference Include="VC-LTL" Version="5.3.1" />
     <PackageReference Include="YY-Thunks" Version="1.1.9" />