* 编译/打包脚本;

This commit is contained in:
zeroone 2024-08-25 22:08:12 +08:00
parent accc810c5e
commit f4d9396ff0
13 changed files with 90 additions and 57 deletions

View File

@ -1,31 +1,34 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)\Build\Common.props" />
<Import Project="$(MSBuildThisFileDirectory)\build\Common.props"/>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersionThatLibrariesUsed)" />
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersionThatLibrariesUsed)" />
<PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersionThatLibrariesUsed)" />
<PackageVersion Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersionThatLibrariesUsed)" />
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersionThatLibrariesUsed)" />
<PackageVersion Include="Avalonia.Svg" Version="11.1.0" />
<PackageVersion Include="Avalonia.Controls.TreeDataGrid" Version="11.0.10" />
<PackageVersion Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersionThatLibrariesUsed)" />
<PackageVersion Include="Avalonia.Win32" Version="$(AvaloniaVersionThatLibrariesUsed)" />
<PackageVersion Include="System.Reactive" Version="6.0.1" />
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Win32" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<!-- TODO 版本是否跟随 AvaloniaVersionThatLibrariesUsed-->
<PackageVersion Include="Avalonia.Svg" Version="11.1.0"/>
<PackageVersion Include="Avalonia.Controls.TreeDataGrid" Version="11.0.10"/>
<PackageVersion Include="System.Reactive" Version="6.0.1"/>
<!-- 测试相关依赖 -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0-release-24177-07" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="xunit" Version="2.8.0" />
<PackageVersion Include="xunit.extensibility.execution" Version="2.8.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0-release-24177-07"/>
<PackageVersion Include="NSubstitute" Version="5.1.0"/>
<PackageVersion Include="Shouldly" Version="4.2.1"/>
<PackageVersion Include="xunit" Version="2.8.0"/>
<PackageVersion Include="xunit.extensibility.execution" Version="2.8.0"/>
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0"/>
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.1.0"/>
<!-- 开发支持 -->
<PackageVersion Include="Nlnet.Avalonia.DevTools" Version="1.0.1-beta.23" />
<PackageVersion Include="Nlnet.Avalonia.DevTools" Version="1.0.1-beta.25"/>
<!-- 源码生成 -->
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0-3.final" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24219.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0-3.final"/>
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24219.2"/>
</ItemGroup>
</Project>

8
build/!Nuget.Local.bat Normal file
View File

@ -0,0 +1,8 @@
cd %~dp0
@set dir="..\_output\Nuget"
for %%f in (%dir%\*.nupkg) do (
dotnet nuget push %%f --source "D:\nuget.local"
)
pause

7
build/!Nuget.bat Normal file
View File

@ -0,0 +1,7 @@
@set dir="..\_output\Nuget"
for %%f in (%dir%\*.nupkg) do (
dotnet nuget push %%f --api-key [key] --source https://api.nuget.org/v3/index.json
)
pause

View File

@ -0,0 +1,9 @@
%~dp0
rd/s/q ..\_output\
cd ..\
dotnet msbuild .\AtomUI.sln /p:Configuration=Release
pause

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>false</BuiltInComInteropSupport>

View File

@ -10,8 +10,8 @@
<Author>Chinware Technologies Ltd.</Author>
<Authors>$(Author)</Authors>
<Description>TODO</Description>
<PackageTags>TODO</PackageTags>
<Description>AtomUI is an implementation of Ant Design based on .NET technology, and is committed to bringing Ant Design's excellent and efficient design language and experience to the Avalonia/.NET cross-platform desktop software development field.</Description>
<PackageTags>avalonia;antdesign;ui;control</PackageTags>
<ProjectUrl>https://atomui.net</ProjectUrl>
<RepositoryUrl>https://github.com/chinware/AtomUI</RepositoryUrl>

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildThisFileDirectory)..\..\build\Nuget.props" />
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>

View File

@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildThisFileDirectory)..\..\build\Nuget.props" />
<PropertyGroup>
<RootNamespace>AtomUI.Controls</RootNamespace>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
@ -7,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/**/*.cs" />
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/**/*.cs"/>
</ItemGroup>
<ItemGroup>
@ -15,8 +17,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AtomUI.Theme\AtomUI.Theme.csproj" />
<ProjectReference Include="..\AtomUI.Generator\AtomUI.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\AtomUI.Theme\AtomUI.Theme.csproj"/>
<ProjectReference Include="..\AtomUI.Generator\AtomUI.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
</ItemGroup>
<ItemGroup>

View File

@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildThisFileDirectory)..\..\build\Nuget.props" />
<ItemGroup>
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/**/*.cs" />
</ItemGroup>

View File

@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildThisFileDirectory)..\..\build\Nuget.props" />
<ItemGroup>
<PackageReference Include="Avalonia"/>
</ItemGroup>

View File

@ -1,41 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildThisFileDirectory)..\..\build\Nuget.props"/>
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>GeneratedFiles</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/**/*.cs" />
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/**/*.cs"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AtomUI.Base\AtomUI.Base.csproj" />
<ProjectReference Include="..\AtomUI.Icon\AtomUI.Icon.csproj" />
<ProjectReference Include="..\AtomUI.Generator\AtomUI.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\AtomUI.Base\AtomUI.Base.csproj"/>
<ProjectReference Include="..\AtomUI.Icon\AtomUI.Icon.csproj"/>
<ProjectReference Include="..\AtomUI.Generator\AtomUI.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="Assets\**" />
<AvaloniaResource Include="Assets\**"/>
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="AtomUI.Controls"/>
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="AtomUI.Controls" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics"/>
</ItemGroup>
<ItemGroup>
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" />
<Compile Remove="Platform/**/*.cs"/>
</ItemGroup>
<ItemGroup>
<Compile Remove="Platform/**/*.cs" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))" >
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<Compile Include="Platform\Windows\*.cs"/>
<PackageReference Include="Avalonia.Win32"/>
</ItemGroup>

View File

@ -214,7 +214,7 @@ public class ThemeManager : Styles, IThemeManager
{
foreach (var path in paths) {
var fullPath = Path.GetFullPath(path);
if (!_customThemeDirs.Contains(fullPath) && Path.Exists(fullPath)) {
if (!_customThemeDirs.Contains(fullPath) && Directory.Exists(fullPath)) {
_customThemeDirs.Add(fullPath);
}
}