Skip to content

Commit

Permalink
Fea #32, 添加.NET native AOT支持
Browse files Browse the repository at this point in the history
  • Loading branch information
mingkuang-Chuyu committed May 4, 2024
1 parent 044bee7 commit c745570
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ charset = utf-8-bom
indent_style = space
indent_size = 4

[*.{vcxproj,xml}]
[*.{vcxproj,xml,nuspec,props,targets}]
indent_style = space
indent_size = 2
17 changes: 13 additions & 4 deletions Nuget/VC-LTL.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@
<tags>初雨团队 Chuyu YY native nativepackage</tags>
<repository type="git" url="https://github.com/Chuyu-Team/VC-LTL5.git" branch="master" commit="$commit$" />
<dependencies>
<dependency id="YY.NuGet.Import.Helper" version="1.0.0.4" />
<group targetFramework="native">
<dependency id="YY.NuGet.Import.Helper" version="1.0.0.4" />
</group>
<group targetFramework="net8.0-windows7.0">
<!--虽然YY-Thunks从1.0.10-Beta2开始才解决Windows Vista、Windows 7的一些API缺失问题。
但是1.0.10-Beta3开始直接支持在.NET AOT使用
-->
<dependency id="YY-Thunks" version="[1.0.10-Beta3,)"/>
</group>
<group targetFramework="net8.0-windows8.0">
</group>
</dependencies>
</metadata>
<files>
<file src=".\logo-small.png" target="images\logo-small.png" />
<file src=".\VC-LTL.props" target="build\native\VC-LTL.props"/>
<file src=".\**\*" target=".\" exclude=".\*.nuspec"/>
<file src="..\config\**" target="build\native\config\" exclude="..\config\config.cmake;..\config\config.cmd;..\config\config.pri;..\config\1033\config.strings.cmd;..\config\2052\config.strings.cmd;"/>
<file src="..\TargetPlatform\**" target="build\native\TargetPlatform\" exclude="**\*.idb"/>
</files>
</package>
</package>
File renamed without changes.
30 changes: 30 additions & 0 deletions Nuget/build/net8.0-windows7.0/VC-LTL.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Dot_NET_Import_VC-LTL_907ECCAB-58CA-4C11-B809-B53585C6BFE1" BeforeTargets="SetupOSSpecificProps">
<PropertyGroup>
<LTLPlatform></LTLPlatform>
<LTLPlatform Condition="'$(RuntimeIdentifier)'=='win-arm64'">ARM64</LTLPlatform>
<LTLPlatform Condition="'$(RuntimeIdentifier)'=='win-arm'">ARM</LTLPlatform>
<LTLPlatform Condition="'$(RuntimeIdentifier)'=='win-x64'">x64</LTLPlatform>
<LTLPlatform Condition="'$(RuntimeIdentifier)'=='win-x86'">x86</LTLPlatform>


<!--默认兼容到Windows Vista-->
<LTLSupportedOSPlatformVersion>6.0.6000.0</LTLSupportedOSPlatformVersion>
<LTLSupportedOSPlatformVersion Condition=" '$(TargetPlatformMinVersion)'!=''">$(TargetPlatformMinVersion)</LTLSupportedOSPlatformVersion>
<LTLWindowsTargetPlatformMinVersion></LTLWindowsTargetPlatformMinVersion>
<LTLWindowsTargetPlatformMinVersion Condition="'$(LTLWindowsTargetPlatformMinVersion)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(LTLSupportedOSPlatformVersion), 10.0.19041.0))">10.0.19041.0</LTLWindowsTargetPlatformMinVersion>
<LTLWindowsTargetPlatformMinVersion Condition="'$(LTLWindowsTargetPlatformMinVersion)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(LTLSupportedOSPlatformVersion), 10.0.0.0))">10.0.10240.0</LTLWindowsTargetPlatformMinVersion>
<LTLWindowsTargetPlatformMinVersion Condition="'$(LTLWindowsTargetPlatformMinVersion)' == '' and '$(LTLPlatform)'=='ARM64'">10.0.10240.0</LTLWindowsTargetPlatformMinVersion>
<LTLWindowsTargetPlatformMinVersion Condition="'$(LTLWindowsTargetPlatformMinVersion)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(LTLSupportedOSPlatformVersion), 8.0))">6.2.9200.0</LTLWindowsTargetPlatformMinVersion>
<LTLWindowsTargetPlatformMinVersion Condition="'$(LTLWindowsTargetPlatformMinVersion)' == '' and '$(LTLPlatform)'=='ARM'">6.2.9200.0</LTLWindowsTargetPlatformMinVersion>
<LTLWindowsTargetPlatformMinVersion Condition="'$(LTLWindowsTargetPlatformMinVersion)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(LTLSupportedOSPlatformVersion), 6.0))">6.0.6000.0</LTLWindowsTargetPlatformMinVersion>
<LTLWindowsTargetPlatformMinVersion Condition="'$(LTLWindowsTargetPlatformMinVersion)' == '' and '$(LTLPlatform)'=='x64'">5.2.3790.0</LTLWindowsTargetPlatformMinVersion>
<LTLWindowsTargetPlatformMinVersion Condition="'$(LTLWindowsTargetPlatformMinVersion)' == '' and '$(LTLPlatform)'=='x86'">5.1.2600.0</LTLWindowsTargetPlatformMinVersion>
</PropertyGroup>
<ItemGroup Condition="'$(LTLWindowsTargetPlatformMinVersion)' != '' and '$(LTLPlatform)' != ''">
<AdditionalNativeLibraryDirectories Include="$(MSBuildThisFileDirectory)..\native\TargetPlatform\$(LTLWindowsTargetPlatformMinVersion)\lib\$(LTLPlatform)\CleanImport" />
<AdditionalNativeLibraryDirectories Include="$(MSBuildThisFileDirectory)..\native\TargetPlatform\$(LTLWindowsTargetPlatformMinVersion)\lib\$(LTLPlatform)" />
</ItemGroup>
</Target>
</Project>
File renamed without changes

0 comments on commit c745570

Please sign in to comment.