Skip to content

Commit

Permalink
Use NAPS2.NTwain package
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Mar 10, 2024
1 parent 3669c2d commit bda067f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
4 changes: 0 additions & 4 deletions NAPS2.Sdk.Tests/NAPS2.Sdk.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<Import Project="..\NAPS2.Setup\targets\SdkUsers.targets" />

<ItemGroup>
<Reference Include="NTwain">
<HintPath>..\NAPS2.Setup\lib\NTwain.dll</HintPath>
</Reference>

<ProjectReference Include="..\NAPS2.Sdk\NAPS2.Sdk.csproj" />
<ProjectReference Include="..\NAPS2.Images.Gdi\NAPS2.Images.Gdi.csproj" Condition="$([MSBuild]::IsOSPlatform('Windows'))" />
<ProjectReference Include="..\NAPS2.Images.Wpf\NAPS2.Images.Wpf.csproj" Condition="$([MSBuild]::IsOSPlatform('Windows'))" />
Expand Down
29 changes: 5 additions & 24 deletions NAPS2.Sdk/NAPS2.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="NAPS2.PdfSharp" Version="1.0.1" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="SixLabors.Fonts" Version="1.0.1" />
<!-- TODO: Switch back to the official nuget if https://github.com/soukoku/ntwain/pull/35 gets merged -->
<Reference Include="NTwain" Condition="'$(TargetFramework)' != 'net8-macos10.15'">
<HintPath>..\NAPS2.Setup\lib\NTwain.dll</HintPath>
</Reference>

<PackageReference Include="Grpc.Tools" Version="2.59.0" PrivateAssets="all" />
<PackageReference Include="GrpcDotNetNamedPipes" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" Condition="'$(TargetFramework)' != 'net8-macos10.15'" />
<PackageReference Include="NAPS2.NTwain" Version="1.0.0" Condition="'$(TargetFramework)' != 'net8-macos10.15'" />
<PackageReference Include="NAPS2.PdfSharp" Version="1.0.1" />
<PackageReference Include="NAPS2.Wia" Version="2.0.3" Condition="'$(TargetFramework)' != 'net8-macos10.15'" />
<!-- Hide compatibility warnings for NTwain as it will only be actually used on Windows. -->
<!-- TODO: Does this actually work if we build a net6 framework-dependent app and try to use Twain? -->
<!-- <PackageReference Include="NTwain" Version="3.7.1" NoWarn="NU1701" Condition="'$(TargetFramework)' != 'net6-macos10.15'" />-->
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="all" Condition="'$(TargetFramework)' == 'net462'" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="SixLabors.Fonts" Version="1.0.1" />
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
<PackageReference Include="System.Resources.Extensions" Version="8.0.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="8.0.0" />
Expand Down Expand Up @@ -93,18 +86,6 @@
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net8-macos10.15'">
<!-- TODO: Ideally we'd only have package dependencies, not direct dlls -->
<Content Include="..\NAPS2.Setup\lib\NTwain.dll">
<Pack>true</Pack>
<PackagePath>lib\net6.0</PackagePath>
</Content>
<Content Include="..\NAPS2.Setup\lib\NTwain.dll">
<Pack>true</Pack>
<PackagePath>lib\net462</PackagePath>
</Content>
</ItemGroup>

<ItemGroup>

<EmbeddedResource Remove="Lang\Resources\SdkResources.*.resx" Condition="'$(Configuration)' == 'Debug'" />
Expand Down
Binary file removed NAPS2.Setup/lib/NTwain.dll
Binary file not shown.

0 comments on commit bda067f

Please sign in to comment.