diff options
Diffstat (limited to 'wrappers')
| -rw-r--r-- | wrappers/csharp/EduVpnCommon.csproj | 47 | ||||
| -rw-r--r-- | wrappers/csharp/Makefile | 12 |
2 files changed, 54 insertions, 5 deletions
diff --git a/wrappers/csharp/EduVpnCommon.csproj b/wrappers/csharp/EduVpnCommon.csproj index 1bbbc23..04df7f0 100644 --- a/wrappers/csharp/EduVpnCommon.csproj +++ b/wrappers/csharp/EduVpnCommon.csproj @@ -4,6 +4,11 @@ <TargetFramework>netstandard2.0</TargetFramework> <LangVersion>8</LangVersion> <Nullable>enable</Nullable> + <PackageId>EduVpn.Common</PackageId> + <PackageVersion>0.1.0</PackageVersion> + <Authors /> + <Description>Common EduVpn logic</Description> + <Product>EduVpn</Product> </PropertyGroup> <ItemGroup> @@ -14,13 +19,47 @@ <EmbeddedResource Remove="EduVpnCommonTests/**" /> </ItemGroup> + <Target Name="Build library for current OS" BeforeTargets="PrepareForBuild" + Condition="!(Exists('../../exports/windows/amd64/eduvpn_verify.dll') + Or Exists('../../exports/windows/386/eduvpn_verify.dll') + Or Exists('../../exports/windows/arm/eduvpn_verify.dll') + Or Exists('../../exports/windows/arm64/eduvpn_verify.dll') + Or Exists('../../exports/linux/amd64/eduvpn_verify.so') + Or Exists('../../exports/linux/arm/eduvpn_verify.so') + Or Exists('../../exports/linux/arm64/eduvpn_verify.so'))"> + <Message Text="Shared eduvpn_verify library not found, you should build that one first" Importance="high" /> + </Target> + <ItemGroup> <None Remove="EduVpnCommonTests/**" /> - <None Condition="Exists('../../exports/eduvpn_verify.dll')" Include="../../exports/eduvpn_verify.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + + <None Condition="Exists('../../exports/windows/amd64/eduvpn_verify.dll')" + Include="../../exports/windows/amd64/eduvpn_verify.dll" Pack="true" PackagePath="runtimes/win-x64/native/"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Condition="Exists('../../exports/windows/386/eduvpn_verify.dll')" + Include="../../exports/windows/386/eduvpn_verify.dll" Pack="true" PackagePath="runtimes/win-x86/native/"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Condition="Exists('../../exports/windows/arm/eduvpn_verify.dll')" + Include="../../exports/windows/arm/eduvpn_verify.dll" Pack="true" PackagePath="runtimes/win-arm/native/"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Condition="Exists('../../exports/windows/arm64/eduvpn_verify.dll')" + Include="../../exports/windows/arm64/eduvpn_verify.dll" Pack="true" PackagePath="runtimes/win-arm64/native/"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Condition="Exists('../../exports/linux/amd64/eduvpn_verify.so')" + Include="../../exports/linux/amd64/eduvpn_verify.so" Pack="true" PackagePath="runtimes/linux-x64/native/"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Condition="Exists('../../exports/linux/arm/eduvpn_verify.so')" + Include="../../exports/linux/arm/eduvpn_verify.so" Pack="true" PackagePath="runtimes/linux-arm/native/"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> - <None Condition="Exists('../../exports/eduvpn_verify.so')" Include="../../exports/eduvpn_verify.so"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + <None Condition="Exists('../../exports/linux/arm64/eduvpn_verify.so')" + Include="../../exports/linux/arm64/eduvpn_verify.so" Pack="true" PackagePath="runtimes/linux-arm64/native/"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> </ItemGroup> diff --git a/wrappers/csharp/Makefile b/wrappers/csharp/Makefile index 293a7a2..1761edc 100644 --- a/wrappers/csharp/Makefile +++ b/wrappers/csharp/Makefile @@ -1,4 +1,14 @@ -.PHONY: test +.PHONY: build pack test clean + +build: + dotnet publish EduVpnCommon.csproj --configuration Release + +pack: + dotnet pack EduVpnCommon.csproj --configuration Release test: + $(MAKE) -C ../../exports dotnet test + +clean: + rm -rf bin/ obj/ EduVpnCommonTests/bin/ EduVpnCommonTests/obj/ |
