Skip to content

Commit

Permalink
Fea,添加.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 22d9183 commit 8f40f9f
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 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,targets}]
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion .github/workflows/Build&Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
$releaseNotes = & git tag -l --format='%(contents)' $env:GITHUB_REF.Remove(0, 10)
$content = [System.IO.File]::ReadAllText("YY-Thunks.nuspec")
$content = [System.IO.File]::ReadAllText("NuGet\YY-Thunks.nuspec")
# 使用此文本替换 .nuspec 中的 releaseNotes
# [System.IO.File]::WriteAllText("YY-Thunks-New.nuspec", $content)
Expand Down
13 changes: 9 additions & 4 deletions YY-Thunks.nuspec → NuGet/YY-Thunks.nuspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>YY-Thunks</id>
Expand All @@ -17,11 +17,16 @@
<copyright>Copyright 2021</copyright>
<tags>Chuyu YY-Thunks native nativepackage</tags>
<repository type="git" url="https://github.com/Chuyu-Team/YY-Thunks.git" branch="master" commit="$commit$" />
<dependencies>
<group targetFramework="native">
</group>
<group targetFramework="net8.0-windows7.0">
</group>
</dependencies>
</metadata>
<files>
<file src=".\objs\**" target="build\native\objs" />
<file src=".\Bin\MinimumRequiredVersionHelper.exe" target="build\native\Bin\MinimumRequiredVersionHelper.exe" />
<file src=".\YY-Thunks.targets" target="build\native\YY-Thunks.targets" />
<file src=".\YY-Thunks_ui_D5D733D3-8829-4509-9C74-021E5685ED18.xml" target="build\native\YY-Thunks_ui_D5D733D3-8829-4509-9C74-021E5685ED18.xml" />
<file src=".\NuGet\build\**\*" target="build\"/>
</files>
</package>
</package>
File renamed without changes.
21 changes: 21 additions & 0 deletions NuGet/build/net8.0-windows7.0/YY-Thunks.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="DotNET_Import_VC-LTL_907ECCAB-58CA-4C11-B809-B53585C6BFE1" BeforeTargets="SetupOSSpecificProps">
<PropertyGroup>
<YY_Thunks_File></YY_Thunks_File>
</PropertyGroup>
<PropertyGroup Condition="'$(RuntimeIdentifier)'=='win-x64'">
<YY_Thunks_File Condition="'$(YY_Thunks_File)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetPlatformMinVersion), 6.0))">x64\YY_Thunks_for_Vista.obj</YY_Thunks_File>
<YY_Thunks_File Condition="'$(YY_Thunks_File)' == ''">x64\YY_Thunks_for_WinXP.obj</YY_Thunks_File>
</PropertyGroup>
<PropertyGroup Condition="'$(RuntimeIdentifier)'=='win-x86'">
<YY_Thunks_File Condition="'$(YY_Thunks_File)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetPlatformMinVersion), 6.0))">x86\YY_Thunks_for_Vista.obj</YY_Thunks_File>
<YY_Thunks_File Condition="'$(YY_Thunks_File)' == '' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetPlatformMinVersion), 5.1))">x86\YY_Thunks_for_WinXP.obj</YY_Thunks_File>
<YY_Thunks_File Condition="'$(YY_Thunks_File)' == ''">x86\YY_Thunks_for_Win2K.obj</YY_Thunks_File>
</PropertyGroup>
<ItemGroup Condition="'$(LTLWindowsTargetPlatformMinVersion)' != '' and '$(LTLPlatform)' != ''">
<LinkerArg Include="$(MSBuildThisFileDirectory)..\native\objs\$(YY_Thunks_File)" />
</ItemGroup>
</Target>
</Project>

0 comments on commit 8f40f9f

Please sign in to comment.