|
27 | 27 | <RepositoryUrl>https://github.com/Rubjerg/Graphviz.NetWrapper</RepositoryUrl> |
28 | 28 | <PackageProjectUrl>https://github.com/Rubjerg/Graphviz.NetWrapper</PackageProjectUrl> |
29 | 29 | <PackageLicenseFile>LICENSE</PackageLicenseFile> |
| 30 | + |
| 31 | + <Rid Condition=" '$(OS)' == 'Windows_NT' ">win-x64</Rid> |
| 32 | + <Rid Condition=" '$(OS)' != 'Windows_NT' ">linux-x64</Rid> |
30 | 33 | </PropertyGroup> |
31 | 34 |
|
32 | | - <!-- Platform‑specific compilation constant for Windows code paths --> |
33 | | - <PropertyGroup Condition=" '$(OS)' == 'Windows_NT' "> |
34 | | - <DefineConstants>_WINDOWS</DefineConstants> |
35 | | - </PropertyGroup> |
| 35 | + <ItemGroup> |
| 36 | + <None Include="..\LICENSE"> |
| 37 | + <Pack>true</Pack> |
| 38 | + <PackagePath></PackagePath> |
| 39 | + </None> |
| 40 | + </ItemGroup> |
36 | 41 |
|
37 | 42 | <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
38 | 43 | <TreatWarningsAsErrors>true</TreatWarningsAsErrors> |
|
44 | 49 | </ProjectReference> |
45 | 50 | </ItemGroup> |
46 | 51 |
|
47 | | - <!-- |
48 | | - ***** Native assets ***** |
49 | | - All files under Resources/ are copied to bin/ at build time *and* packed into |
50 | | - runtimes/<rid>/native so consumers only get the bits for their platform. |
51 | | - --> |
| 52 | + <PropertyGroup Condition=" '$(OS)' == 'Windows_NT' "> |
| 53 | + <DefineConstants>_WINDOWS</DefineConstants> |
| 54 | + </PropertyGroup> |
52 | 55 |
|
53 | 56 | <ItemGroup> |
54 | | - <!-- Top‑level executables / libraries --> |
55 | 57 | <None Include="Resources/*" Exclude="Resources/graphviz/**"> |
56 | 58 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
57 | | - <Link>%(RecursiveDir)/%(Filename)%(Extension)</Link> |
| 59 | + <TargetPath>runtimes/$(Rid)/native/%(Filename)%(Extension)</TargetPath> |
58 | 60 | <Pack>true</Pack> |
59 | | - <PackagePath>runtimes/linux-x64/native/</PackagePath> |
| 61 | + <PackagePath>runtimes/$(Rid)/native/</PackagePath> |
60 | 62 | </None> |
61 | | - <!-- Graphviz plug‑ins & sub‑folder --> |
| 63 | + |
62 | 64 | <None Include="Resources/graphviz/**"> |
63 | 65 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
64 | | - <Link>%(RecursiveDir)/graphviz/%(Filename)%(Extension)</Link> |
65 | | - <Pack>true</Pack> |
66 | | - <PackagePath>runtimes/linux-x64/native/graphviz/%(RecursiveDir)</PackagePath> |
67 | | - </None> |
68 | | - </ItemGroup> |
69 | | - |
70 | | - <!-- Shared assets such as the licence file --> |
71 | | - <ItemGroup> |
72 | | - <None Include="..\LICENSE"> |
| 66 | + <TargetPath>runtimes/$(Rid)/native/graphviz/%(RecursiveDir)%(Filename)%(Extension)</TargetPath> |
73 | 67 | <Pack>true</Pack> |
74 | | - <PackagePath></PackagePath> |
| 68 | + <PackagePath>runtimes/$(Rid)/native/graphviz/%(RecursiveDir)</PackagePath> |
75 | 69 | </None> |
76 | 70 | </ItemGroup> |
77 | 71 |
|
|
0 commit comments