Skip to content

Commit 835f978

Browse files
committed
Added nuget packages
1 parent 79d6906 commit 835f978

File tree

5 files changed

+51
-3
lines changed

5 files changed

+51
-3
lines changed

DirectN.Extensions/DirectN.Extensions.csproj

+24
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
<IsAotCompatible>true</IsAotCompatible>
1010
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1111
<RootNamespace>DirectN.Extensions</RootNamespace>
12+
<Title>DirectNAot.Extensions</Title>
13+
<PackageId>DirectNAot.Extensions</PackageId>
14+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
15+
<PackageTags>.NET DXGI WIC DirectX Direct2D DirectWrite DirectComposition MediaFoundation WASAPI CoreAudio Interop UWP WinAppSD</PackageTags>
16+
<RepositoryUrl>https://github.com/smourier/DirectNAot</RepositoryUrl>
17+
<Description>Extensions code for DirectNAOT package: Com utilities, Extension methods, Windows utilities, DXC utilities, etc.</Description>
18+
<Copyright>Copyright © 2013-2025 Simon Mourier. All rights reserved.</Copyright>
19+
<PackageProjectUrl>https://github.com/smourier/DirectNAot</PackageProjectUrl>
20+
<PackageIcon>DirectN.png</PackageIcon>
21+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1222
</PropertyGroup>
1323

1424
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -29,6 +39,13 @@
2939
<Compile Include="..\DirectN\Properties\AssemblyVersionInfo.cs" Link="Properties\AssemblyVersionInfo.cs" />
3040
</ItemGroup>
3141

42+
<ItemGroup>
43+
<None Include="..\LICENSE">
44+
<Pack>True</Pack>
45+
<PackagePath>\</PackagePath>
46+
</None>
47+
</ItemGroup>
48+
3249
<ItemGroup>
3350
<ProjectReference Include="..\DirectN\DirectN.csproj" />
3451
</ItemGroup>
@@ -53,4 +70,11 @@
5370
<Using Include="System.Text" />
5471
</ItemGroup>
5572

73+
<ItemGroup>
74+
<None Update="DirectN.png">
75+
<Pack>True</Pack>
76+
<PackagePath>\</PackagePath>
77+
</None>
78+
</ItemGroup>
79+
5680
</Project>

DirectN.Extensions/DirectN.png

28 KB
Loading

DirectN/DirectN.csproj

+21
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
<IsAotCompatible>true</IsAotCompatible>
1010
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1111
<RunAnalyzersDuringLiveAnalysis>True</RunAnalyzersDuringLiveAnalysis>
12+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
13+
<Description>AOT-compatible Interop Code for .NET Core 8+: DXGI, WIC, DirectX, Direct2D, Direct Write, Direct Composition, Media Foundation, WASAPI, WinAppSK, etc.</Description>
14+
<Title>DirectNAot</Title>
15+
<Copyright>Copyright © 2013-2025 Simon Mourier. All rights reserved.</Copyright>
16+
<PackageProjectUrl>https://github.com/smourier/DirectNAot</PackageProjectUrl>
17+
<PackageIcon>DirectN.png</PackageIcon>
18+
<RepositoryUrl>https://github.com/smourier/DirectNAot</RepositoryUrl>
19+
<PackageTags>.NET DXGI WIC DirectX Direct2D DirectWrite DirectComposition MediaFoundation WASAPI CoreAudio Interop UWP WinAppSD</PackageTags>
20+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
21+
<PackageId>DirectNAot</PackageId>
1222
</PropertyGroup>
1323

1424
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -38,7 +48,18 @@
3848
</ItemGroup>
3949

4050
<ItemGroup>
51+
<None Include="..\LICENSE">
52+
<Pack>True</Pack>
53+
<PackagePath>\</PackagePath>
54+
</None>
4155
<None Include="Generated\DirectN\.editorconfig" />
4256
</ItemGroup>
4357

58+
<ItemGroup>
59+
<None Update="DirectN.png">
60+
<Pack>True</Pack>
61+
<PackagePath>\</PackagePath>
62+
</None>
63+
</ItemGroup>
64+
4465
</Project>

DirectN/DirectN.png

28 KB
Loading

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DirectN AOT
22
This is an AOT-friendly version of [DirectN](https://github.com/smourier/DirectN). Aimed at x64 targets (doesn't mean it won't work for x86 targets, but it may not work for ambiguous types) . Only for .NET Core 8 and beyond, it won't work for version below 8 or with .NET Framework.
33

4-
This is a work in progress although it's been stabilizing lately. If you want to discuss how, where, why, just create an issue.
4+
This is a still work in progress although it's been stabilizing lately. If you want to discuss how, where, why, just create an issue.
55

66
* **DirectN** is the AOT-friendly version of DirectN.
77
* **DirectN.Extensions** is a set of utilities that are not mandatory, but quite useful for programming with DirectN (and interop in general).
@@ -13,8 +13,6 @@ You don't have to use the extensions, but it's easier to use it.
1313

1414
The reason Extensions is separated from DirectN is more an engineering reason. The new COM Roslyn/.NET source generator at work here is very slow on ~8000 source-generated classes (since COM interop is not builtin in CLR anymore), so the DirectN project is just very difficult to work directly with in Visual Studio.
1515

16-
**Nuget packages** will be provided when the project is a bit more stable.
17-
1816
The key points that drive how code is generated and built:
1917
* Although Win32InteropBuilder is totally generic, the goal for **DirectN** is still to create built-in interop code for modern media & graphics Windows (cross-platform is *not* a target) technologies only:
2018
* DirectX (9 => 12)
@@ -36,6 +34,11 @@ The key points that drive how code is generated and built:
3634
* Due to the usage of unique instances everywhere in DirectN AOT, we had to add a hack to overcome a nasty .NET 8 bug https://github.com/dotnet/runtime/issues/96901 or everything crashes very quickly at GC or finalizing time. We want to remove this hack ASAP, but it's not sure if this bug will be only released with .NET 9 or before...
3735
* Doing interop is inherently unsafe but we want to keep a .NET-like programming whenever possible. The generated code serves a similar purpose to the CsWin32 project, but the final generated code and net result (ie: how we use it as a caller) are quite different.
3836

37+
# Installation
38+
You can just compile the source (not it take minutes due to the fact ComWrapper Source geneation is *slooooowwwwww*...) or use the nuget packages
39+
40+
https://www.nuget.org/packages/DirectNAot/ and https://www.nuget.org/packages/DirectNAot.Extensions/
41+
3942
# Direct3D11 minimal sample.
4043
The **DirectN.Samples.MinimalD3D11** sample here [https://github.com/smourier/DirectN/tree/master/DirectN/DirectN.WinUI3.MinimalD3D11](https://github.com/smourier/DirectNAot/tree/main/Samples/DirectN.Samples.MinimalD3D11) has been ported to C# from here: https://gist.github.com/d7samurai/abab8a580d0298cb2f34a44eec41d39d which features a minimal Direct3D11 *"'API familiarizer' - an uncluttered Direct3D 11 setup & basic rendering reference implementation, in the form of a complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion"* sample.
4144

0 commit comments

Comments
 (0)