Skip to content

Commit

Permalink
Cleanup project files and test native dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar committed Jan 14, 2024
1 parent fa2943b commit 35d1ebd
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 26 deletions.
29 changes: 29 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project>
<PropertyGroup>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Nullable>enable</Nullable>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<TargetFrameworks>net8.0</TargetFrameworks>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<Authors>OoLunar</Authors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageIcon>logo.png</PackageIcon>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageProjectUrl>https://github.com/OoLunar/DSharpPlus.VoiceLink</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<ProjectRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), "DSharpPlus.VoiceLink.sln"))</ProjectRoot>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/OoLunar/DSharpPlus.VoiceLink</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="$(ProjectRoot)/res/*.png" Pack="true" PackagePath=""/>
<EmbeddedResource Include="$(ProjectRoot)/LICENSE" Pack="true" PackagePath=""/>
<EmbeddedResource Include="$(ProjectRoot)/README.md" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ./ /src
RUN dotnet publish -c Release -r linux-musl-x64
ENTRYPOINT dotnet /src/examples/HelloWorld/bin/Release/net8.0/linux-musl-x64/HelloWorld.dll
Empty file added README.md
Empty file.
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "3.9"

services:
voicelink_example:
build: .
restart: unless-stopped
env_file: .env
8 changes: 4 additions & 4 deletions examples/HelloWorld/HelloWorld.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../src/DSharpPlus.VoiceLink/DSharpPlus.VoiceLink.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Matroska" Version="0.0.9" />
<ProjectReference Include="$(ProjectRoot)/src/DSharpPlus.VoiceLink/DSharpPlus.VoiceLink.csproj" />
<ProjectReference Include="$(ProjectRoot)/src/DSharpPlus.VoiceLink.Natives.Sodium/DSharpPlus.VoiceLink.Natives.Sodium.csproj" />
<ProjectReference Include="$(ProjectRoot)/src/DSharpPlus.VoiceLink.Natives.Opus/DSharpPlus.VoiceLink.Natives.Opus.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
<Description>Provides the dynamic library files for Opus.</Description>
<PackageTags>discord, discord-bot, discord-api, dsharpplus, discord-voice, dsharpplus-voicenext</PackageTags>
<Authors>OoLunar, InFTord, Aaron2550</Authors>
<PackageProjectUrl>https://github.com/OoLunar/DSharpPlus.VoiceLink</PackageProjectUrl>
<RepositoryUrl>https://github.com/OoLunar/DSharpPlus.VoiceLink</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<IsPackable>true</IsPackable>
</PropertyGroup>
<ItemGroup>
<None Include="../../LICENSE" Pack="true" PackagePath="" />
<Content Include="../../libs/libopus/*" Pack="true" PackagePath="lib/$(TargetFramework)" />
<Content Include="$(ProjectRoot)/libs/libopus/*" Pack="true" PackagePath="runtimes/$(TargetFramework)/native" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
<Description>Provides the dynamic library files for Sodium.</Description>
<PackageTags>discord, discord-bot, discord-api, dsharpplus, discord-voice, dsharpplus-voicenext</PackageTags>
<Authors>OoLunar, InFTord, Aaron2550</Authors>
<PackageProjectUrl>https://github.com/OoLunar/DSharpPlus.VoiceLink</PackageProjectUrl>
<RepositoryUrl>https://github.com/OoLunar/DSharpPlus.VoiceLink</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<IsPackable>true</IsPackable>
</PropertyGroup>
<ItemGroup>
<None Include="../../LICENSE" Pack="true" PackagePath="" />
<Content Include="../../libs/libsodium/*" Pack="true" PackagePath="lib/$(TargetFramework)" />
<Content Include="$(ProjectRoot)/libs/libsodium/libsodium.so" Pack="true" PackagePath="lib/$(TargetFramework)/libsodium.so" />
</ItemGroup>
</Project>
15 changes: 5 additions & 10 deletions src/DSharpPlus.VoiceLink/DSharpPlus.VoiceLink.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@
<PackageId>OoLunar.DSharpPlus.VoiceLink</PackageId>
<Description>An updated voice extension for the DSharpPlus Discord library.</Description>
<PackageTags>discord, discord-bot, discord-api, dsharpplus, discord-voice, dsharpplus-voicenext</PackageTags>
<Authors>OoLunar, InFTord, Aaron2550</Authors>
<PackageProjectUrl>https://github.com/OoLunar/DSharpPlus.VoiceLink</PackageProjectUrl>
<RepositoryUrl>https://github.com/OoLunar/DSharpPlus.VoiceLink</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Authors>OoLunar</Authors>
<IsPackable>true</IsPackable>
</PropertyGroup>
<ItemGroup>
<None Include="../../LICENSE" Pack="true" PackagePath="" />
<PackageReference Include="Geralt" Version="3.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="System.IO.Pipelines" Version="8.0.0" />
<PackageReference Include="Serilog" Version="3.1.1" />
Expand All @@ -25,7 +20,7 @@
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\libs\DSharpPlus\DSharpPlus\DSharpPlus.csproj" />
<ItemGroup>
<ProjectReference Include="$(ProjectRoot)/libs/DSharpPlus/DSharpPlus/DSharpPlus.csproj" />
</ItemGroup>
</Project>
</Project>

0 comments on commit 35d1ebd

Please sign in to comment.