Skip to content

Commit

Permalink
build options
Browse files Browse the repository at this point in the history
  • Loading branch information
caunt committed Dec 15, 2023
1 parent c9e759c commit 0a561e4
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 20 deletions.
13 changes: 13 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$runtimeIdentifiers = @("linux-arm", "linux-arm64", "linux-bionic-arm64", "linux-musl-arm", "linux-musl-arm64", "linux-musl-x64", "linux-x64", "osx-arm64", "osx-x64", "win-arm64", "win-x64", "win-x86")
$config = "Release"
$path = "publish"

Get-ChildItem -Path $path | Remove-Item -Recurse -Force

foreach ($rid in $runtimeIdentifiers) {
dotnet publish .\src\Void.Proxy\ -c $config -r $rid --output "$path\$rid" --self-contained true
dotnet publish .\src\Void.Proxy\ -c $config -r $rid --output "$path\$rid-minimal" --self-contained false
}

Get-ChildItem -Path $path -Recurse | Where-Object {!$_.PSIsContainer -and $_.Extension -ne '.pdb'} | Move-Item -Destination $path -Force
Get-ChildItem -Path $path -Directory | Remove-Item -Recurse -Force
8 changes: 4 additions & 4 deletions src/Void.NBT/Void.NBT.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
44 changes: 28 additions & 16 deletions src/Void.Proxy/Void.Proxy.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>void-proxy-$(RuntimeIdentifier)</AssemblyName>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishSingleFile>true</PublishSingleFile>
<!--<PublishReadyToRun>true</PublishReadyToRun>-->
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NET.Minecraft.Component" Version="1.0.5" />
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
<PackageReference Include="Serilog" Version="3.1.2-dev-02097" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Zlib.Portable.Signed" Version="1.11.0" />
</ItemGroup>
<PropertyGroup Condition="'$(SelfContained)' == 'true'">
<PublishTrimmed>true</PublishTrimmed>
<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Void.NBT\Void.NBT.csproj" />
</ItemGroup>
<PropertyGroup Condition="'$(SelfContained)' == 'false'">
<AssemblyName>$(AssemblyName)-minimal</AssemblyName>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NET.Minecraft.Component" Version="1.0.5" />
<PackageReference Include="Nito.AsyncEx" Version="5.1.2" />
<PackageReference Include="Serilog" Version="3.1.2-dev-02097" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Zlib.Portable.Signed" Version="1.11.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Void.NBT\Void.NBT.csproj" />
</ItemGroup>

</Project>

0 comments on commit 0a561e4

Please sign in to comment.