Compare commits

...

3 Commits
rls ... main

Author SHA1 Message Date
code liturgy be2366eb83 Nuget copy native Linux targeted library 2022-11-30 15:57:44 +00:00
code liturgy 1f7bbff842 Merge remote 2022-11-25 22:37:06 +00:00
code liturgy 61be6b226d Copy lib contents 2022-11-25 22:36:40 +00:00
8 changed files with 49 additions and 17 deletions

9
Directory.Build.props Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning">
<Version>3.4.22</Version>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

View File

@ -15,10 +15,7 @@
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Sharp.Augeas\Sharp.Augeas.csproj" />
<PackageReference Include="Sharp.Augeas" Version="1.1.0-g34c7ba4d4d" />
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="root\**">

13
Sharp.Augeas/.nuspec Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Example</id>
<version>1.0.0</version>
<authors>Example</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Example</description>
</metadata>
<files>
<file src="libclAugeas.so" target="Platform\libclAugeas.so" />
</files>
</package>

View File

@ -9,6 +9,14 @@ namespace Sharp.Augeas
[SuppressUnmanagedCodeSecurity]
public static unsafe class AugeasExtern
{
/// <summary>
/// Used by DllImport to load the native library
/// </summary>
///
private const string _libName = "clAugeas";
[DllImport(_libName)]
public static extern IntPtr init_aug(AugSettings settings, int flags);
@ -18,10 +26,6 @@ namespace Sharp.Augeas
[DllImport(_libName)]
public static extern void free_str(IntPtr str);
/// <summary>
/// Used by DllImport to load the native library
/// </summary>
private const string _libName = "clAugeas";
/// <summary>Test calling</summary>
[DllImport(_libName)]

View File

@ -5,19 +5,28 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>Sharp.Augeas</RootNamespace>
<PackageProjectUrl>https://git.codeliturgy.com/P0/Sharp.Augeas</PackageProjectUrl>
<PackageVersion>$(Version)</PackageVersion>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<RepositoryUrl>https://git.codeliturgy.com/P0/Sharp.Augeas</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<ContentWithTargetPath Include="root\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>root\%(RecursiveDir)\%(Filename)%(Extension)</TargetPath>
</ContentWithTargetPath>
<PackageReference Update="Nerdbank.GitVersioning">
<Version>3.5.109</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="./Platform/Linux/libclAugeas.so">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<PackageReference Update="Nerdbank.GitVersioning">
<Version>3.5.109</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Content Include="libclAugeas.so">
<Pack>true</Pack>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

BIN
Sharp.Augeas/libclAugeas.so Executable file

Binary file not shown.

View File

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "0.9",
"version": "1.1",
"semVer1NumericIdentifierPadding": 1,
"publicReleaseRefSpec": [
"^refs/heads/master$",