* 编译/打包脚本;

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> <Project>
<Import Project="$(MSBuildThisFileDirectory)\Build\Common.props" /> <Import Project="$(MSBuildThisFileDirectory)\build\Common.props"/>
<PropertyGroup> <PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersionThatLibrariesUsed)" /> <PackageVersion Include="Avalonia" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersionThatLibrariesUsed)" /> <PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersionThatLibrariesUsed)" /> <PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersionThatLibrariesUsed)" /> <PackageVersion Include="Avalonia.Controls.ColorPicker" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersionThatLibrariesUsed)" /> <PackageVersion Include="Avalonia.Controls.DataGrid" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Svg" Version="11.1.0" /> <PackageVersion Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Controls.TreeDataGrid" Version="11.0.10" /> <PackageVersion Include="Avalonia.Win32" Version="$(AvaloniaVersionThatLibrariesUsed)"/>
<PackageVersion Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersionThatLibrariesUsed)" />
<PackageVersion Include="Avalonia.Win32" Version="$(AvaloniaVersionThatLibrariesUsed)" /> <!-- TODO 版本是否跟随 AvaloniaVersionThatLibrariesUsed-->
<PackageVersion Include="System.Reactive" Version="6.0.1" /> <PackageVersion Include="Avalonia.Svg" Version="11.1.0"/>
<!-- 测试相关依赖 --> <PackageVersion Include="Avalonia.Controls.TreeDataGrid" Version="11.0.10"/>
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0-release-24177-07" />
<PackageVersion Include="NSubstitute" Version="5.1.0" /> <PackageVersion Include="System.Reactive" Version="6.0.1"/>
<PackageVersion Include="Shouldly" Version="4.2.1" /> <!-- 测试相关依赖 -->
<PackageVersion Include="xunit" Version="2.8.0" /> <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0-release-24177-07"/>
<PackageVersion Include="xunit.extensibility.execution" Version="2.8.0" /> <PackageVersion Include="NSubstitute" Version="5.1.0"/>
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0" /> <PackageVersion Include="Shouldly" Version="4.2.1"/>
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.1.0" /> <PackageVersion Include="xunit" Version="2.8.0"/>
<!-- 开发支持 --> <PackageVersion Include="xunit.extensibility.execution" Version="2.8.0"/>
<PackageVersion Include="Nlnet.Avalonia.DevTools" Version="1.0.1-beta.23" /> <PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0"/>
<!-- 源码生成 --> <PackageVersion Include="CommunityToolkit.Mvvm" Version="8.1.0"/>
<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="Nlnet.Avalonia.DevTools" Version="1.0.1-beta.25"/>
</ItemGroup> <!-- 源码生成 -->
<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> </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> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<TrimMode>copyused</TrimMode> <TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>false</BuiltInComInteropSupport> <BuiltInComInteropSupport>false</BuiltInComInteropSupport>

View File

@ -10,8 +10,8 @@
<Author>Chinware Technologies Ltd.</Author> <Author>Chinware Technologies Ltd.</Author>
<Authors>$(Author)</Authors> <Authors>$(Author)</Authors>
<Description>TODO</Description> <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>TODO</PackageTags> <PackageTags>avalonia;antdesign;ui;control</PackageTags>
<ProjectUrl>https://atomui.net</ProjectUrl> <ProjectUrl>https://atomui.net</ProjectUrl>
<RepositoryUrl>https://github.com/chinware/AtomUI</RepositoryUrl> <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"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildThisFileDirectory)..\..\build\Nuget.props" />
<PropertyGroup> <PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>

View File

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

View File

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

View File

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

View File

@ -1,43 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildThisFileDirectory)..\..\build\Nuget.props"/>
<PropertyGroup> <PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles> <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>GeneratedFiles</CompilerGeneratedFilesOutputPath> <CompilerGeneratedFilesOutputPath>GeneratedFiles</CompilerGeneratedFilesOutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<AvaloniaResource Include="Assets\**" /> <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>
<ItemGroup> <ItemGroup>
<AvaloniaResource Include="Assets\**"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<InternalsVisibleTo Include="AtomUI.Controls" /> <InternalsVisibleTo Include="AtomUI.Controls"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" /> <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics"/>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="Platform/**/*.cs" /> <Compile Remove="Platform/**/*.cs"/>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))" > <ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<Compile Include="Platform\Windows\*.cs"/> <Compile Include="Platform\Windows\*.cs"/>
<PackageReference Include="Avalonia.Win32"/> <PackageReference Include="Avalonia.Win32"/>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

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