-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Generate an all-in-one nuget package. #481
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<Project> | ||
<Target Name="PrepareFolderStructure" DependsOnTargets="Build" | ||
Outputs="@(O_PrepareFolderStructure)"> | ||
<PropertyGroup> | ||
<AsmBase>$(ProjectDir)bin\nuget\runtime\</AsmBase> | ||
<PdbBase>$(ProjectDir)bin\nugetsyms\runtime\</PdbBase> | ||
<FrameworkBase>lib\$(TargetFramework)\</FrameworkBase> | ||
</PropertyGroup> | ||
<ItemGroup Condition="'$(Configuration)'=='Windows'"> | ||
<LibDir Include="$(AsmBase)win-$(Platform)\$(FrameworkBase)" /> | ||
<SymDir Include="$(PdbBase)win-$(Platform)\$(FrameworkBase)\" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(Configuration)'=='OSX-Linux'"> | ||
<LibDir Include="$(AsmBase)linux-$(Platform)\$(FrameworkBase)\" /> | ||
<SymDir Include="$(PdbBase)linux-$(Platform)\$(FrameworkBase)\" /> | ||
<LibDir Include="$(AsmBase)osx-$(Platform)\$(FrameworkBase)\" /> | ||
<SymDir Include="$(PdbBase)osx-$(Platform)\$(FrameworkBase)\" /> | ||
</ItemGroup> | ||
<Copy SourceFiles="$(OutDir)$(AssemblyName).dll" DestinationFolder="%(LibDir.Identity)"> | ||
<Output ItemName="O_PrepareFolderStructure" TaskParameter="CopiedFiles"/> | ||
</Copy> | ||
<Copy SourceFiles="$(OutDir)$(AssemblyName).pdb" Condition="Exists('$(OutDir)$(AssemblyName).pdb')" DestinationFolder="%(SymDir.Identity)"> | ||
<Output ItemName="O_PrepareFolderStructure" TaskParameter="CopiedFiles"/> | ||
</Copy> | ||
</Target> | ||
<Target Name="BatchBuild" BeforeTargets="Pack" | ||
Outputs="@(O_BatchBuild)"> | ||
<ItemGroup> | ||
<ToBuilt Include="Steamworks.NET.Standard.csproj"> | ||
<Properties>Platform=x64;Configuration=Windows;PackagingBuild=true</Properties> | ||
</ToBuilt> | ||
<ToBuilt Include="Steamworks.NET.Standard.csproj"> | ||
<Properties>Platform=x64;Configuration=OSX-Linux;PackagingBuild=true</Properties> | ||
</ToBuilt> | ||
<ToBuilt Include="Steamworks.NET.Standard.csproj"> | ||
<Properties>Platform=x86;Configuration=Windows;PackagingBuild=true</Properties> | ||
</ToBuilt> | ||
<ToBuilt Include="Steamworks.NET.Standard.csproj"> | ||
<Properties>Platform=x86;Configuration=OSX-Linux;PackagingBuild=true</Properties> | ||
</ToBuilt> | ||
<ToBuilt Include="Steamworks.NET.Standard.csproj"> | ||
<Properties> | ||
Platform=x64; | ||
Configuration=Windows; | ||
ProduceOnlyReferenceAssembly=true; | ||
OutDir=$(ProjectDir)bin\ref | ||
</Properties> | ||
</ToBuilt> | ||
</ItemGroup> | ||
<MSBuild BuildInParallel="true" StopOnFirstFailure="true" Projects="@(ToBuilt)" | ||
Targets="Build;PrepareFolderStructure"> | ||
<Output TaskParameter="TargetOutputs" ItemName="O_BatchBuild" /> | ||
</MSBuild> | ||
</Target> | ||
<Target Name="CollectNugetContent" DependsOnTargets="BatchBuild" BeforeTargets="_GetPackageFiles;GenerateNuspec"> | ||
<ItemGroup> | ||
<None Remove="%(Complie.Identity)" /> | ||
<None Remove="*" /> | ||
<None Remove="MainPackage\*" /> | ||
<Asm Include="$(ProjectDir)bin\ref\*"> | ||
<Pack>true</Pack> | ||
<PackagePath>ref\$(TargetFramework)\</PackagePath> | ||
</Asm> | ||
<Content Include="../README.md" Pack="true" PackagePath="" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Paths Include="linux-x64;osx-x64;win-x64;linux-x86;osx-x86;win-x86" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<AsmBase>$(ProjectDir)bin\nuget\runtime\lib\</AsmBase> | ||
<PdbBase>$(ProjectDir)bin\nugetsyms\runtime\lib\</PdbBase> | ||
<FrameworkBase>lib\$(TargetFramework)\</FrameworkBase> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Asm Include="@(Paths->'$(AsmBase)%(Identity)\$(FrameworkBase)\$(AssemblyName).dll')" | ||
Pack="true" PackagePath="@(Paths->'runtime\lib\%(Identity)\$(FrameworkBase)\')" /> | ||
<Pdb Include="@(Paths->'$(PdbBase)%(Identity)\$(FrameworkBase)\$(AssemblyName).pdb')" | ||
Pack="true" PackagePath="@(Paths->'runtime\lib\$(FrameworkBase)\%(Identity)\')" /> | ||
|
||
<_PackageFiles Include="@(Asm)" /> | ||
</ItemGroup> | ||
|
||
<Message Text="Asm target: @(Asm->'%(identity) -> %(PackagePath)')" Importance="high" /> | ||
<Message Text="Pdb target: @(Pdb->'%(identity) -> %(PackagePath)')" Importance="high" /> | ||
</Target> | ||
<Target Name="OverrideSymbolFiles" DependsOnTargets="_GetDebugSymbolsWithTfm" | ||
BeforeTargets="GenerateNuspec" | ||
Returns="@(_TargetPathsToSymbolsWithTfm)"> | ||
|
||
<ItemGroup> | ||
<None Remove="%(_TargetPathsToSymbols.Identity)" /> | ||
<_TargetPathsToSymbols Include="@(Pdb)" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="ShowPackagedFiles" AfterTargets="CollectNugetContent"> | ||
<Message Text="Package Files: @(_PackageFiles)" Importance="high" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
First build binaries of all supported platform. Enter | ||
```bat | ||
dotnet build -t:BatchBuild Steamworks.NET.Standard.sln | ||
``` | ||
to your terminal. | ||
|
||
Then use nuget client with the `.nuspec` to pack an all-in-one package. Enter | ||
```bat | ||
nuget pack Steamworks.NET.nuspec -OutputDirectory bin\ | ||
``` | ||
to your terminal. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we could have a build.bat and build.sh which runs these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!