From a7f421bd70de1777973874c1271c36d506bb027c Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Fri, 16 Jan 2026 02:05:13 +0900
Subject: [PATCH 01/11] initial prebuild libdave
---
.gitignore | 4 +-
.gitmodules | 7 +
Directory.Build.props | 5 +-
Directory.Build.targets | 2 +-
NetCord.slnx | 1 +
NetCord/NetCord.csproj | 5 +
NetCord/ThirdParty/Directory.Build.props | 35 +++
NetCord/ThirdParty/Directory.Build.targets | 46 ++++
.../ThirdParty/Libdave/Libdave.build.props | 18 ++
.../ThirdParty/Libdave/Libdave.build.targets | 216 ++++++++++++++++++
NetCord/ThirdParty/Libdave/Libdave.csproj | 52 +++++
.../ThirdParty/Libdave/Packaged/build.props | 11 +
.../ThirdParty/Libdave/Packaged/build.targets | 3 +
NetCord/ThirdParty/MLSpp/MLSpp.build.props | 15 ++
NetCord/ThirdParty/MLSpp/MLSpp.build.targets | 195 ++++++++++++++++
Resources/NuGet/README.md | 2 +
16 files changed, 614 insertions(+), 3 deletions(-)
create mode 100644 .gitmodules
create mode 100644 NetCord/ThirdParty/Directory.Build.props
create mode 100644 NetCord/ThirdParty/Directory.Build.targets
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.build.props
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.build.targets
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.csproj
create mode 100644 NetCord/ThirdParty/Libdave/Packaged/build.props
create mode 100644 NetCord/ThirdParty/Libdave/Packaged/build.targets
create mode 100644 NetCord/ThirdParty/MLSpp/MLSpp.build.props
create mode 100644 NetCord/ThirdParty/MLSpp/MLSpp.build.targets
diff --git a/.gitignore b/.gitignore
index 44c3b430e..80176aba1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -364,4 +364,6 @@ FodyWeavers.xsd
# Settings file
appsettings.json
-!Documentation/**/appsettings.json
\ No newline at end of file
+!Documentation/**/appsettings.json
+
+/NetCord/ThirdParty/**/*_build
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000000000..38d0aefb4
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,7 @@
+[submodule "NetCord/ThirdParty/libdave"]
+ path = NetCord/ThirdParty/libdave
+ url = https://github.com/discord/libdave/
+
+[submodule "NetCord/ThirdParty/mlspp"]
+ path = NetCord/ThirdParty/mlspp
+ url = https://github.com/cisco/mlspp/
diff --git a/Directory.Build.props b/Directory.Build.props
index 55e17a349..ff80802b1 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,6 +1,8 @@
-
+
+
+
net10.0
enable
enable
@@ -16,6 +18,7 @@
bot;discord;discord-api
MIT
The modern and fully customizable C# Discord library.
+ KubaZ2; NetCord Contributors
README.md
ICON.png
true
diff --git a/Directory.Build.targets b/Directory.Build.targets
index fb55fc1ce..fb6f7d022 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -3,5 +3,5 @@
$(DefineConstants);$([System.String]::Copy('$(AssemblyName)').Replace('.', '_'))
-
+
diff --git a/NetCord.slnx b/NetCord.slnx
index c3ba02e9f..3d43998b4 100644
--- a/NetCord.slnx
+++ b/NetCord.slnx
@@ -98,4 +98,5 @@
+
diff --git a/NetCord/NetCord.csproj b/NetCord/NetCord.csproj
index 1d3b26c3c..dd3cf5af5 100644
--- a/NetCord/NetCord.csproj
+++ b/NetCord/NetCord.csproj
@@ -1,5 +1,10 @@
+
+
+
+
+
diff --git a/NetCord/ThirdParty/Directory.Build.props b/NetCord/ThirdParty/Directory.Build.props
new file mode 100644
index 000000000..4d96bf4df
--- /dev/null
+++ b/NetCord/ThirdParty/Directory.Build.props
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Debug;Release;RelWithDebInfo;MinSizeRel
+ $(CMakeArgs) -DCMAKE_CONFIGURATION_TYPES="$(CMakeConfigs)"
+
+
+
+ ConfigureMlspp
+ BuildMlsppNative
+ BuildMlsppForPackage
+ $(MSBuildThisFileDirectory)\MLSpp\
+
+
+
+
+
+ $(BuildLibdave_DependsOn)
+
+
+
diff --git a/NetCord/ThirdParty/Directory.Build.targets b/NetCord/ThirdParty/Directory.Build.targets
new file mode 100644
index 000000000..ab95814fd
--- /dev/null
+++ b/NetCord/ThirdParty/Directory.Build.targets
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+ $([System.Version]::Parse('$(MSBuildVersion)').Major)
+
+
+
+
+
+
+
+
+
+
+ $([System.Text.RegularExpressions.Regex]::Match($(CMakeVersionOutput), 'cmake version (\d+\.\d+\.\d+)').Groups[1].Value)
+ $([System.Version]::Parse('$(CMakeVersionString)').Major)
+ $([System.Version]::Parse('$(CMakeVersionString)').Minor)
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NetCord/ThirdParty/Libdave/Libdave.build.props b/NetCord/ThirdParty/Libdave/Libdave.build.props
new file mode 100644
index 000000000..752c821e4
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.build.props
@@ -0,0 +1,18 @@
+
+
+
+
+ true
+ false
+ $(MSBuildThisFileDirectory)\libdave\cpp
+
+ $(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)\libdave_build
+ $(LibdaveBuildDir)\.build-stamp
+ $(LibdaveBuildDir)\.cmake-configure-error.log
+ $(LibdaveBuildDir)\.cmake-build-error.log
+ dave.dll
+ libdave.dylib
+ libdave.so
+
+
+
diff --git a/NetCord/ThirdParty/Libdave/Libdave.build.targets b/NetCord/ThirdParty/Libdave/Libdave.build.targets
new file mode 100644
index 000000000..99d47e391
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.build.targets
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_LibdaveConfigureCMakeArgsFile>$(LibdaveBuildDir)\.cmake-args
+
+
+
+
+
+
+ $(CMakeArgs) $(LibdaveCMakeArgs)
+ -G "$(LibdaveGenerator)" $(LibdaveCMakeArgs)
+
+ $(LibdaveCMakeArgs) -DBUILD_SHARED_LIBS=ON
+
+ <_LibdaveOutputAbs>$(MSBuildProjectDirectory)\$(OutputPath)
+ <_LibdaveOutputRel>$([MSBuild]::MakeRelative($(LibdaveBuildDir), $(_LibdaveOutputAbs)))
+
+ $(LibdaveCMakeArgs) -DTESTING=$(LibdaveTesting) -DTESTS=$(LibdaveTesting)
+ $(LibdaveCMakeArgs) -DOpenSSL_ROOT="$(CMakeOpenSSLRoot)"
+ $(LibdaveCMakeArgs) -DOpenSSL_DIR="$(CMakeOpenSSLDir)"
+ $(LibdaveCMakeArgs) -DBoringSSL_ROOT="$(CMakeBoringSSLRoot)"
+ $(LibdaveCMakeArgs) -DBoringSSL_DIR="$(CMakeBoringSSLDir)"
+ $(LibdaveCMakeArgs) -Dnlohmann_json_ROOT="$(CMakeNlohmannJsonRoot)"
+ $(LibdaveCMakeArgs) -Dnlohmann_json_DIR="$(CMakeNlohmannJsonDir)"
+ $(LibdaveCMakeArgs) -DMLSPP_ROOT="$(CMakeMlsppRoot)"
+ $(LibdaveCMakeArgs) -DMLSPP_DIR="$(CMakeMlsppDir)"
+
+
+
+
+
+
+
+
+
+ <_PrevCMakeArgsProperty>%(_PrevCMakeArgs.Identity)
+
+
+
+
+ <_PrevCMakeArgsTrimmed>$(_PrevCMakeArgsProperty.Trim())
+ <_LibdaveCMakeArgsTrimmed>$(LibdaveCMakeArgs.Trim())
+
+ <_IsCMakeArgsChanged_>
+ $([System.String]::Compare('$(_LibdaveCMakeArgsTrimmed)', '$(_PrevCMakeArgsTrimmed)'))
+
+
+
+ <_IsCMakeArgsChanged>$(_IsCMakeArgsChanged_.Trim())
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(BuildLibdave_DependsOn);ConfigureLibdave
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_LibdaveBuildOutput Include="$(LibdaveBuildDir)\$(Configuration)\**\*" />
+
+ true
+ PreserveNewest
+ native\$([MSBuild]::MakeRelative('$(LibdaveBuildDir)', '%(_LibdaveBuildOutput.FullPath)'))
+
+
+
+
+
+
+
+ <_LibdaveConfig Include="$(CMakeConfigs)">
+ $(LibdaveBuildDir)\%(Identity)\
+
+ <_LibdaveConfig Remove="$(Configuration)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_LibdavePackageFiles Include="%(_LibdaveConfig.Dir)\**\*" Condition="Exists('%(_LibdaveConfig.Dir)')"/>
+
+ true
+ native\$([MSBuild]::MakeRelative('$(LibdaveBuildDir)', '%(_LibdavePackageFiles.FullPath)'))
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.csproj b/NetCord/ThirdParty/Libdave/Libdave.csproj
new file mode 100644
index 000000000..b4c00638d
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.csproj
@@ -0,0 +1,52 @@
+
+
+
+ false
+ NetCord.ThirdParty.Libdave.Win32
+ Pre-built libdave binaries for NetCord, $(Description)
+
+ NU5128
+
+
+
+ true
+
+
+
+
+
+
+
+
+ MLSpp\%(Filename)%(Extension)
+
+
+
+ native\source\libdave\%(RecursiveDir)%(Filename)%(Extension)
+
+
+ native\source\mlspp\%(RecursiveDir)%(Filename)%(Extension)
+
+
+
+ Build Files\%(Filename)%(Extension)
+
+
+ Build Files\%(Filename)%(Extension)
+
+
+ Build Files\%(Filename)%(Extension)
+
+
+
+
+
+ native\build\%(RecursiveDir)%(Filename)%(Extension)
+
+
+ true
+ build\$(PackageId)%(Extension)
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Packaged/build.props b/NetCord/ThirdParty/Libdave/Packaged/build.props
new file mode 100644
index 000000000..4303ec026
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Packaged/build.props
@@ -0,0 +1,11 @@
+
+
+
+
+ PreserveNewest
+ PreserveNewest
+ false
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Packaged/build.targets b/NetCord/ThirdParty/Libdave/Packaged/build.targets
new file mode 100644
index 000000000..4de98b5c7
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Packaged/build.targets
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/MLSpp/MLSpp.build.props b/NetCord/ThirdParty/MLSpp/MLSpp.build.props
new file mode 100644
index 000000000..703b7eb57
--- /dev/null
+++ b/NetCord/ThirdParty/MLSpp/MLSpp.build.props
@@ -0,0 +1,15 @@
+
+
+
+
+ true
+ false
+ $(MSBuildThisFileDirectory)\mlspp
+
+ $(MSBuildThisFileDirectory)\mlspp_build
+ $(MlsppBuildDir)\.build-stamp
+ $(MlsppBuildDir)\.cmake-configure-error.log
+ $(MlsppBuildDir)\.cmake-build-error.log
+
+
+
diff --git a/NetCord/ThirdParty/MLSpp/MLSpp.build.targets b/NetCord/ThirdParty/MLSpp/MLSpp.build.targets
new file mode 100644
index 000000000..929ea0474
--- /dev/null
+++ b/NetCord/ThirdParty/MLSpp/MLSpp.build.targets
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_MlsppConfigureCMakeArgsFile>$(MlsppBuildDir)\\.cmake-args
+
+
+
+
+
+ $(CMakeArgs) $(MlsppCMakeArgs)
+ -G "$(MlsppGenerator)" $(MlsppCMakeArgs)
+
+ $(MlsppCMakeArgs) -DDISABLE_PQ=ON -DMLS_CXX_NAMESPACE="mlspp" -DDISABLE_GREASE=ON
+
+ $(MlsppCMakeArgs) -DTESTING=$(MlsppTesting)
+ $(MlsppCMakeArgs) -DOpenSSL_ROOT="$(CMakeOpenSSLRoot)"
+ $(MlsppCMakeArgs) -DOpenSSL_DIR="$(CMakeOpenSSLDir)"
+ $(MlsppCMakeArgs) -DBoringSSL_ROOT="$(CMakeBoringSSLRoot)"
+ $(MlsppCMakeArgs) -DBoringSSL_DIR="$(CMakeBoringSSLDir)"
+ $(MlsppCMakeArgs) -Dnlohmann_json_ROOT="$(CMakeNlohmannJsonRoot)"
+ $(MlsppCMakeArgs) -Dnlohmann_json_DIR="$(CMakeNlohmannJsonDir)"
+
+
+
+
+
+
+
+
+
+ <_PrevCMakeArgsProperty>%(_PrevCMakeArgs.Identity)
+
+
+
+
+ <_PrevCMakeArgsTrimmed>$(_PrevCMakeArgsProperty.Trim())
+ <_MlsppCMakeArgsTrimmed>$(MlsppCMakeArgs.Trim())
+
+ <_IsCMakeArgsChanged_>
+ $([System.String]::Compare('$(_MlsppCMakeArgsTrimmed)', '$(_PrevCMakeArgsTrimmed)'))
+
+
+
+ <_IsCMakeArgsChanged>$(_IsCMakeArgsChanged_.Trim())
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(MlsppBuildDir)
+
+
+
+
+
+ <_MlsppConfig Include="$(CMakeConfigs.Split(';'))" />
+ <_MlsppConfig Remove="$(Configuration)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Resources/NuGet/README.md b/Resources/NuGet/README.md
index 89a1d4146..73e08eafa 100644
--- a/Resources/NuGet/README.md
+++ b/Resources/NuGet/README.md
@@ -25,6 +25,8 @@ You can install NetCord packages via NuGet package manager:
| **[NetCord.Hosting](https://www.nuget.org/packages/NetCord.Hosting)** | Provides .NET Generic Host extensions for the NetCord package. |
| **[NetCord.Hosting.Services](https://www.nuget.org/packages/NetCord.Hosting.Services)** | Provides .NET Generic Host extensions for the NetCord.Services package. |
| **[NetCord.Hosting.AspNetCore](https://www.nuget.org/packages/NetCord.Hosting.AspNetCore)** | Provides ASP.NET Core extensions for seamless handling of HTTP events. |
+| | |
+| **[NetCord.ThirdParty.Libdave](https://www.nuget.org/packages/NetCord.ThirdParty.Libdave)** | Provides pre-built binaries for Libdave used by Voice feature |
## 2. 🚀 Showcase
From 638c980ded2b62f7ce9b0a39375d060c4cb1c071 Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Tue, 20 Jan 2026 07:02:27 +0900
Subject: [PATCH 02/11] building libdave packages ready
---
.gitignore | 2 +-
Directory.Build.props | 1 +
NetCord.slnx | 13 +-
NetCord/ThirdParty/Directory.Build.props | 57 +-
NetCord/ThirdParty/Directory.Build.targets | 2 +-
NetCord/ThirdParty/FindOpenSSL.targets | 238 ++++++++
NetCord/ThirdParty/LICENSE.md | 21 +
.../Libdave.Manager.build.props | 13 +
.../Libdave.Manager.build.targets | 127 +++++
.../Libdave.Manager/Libdave.Manager.csproj | 32 ++
.../Libdave.Manager/manage.build.props.in | 17 +
.../Libdave.Manager/manage.build.targets.in | 9 +
.../Libdave.RID/Libdave.RID.build.props | 66 +++
.../Libdave.RID/Libdave.RID.build.targets | 522 ++++++++++++++++++
.../Libdave/Libdave.RID/Libdave.RID.csproj | 67 +++
.../Libdave/Libdave.RID/build.props.in | 15 +
.../Libdave/Libdave.RID/build.targets.in | 62 +++
.../ThirdParty/Libdave/Libdave.build.props | 18 -
.../ThirdParty/Libdave/Libdave.build.targets | 216 --------
NetCord/ThirdParty/Libdave/Libdave.csproj | 52 --
.../ThirdParty/Libdave/Packaged/build.props | 11 -
.../ThirdParty/Libdave/Packaged/build.targets | 3 -
NetCord/ThirdParty/Libdave/build_unix.sh | 5 +
NetCord/ThirdParty/MLSpp/MLSpp.build.props | 53 +-
NetCord/ThirdParty/MLSpp/MLSpp.build.targets | 357 +++++++++---
NetCord/ThirdParty/fix_msvc.cmake | 13 +
README.md | 2 +
27 files changed, 1598 insertions(+), 396 deletions(-)
create mode 100644 NetCord/ThirdParty/FindOpenSSL.targets
create mode 100644 NetCord/ThirdParty/LICENSE.md
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.build.props
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.build.targets
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.csproj
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.Manager/manage.build.props.in
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.Manager/manage.build.targets.in
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.build.props
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.build.targets
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.RID/build.props.in
create mode 100644 NetCord/ThirdParty/Libdave/Libdave.RID/build.targets.in
delete mode 100644 NetCord/ThirdParty/Libdave/Libdave.build.props
delete mode 100644 NetCord/ThirdParty/Libdave/Libdave.build.targets
delete mode 100644 NetCord/ThirdParty/Libdave/Libdave.csproj
delete mode 100644 NetCord/ThirdParty/Libdave/Packaged/build.props
delete mode 100644 NetCord/ThirdParty/Libdave/Packaged/build.targets
create mode 100644 NetCord/ThirdParty/Libdave/build_unix.sh
create mode 100644 NetCord/ThirdParty/fix_msvc.cmake
diff --git a/.gitignore b/.gitignore
index 80176aba1..a03941df2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -366,4 +366,4 @@ FodyWeavers.xsd
appsettings.json
!Documentation/**/appsettings.json
-/NetCord/ThirdParty/**/*_build
+/NetCord/ThirdParty/**/*_build*
diff --git a/Directory.Build.props b/Directory.Build.props
index ff80802b1..669d552b8 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -40,6 +40,7 @@
+
diff --git a/NetCord.slnx b/NetCord.slnx
index 3d43998b4..dc2006012 100644
--- a/NetCord.slnx
+++ b/NetCord.slnx
@@ -60,6 +60,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -98,5 +110,4 @@
-
diff --git a/NetCord/ThirdParty/Directory.Build.props b/NetCord/ThirdParty/Directory.Build.props
index 4d96bf4df..052132e21 100644
--- a/NetCord/ThirdParty/Directory.Build.props
+++ b/NetCord/ThirdParty/Directory.Build.props
@@ -2,6 +2,8 @@
+ false
+
@@ -13,23 +15,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_BuildArch>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)
+ <_BuildRuntime Condition="$([MSBuild]::IsOSPlatform('Windows'))">win
+ <_BuildRuntime Condition="$([MSBuild]::IsOSPlatform('Linux'))">linux
+ <_BuildRuntime Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx
+ $(_BuildRuntime)-$(_BuildArch.ToLower())
+
- Debug;Release;RelWithDebInfo;MinSizeRel
- $(CMakeArgs) -DCMAKE_CONFIGURATION_TYPES="$(CMakeConfigs)"
+ true
+ $(PackageOutputPath);$(RestoreSources)
+ win-x64;linux-x64
+
+
+
+
+
+ $(CMakeArgs) -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- ConfigureMlspp
- BuildMlsppNative
- BuildMlsppForPackage
$(MSBuildThisFileDirectory)\MLSpp\
+ BuildMlsppNative;MlsppOutputs;$(Building_DependsOn)
+ MlsppInstall;$(Installing_DependsOn)
+ CleanMlsppNative;$(Cleaning_DependsOn)
+ PackageMlsppLib;$(Packing_DependsOn)
+ true
-
-
-
- $(BuildLibdave_DependsOn)
+
+
+
+
+ PackageOpenSSLLib;$(Packing_DependsOn)
-
+
+
+
diff --git a/NetCord/ThirdParty/Directory.Build.targets b/NetCord/ThirdParty/Directory.Build.targets
index ab95814fd..18a7b01ef 100644
--- a/NetCord/ThirdParty/Directory.Build.targets
+++ b/NetCord/ThirdParty/Directory.Build.targets
@@ -4,7 +4,7 @@
+ Condition="'$(CMakeGenerator)' == '' AND '$(OS)' == 'Windows_NT'">
diff --git a/NetCord/ThirdParty/FindOpenSSL.targets b/NetCord/ThirdParty/FindOpenSSL.targets
new file mode 100644
index 000000000..3fe93f544
--- /dev/null
+++ b/NetCord/ThirdParty/FindOpenSSL.targets
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+ false
+ false
+ true
+
+
+
+
+
+
+ <_IsWindows Condition="'$(OS)' == 'Windows_NT'">true
+ <_IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true
+ <_IsMacOS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true
+ <_IsUnix Condition="'$(_IsLinux)' == 'true' OR '$(_IsMacOS)' == 'true'">true
+
+
+
+
+
+
+
+
+
+ $(OPENSSL_ROOT_DIR)
+
+
+
+
+
+ $([MSBuild]::GetRegistryValueFromView(
+ `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenSSL (64-bit)_is1`,
+ `Inno Setup: App Path`, null,
+ RegistryView.Registry64))
+
+ $([MSBuild]::GetRegistryValueFromView(
+ `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenSSL (32-bit)_is1`,
+ `Inno Setup: App Path`, null,
+ RegistryView.Registry32))
+
+
+
+
+ $(ProgramFiles)\OpenSSL-Win64
+ $(ProgramFiles)\OpenSSL
+ C:\OpenSSL-Win64
+ C:\OpenSSL
+
+
+
+
+ /opt/homebrew/opt/openssl@3
+ /opt/homebrew/opt/openssl@1.1
+ /opt/homebrew/opt/openssl
+ /usr/local/opt/openssl@3
+ /usr/local/opt/openssl@1.1
+ /usr/local/opt/openssl
+
+
+
+
+ /usr
+ /usr/local
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_RTSuffix Condition="'$(CMakeStaticRT)' == 'true'">MT
+ <_RTSuffix Condition="'$(CMakeStaticRT)' != 'true'">MD
+
+
+
+
+ $(OpenSSLRoot)\lib\VC\x64\$(_RTSuffix)
+ $(OpenSSLRoot)\lib\VC\static
+ $(OpenSSLRoot)\lib\VC
+ $(OpenSSLRoot)\lib64
+ $(OpenSSLRoot)\lib
+
+
+
+
+ $(OpenSSLRoot)/lib/x86_64-linux-gnu
+ $(OpenSSLRoot)/lib64
+ $(OpenSSLRoot)/lib
+
+
+
+
+ $(OpenSSLRoot)/lib
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_RTSuffix Condition="'$(CMakeStaticRT)' == 'true'">MT
+ <_RTSuffix Condition="'$(CMakeStaticRT)' != 'true'">MD
+
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)\libcrypto_static64$(_RTSuffix).lib')">$(OpenSSLLibPath)\libcrypto_static64$(_RTSuffix).lib
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)\libcrypto_static$(_RTSuffix).lib')">$(OpenSSLLibPath)\libcrypto_static$(_RTSuffix).lib
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)\libcrypto_static.lib')">$(OpenSSLLibPath)\libcrypto_static.lib
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)\libcrypto64$(_RTSuffix).lib')">$(OpenSSLLibPath)\libcrypto64$(_RTSuffix).lib
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)\libcrypto$(_RTSuffix).lib')">$(OpenSSLLibPath)\libcrypto$(_RTSuffix).lib
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)\libcrypto.lib')">$(OpenSSLLibPath)\libcrypto.lib
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)\libeay32$(_RTSuffix).lib')">$(OpenSSLLibPath)\libeay32$(_RTSuffix).lib
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)\libeay32.lib')">$(OpenSSLLibPath)\libeay32.lib
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)\crypto.lib')">$(OpenSSLLibPath)\crypto.lib
+
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)\libssl_static64$(_RTSuffix).lib')">$(OpenSSLLibPath)\libssl_static64$(_RTSuffix).lib
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)\libssl_static$(_RTSuffix).lib')">$(OpenSSLLibPath)\libssl_static$(_RTSuffix).lib
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)\libssl_static.lib')">$(OpenSSLLibPath)\libssl_static.lib
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)\libssl64$(_RTSuffix).lib')">$(OpenSSLLibPath)\libssl64$(_RTSuffix).lib
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)\libssl$(_RTSuffix).lib')">$(OpenSSLLibPath)\libssl$(_RTSuffix).lib
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)\libssl.lib')">$(OpenSSLLibPath)\libssl.lib
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)\ssleay32$(_RTSuffix).lib')">$(OpenSSLLibPath)\ssleay32$(_RTSuffix).lib
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)\ssleay32.lib')">$(OpenSSLLibPath)\ssleay32.lib
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)\ssl.lib')">$(OpenSSLLibPath)\ssl.lib
+
+
+
+
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND '$(OpenSSLUseStaticLibs)' == 'true' AND Exists('$(OpenSSLLibPath)/libcrypto.a')">$(OpenSSLLibPath)/libcrypto.a
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)/libcrypto.so')">$(OpenSSLLibPath)/libcrypto.so
+
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND '$(OpenSSLUseStaticLibs)' == 'true' AND Exists('$(OpenSSLLibPath)/libssl.a')">$(OpenSSLLibPath)/libssl.a
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)/libssl.so')">$(OpenSSLLibPath)/libssl.so
+
+
+
+
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND '$(OpenSSLUseStaticLibs)' == 'true' AND Exists('$(OpenSSLLibPath)/libcrypto.a')">$(OpenSSLLibPath)/libcrypto.a
+ <_CryptoLib Condition="'$(_CryptoLib)' == '' AND Exists('$(OpenSSLLibPath)/libcrypto.dylib')">$(OpenSSLLibPath)/libcrypto.dylib
+
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND '$(OpenSSLUseStaticLibs)' == 'true' AND Exists('$(OpenSSLLibPath)/libssl.a')">$(OpenSSLLibPath)/libssl.a
+ <_SSLLib Condition="'$(_SSLLib)' == '' AND Exists('$(OpenSSLLibPath)/libssl.dylib')">$(OpenSSLLibPath)/libssl.dylib
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_OpenSSLPackageFiles Include="@(OpenSSLLib)" Condition="Exists('%(Identity)')">
+ true
+ lib\$(RuntimeIdentifier)\%(_OpenSSLPackageFiles.Filename)%(_OpenSSLPackageFiles.Extension)
+
+ <_OpenSSLPackageFiles Include="$(OpenSSLRoot)\license.txt" Condition="Exists('$(OpenSSLRoot)\license.txt')">
+ true
+ lib\$(RuntimeIdentifier)\OPENSSL_LICENSE.txt
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/LICENSE.md b/NetCord/ThirdParty/LICENSE.md
new file mode 100644
index 000000000..b69955a8d
--- /dev/null
+++ b/NetCord/ThirdParty/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 ha-ves
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.build.props b/NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.build.props
new file mode 100644
index 000000000..c9a48190b
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.build.props
@@ -0,0 +1,13 @@
+
+
+
+ manage.build.props.in
+ manage.build.targets.in
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.build.targets b/NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.build.targets
new file mode 100644
index 000000000..b15125472
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.build.targets
@@ -0,0 +1,127 @@
+
+
+
+
+
+ <_PackVer>$(Version)
+
+
+
+
+
+
+
+ <_Rid Include="$(RuntimeIdentifiers)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_TemplateContent>$([System.IO.File]::ReadAllText('$(BuildPropsTemplate)'))
+ <_TransformedContent>
+ $([System.Text.RegularExpressions.Regex]::Replace(
+ $(_TemplateContent),
+ '__PACK_VER__',
+ '$(_PackVer)'))
+
+ <_OutBuildFile>$(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)\build.props
+
+
+
+
+
+
+
+
+ <_TemplateContent>$([System.IO.File]::ReadAllText('$(BuildTargetsTemplate)'))
+ <_TransformedContent>
+ $([System.Text.RegularExpressions.Regex]::Replace(
+ $(_TemplateContent),
+ '__PACK_VER__',
+ '$(_PackVer)'))
+
+ <_OutBuildFile>$(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)\build.targets
+
+
+
+
+
+
+
+
+
+
+
+ <_PackBuildFiles Include="$(BaseIntermediateOutputPath)\build.*" />
+
+ true
+ build\$(PackageId)%(Extension)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.csproj b/NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.csproj
new file mode 100644
index 000000000..607164543
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.Manager/Libdave.Manager.csproj
@@ -0,0 +1,32 @@
+
+
+
+ NetCord.ThirdParty.Libdave
+ Pre-built libdave binaries Manager for NetCord, $(Description)
+ ha-ves;$(Authors)
+
+
+
+ false
+ NU5128
+ true
+ false
+
+ MinSizeRel;RelWithDebInfo
+ MinSizeRel
+ RelWithDebInfo
+
+
+
+
+
+
+
+ Build Files\%(Filename)%(Extension)
+
+
+ Build Files\%(Filename)%(Extension)
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.Manager/manage.build.props.in b/NetCord/ThirdParty/Libdave/Libdave.Manager/manage.build.props.in
new file mode 100644
index 000000000..a9f71818e
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.Manager/manage.build.props.in
@@ -0,0 +1,17 @@
+
+
+
+ __PACK_VER__
+
+
+
+ <_LibdaveRefArch>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)
+ <_LibdaveRefArch>$(_LibdaveRefArch.ToLower())
+ <_LibdaveRuntime Condition="$([MSBuild]::IsOSPlatform('Windows'))">win
+ <_LibdaveRuntime Condition="$([MSBuild]::IsOSPlatform('Linux'))">linux
+ <_LibdaveRuntime Condition="$([MSBuild]::IsOSPlatform('OSX'))">osx
+
+ $(_LibdaveRuntime)-$(_LibdaveRefArch)
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.Manager/manage.build.targets.in b/NetCord/ThirdParty/Libdave/Libdave.Manager/manage.build.targets.in
new file mode 100644
index 000000000..acda746b3
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.Manager/manage.build.targets.in
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.build.props b/NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.build.props
new file mode 100644
index 000000000..4b8ddf33b
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.build.props
@@ -0,0 +1,66 @@
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+ false
+ $(MSBuildThisFileDirectory)\..\libdave\cpp
+
+ true
+ $(MSBuildThisFileDirectory)\..\libdave_build\
+
+ out\
+ true
+
+ libdave_install\
+
+
+
+
+
+ build.props.in
+ build.targets.in
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.build.targets b/NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.build.targets
new file mode 100644
index 000000000..ecb5a8758
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.build.targets
@@ -0,0 +1,522 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(CMakeFlags) $(LibdaveCMakeFlags)
+
+ <_LibdaveCMakeArgs>$(CMakeArgs) $(_LibdaveCMakeArgs)
+ <_LibdaveCMakeArgs Condition="'$(LibdaveGenerator)' != ''">-G "$(LibdaveGenerator)" $(_LibdaveCMakeArgs)
+
+ <_LibdaveCMakeArgs Condition="'@(CMakeConfiguration)' != ''"
+ >$(_LibdaveCMakeArgs) -DCMAKE_CONFIGURATION_TYPES="@(CMakeConfiguration)"
+ <_LibdaveCMakeArgs Condition="'@(CMakeConfiguration)' == ''"
+ >$(_LibdaveCMakeArgs) -DCMAKE_BUILD_TYPE="$(Configuration)"
+
+ <_LibdaveCMakeArgs Condition="'$(LibdaveBuildShared)' == 'true'">$(_LibdaveCMakeArgs) -DBUILD_SHARED_LIBS=ON
+
+ <_LibdaveCMakeArgs Condition="'$(LibdaveTesting)' != ''">$(_LibdaveCMakeArgs) -DTESTING=$(LibdaveTesting) -DTESTS=$(LibdaveTesting)
+ <_LibdaveCMakeArgs Condition="'$(CMakeOpenSSLRoot)' != ''">$(_LibdaveCMakeArgs) -DOpenSSL_ROOT="$(CMakeOpenSSLRoot) "
+ <_LibdaveCMakeArgs Condition="'$(CMakeOpenSSLDir)' != ''">$(_LibdaveCMakeArgs) -DOpenSSL_DIR="$(CMakeOpenSSLDir) "
+ <_LibdaveCMakeArgs Condition="'$(CMakeBoringSSLRoot)' != ''">$(_LibdaveCMakeArgs) -DBoringSSL_ROOT="$(CMakeBoringSSLRoot) "
+ <_LibdaveCMakeArgs Condition="'$(CMakeBoringSSLDir)' != ''">$(_LibdaveCMakeArgs) -DBoringSSL_DIR="$(CMakeBoringSSLDir) "
+ <_LibdaveCMakeArgs Condition="'$(CMakeNlohmannJsonRoot)' != ''">$(_LibdaveCMakeArgs) -Dnlohmann_json_ROOT="$(CMakeNlohmannJsonRoot) "
+ <_LibdaveCMakeArgs Condition="'$(CMakeNlohmannJsonDir)' != ''">$(_LibdaveCMakeArgs) -Dnlohmann_json_DIR="$(CMakeNlohmannJsonDir) "
+ <_LibdaveCMakeArgs Condition="'$(CMakeMlsppRoot)' != ''">$(_LibdaveCMakeArgs) -DMLSPP_ROOT="$(CMakeMlsppRoot) "
+ <_LibdaveCMakeArgs Condition="'$(CMakeMlsppDir)' != ''">$(_LibdaveCMakeArgs) -DMLSPP_DIR="$(CMakeMlsppDir) "
+
+ <_LibdaveInstallPath Condition="'$(LibdaveBaseInstallPath)' != ''">$(LibdaveBaseInstallPath)
+ <_LibdaveInstallPath Condition="'$(CMakeInstallPrefix)' != ''">$(CMakeInstallPrefix)\$(_LibdaveInstallPath)
+ <_LibdaveInstallPath Condition="'$(LibdaveInstallPath)' != ''">$(LibdaveInstallPath)
+ <_LibdaveCMakeArgs Condition="'$(_LibdaveInstallPath)' != ''">$(_LibdaveCMakeArgs) -DCMAKE_INSTALL_PREFIX="$(_LibdaveInstallPath) "
+
+ $(LibdaveBaseBuildDir)\$(RuntimeIdentifier)\
+
+ $(CMakeFlags)
+
+ $(CMakeBuildArgs) $(LibdaveCMakeBuildArgs)
+ --config $(Configuration) --parallel $(LibdaveCMakeBuildArgs)
+
+ <_LibdaveBuildType>static
+ <_LibdaveBuildType Condition="'$(LibdaveBuildShared)' == 'true'">shared
+
+
+
+
+
+
+
+
+
+ <_LibdaveLibType Include="static;shared" />
+ <_LibdaveRunExt Include="dll;so" />
+ <_LibdaveLibExt Include="lib;a" />
+
+ <_LibdaveConfigType Include="@(CMakeConfiguration)">
+ <_BuildType>%(_LibdaveLibType.Identity)
+
+
+ <_LibdaveCMakeConfig Include="@(_LibdaveConfigType->'%(Identity)-%(_BuildType)')">
+ <_Config>%(Identity)
+ <_OutputPath>$(LibdaveBuildDir)\%(_BuildType)\%(Identity)
+ <_OutputPath Condition="'$(CMakeStaticRT)' == 'true' AND '%(_BuildType)' == 'static'"
+ >$(LibdaveBuildDir)\%(_BuildType)_rt\%(Identity)
+ %(MSBuildProperties);Configuration=%(Identity);CMakeStaticRT=$(CMakeStaticRT);LibdaveBuildShared=true
+ %(MSBuildProperties);LibdaveBuildShared=false
+
+
+ <_LibdaveCMakeConfig Update="%(Identity)" Condition="'$(LibdaveGenerator)' == '' AND '$(OS)' != 'Windows_NT'">
+ <_OutputPath Condition="">%(_OutputPath)\$(LibdaveBuildOutBaseDir)
+
+
+
+
+ $(LibdaveBuildDir)\$(_LibdaveBuildType)
+ <_LibdaveBuildOutputPath>$(LibdaveBuildDir)\$(LibdaveBuildOutBaseDir)
+
+
+
+ $(LibdaveBuildDir)_rt
+
+ <_LibdaveBuildMSVC>MultiThreaded
+ <_LibdaveBuildMSVC Condition="'$(Configuration)' == 'RelWithDebInfo'">$(_LibdaveBuildMSVC)Debug
+ <_LibdaveCMakeArgs Condition="'$(OS)' == 'Windows_NT'">$(_LibdaveCMakeArgs) -DOPENSSL_MSVC_STATIC_RT=ON -DCMAKE_MSVC_RUNTIME_LIBRARY="$(_LibdaveBuildMSVC)"
+
+
+
+
+
+
+ $(LibdaveBuildDir)\$(Configuration)\
+
+ <_LibdaveCMakeOutDir>$(LibdaveBuildDir)
+ <_LibdaveCMakeOutDir Condition="'$(OS)' != 'Windows_NT'">$(_LibdaveCMakeOutDir)\$(LibdaveBuildOutBaseDir)
+
+ <_LibdaveCMakeArgs>$(_LibdaveCMakeArgs) -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$(_LibdaveCMakeOutDir)
+ <_LibdaveCMakeArgs>$(_LibdaveCMakeArgs) -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$(_LibdaveCMakeOutDir)
+ <_LibdaveCMakeArgs>$(_LibdaveCMakeArgs) -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=$(_LibdaveCMakeOutDir)
+
+ <_LibdaveBuildOutputPath>$(LibdaveBuildDir)\$(Configuration)
+ $(LibdaveCMakeBuildArgs) -- /p:OutDir="$(_LibdaveBuildOutputPath)/"
+
+ <_LibdaveBuildOutputPath Condition="'$(OS)' != 'Windows_NT'">$(LibdaveBuildDir)\$(LibdaveBuildOutBaseDir)
+
+
+
+ $(_LibdaveCMakeArgs) $(CMakeArgs) $(LibdaveCMakeArgs)
+
+ <_LibdaveConfigureCMakeArgsFile>$(LibdaveBuildDir)\.cmake-args
+ <_LibdaveConfigureErrorLog>$(LibdaveBuildDir)\.cmake-configure-error.log
+
+ <_LibdaveBuildErrorLog>$(LibdaveBuildDir)\.cmake-build-error_$(Configuration).log
+ <_LibdaveBuildErrorIdent>$(LibdaveBuildDir)\build_error_$(Configuration)
+
+ <_LibdaveInstallErrorLog>$(LibdaveBuildDir)\.cmake-install-error_$(Configuration).log
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_PrevCMakeArgsProperty>%(_PrevCMakeArgs.Identity)
+
+
+
+
+ <_PrevCMakeArgsTrimmed>$(_PrevCMakeArgsProperty.Trim())
+ <_LibdaveCMakeArgsTrimmed>$(LibdaveCMakeArgs.Trim())
+
+ <_IsCMakeArgsChanged_>
+ $([System.String]::Compare('$(_LibdaveCMakeArgsTrimmed)', '$(_PrevCMakeArgsTrimmed)'))
+
+ <_IsCMakeArgsChanged>$(_IsCMakeArgsChanged_.Trim())
+
+
+
+
+
+
+ <_IsCMakeArgsChanged Condition="'$(CMakeClearCache)' == 'true' AND '$(_IsCMakeArgsChanged)' != '0'">-1
+
+
+
+
+
+ <_IsCMakeArgsChanged Condition="!Exists('$(LibdaveBuildDir)\CMakeCache.txt')">-1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(LibdaveBuildDir)
+
+
+
+
+ <_LibdaveCMakeConfigRemain Include="@(_LibdaveCMakeConfig)" />
+ <_LibdaveCMakeConfigRemain Remove="$(Configuration)-$(_LibdaveBuildType)" />
+
+
+
+ <_LibdaveBuildOutput Include="$(_LibdaveBuildOutputPath)\**\*" />
+ <_LibdaveBuildOutput Update="%(Identity)" Condition="'$(LibdaveCopyBuildOutput)' == 'true'">
+ <_CopyPath>-> $(MSBuildProjectDirectory)\$(OutputPath)\$(LibdaveBaseOutputPath)\$([MSBuild]::MakeRelative('$(_LibdaveBuildOutputPath)', '%(FullPath)'))
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+ $(LibdaveBaseOutputPath)\$([MSBuild]::MakeRelative('$(_LibdaveBuildOutputPath)', '%(FullPath)'))
+
+
+
+
+
+
+
+
+
+
+ <_LibdaveCMakeConfigRemain Include="@(_LibdaveCMakeConfig)" />
+
+
+
+
+ <_Args>$(LibdaveCMakeBuildArgs.Replace('=', ' '))
+ <_Pattern>(?:^|\s)(?:-j|--parallel)\s*(\d+)
+
+
+ <_HasParallel>$([System.Text.RegularExpressions.Regex]::IsMatch('$(_Args)', '$(_Pattern)'))
+
+
+ <_TotalJobs Condition="'$(_HasParallel)' == 'True'">$([System.Text.RegularExpressions.Regex]::Match('$(_Args)', '.*(?:-j|--parallel)\s*(\d+)').Groups[1].Value)
+ <_TotalJobs Condition="'$(_TotalJobs)' == ''">$([System.Environment]::ProcessorCount)
+
+
+ <_ConfigCount>@(_LibdaveCMakeConfigRemain->Count())
+ <_ConfigCount Condition="'$(_ConfigCount)' == '0' AND '$(Configuration)' != ''">1
+ $([MSBuild]::Divide($(_TotalJobs), $(_ConfigCount)))
+ 1
+
+ <_LibdaveIntCMakeBuildArgs Condition="'$(JobsPerConfig)' != '1'">LibdaveCMakeBuildArgs=-j$(JobsPerConfig)
+
+
+
+
+
+
+ <_LibdaveConfigToBuild Include="$(MSBuildProjectFile)">
+ $(_LibdaveIntCMakeBuildArgs);%(_LibdaveCMakeConfigRemain.MSBuildProperties)
+ $(Building_DependsOn);BuildLibdaveNative;LibdaveOutputs
+
+
+
+
+
+
+
+
+
+
+
+ <_LibdaveCMakeConfig Update="%(Identity)"
+ Condition="'%(_BuildType)' == 'static'">
+ <_OutputPath>$(LibdaveBaseBuildDir)\$(RuntimeIdentifier)\%(_BuildType)_rt\%(_Config)
+
+ <_LibdaveCMakeConfigRemain Update="%(Identity)"
+ Condition="'$(CMakeStaticRT)' == 'true' AND '%(_BuildType)' == 'static'">
+ %(MSBuildProperties);CMakeStaticRT=true
+
+
+
+
+
+
+
+
+ <_LibdaveOutstatic Include="@(_LibdaveCMakeConfig)" Condition="'%(_LibdaveCMakeConfig._BuildType)' == 'static'" />
+ <_LibdaveOutshared Include="@(_LibdaveCMakeConfig)" Condition="'%(_LibdaveCMakeConfig._BuildType)' == 'shared'" />
+
+ <_LibdaveOuts Include="@(_LibdaveOutstatic)">
+ <_Ext>%(_LibdaveLibExt.Identity)
+
+ <_LibdaveOuts Include="@(_LibdaveOutshared)">
+ <_Ext>%(_LibdaveRunExt.Identity)
+
+
+ <_LibdavePackageFiles Include="%(_LibdaveOuts._OutputPath)\**\*.%(_LibdaveOuts._Ext)" >
+ <_Config>%(_LibdaveOuts._Config)
+ <_OutputPath>%(_LibdaveOuts._OutputPath)
+
+ <_LibdavePackageFiles Update="%(Identity)">
+ true
+ lib\$(RuntimeIdentifier)\%(_Config)\$([MSBuild]::MakeRelative('%(_OutputPath)', '%(FullPath)'))
+
+ <_LibdavePackageFiles Update="%(Identity)" Condition="'%(Filename)%(Extension)' == 'dave.dll'">
+ $([System.IO.Path]::GetDirectoryName('%(PackagePath)'))\libdave%(Extension)
+
+
+ <_LibdavePackageFiles Include="$(MSBuildThisFileDirectory)\..\..\LICENSE.md">
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(RuntimeIdentifier.ToLower())
+
+ <_OSLib Condition="$(RuntimeIdentifier.StartsWith('win'))">*.lib
+ <_OSLib Condition="$(RuntimeIdentifier.StartsWith('linux')) OR $(RuntimeIdentifier.StartsWith('osx'))">*.a
+
+ <_OSRun Condition="$(RuntimeIdentifier.StartsWith('win'))">*.dll
+ <_OSRun Condition="$(RuntimeIdentifier.StartsWith('linux')) OR $(RuntimeIdentifier.StartsWith('osx'))">*.so
+
+ <_DebugableProp Condition="'$(Configuration)' == 'RelWithDebInfo'">
+ <_LibDaveConfig Condition="'%24(Configuration)' == 'Debug' OR %24(Configuration.StartsWith('RelWithDeb'))">RelWithDebInfo</_LibDaveConfig>
+
+
+
+
+ <_TemplateContent>$([System.IO.File]::ReadAllText('$(BuildPropsTemplate)'))
+ <_TemplateContent>
+ $([System.Text.RegularExpressions.Regex]::Replace(
+ $(_TemplateContent),
+ '__Runtime_Lib__',
+ '$(_OSLib)'))
+
+ <_TemplateContent>
+ $([System.Text.RegularExpressions.Regex]::Replace(
+ $(_TemplateContent),
+ '__Runtime_Run__',
+ '$(_OSRun)'))
+
+ <_TemplateContent>
+ $([System.Text.RegularExpressions.Regex]::Replace(
+ $(_TemplateContent),
+ '__DebugableProp__',
+ '$(_DebugableProp)'))
+
+ <_TemplateContent>
+ $([System.Text.RegularExpressions.Regex]::Replace(
+ $(_TemplateContent),
+ '__Runtime_ID__',
+ '$(RuntimeIdentifier)'))
+
+ <_OutBuildFile>$(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)\$(RuntimeIdentifier)\build.props
+
+
+
+
+
+
+
+
+ <_TemplateContent>$([System.IO.File]::ReadAllText('$(BuildTargetsTemplate)'))
+ <_TemplateContent>
+ $([System.Text.RegularExpressions.Regex]::Replace(
+ $(_TemplateContent),
+ '__Runtime_Lib__',
+ '$(_OSLib)'))
+
+ <_TemplateContent>
+ $([System.Text.RegularExpressions.Regex]::Replace(
+ $(_TemplateContent),
+ '__Runtime_Run__',
+ '$(_OSRun)'))
+
+ <_TemplateContent>
+ $([System.Text.RegularExpressions.Regex]::Replace(
+ $(_TemplateContent),
+ '__DebugableProp__',
+ '$(_DebugableProp)'))
+
+ <_TemplateContent>
+ $([System.Text.RegularExpressions.Regex]::Replace(
+ $(_TemplateContent),
+ '__Runtime_ID__',
+ '$(RuntimeIdentifier)'))
+
+ <_OutBuildFile>$(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)\$(RuntimeIdentifier)\build.targets
+
+
+
+
+
+
+
+
+
+
+
+ $(PackageId).$(RuntimeIdentifier)
+ $(BaseIntermediateOutputPath)\$(RuntimeIdentifier)\
+
+
+
+ <_PackBuildFilesDir Include="build;buildTransitive" />
+
+ <_PackBuildFiles Include="$(BaseIntermediateOutputPath)\$(RuntimeIdentifier)\build.*">
+ <_BaseDir>%(_PackBuildFilesDir.Identity)
+
+
+
+ true
+ %(_PackBuildFiles._BaseDir)\$(PackageId)%(Extension)
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj b/NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj
new file mode 100644
index 000000000..69d322e94
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj
@@ -0,0 +1,67 @@
+
+
+
+ NetCord.Natives.Libdave
+ Pre-built libdave binaries ($(RuntimeIdentifier), openssl ) for NetCord, $(Description)
+ ha-ves; $(Authors)
+
+
+
+ false
+ NU5128
+ true
+ false
+ true
+
+ $(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)\$(RuntimeIdentifier)\
+
+ MinSizeRel;RelWithDebInfo
+ MinSizeRel
+ RelWithDebInfo
+
+
+
+
+ MLSpp\%(Filename)%(Extension)
+
+
+
+ Build Files\%(Filename)%(Extension)
+
+
+
+ source\libdave\%(RecursiveDir)%(Filename)%(Extension)
+
+
+ source\mlspp\%(RecursiveDir)%(Filename)%(Extension)
+
+
+
+
+
+ Build Files\%(Filename)%(Extension)
+
+
+ Build Files\%(Filename)%(Extension)
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.RID/build.props.in b/NetCord/ThirdParty/Libdave/Libdave.RID/build.props.in
new file mode 100644
index 000000000..ff23d06e5
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.RID/build.props.in
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+ true
+
+
+
+ false
+ $(LibdaveBaseOutputPath)\__Runtime_Id__
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.RID/build.targets.in b/NetCord/ThirdParty/Libdave/Libdave.RID/build.targets.in
new file mode 100644
index 000000000..c8662980c
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/Libdave.RID/build.targets.in
@@ -0,0 +1,62 @@
+
+
+
+
+ <_LibdaveLinked Include="%(DirectPInvoke.Identity)" Condition="'%(DirectPInvoke.Identity)' == 'libdave'" />
+
+
+
+
+
+
+ <_LibDaveConfig>MinSizeRel__DebugableProp__
+ <_LibdaveNativePath>$(MSBuildThisFileDirectory)\..\lib\__Runtime_ID__\
+
+
+
+ <_LibDaveLinkedLibs Include="$(_LibdaveNativePath)\__Runtime_Lib__" />
+ <_LibDaveLinkedLibs Include="$(_LibdaveNativePath)\$(_LibDaveConfig)\__Runtime_Lib__" />
+
+
+
+
+
+
+ <_LibDaveLinkedLibs Remove="@(_LibDaveLinkedLibs)" />
+
+
+
+
+
+
+ <_LibDaveConfig>MinSizeRel__DebugableProp__
+ <_LibdaveNativePath>$(MSBuildThisFileDirectory)\..\lib\__Runtime_ID__\$(_LibDaveConfig)
+
+
+
+ <_LibdaveNativeFile Include="$(_LibdaveNativePath)\__Runtime_Run__">
+ PreserveNewest
+ PreserveNewest
+
+ <_LibdaveNativeFile Update="%(Identity)">
+ <_CopyPath>-> $(MSBuildProjectDirectory)\$(OutputPath)\$(LibdaveBaseOutputPath)\%(Filename)%(Extension)
+ $(LibdaveBaseOutputPath)\%(Filename)%(Extension)
+
+
+
+
+ <_LibdaveNativeFile Remove="@(_LibdaveNativeFile)" />
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.build.props b/NetCord/ThirdParty/Libdave/Libdave.build.props
deleted file mode 100644
index 752c821e4..000000000
--- a/NetCord/ThirdParty/Libdave/Libdave.build.props
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- true
- false
- $(MSBuildThisFileDirectory)\libdave\cpp
-
- $(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)\libdave_build
- $(LibdaveBuildDir)\.build-stamp
- $(LibdaveBuildDir)\.cmake-configure-error.log
- $(LibdaveBuildDir)\.cmake-build-error.log
- dave.dll
- libdave.dylib
- libdave.so
-
-
-
diff --git a/NetCord/ThirdParty/Libdave/Libdave.build.targets b/NetCord/ThirdParty/Libdave/Libdave.build.targets
deleted file mode 100644
index 99d47e391..000000000
--- a/NetCord/ThirdParty/Libdave/Libdave.build.targets
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_LibdaveConfigureCMakeArgsFile>$(LibdaveBuildDir)\.cmake-args
-
-
-
-
-
-
- $(CMakeArgs) $(LibdaveCMakeArgs)
- -G "$(LibdaveGenerator)" $(LibdaveCMakeArgs)
-
- $(LibdaveCMakeArgs) -DBUILD_SHARED_LIBS=ON
-
- <_LibdaveOutputAbs>$(MSBuildProjectDirectory)\$(OutputPath)
- <_LibdaveOutputRel>$([MSBuild]::MakeRelative($(LibdaveBuildDir), $(_LibdaveOutputAbs)))
-
- $(LibdaveCMakeArgs) -DTESTING=$(LibdaveTesting) -DTESTS=$(LibdaveTesting)
- $(LibdaveCMakeArgs) -DOpenSSL_ROOT="$(CMakeOpenSSLRoot)"
- $(LibdaveCMakeArgs) -DOpenSSL_DIR="$(CMakeOpenSSLDir)"
- $(LibdaveCMakeArgs) -DBoringSSL_ROOT="$(CMakeBoringSSLRoot)"
- $(LibdaveCMakeArgs) -DBoringSSL_DIR="$(CMakeBoringSSLDir)"
- $(LibdaveCMakeArgs) -Dnlohmann_json_ROOT="$(CMakeNlohmannJsonRoot)"
- $(LibdaveCMakeArgs) -Dnlohmann_json_DIR="$(CMakeNlohmannJsonDir)"
- $(LibdaveCMakeArgs) -DMLSPP_ROOT="$(CMakeMlsppRoot)"
- $(LibdaveCMakeArgs) -DMLSPP_DIR="$(CMakeMlsppDir)"
-
-
-
-
-
-
-
-
-
- <_PrevCMakeArgsProperty>%(_PrevCMakeArgs.Identity)
-
-
-
-
- <_PrevCMakeArgsTrimmed>$(_PrevCMakeArgsProperty.Trim())
- <_LibdaveCMakeArgsTrimmed>$(LibdaveCMakeArgs.Trim())
-
- <_IsCMakeArgsChanged_>
- $([System.String]::Compare('$(_LibdaveCMakeArgsTrimmed)', '$(_PrevCMakeArgsTrimmed)'))
-
-
-
- <_IsCMakeArgsChanged>$(_IsCMakeArgsChanged_.Trim())
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(BuildLibdave_DependsOn);ConfigureLibdave
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_LibdaveBuildOutput Include="$(LibdaveBuildDir)\$(Configuration)\**\*" />
-
- true
- PreserveNewest
- native\$([MSBuild]::MakeRelative('$(LibdaveBuildDir)', '%(_LibdaveBuildOutput.FullPath)'))
-
-
-
-
-
-
-
- <_LibdaveConfig Include="$(CMakeConfigs)">
- $(LibdaveBuildDir)\%(Identity)\
-
- <_LibdaveConfig Remove="$(Configuration)" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_LibdavePackageFiles Include="%(_LibdaveConfig.Dir)\**\*" Condition="Exists('%(_LibdaveConfig.Dir)')"/>
-
- true
- native\$([MSBuild]::MakeRelative('$(LibdaveBuildDir)', '%(_LibdavePackageFiles.FullPath)'))
-
-
-
-
-
-
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Libdave.csproj b/NetCord/ThirdParty/Libdave/Libdave.csproj
deleted file mode 100644
index b4c00638d..000000000
--- a/NetCord/ThirdParty/Libdave/Libdave.csproj
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
- false
- NetCord.ThirdParty.Libdave.Win32
- Pre-built libdave binaries for NetCord, $(Description)
-
- NU5128
-
-
-
- true
-
-
-
-
-
-
-
-
- MLSpp\%(Filename)%(Extension)
-
-
-
- native\source\libdave\%(RecursiveDir)%(Filename)%(Extension)
-
-
- native\source\mlspp\%(RecursiveDir)%(Filename)%(Extension)
-
-
-
- Build Files\%(Filename)%(Extension)
-
-
- Build Files\%(Filename)%(Extension)
-
-
- Build Files\%(Filename)%(Extension)
-
-
-
-
-
- native\build\%(RecursiveDir)%(Filename)%(Extension)
-
-
- true
- build\$(PackageId)%(Extension)
-
-
-
-
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Packaged/build.props b/NetCord/ThirdParty/Libdave/Packaged/build.props
deleted file mode 100644
index 4303ec026..000000000
--- a/NetCord/ThirdParty/Libdave/Packaged/build.props
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- PreserveNewest
- PreserveNewest
- false
-
-
-
-
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/Packaged/build.targets b/NetCord/ThirdParty/Libdave/Packaged/build.targets
deleted file mode 100644
index 4de98b5c7..000000000
--- a/NetCord/ThirdParty/Libdave/Packaged/build.targets
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/NetCord/ThirdParty/Libdave/build_unix.sh b/NetCord/ThirdParty/Libdave/build_unix.sh
new file mode 100644
index 000000000..a044a921e
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/build_unix.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BASEDIR=$(dirname "$0")
+
+CMakeArgs="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" dotnet msbuild -restore -tl:off -tlp:v=n -v:n $BASEDIR/Libdave.RID/Libdave.RID.csproj
diff --git a/NetCord/ThirdParty/MLSpp/MLSpp.build.props b/NetCord/ThirdParty/MLSpp/MLSpp.build.props
index 703b7eb57..eca319c88 100644
--- a/NetCord/ThirdParty/MLSpp/MLSpp.build.props
+++ b/NetCord/ThirdParty/MLSpp/MLSpp.build.props
@@ -1,15 +1,56 @@
+
+ false
+
+
+
+ $(OPENSSL_ROOT_DIR)
+
+
+
+
+
+
+
true
+
false
- $(MSBuildThisFileDirectory)\mlspp
-
- $(MSBuildThisFileDirectory)\mlspp_build
- $(MlsppBuildDir)\.build-stamp
- $(MlsppBuildDir)\.cmake-configure-error.log
- $(MlsppBuildDir)\.cmake-build-error.log
+ $(MSBuildThisFileDirectory)\mlspp
+
+ false
+ $(MSBuildThisFileDirectory)\mlspp_build\
+
+ out\
+ false
+
+ mlspp_install\
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NetCord/ThirdParty/MLSpp/MLSpp.build.targets b/NetCord/ThirdParty/MLSpp/MLSpp.build.targets
index 929ea0474..749e4f933 100644
--- a/NetCord/ThirdParty/MLSpp/MLSpp.build.targets
+++ b/NetCord/ThirdParty/MLSpp/MLSpp.build.targets
@@ -2,39 +2,119 @@
+ DependsOnTargets="PopulateMlsppBaseProps"
+ Condition="'$(AlsoCleanMlspp)' == 'true'">
-
+
-
+
-
+
-
- <_MlsppConfigureCMakeArgsFile>$(MlsppBuildDir)\\.cmake-args
-
-
+
- $(CMakeArgs) $(MlsppCMakeArgs)
- -G "$(MlsppGenerator)" $(MlsppCMakeArgs)
+ <_MlsppCMakeArgs Condition="'$(MlsppGenerator)' != ''">-G "$(MlsppGenerator)"
+
+ <_MlsppCMakeArgs Condition="'@(CMakeConfiguration)' != ''"
+ >$(_MlsppCMakeArgs) -DCMAKE_CONFIGURATION_TYPES="@(CMakeConfiguration)"
+ <_MlsppCMakeArgs Condition="'@(CMakeConfiguration)' == ''"
+ >$(_MlsppCMakeArgs) -DCMAKE_BUILD_TYPE="$(Configuration)"
+
+ <_MlsppCMakeArgs>$(_MlsppCMakeArgs) -DDISABLE_PQ=ON -DMLS_CXX_NAMESPACE="mlspp" -DDISABLE_GREASE=ON
+
+ <_MlsppCMakeArgs Condition="'$(MlsppTesting)' != ''">$(_MlsppCMakeArgs) -DTESTING=$(MlsppTesting)
+ <_MlsppCMakeArgs Condition="'$(CMakeOpenSSLRoot)' != ''">$(_MlsppCMakeArgs) -DOpenSSL_ROOT="$(CMakeOpenSSLRoot) "
+ <_MlsppCMakeArgs Condition="'$(CMakeOpenSSLDir)' != ''">$(_MlsppCMakeArgs) -DOpenSSL_DIR="$(CMakeOpenSSLDir) "
+ <_MlsppCMakeArgs Condition="'$(CMakeBoringSSLRoot)' != ''">$(_MlsppCMakeArgs) -DBoringSSL_ROOT="$(CMakeBoringSSLRoot) "
+ <_MlsppCMakeArgs Condition="'$(CMakeBoringSSLDir)' != ''">$(_MlsppCMakeArgs) -DBoringSSL_DIR="$(CMakeBoringSSLDir) "
+ <_MlsppCMakeArgs Condition="'$(CMakeNlohmannJsonRoot)' != ''">$(_MlsppCMakeArgs) -Dnlohmann_json_ROOT="$(CMakeNlohmannJsonRoot) "
+ <_MlsppCMakeArgs Condition="'$(CMakeNlohmannJsonDir)' != ''">$(_MlsppCMakeArgs) -Dnlohmann_json_DIR="$(CMakeNlohmannJsonDir) "
+
+ <_MlsppInstallPath Condition="'$(MlsppBaseInstallPath)' != ''">$(MlsppBaseInstallPath)
+ <_MlsppInstallPath Condition="'$(CMakeInstallPrefix)' != ''">$(CMakeInstallPrefix)\$(_MlsppInstallPath)
+ <_MlsppInstallPath Condition="'$(MlsppInstallPath)' != ''">$(MlsppInstallPath)
+ <_MlsppCMakeArgs Condition="'$(_MlsppInstallPath)' != ''">$(_MlsppCMakeArgs) -DCMAKE_INSTALL_PREFIX="$(_MlsppInstallPath) "
+
+ $(MlsppBaseBuildDir)\$(RuntimeIdentifier)\
+ <_MlsppBuildDirPreType>$(MlsppBuildDir)
+
+ $(CMakeBuildArgs) $(MlsppCMakeBuildArgs)
+ --config $(Configuration) $(MlsppCMakeBuildArgs)
+ --parallel $(MlsppCMakeBuildArgs)
+
+
+
+
+
+
+
+
+
+ $(MlsppBuildDir)\static
+
+
+
+ $(MlsppBuildDir)_rt
+
+ <_MlsppCMakeArgs Condition="'$(OS)' == 'Windows_NT'">$(_MlsppCMakeArgs) -DOPENSSL_MSVC_STATIC_RT=ON -DCMAKE_PROJECT_mlspp_INCLUDE="$(MSBuildThisFileDirectory)\..\fix_msvc.cmake"
+
+
+
+
+
+
+ <_MlsppLibExt Include="lib;a" />
+
+ <_MlsppCMakeConfig Include="@(CMakeConfiguration)">
+ %(MSBuildProperties);Configuration=%(Identity);CMakeStaticRT=$(CMakeStaticRT)
+ <_OutputPath>$(MlsppBuildDir)\%(Identity)
+
+
+ <_MlsppCMakeConfig Update="%(Identity)" Condition="'$(MlsppGenerator)' == '' AND '$(OS)' != 'Windows_NT'">
+ <_OutputPath>%(_OutputPath)\$(MlsppBuildOutBaseDir)
+
+
+
+
+ $(MlsppBuildDir)\$(Configuration)\
+
+ <_MlsppCMakeOutDir>$(MlsppBuildDir)
+ <_MlsppCMakeOutDir Condition="'$(OS)' != 'Windows_NT'">$(_MlsppCMakeOutDir)\$(MlsppBuildOutBaseDir)
- $(MlsppCMakeArgs) -DDISABLE_PQ=ON -DMLS_CXX_NAMESPACE="mlspp" -DDISABLE_GREASE=ON
-
- $(MlsppCMakeArgs) -DTESTING=$(MlsppTesting)
- $(MlsppCMakeArgs) -DOpenSSL_ROOT="$(CMakeOpenSSLRoot)"
- $(MlsppCMakeArgs) -DOpenSSL_DIR="$(CMakeOpenSSLDir)"
- $(MlsppCMakeArgs) -DBoringSSL_ROOT="$(CMakeBoringSSLRoot)"
- $(MlsppCMakeArgs) -DBoringSSL_DIR="$(CMakeBoringSSLDir)"
- $(MlsppCMakeArgs) -Dnlohmann_json_ROOT="$(CMakeNlohmannJsonRoot)"
- $(MlsppCMakeArgs) -Dnlohmann_json_DIR="$(CMakeNlohmannJsonDir)"
+ <_MlsppCMakeArgs>$(_MlsppCMakeArgs) -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$(_MlsppCMakeOutDir)
+ <_MlsppCMakeArgs>$(_MlsppCMakeArgs) -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$(_MlsppCMakeOutDir)
+ <_MlsppCMakeArgs>$(_MlsppCMakeArgs) -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=$(_MlsppCMakeOutDir)
+
+ <_MlsppBuildOutputPath>$(MlsppBuildDir)\$(Configuration)
+ $(MlsppCMakeBuildArgs) -- /p:OutDir="$(_MlsppBuildOutputPath)/"
+
+ <_MlsppBuildOutputPath Condition="'$(OS)' != 'Windows_NT'">$(MlsppBuildDir)\$(MlsppBuildOutBaseDir)
+
+ $(_MlsppCMakeArgs) $(CMakeArgs) $(MlsppCMakeArgs)
+
+ <_MlsppConfigureCMakeArgsFile>$(MlsppBuildDir)\.cmake-args
+ <_MlsppConfigureErrorLog>$(MlsppBuildDir)\.cmake-configure-error.log
+
+ <_MlsppBuildErrorLog>$(MlsppBuildDir)\.cmake-build-error_$(Configuration).log
+ <_MlsppBuildErrorIdent>$(MlsppBuildDir)\build_error_$(Configuration)
+
+ <_MlsppInstallErrorLog>$(MlsppBuildDir)\.cmake-install-error_$(Configuration).log
+
+
+
+
+
+
@@ -54,35 +134,35 @@
<_IsCMakeArgsChanged_>
$([System.String]::Compare('$(_MlsppCMakeArgsTrimmed)', '$(_PrevCMakeArgsTrimmed)'))
-
-
<_IsCMakeArgsChanged>$(_IsCMakeArgsChanged_.Trim())
+
+ <_IsCMakeArgsChanged Condition="'$(CMakeClearCache)' == 'true' AND '$(_IsCMakeArgsChanged)' != '0'">-1
+
+
+
+
+
+ <_IsCMakeArgsChanged Condition="!Exists('$(MlsppBuildDir)\CMakeCache.txt')">-1
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+ DependsOnTargets="CheckReconfigureMlspp"
+ Inputs="$(MlsppCppRoot)\CMakeLists.txt;$(MlsppBuildDir)\.cmake-configure"
+ Outputs="$(_MlsppConfigureCMakeArgsFile)"
+ Condition="Exists('$(MlsppCppRoot)\CMakeLists.txt')">
@@ -92,23 +172,23 @@
-
+
-
-
+
-
-
+
+
-
+
-
+
+
+
+
+
-
+
+
+
+
-
-
+
-
-
+
+
-
+
-
+
@@ -155,41 +247,152 @@
$(MlsppBuildDir)
+
+
+
+ <_MlsppCMakeConfigRemain Include="@(_MlsppCMakeConfig)" />
+ <_MlsppCMakeConfigRemain Remove="$(Configuration)" />
+
+
+
+ <_MlsppBuildOutput Include="$(_MlsppBuildOutputPath)\**\*"/>
+ <_MlsppBuildOutput Update="%(Identity)" Condition="'$(MlsppCopyBuildOutput)' == 'true'">
+ <_CopyPath>-> $(MSBuildProjectDirectory)\$(OutputPath)\$(MlsppBaseOutputPath)\$([MSBuild]::MakeRelative('$(_MlsppBuildOutputPath)', '%(FullPath)'))
+
+
+
+
+
+
+
+
+ PreserveNewest
+ $(MlsppBaseOutputPath)\$([MSBuild]::MakeRelative('$(_MlsppBuildOutputPath)', '%(FullPath)'))
+
+
+
+
+
-
-
- <_MlsppConfig Include="$(CMakeConfigs.Split(';'))" />
- <_MlsppConfig Remove="$(Configuration)" />
-
-
-
+
+
+
+
+
-
+
-
+
-
+
+
-
+
-
-
+
+
+
+
-
+
+ <_MlsppInstalled Include="$(_MlsppInstallPath)\**\*"/>
+
-
+
+
+
+
+ $(_MlsppInstallPath)\share\MLSPP\
+
-
+
+
+
+
+
+ <_Args>$(MlsppCMakeBuildArgs.Replace('=', ' '))
+ <_Pattern>(?:^|\s)(?:-j|--parallel)\s*(\d+)
+
+
+ <_HasParallel>$([System.Text.RegularExpressions.Regex]::IsMatch('$(_Args)', '$(_Pattern)'))
+
+
+ <_TotalJobs Condition="'$(_HasParallel)' == 'True'">$([System.Text.RegularExpressions.Regex]::Match('$(_Args)', '.*(?:-j|--parallel)\s*(\d+)').Groups[1].Value)
+ <_TotalJobs Condition="'$(_TotalJobs)' == ''">$([System.Environment]::ProcessorCount)
+
+
+ <_ConfigCount>@(_MlsppCMakeConfigRemain->Count())
+ <_ConfigCount Condition="'$(_ConfigCount)' == '0' AND '$(Configuration)' != ''">1
+ $([MSBuild]::Divide($(_TotalJobs), $(_ConfigCount)))
+ 1
+
+ <_MlsppIntCMakeBuildArgs Condition="'$(JobsPerConfig)' != '1'">MlsppCMakeBuildArgs=-j$(JobsPerConfig)
+
+
+
+
+
+
+ <_MLsppConfigToBuild Include="$(MSBuildProjectFile)">
+ $(_MlsppIntCMakeBuildArgs);%(_MlsppCMakeConfigRemain.MSBuildProperties)
+ BuildMlsppNative
+
+
+
+
+
+
+
+
+
+
+
+
+ <_MlsppOuts Include="@(_MlsppCMakeConfig)">
+ <_Ext>%(_MlsppLibExt.Identity)
+
+ <_MlsppOuts Update="%(Identity)" Condition="'$(CMakeStaticRT)' == 'true'">
+ <_OutputPath>$(_MlsppBuildDirPreType)\static_rt\$([MSBuild]::MakeRelative('$(_MlsppBuildDirPreType)\static', '%(_OutputPath)'))
+
+
+ <_MlsppPackageFiles Include="%(_MlsppOuts._OutputPath)\**\*.%(_MlsppOuts._Ext)" >
+ <_Config>%(_MlsppOuts.Identity)
+ <_OutputPath>%(_MlsppOuts._OutputPath)
+
+
+
+
+
+ true
+ lib\$(RuntimeIdentifier)\%(_MlsppPackageFiles._Config)\$([MSBuild]::MakeRelative('%(_MlsppPackageFiles._OutputPath)', '%(_MlsppPackageFiles.FullPath)'))
+
+
+
+
+
+
+
+
+
+
diff --git a/NetCord/ThirdParty/fix_msvc.cmake b/NetCord/ThirdParty/fix_msvc.cmake
new file mode 100644
index 000000000..472ad53e1
--- /dev/null
+++ b/NetCord/ThirdParty/fix_msvc.cmake
@@ -0,0 +1,13 @@
+if(MSVC)
+ # Debug, Release, RelWithDebInfo, MinSizeRel ׂĂɑ
+ # /MD (I) /MT (ÓI) ɒu
+ foreach(flag_var
+ CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
+ CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+ if(${flag_var} MATCHES "/MD")
+ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+ endif()
+ endforeach()
+endif()
diff --git a/README.md b/README.md
index b3d29496c..1603f8d88 100644
--- a/README.md
+++ b/README.md
@@ -32,6 +32,8 @@ You can install NetCord packages via NuGet package manager:
| **[NetCord.Hosting](https://www.nuget.org/packages/NetCord.Hosting)** | Provides .NET Generic Host extensions for the NetCord package. |
| **[NetCord.Hosting.Services](https://www.nuget.org/packages/NetCord.Hosting.Services)** | Provides .NET Generic Host extensions for the NetCord.Services package. |
| **[NetCord.Hosting.AspNetCore](https://www.nuget.org/packages/NetCord.Hosting.AspNetCore)** | Provides ASP.NET Core extensions for seamless handling of HTTP events. |
+| | |
+| **[NetCord.ThirdParty.Libdave](https://www.nuget.org/packages/NetCord.ThirdParty.Libdave)** | Provides pre-built binaries for Libdave used by Voice feature |
## 2. 🚀 Showcase
From 8521a7068dd7ca23194a9252280b2d18ea1438e6 Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Sun, 8 Feb 2026 12:27:26 +0900
Subject: [PATCH 03/11] try CI actions workflow
---
.github/workflows/build-libdave.yml | 111 ++++++++++++++++++++++++++++
1 file changed, 111 insertions(+)
create mode 100644 .github/workflows/build-libdave.yml
diff --git a/.github/workflows/build-libdave.yml b/.github/workflows/build-libdave.yml
new file mode 100644
index 000000000..77df59ce4
--- /dev/null
+++ b/.github/workflows/build-libdave.yml
@@ -0,0 +1,111 @@
+name: Build Libdave.RID
+
+on:
+ pull_request:
+ branches:
+ - stable
+ - alpha
+ - feature/e2ee-libdave
+ paths:
+ - 'NetCord/ThirdParty/Libdave/**'
+ - '.github/workflows/build-libdave.yml'
+ push:
+ branches:
+ - stable
+ - alpha
+ - feature/e2ee-libdave
+ paths:
+ - 'NetCord/ThirdParty/Libdave/**'
+ - '.github/workflows/build-libdave.yml'
+ workflow_dispatch:
+
+jobs:
+ build-libdave:
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ # Windows builds
+ - os: windows-latest
+ rid: win-x86
+ arch: x86
+ cmake-arch: Win32
+ - os: windows-latest
+ rid: win-x64
+ arch: x64
+ cmake-arch: x64
+ - os: windows-latest
+ rid: win-arm64
+ arch: arm64
+ cmake-arch: ARM64
+
+ # Linux builds
+ - os: ubuntu-latest
+ rid: linux-x64
+ arch: x64
+ - os: ubuntu-latest
+ rid: linux-arm64
+ arch: arm64
+
+ # macOS builds
+ - os: macos-latest
+ rid: osx-x64
+ arch: x64
+ - os: macos-latest
+ rid: osx-arm64
+ arch: arm64
+
+ runs-on: ${{ matrix.os }}
+
+ name: Build ${{ matrix.rid }}
+
+ steps:
+ - uses: actions/checkout@v6.0.2
+ with:
+ fetch-depth: 0
+ filter: tree:0
+ submodules: recursive
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v5.1.0
+ with:
+ global-json-file: global.json
+
+ - name: Install Linux cross-compilation tools (ARM64)
+ if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64'
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
+
+ - name: Setup CMake
+ uses: lukka/get-cmake@latest
+
+ - name: Restore dependencies
+ run: dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj /p:RuntimeIdentifier=${{ matrix.rid }}
+
+ - name: Build Libdave.RID
+ shell: pwsh
+ run: |
+ $env:CMAKE_GENERATOR = if ("${{ matrix.os }}" -eq "windows-latest") { "Visual Studio 18 2026" } else { "Unix Makefiles" }
+ if ("${{ matrix.cmake-arch }}" -ne "") {
+ dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} /p:Platform="${{ matrix.cmake-arch }}" --no-restore
+ } else {
+ dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} --no-restore
+ }
+
+ - name: Pack Libdave.RID
+ run: dotnet pack NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} --no-build
+
+ - name: Upload Build Artifacts
+ uses: actions/upload-artifact@v6.0.0
+ with:
+ name: Libdave-${{ matrix.rid }}
+ path: |
+ NetCord/ThirdParty/Libdave/Libdave.RID/bin/MinSizeRel/*.nupkg
+ NetCord/ThirdParty/Libdave/Libdave.RID/bin/MinSizeRel/*/net*/${{ matrix.rid }}/
+
+ - name: Upload NuGet Package
+ uses: actions/upload-artifact@v6.0.0
+ with:
+ name: NuGet-Libdave-${{ matrix.rid }}
+ path: NetCord/ThirdParty/Libdave/Libdave.RID/bin/MinSizeRel/*.nupkg
From 1fd601222783fbd214c605004c16415e76c8fe1a Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Sun, 8 Feb 2026 12:43:46 +0900
Subject: [PATCH 04/11] CI verbosity & debug
---
.github/workflows/build-libdave.yml | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/build-libdave.yml b/.github/workflows/build-libdave.yml
index 77df59ce4..1458fb0e2 100644
--- a/.github/workflows/build-libdave.yml
+++ b/.github/workflows/build-libdave.yml
@@ -30,30 +30,37 @@ jobs:
rid: win-x86
arch: x86
cmake-arch: Win32
+ # configs: RelWithDebInfo,MinSizeRel
- os: windows-latest
rid: win-x64
arch: x64
cmake-arch: x64
+ # configs: RelWithDebInfo,MinSizeRel
- os: windows-latest
rid: win-arm64
arch: arm64
cmake-arch: ARM64
+ # configs: RelWithDebInfo,MinSizeRel
# Linux builds
- os: ubuntu-latest
rid: linux-x64
arch: x64
+ # configs: RelWithDebInfo,MinSizeRel
- os: ubuntu-latest
rid: linux-arm64
arch: arm64
+ # configs: RelWithDebInfo,MinSizeRel
# macOS builds
- os: macos-latest
rid: osx-x64
arch: x64
+ # configs: RelWithDebInfo,MinSizeRel
- os: macos-latest
rid: osx-arm64
arch: arm64
+ # configs: RelWithDebInfo,MinSizeRel
runs-on: ${{ matrix.os }}
@@ -81,20 +88,28 @@ jobs:
uses: lukka/get-cmake@latest
- name: Restore dependencies
- run: dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj /p:RuntimeIdentifier=${{ matrix.rid }}
+ run: dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag /p:RuntimeIdentifier=${{ matrix.rid }}
- - name: Build Libdave.RID
+ # /p:Configurations="${{ matrix.configs }}"
+ - name: Build & Pack Libdave.RID
shell: pwsh
run: |
$env:CMAKE_GENERATOR = if ("${{ matrix.os }}" -eq "windows-latest") { "Visual Studio 18 2026" } else { "Unix Makefiles" }
if ("${{ matrix.cmake-arch }}" -ne "") {
- dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} /p:Platform="${{ matrix.cmake-arch }}" --no-restore
+ dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} /p:Platform="${{ matrix.cmake-arch }}" --no-restore -bl:build-${{ matrix.rid }}.binlog
} else {
- dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} --no-restore
+ dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} --no-restore -bl:build-${{ matrix.rid }}.binlog
}
- - name: Pack Libdave.RID
- run: dotnet pack NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} --no-build
+ # - name: Pack Libdave.RID
+ # run: dotnet pack NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} --no-build
+
+ - name: Upload Binary Log on Failure
+ if: failure()
+ uses: actions/upload-artifact@v6.0.0
+ with:
+ name: BinLog-${{ matrix.rid }}
+ path: build-${{ matrix.rid }}.binlog
- name: Upload Build Artifacts
uses: actions/upload-artifact@v6.0.0
@@ -102,7 +117,7 @@ jobs:
name: Libdave-${{ matrix.rid }}
path: |
NetCord/ThirdParty/Libdave/Libdave.RID/bin/MinSizeRel/*.nupkg
- NetCord/ThirdParty/Libdave/Libdave.RID/bin/MinSizeRel/*/net*/${{ matrix.rid }}/
+ NetCord/ThirdParty/Libdave/Libdave.RID/bin/MinSizeRel/net*/${{ matrix.rid }}/
- name: Upload NuGet Package
uses: actions/upload-artifact@v6.0.0
From deacd96e47330af4a50afe0e72365c53954a06cd Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Sun, 8 Feb 2026 13:01:32 +0900
Subject: [PATCH 05/11] CI verbosity & binlog
---
.github/workflows/build-libdave.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build-libdave.yml b/.github/workflows/build-libdave.yml
index 1458fb0e2..c53af0957 100644
--- a/.github/workflows/build-libdave.yml
+++ b/.github/workflows/build-libdave.yml
@@ -96,9 +96,9 @@ jobs:
run: |
$env:CMAKE_GENERATOR = if ("${{ matrix.os }}" -eq "windows-latest") { "Visual Studio 18 2026" } else { "Unix Makefiles" }
if ("${{ matrix.cmake-arch }}" -ne "") {
- dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} /p:Platform="${{ matrix.cmake-arch }}" --no-restore -bl:build-${{ matrix.rid }}.binlog
+ dotnet msbuild NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj /t:Build /v:diag /nologo /clp:NoSummary`;Verbosity=minimal /p:Configuration=MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} /p:Platform="${{ matrix.cmake-arch }}" /bl:build-${{ matrix.rid }}.binlog
} else {
- dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} --no-restore -bl:build-${{ matrix.rid }}.binlog
+ dotnet msbuild NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj /t:Build /v:diag /nologo /clp:NoSummary`;Verbosity=minimal /p:Configuration=MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} /bl:build-${{ matrix.rid }}.binlog
}
# - name: Pack Libdave.RID
From 7c743ab1ef28f785120e1c2067815908162b41f1 Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Sun, 8 Feb 2026 23:13:46 +0900
Subject: [PATCH 06/11] submodules set
---
.gitmodules | 8 ++++----
NetCord/ThirdParty/Libdave/libdave | 1 +
NetCord/ThirdParty/MLSpp/mlspp | 1 +
3 files changed, 6 insertions(+), 4 deletions(-)
create mode 160000 NetCord/ThirdParty/Libdave/libdave
create mode 160000 NetCord/ThirdParty/MLSpp/mlspp
diff --git a/.gitmodules b/.gitmodules
index 38d0aefb4..49816c0b8 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,7 +1,7 @@
-[submodule "NetCord/ThirdParty/libdave"]
- path = NetCord/ThirdParty/libdave
+[submodule "NetCord/ThirdParty/Libdave/libdave"]
+ path = NetCord/ThirdParty/Libdave/libdave
url = https://github.com/discord/libdave/
-[submodule "NetCord/ThirdParty/mlspp"]
- path = NetCord/ThirdParty/mlspp
+[submodule "NetCord/ThirdParty/MLSpp/mlspp"]
+ path = NetCord/ThirdParty/MLSpp/mlspp
url = https://github.com/cisco/mlspp/
diff --git a/NetCord/ThirdParty/Libdave/libdave b/NetCord/ThirdParty/Libdave/libdave
new file mode 160000
index 000000000..52cd56dc5
--- /dev/null
+++ b/NetCord/ThirdParty/Libdave/libdave
@@ -0,0 +1 @@
+Subproject commit 52cd56dc550f447fb354b3a06c9e2d2e2a4309c6
diff --git a/NetCord/ThirdParty/MLSpp/mlspp b/NetCord/ThirdParty/MLSpp/mlspp
new file mode 160000
index 000000000..1cc50a124
--- /dev/null
+++ b/NetCord/ThirdParty/MLSpp/mlspp
@@ -0,0 +1 @@
+Subproject commit 1cc50a124a3bc4e143a787ec934280dc70c1034d
From 03521cf72a8a29864b884a057f5975a19f0f573c Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Sun, 8 Feb 2026 23:26:55 +0900
Subject: [PATCH 07/11] CI debugging
---
.github/workflows/build-libdave.yml | 29 +++++++++--------------------
1 file changed, 9 insertions(+), 20 deletions(-)
diff --git a/.github/workflows/build-libdave.yml b/.github/workflows/build-libdave.yml
index c53af0957..71235dc9d 100644
--- a/.github/workflows/build-libdave.yml
+++ b/.github/workflows/build-libdave.yml
@@ -28,38 +28,31 @@ jobs:
# Windows builds
- os: windows-latest
rid: win-x86
- arch: x86
cmake-arch: Win32
# configs: RelWithDebInfo,MinSizeRel
- os: windows-latest
rid: win-x64
- arch: x64
cmake-arch: x64
# configs: RelWithDebInfo,MinSizeRel
- - os: windows-latest
- rid: win-arm64
- arch: arm64
- cmake-arch: ARM64
+ # - os: windows-latest
+ # rid: win-arm64
+ # cmake-arch: ARM64
# configs: RelWithDebInfo,MinSizeRel
# Linux builds
- os: ubuntu-latest
rid: linux-x64
- arch: x64
# configs: RelWithDebInfo,MinSizeRel
- - os: ubuntu-latest
- rid: linux-arm64
- arch: arm64
+ # - os: ubuntu-latest
+ # rid: linux-arm64
# configs: RelWithDebInfo,MinSizeRel
# macOS builds
- os: macos-latest
rid: osx-x64
- arch: x64
# configs: RelWithDebInfo,MinSizeRel
- - os: macos-latest
- rid: osx-arm64
- arch: arm64
+ # - os: macos-latest
+ # rid: osx-arm64
# configs: RelWithDebInfo,MinSizeRel
runs-on: ${{ matrix.os }}
@@ -88,18 +81,14 @@ jobs:
uses: lukka/get-cmake@latest
- name: Restore dependencies
- run: dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag /p:RuntimeIdentifier=${{ matrix.rid }}
+ run: dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -r ${{ matrix.rid }} /bl:restore-${{ matrix.rid }}.binlog
# /p:Configurations="${{ matrix.configs }}"
- name: Build & Pack Libdave.RID
shell: pwsh
run: |
$env:CMAKE_GENERATOR = if ("${{ matrix.os }}" -eq "windows-latest") { "Visual Studio 18 2026" } else { "Unix Makefiles" }
- if ("${{ matrix.cmake-arch }}" -ne "") {
- dotnet msbuild NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj /t:Build /v:diag /nologo /clp:NoSummary`;Verbosity=minimal /p:Configuration=MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} /p:Platform="${{ matrix.cmake-arch }}" /bl:build-${{ matrix.rid }}.binlog
- } else {
- dotnet msbuild NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj /t:Build /v:diag /nologo /clp:NoSummary`;Verbosity=minimal /p:Configuration=MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} /bl:build-${{ matrix.rid }}.binlog
- }
+ dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag --no-restore -c MinSizeRel -r ${{ matrix.rid }} /bl:build-${{ matrix.rid }}.binlog
# - name: Pack Libdave.RID
# run: dotnet pack NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} --no-build
From a85b4e246e00375a1dcacb96cfd49c0cf3c3ca56 Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Mon, 9 Feb 2026 01:31:19 +0900
Subject: [PATCH 08/11] gh action runner proper
---
.github/workflows/build-libdave.yml | 71 +++++++++++-------------
NetCord/ThirdParty/Directory.Build.props | 4 +-
2 files changed, 32 insertions(+), 43 deletions(-)
diff --git a/.github/workflows/build-libdave.yml b/.github/workflows/build-libdave.yml
index 71235dc9d..9d2afdaab 100644
--- a/.github/workflows/build-libdave.yml
+++ b/.github/workflows/build-libdave.yml
@@ -26,34 +26,27 @@ jobs:
matrix:
include:
# Windows builds
- - os: windows-latest
+ - os: windows-2025-vs2026
rid: win-x86
- cmake-arch: Win32
- # configs: RelWithDebInfo,MinSizeRel
- - os: windows-latest
+ arch: Win32
+ - os: windows-2025-vs2026
rid: win-x64
- cmake-arch: x64
- # configs: RelWithDebInfo,MinSizeRel
- # - os: windows-latest
- # rid: win-arm64
- # cmake-arch: ARM64
- # configs: RelWithDebInfo,MinSizeRel
+ arch: x64
+ - os: windows-2025-vs2026
+ rid: win-arm64
+ arch: ARM64
# Linux builds
- os: ubuntu-latest
rid: linux-x64
- # configs: RelWithDebInfo,MinSizeRel
- # - os: ubuntu-latest
- # rid: linux-arm64
- # configs: RelWithDebInfo,MinSizeRel
+ - os: ubuntu-latest
+ rid: linux-arm64
# macOS builds
- os: macos-latest
+ rid: osx-arm64
+ - os: macos-latest-large
rid: osx-x64
- # configs: RelWithDebInfo,MinSizeRel
- # - os: macos-latest
- # rid: osx-arm64
- # configs: RelWithDebInfo,MinSizeRel
runs-on: ${{ matrix.os }}
@@ -76,39 +69,37 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
-
- - name: Setup CMake
- uses: lukka/get-cmake@latest
-
+
- name: Restore dependencies
- run: dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -r ${{ matrix.rid }} /bl:restore-${{ matrix.rid }}.binlog
+ run: |
+ if ("${{ matrix.arch }}" -ne "") {
+ dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -a ${{ matrix.arch }} -r ${{ matrix.rid }} /bl:restore-${{ matrix.rid }}.binlog
+ }
+ else {
+ dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -r ${{ matrix.rid }} /bl:restore-${{ matrix.rid }}.binlog
+ }
- # /p:Configurations="${{ matrix.configs }}"
- - name: Build & Pack Libdave.RID
+ # /p:Configurations="RelWithDebInfo,MinSizeRel"
+ - name: Build & Pack Libdave.RID (via )
shell: pwsh
run: |
- $env:CMAKE_GENERATOR = if ("${{ matrix.os }}" -eq "windows-latest") { "Visual Studio 18 2026" } else { "Unix Makefiles" }
+ if ("${{ matrix.arch }}" -ne "") { $env:CMAKE_GENERATOR_PLATFORM = "${{ matrix.arch }}" }
+ if ("${{ matrix.os }}" -eq "ubuntu-latest" -and "${{ matrix.arch }}" -eq "arm64") {
+ $env:CMAKE_CXX_COMPILER = "aarch64-linux-gnu-g++"
+ $env:CMAKE_C_COMPILER = "aarch64-linux-gnu-gcc"
+ }
dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag --no-restore -c MinSizeRel -r ${{ matrix.rid }} /bl:build-${{ matrix.rid }}.binlog
-
- # - name: Pack Libdave.RID
- # run: dotnet pack NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -c MinSizeRel /p:RuntimeIdentifier=${{ matrix.rid }} --no-build
-
+
- name: Upload Binary Log on Failure
if: failure()
uses: actions/upload-artifact@v6.0.0
with:
name: BinLog-${{ matrix.rid }}
- path: build-${{ matrix.rid }}.binlog
-
- - name: Upload Build Artifacts
- uses: actions/upload-artifact@v6.0.0
- with:
- name: Libdave-${{ matrix.rid }}
path: |
- NetCord/ThirdParty/Libdave/Libdave.RID/bin/MinSizeRel/*.nupkg
- NetCord/ThirdParty/Libdave/Libdave.RID/bin/MinSizeRel/net*/${{ matrix.rid }}/
-
- - name: Upload NuGet Package
+ restore-${{ matrix.rid }}.binlog
+ build-${{ matrix.rid }}.binlog
+
+ - name: Upload NuGet Packages
uses: actions/upload-artifact@v6.0.0
with:
name: NuGet-Libdave-${{ matrix.rid }}
diff --git a/NetCord/ThirdParty/Directory.Build.props b/NetCord/ThirdParty/Directory.Build.props
index 052132e21..371648840 100644
--- a/NetCord/ThirdParty/Directory.Build.props
+++ b/NetCord/ThirdParty/Directory.Build.props
@@ -40,10 +40,8 @@
true
$(PackageOutputPath);$(RestoreSources)
- win-x64;linux-x64
-
-
+ win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-arm64;osx-x64
$(CMakeArgs) -DCMAKE_POSITION_INDEPENDENT_CODE=ON
From 3e1e955e6e2305e71ebf53413c133d3979a8dec2 Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Mon, 9 Feb 2026 01:34:43 +0900
Subject: [PATCH 09/11] `dotnet restore` step fix
---
.github/workflows/build-libdave.yml | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/.github/workflows/build-libdave.yml b/.github/workflows/build-libdave.yml
index 9d2afdaab..d5d224510 100644
--- a/.github/workflows/build-libdave.yml
+++ b/.github/workflows/build-libdave.yml
@@ -71,13 +71,7 @@ jobs:
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Restore dependencies
- run: |
- if ("${{ matrix.arch }}" -ne "") {
- dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -a ${{ matrix.arch }} -r ${{ matrix.rid }} /bl:restore-${{ matrix.rid }}.binlog
- }
- else {
- dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -r ${{ matrix.rid }} /bl:restore-${{ matrix.rid }}.binlog
- }
+ run: dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -r ${{ matrix.rid }} /bl:restore-${{ matrix.rid }}.binlog
# /p:Configurations="RelWithDebInfo,MinSizeRel"
- name: Build & Pack Libdave.RID (via )
From 364c2588ad6e3ba9172da8a2bdc0b1f26ea8123e Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Mon, 9 Feb 2026 02:27:07 +0900
Subject: [PATCH 10/11] handle deps via vcpkg
---
.github/workflows/build-libdave.yml | 41 +++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/.github/workflows/build-libdave.yml b/.github/workflows/build-libdave.yml
index d5d224510..7577c00d3 100644
--- a/.github/workflows/build-libdave.yml
+++ b/.github/workflows/build-libdave.yml
@@ -74,14 +74,55 @@ jobs:
run: dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -r ${{ matrix.rid }} /bl:restore-${{ matrix.rid }}.binlog
# /p:Configurations="RelWithDebInfo,MinSizeRel"
+ - id: install-nlohmann
+ name: Install nlohmann-json (vcpkg)
+ shell: pwsh
+ run: |
+ # Use vcpkg installed on the runner if available
+ if ($env:VCPKG_INSTALLATION_ROOT) {
+ $vcpkgPath = Join-Path $env:VCPKG_INSTALLATION_ROOT 'vcpkg'
+ if (Test-Path "$vcpkgPath.exe") { $vcpkgPath = "$vcpkgPath.exe" }
+ elseif (-not (Test-Path $vcpkgPath)) { Write-Error "vcpkg executable not found under $env:VCPKG_INSTALLATION_ROOT"; exit 1 }
+
+ switch ("${{ matrix.rid }}") {
+ 'win-x86' { $triplet = 'x86-windows' }
+ 'win-x64' { $triplet = 'x64-windows' }
+ 'win-arm64' { $triplet = 'arm64-windows' }
+ 'linux-x64' { $triplet = 'x64-linux' }
+ 'linux-arm64'{ $triplet = 'arm64-linux' }
+ 'osx-x64' { $triplet = 'x64-osx' }
+ 'osx-arm64' { $triplet = 'arm64-osx' }
+ default { Write-Host "Unknown RID '${{ matrix.rid }}' for vcpkg triplet mapping; skipping vcpkg install"; exit 0 }
+ }
+
+ Write-Host "Installing nlohmann-json for triplet: $triplet"
+ # Export vcpkg settings as step outputs (do NOT persist to job env)
+ Add-Content -Path $env:GITHUB_OUTPUT -Value "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT"
+ Add-Content -Path $env:GITHUB_OUTPUT -Value "CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
+ Add-Content -Path $env:GITHUB_OUTPUT -Value "VCPKG_TARGET_TRIPLET=$triplet"
+
+ & $vcpkgPath install "nlohmann-json:$triplet"
+ }
+ else {
+ Write-Host "VCPKG_INSTALLATION_ROOT not set on runner, skipping vcpkg install of nlohmann-json"
+ }
- name: Build & Pack Libdave.RID (via )
shell: pwsh
run: |
+ # Use vcpkg settings exported by the install step (only for this step, not persisted)
+ if ('${{ steps.install-nlohmann.outputs.CMAKE_TOOLCHAIN_FILE }}' -ne '') {
+ $env:CMAKE_TOOLCHAIN_FILE = '${{ steps.install-nlohmann.outputs.CMAKE_TOOLCHAIN_FILE }}'
+ $env:VCPKG_TARGET_TRIPLET = '${{ steps.install-nlohmann.outputs.VCPKG_TARGET_TRIPLET }}'
+ Write-Host "Using vcpkg toolchain: $env:CMAKE_TOOLCHAIN_FILE"
+ Write-Host "Using vcpkg triplet: $env:VCPKG_TARGET_TRIPLET"
+ }
+
if ("${{ matrix.arch }}" -ne "") { $env:CMAKE_GENERATOR_PLATFORM = "${{ matrix.arch }}" }
if ("${{ matrix.os }}" -eq "ubuntu-latest" -and "${{ matrix.arch }}" -eq "arm64") {
$env:CMAKE_CXX_COMPILER = "aarch64-linux-gnu-g++"
$env:CMAKE_C_COMPILER = "aarch64-linux-gnu-gcc"
}
+
dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag --no-restore -c MinSizeRel -r ${{ matrix.rid }} /bl:build-${{ matrix.rid }}.binlog
- name: Upload Binary Log on Failure
From 27d07569fc36c043746011d9917b371e559803f9 Mon Sep 17 00:00:00 2001
From: Haves Irfan <20160532+ha-ves@users.noreply.github.com>
Date: Mon, 9 Feb 2026 15:53:13 +0900
Subject: [PATCH 11/11] * CI proper * prop condition fix * openssl getver
---
.github/workflows/build-libdave.yml | 73 ++++++++++++------------
NetCord/ThirdParty/Directory.Build.props | 3 +-
NetCord/ThirdParty/FindOpenSSL.targets | 44 +++++++++++---
3 files changed, 73 insertions(+), 47 deletions(-)
diff --git a/.github/workflows/build-libdave.yml b/.github/workflows/build-libdave.yml
index 7577c00d3..a69bc0f7b 100644
--- a/.github/workflows/build-libdave.yml
+++ b/.github/workflows/build-libdave.yml
@@ -65,68 +65,65 @@ jobs:
global-json-file: global.json
- name: Install Linux cross-compilation tools (ARM64)
- if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64'
+ if: matrix.os == 'ubuntu-latest' && matrix.rid == 'linux-arm64'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Restore dependencies
- run: dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag -r ${{ matrix.rid }} /bl:restore-${{ matrix.rid }}.binlog
+ run: dotnet restore NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v normal -r ${{ matrix.rid }} /bl:restore-${{ matrix.rid }}.binlog
# /p:Configurations="RelWithDebInfo,MinSizeRel"
- id: install-nlohmann
name: Install nlohmann-json (vcpkg)
shell: pwsh
run: |
- # Use vcpkg installed on the runner if available
- if ($env:VCPKG_INSTALLATION_ROOT) {
- $vcpkgPath = Join-Path $env:VCPKG_INSTALLATION_ROOT 'vcpkg'
- if (Test-Path "$vcpkgPath.exe") { $vcpkgPath = "$vcpkgPath.exe" }
- elseif (-not (Test-Path $vcpkgPath)) { Write-Error "vcpkg executable not found under $env:VCPKG_INSTALLATION_ROOT"; exit 1 }
+ # Use vcpkg installed on the runner
+ $vcpkgPath = Join-Path $env:VCPKG_INSTALLATION_ROOT 'vcpkg'
+ if (Test-Path "$vcpkgPath.exe") { $vcpkgPath = "$vcpkgPath.exe" }
+ elseif (-not (Test-Path $vcpkgPath)) { Write-Error "vcpkg executable not found under $env:VCPKG_INSTALLATION_ROOT"; exit 1 }
- switch ("${{ matrix.rid }}") {
- 'win-x86' { $triplet = 'x86-windows' }
- 'win-x64' { $triplet = 'x64-windows' }
- 'win-arm64' { $triplet = 'arm64-windows' }
- 'linux-x64' { $triplet = 'x64-linux' }
- 'linux-arm64'{ $triplet = 'arm64-linux' }
- 'osx-x64' { $triplet = 'x64-osx' }
- 'osx-arm64' { $triplet = 'arm64-osx' }
- default { Write-Host "Unknown RID '${{ matrix.rid }}' for vcpkg triplet mapping; skipping vcpkg install"; exit 0 }
- }
+ switch ("${{ matrix.rid }}") {
+ 'win-x86' { $triplet = 'x86-windows' }
+ 'win-x64' { $triplet = 'x64-windows' }
+ 'win-arm64' { $triplet = 'arm64-windows' }
+ 'linux-x64' { $triplet = 'x64-linux' }
+ 'linux-arm64'{ $triplet = 'arm64-linux' }
+ 'osx-x64' { $triplet = 'x64-osx' }
+ 'osx-arm64' { $triplet = 'arm64-osx' }
+ default { Write-Host "Unknown RID '${{ matrix.rid }}' for vcpkg triplet mapping; skipping vcpkg install"; exit 0 }
+ }
- Write-Host "Installing nlohmann-json for triplet: $triplet"
- # Export vcpkg settings as step outputs (do NOT persist to job env)
- Add-Content -Path $env:GITHUB_OUTPUT -Value "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT"
- Add-Content -Path $env:GITHUB_OUTPUT -Value "CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
- Add-Content -Path $env:GITHUB_OUTPUT -Value "VCPKG_TARGET_TRIPLET=$triplet"
+ Write-Host "Installing nlohmann-json for triplet: $triplet"
+ # Export vcpkg settings as step outputs (do NOT persist to job env)
+ Add-Content -Path $env:GITHUB_OUTPUT -Value "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT"
+ Add-Content -Path $env:GITHUB_OUTPUT -Value "CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
+ Add-Content -Path $env:GITHUB_OUTPUT -Value "VCPKG_TARGET_TRIPLET=$triplet"
+
+ & $vcpkgPath install "nlohmann-json:$triplet"
- & $vcpkgPath install "nlohmann-json:$triplet"
- }
- else {
- Write-Host "VCPKG_INSTALLATION_ROOT not set on runner, skipping vcpkg install of nlohmann-json"
- }
- name: Build & Pack Libdave.RID (via )
shell: pwsh
run: |
- # Use vcpkg settings exported by the install step (only for this step, not persisted)
- if ('${{ steps.install-nlohmann.outputs.CMAKE_TOOLCHAIN_FILE }}' -ne '') {
- $env:CMAKE_TOOLCHAIN_FILE = '${{ steps.install-nlohmann.outputs.CMAKE_TOOLCHAIN_FILE }}'
- $env:VCPKG_TARGET_TRIPLET = '${{ steps.install-nlohmann.outputs.VCPKG_TARGET_TRIPLET }}'
- Write-Host "Using vcpkg toolchain: $env:CMAKE_TOOLCHAIN_FILE"
- Write-Host "Using vcpkg triplet: $env:VCPKG_TARGET_TRIPLET"
- }
+ # Use vcpkg settings exported by the install step
+ $env:CMAKE_TOOLCHAIN_FILE = '${{ steps.install-nlohmann.outputs.CMAKE_TOOLCHAIN_FILE }}'
+ $env:VCPKG_TARGET_TRIPLET = '${{ steps.install-nlohmann.outputs.VCPKG_TARGET_TRIPLET }}'
+ Write-Host "Using vcpkg toolchain: $env:CMAKE_TOOLCHAIN_FILE"
+ Write-Host "Using vcpkg triplet: $env:VCPKG_TARGET_TRIPLET"
if ("${{ matrix.arch }}" -ne "") { $env:CMAKE_GENERATOR_PLATFORM = "${{ matrix.arch }}" }
- if ("${{ matrix.os }}" -eq "ubuntu-latest" -and "${{ matrix.arch }}" -eq "arm64") {
+
+ if ("${{ matrix.rid }}" -eq "linux-arm64") {
$env:CMAKE_CXX_COMPILER = "aarch64-linux-gnu-g++"
$env:CMAKE_C_COMPILER = "aarch64-linux-gnu-gcc"
}
- dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj -v diag --no-restore -c MinSizeRel -r ${{ matrix.rid }} /bl:build-${{ matrix.rid }}.binlog
+ $env:CMakeArgs = "-DCMAKE_TOOLCHAIN_FILE=$env:CMAKE_TOOLCHAIN_FILE -DVCPKG_TARGET_TRIPLET=$env:VCPKG_TARGET_TRIPLET"
+
+ dotnet build NetCord/ThirdParty/Libdave/Libdave.RID/Libdave.RID.csproj --no-restore -v normal -c MinSizeRel -r ${{ matrix.rid }} /bl:build-${{ matrix.rid }}.binlog
- - name: Upload Binary Log on Failure
- if: failure()
+ - name: Upload Binary Log
+ if: always() && (hashFiles('restore-${{ matrix.rid }}.binlog','build-${{ matrix.rid }}.binlog') != '')
uses: actions/upload-artifact@v6.0.0
with:
name: BinLog-${{ matrix.rid }}
diff --git a/NetCord/ThirdParty/Directory.Build.props b/NetCord/ThirdParty/Directory.Build.props
index 371648840..a38852747 100644
--- a/NetCord/ThirdParty/Directory.Build.props
+++ b/NetCord/ThirdParty/Directory.Build.props
@@ -59,7 +59,8 @@
-
+
PackageOpenSSLLib;$(Packing_DependsOn)
diff --git a/NetCord/ThirdParty/FindOpenSSL.targets b/NetCord/ThirdParty/FindOpenSSL.targets
index 3fe93f544..7080355c0 100644
--- a/NetCord/ThirdParty/FindOpenSSL.targets
+++ b/NetCord/ThirdParty/FindOpenSSL.targets
@@ -80,6 +80,31 @@
+
+
+
+
+
+ $(OpenSSLRoot)\bin\openssl.exe
+
+
+ $(OpenSSLRoot)\bin\openssl
+
+
+
+
+
+
+
+
+
+ $([System.Text.RegularExpressions.Regex]::Match('@(OpenSSLVersionLines->"%(Identity)")','OpenSSL\s+([^\s]+)').Groups[1].Value)
+
+
+
+
+
@@ -214,19 +239,22 @@
-
+
- <_OpenSSLPackageFiles Include="@(OpenSSLLib)" Condition="Exists('%(Identity)')">
+ <_OpenSSLPackageFiles Include="@(OpenSSLLib)" Condition="Exists('%(Identity)')">
true
lib\$(RuntimeIdentifier)\%(_OpenSSLPackageFiles.Filename)%(_OpenSSLPackageFiles.Extension)
-
- <_OpenSSLPackageFiles Include="$(OpenSSLRoot)\license.txt" Condition="Exists('$(OpenSSLRoot)\license.txt')">
- true
- lib\$(RuntimeIdentifier)\OPENSSL_LICENSE.txt
-
-
+
+
+
+ <_OpenSSLPackageFiles Include="$(OpenSSLRoot)\license.txt" Condition="Exists('$(OpenSSLRoot)\license.txt')">
+ true
+ lib\$(RuntimeIdentifier)\OPENSSL_LICENSE_$(OpenSSLVersion).txt
+ lib\$(RuntimeIdentifier)\OPENSSL_LICENSE.txt
+
+