mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-21 22:34:58 +00:00
Update to UnshieldSharp 1.7.3
This commit is contained in:
@@ -71,7 +71,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`))">
|
||||
<PackageReference Include="OpenMcdf" Version="2.3.1" />
|
||||
<PackageReference Include="UnshieldSharp" Version="1.7.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`)) AND !$(TargetFramework.StartsWith(`net40`)) AND !$(TargetFramework.StartsWith(`net452`))">
|
||||
<PackageReference Include="SharpCompress" Version="0.36.0" />
|
||||
@@ -88,6 +87,7 @@
|
||||
<PackageReference Include="SabreTools.Matching" Version="1.3.1" />
|
||||
<PackageReference Include="SabreTools.Models" Version="1.4.0" />
|
||||
<PackageReference Include="SabreTools.Serialization" Version="1.4.1" />
|
||||
<PackageReference Include="UnshieldSharp" Version="1.7.3" />
|
||||
<PackageReference Include="WiseUnpacker" Version="1.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using BinaryObjectScanner.Interfaces;
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
using UnshieldSharp.Archive;
|
||||
#endif
|
||||
|
||||
namespace BinaryObjectScanner.FileType
|
||||
{
|
||||
@@ -26,10 +24,6 @@ namespace BinaryObjectScanner.FileType
|
||||
/// <inheritdoc/>
|
||||
public string? Extract(Stream? stream, string file, bool includeDebug)
|
||||
{
|
||||
#if NET20 || NET35
|
||||
// Not supported for .NET Framework 2.0 or .NET Framework 3.5 due to library support
|
||||
return null;
|
||||
#else
|
||||
try
|
||||
{
|
||||
// Create a temp output directory
|
||||
@@ -68,7 +62,6 @@ namespace BinaryObjectScanner.FileType
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
return null;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using BinaryObjectScanner.Interfaces;
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
using UnshieldSharp.Cabinet;
|
||||
#endif
|
||||
|
||||
namespace BinaryObjectScanner.FileType
|
||||
{
|
||||
@@ -26,10 +24,6 @@ namespace BinaryObjectScanner.FileType
|
||||
/// <inheritdoc/>
|
||||
public string? Extract(Stream? stream, string file, bool includeDebug)
|
||||
{
|
||||
#if NET20 || NET35
|
||||
// Not supported for .NET Framework 2.0 or .NET Framework 3.5 due to library support
|
||||
return null;
|
||||
#else
|
||||
// Get the name of the first cabinet file or header
|
||||
var directory = Path.GetDirectoryName(file);
|
||||
string noExtension = Path.GetFileNameWithoutExtension(file);
|
||||
@@ -102,7 +96,6 @@ namespace BinaryObjectScanner.FileType
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
return null;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,8 @@ using SharpCompress.Compressors;
|
||||
using SharpCompress.Compressors.BZip2;
|
||||
using SharpCompress.Compressors.Xz;
|
||||
#endif
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
using UnshieldSharp.Archive;
|
||||
using UnshieldSharp.Cabinet;
|
||||
#endif
|
||||
|
||||
namespace Test
|
||||
{
|
||||
@@ -320,7 +318,6 @@ namespace Test
|
||||
Console.WriteLine("Extracting InstallShield Archive V3 contents");
|
||||
Console.WriteLine();
|
||||
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
// If the cab file itself fails
|
||||
try
|
||||
{
|
||||
@@ -357,7 +354,6 @@ namespace Test
|
||||
Console.WriteLine($"Something went wrong extracting InstallShield Archive V3: {ex}");
|
||||
Console.WriteLine();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// IS-CAB archive
|
||||
@@ -367,10 +363,6 @@ namespace Test
|
||||
Console.WriteLine("Extracting IS-CAB contents");
|
||||
Console.WriteLine();
|
||||
|
||||
#if NET20 || NET35 || NET40
|
||||
Console.WriteLine("Extraction is not supported for this framework!");
|
||||
Console.WriteLine();
|
||||
#else
|
||||
// If the cab file itself fails
|
||||
try
|
||||
{
|
||||
@@ -405,7 +397,6 @@ namespace Test
|
||||
Console.WriteLine($"Something went wrong extracting IS-CAB: {ex}");
|
||||
Console.WriteLine();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ((NETFRAMEWORK && !NET20 && !NET35 && !NET40) || NETCOREAPP) && WIN
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<!-- Support for old .NET versions -->
|
||||
<ItemGroup Condition="!$(TargetFramework.StartsWith(`net2`)) AND !$(TargetFramework.StartsWith(`net3`))">
|
||||
<PackageReference Include="OpenMcdf" Version="2.3.1" />
|
||||
<PackageReference Include="UnshieldSharp" Version="1.7.2" />
|
||||
<PackageReference Include="UnshieldSharp" Version="1.7.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user