From 9321b8f221f7ed004f43c3459d4b1aa586fa5b6b Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 25 Mar 2024 21:53:33 -0400 Subject: [PATCH] Update to UnshieldSharp 1.7.3 --- BinaryObjectScanner/BinaryObjectScanner.csproj | 2 +- BinaryObjectScanner/FileType/InstallShieldArchiveV3.cs | 7 ------- BinaryObjectScanner/FileType/InstallShieldCAB.cs | 7 ------- Test/Extractor.cs | 9 --------- Test/Test.csproj | 2 +- 5 files changed, 2 insertions(+), 25 deletions(-) diff --git a/BinaryObjectScanner/BinaryObjectScanner.csproj b/BinaryObjectScanner/BinaryObjectScanner.csproj index e72638b8..cf5a260d 100644 --- a/BinaryObjectScanner/BinaryObjectScanner.csproj +++ b/BinaryObjectScanner/BinaryObjectScanner.csproj @@ -71,7 +71,6 @@ - @@ -88,6 +87,7 @@ + diff --git a/BinaryObjectScanner/FileType/InstallShieldArchiveV3.cs b/BinaryObjectScanner/FileType/InstallShieldArchiveV3.cs index 1e144a1f..253059bb 100644 --- a/BinaryObjectScanner/FileType/InstallShieldArchiveV3.cs +++ b/BinaryObjectScanner/FileType/InstallShieldArchiveV3.cs @@ -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 /// 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 } } } diff --git a/BinaryObjectScanner/FileType/InstallShieldCAB.cs b/BinaryObjectScanner/FileType/InstallShieldCAB.cs index 78ffd7a8..710d32d9 100644 --- a/BinaryObjectScanner/FileType/InstallShieldCAB.cs +++ b/BinaryObjectScanner/FileType/InstallShieldCAB.cs @@ -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 /// 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 } } } diff --git a/Test/Extractor.cs b/Test/Extractor.cs index 8b33d070..89f068cf 100644 --- a/Test/Extractor.cs +++ b/Test/Extractor.cs @@ -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 diff --git a/Test/Test.csproj b/Test/Test.csproj index e84be246..dccf7c3b 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -24,7 +24,7 @@ - +