Skip to content

Commit ba4daf0

Browse files
committed
Fix NPlug.Proxy when used from NuGet
1 parent 21d7481 commit ba4daf0

File tree

10 files changed

+90
-17
lines changed

10 files changed

+90
-17
lines changed

.github/workflows/ci-publish_nplug_proxy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
- name: Build
2525
shell: bash
2626
run: |
27-
dotnet build -c Release ./src/NPlug.Proxy/NPlug.Proxy.msbuildproj
27+
dotnet build -c Release ./src/NPlug.Proxy/NPlug.Proxy.csproj
2828
2929
- name: Package
3030
shell: bash
3131
run: |
32-
dotnet pack -c Release ./src/NPlug.Proxy/NPlug.Proxy.msbuildproj -p:IsPackable=true
32+
dotnet pack -c Release ./src/NPlug.Proxy/NPlug.Proxy.csproj -p:IsPackable=true
3333
3434
- name: Publish
3535
shell: bash

samples

src/NPlug.Proxy/build/AudioPluginProxy.cs src/NPlug.Proxy/AudioPluginProxy.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace NPlug.Proxy;
1010

11-
internal sealed class AudioPluginProxy : IDisposable
11+
public sealed class AudioPluginProxy : IDisposable
1212
{
1313
private readonly IntPtr _nativeProxyHandle;
1414
private readonly bool _ownHandle;
@@ -126,7 +126,7 @@ public void Dispose()
126126
NativeLibrary.Free(_nativeProxyHandle);
127127
}
128128
}
129-
129+
130130
private IntPtr InternalGetFactory()
131131
{
132132
return _nativeFactory?.Invoke() ?? IntPtr.Zero;

src/NPlug.Proxy/NPlug.Proxy.msbuildproj src/NPlug.Proxy/NPlug.Proxy.csproj

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
<Project Sdk="Microsoft.Build.NoTargets/3.7.0">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3+
<OutputType>Library</OutputType>
34
<TargetFramework>net7.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
47
<IsPackable Condition="'$(IsPackable)' == ''">false</IsPackable>
5-
<Version>1.0.0</Version>
8+
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
9+
<Version>1.1.0</Version>
610
</PropertyGroup>
711

812
<PropertyGroup>

src/NPlug.Proxy/build/NPlug.Proxy.targets

-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@
2626
<NPlugProxyLibraryFile Condition="'$(NPlugProxyLibraryFile)' == ''">$(MSBuildThisFileDirectory)$(NPlugRuntimeIdentifier)\native\$(NPlugProxyLibraryLink)</NPlugProxyLibraryFile>
2727
</PropertyGroup>
2828

29-
<ItemGroup>
30-
<Compile Condition="'$(NPlugAudioPluginProxy)' == 'true'" Include="$(MSBuildThisFileDirectory)AudioPluginProxy.cs">
31-
<Visible>false</Visible>
32-
</Compile>
33-
</ItemGroup>
34-
3529
<Target Name="VerifyNPlug" BeforeTargets="Build">
3630
<Error Condition="'$(NPlugVstArch)' == ''" Text="The .NET Platform RID `$(NPlugRuntimeIdentifier)` is not supported by NPlug."></Error>
3731
<Message Importance="high" Text="NPlugRuntimeIdentifier: $(NPlugRuntimeIdentifier)"/>

src/NPlug.Validator/NPlug.Validator.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFramework>net7.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8-
<IsPackable>false</IsPackable>
8+
<IsPackable Condition="'$(IsPackable)' == ''">false</IsPackable>
99
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
1010
<Version>1.0.0.$(VstVersionCompact)</Version>
1111
<NPlugAudioPluginProxy>true</NPlugAudioPluginProxy>
@@ -33,7 +33,7 @@
3333
</ItemGroup>
3434

3535
<ItemGroup>
36-
<ProjectReference Include="..\NPlug.Proxy\NPlug.Proxy.msbuildproj" />
36+
<ProjectReference Include="..\NPlug.Proxy\NPlug.Proxy.csproj" />
3737
</ItemGroup>
3838

3939
<Import Project="$(MSBuildThisFileDirectory)../NPlug.Proxy/build/NPlug.Proxy.targets" />

src/NPlug.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{16297621
4646
EndProject
4747
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NPlug.SimpleProgramChange", "..\samples\NPlug.SimpleProgramChange\NPlug.SimpleProgramChange.csproj", "{B29DFB8F-EECE-4418-955D-E629C9C2B8C2}"
4848
EndProject
49-
Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "NPlug.Proxy", "NPlug.Proxy\NPlug.Proxy.msbuildproj", "{103E615E-DDA9-4EA0-A3CB-318BFC3D844A}"
49+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NPlug.Proxy", "NPlug.Proxy\NPlug.Proxy.csproj", "{103E615E-DDA9-4EA0-A3CB-318BFC3D844A}"
5050
EndProject
5151
Global
5252
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/NPlug/NPlug.cd

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ClassDiagram MajorVersion="1" MinorVersion="1">
3+
<Class Name="NPlug.AudioProcessor&lt;TAudioProcessorModel&gt;" Collapsed="true">
4+
<Position X="4.25" Y="2.25" Width="2.75" />
5+
<TypeIdentifier>
6+
<HashCode>IABgIAAiAAkACAAACqIxAJQACAACAAAQQAASWBggAJA=</HashCode>
7+
<FileName>AudioProcessor.Buses.cs</FileName>
8+
</TypeIdentifier>
9+
<Lollipop Position="0.2" />
10+
</Class>
11+
<Class Name="NPlug.AudioController&lt;TAudioControllerModel&gt;" Collapsed="true">
12+
<Position X="0.5" Y="2.25" Width="2.75" />
13+
<TypeIdentifier>
14+
<HashCode>CsFCAAYkAABYSwAFJBGINQSICAAgQBKECAgkAEDChgY=</HashCode>
15+
<FileName>AudioController.cs</FileName>
16+
</TypeIdentifier>
17+
<Lollipop Position="0.2" />
18+
</Class>
19+
<Class Name="NPlug.AudioPluginComponent" Collapsed="true">
20+
<Position X="2.5" Y="0.75" Width="2.25" />
21+
<TypeIdentifier>
22+
<HashCode>BAAQAAAAAAAAAgABAAAKAAAAAAAECAAAAACGAAAABAI=</HashCode>
23+
<FileName>AudioPluginComponent.cs</FileName>
24+
</TypeIdentifier>
25+
<Lollipop Position="0.2" />
26+
</Class>
27+
<Class Name="NPlug.AudioProcessorModel" Collapsed="true">
28+
<Position X="2.75" Y="4.5" Width="1.75" />
29+
<TypeIdentifier>
30+
<HashCode>AAAAgMkAAqABwQKACaGQBQAQBCqAAACCAiIAgAJAAQA=</HashCode>
31+
<FileName>AudioProcessorModel.cs</FileName>
32+
</TypeIdentifier>
33+
<Lollipop Position="0.2" />
34+
</Class>
35+
<Class Name="NPlug.AudioUnit" Collapsed="true">
36+
<Position X="2.75" Y="3.25" Width="1.75" />
37+
<TypeIdentifier>
38+
<HashCode>AAASkIAAABAdADAkAgFJEAQCAQAAAQQAIAAAAAAAAAA=</HashCode>
39+
<FileName>AudioUnit.cs</FileName>
40+
</TypeIdentifier>
41+
</Class>
42+
<Font Name="Segoe UI" Size="9" />
43+
</ClassDiagram>

src/NPlug/NPlug.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@
6262
</ItemGroup>
6363

6464
<ItemGroup>
65-
<ProjectReference Include="..\NPlug.Proxy\NPlug.Proxy.msbuildproj" />
65+
<ProjectReference Include="..\NPlug.Proxy\NPlug.Proxy.csproj" />
6666
</ItemGroup>
6767
</Project>

src/NPlug/NPlugParameters.cd

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ClassDiagram MajorVersion="1" MinorVersion="1">
3+
<Class Name="NPlug.AudioParameter" Collapsed="true">
4+
<Position X="3" Y="0.5" Width="1.5" />
5+
<TypeIdentifier>
6+
<HashCode>AACCBAAAAAAAAGAEMAAAAAIAAABAEEAAFBIAgAAQkAQ=</HashCode>
7+
<FileName>AudioParameter.cs</FileName>
8+
</TypeIdentifier>
9+
</Class>
10+
<Class Name="NPlug.AudioBoolParameter" Collapsed="true">
11+
<Position X="0.5" Y="1.75" Width="2" />
12+
<TypeIdentifier>
13+
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAA=</HashCode>
14+
<FileName>AudioBoolParameter.cs</FileName>
15+
</TypeIdentifier>
16+
</Class>
17+
<Class Name="NPlug.AudioRangeParameter" Collapsed="true">
18+
<Position X="2.75" Y="1.75" Width="2" />
19+
<TypeIdentifier>
20+
<HashCode>AAAAAAAAAAAAAEgEEAAAAAAAAABAAAAAAAAgAAAAAAA=</HashCode>
21+
<FileName>AudioRangeParameter.cs</FileName>
22+
</TypeIdentifier>
23+
</Class>
24+
<Class Name="NPlug.AudioStringListParameter" Collapsed="true">
25+
<Position X="5.25" Y="1.75" Width="2" />
26+
<TypeIdentifier>
27+
<HashCode>AAAAAAAAAAAACEAEEAAAAAAAABBAAAAAABAAAAAAAAA=</HashCode>
28+
<FileName>AudioStringListParameter.cs</FileName>
29+
</TypeIdentifier>
30+
</Class>
31+
<Font Name="Segoe UI" Size="9" />
32+
</ClassDiagram>

0 commit comments

Comments
 (0)