From 28d6d06033dcf8a2e2c7a1dd0452497b512299a4 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 1 Nov 2020 22:13:46 -0800 Subject: [PATCH] Unshield uses zlib.net which isn't .NET Core... --- BurnOutSharp/BurnOutSharp.csproj | 2 +- BurnOutSharp/FileType/InstallShieldCAB.cs | 6 ++++++ BurnOutSharp/FileType/MicrosoftCAB.cs | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/BurnOutSharp/BurnOutSharp.csproj b/BurnOutSharp/BurnOutSharp.csproj index ea3fce3b..06520a55 100644 --- a/BurnOutSharp/BurnOutSharp.csproj +++ b/BurnOutSharp/BurnOutSharp.csproj @@ -30,7 +30,7 @@ - + diff --git a/BurnOutSharp/FileType/InstallShieldCAB.cs b/BurnOutSharp/FileType/InstallShieldCAB.cs index dd8ce43b..99b23efe 100644 --- a/BurnOutSharp/FileType/InstallShieldCAB.cs +++ b/BurnOutSharp/FileType/InstallShieldCAB.cs @@ -2,7 +2,9 @@ using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; +#if NET_FRAMEWORK using UnshieldSharp; +#endif namespace BurnOutSharp.FileType { @@ -10,8 +12,10 @@ namespace BurnOutSharp.FileType { public static bool ShouldScan(byte[] magic) { +#if NET_FRAMEWORK if (magic.StartsWith(new byte[] { 0x49, 0x53, 0x63 })) return true; +#endif return false; } @@ -19,6 +23,7 @@ namespace BurnOutSharp.FileType // TODO: Add stream opening support public static Dictionary> Scan(Scanner scanner, string file) { +#if NET_FRAMEWORK // Get the name of the first cabinet file or header string directory = Path.GetDirectoryName(file); string noExtension = Path.GetFileNameWithoutExtension(file); @@ -68,6 +73,7 @@ namespace BurnOutSharp.FileType } catch { } } +#endif return null; } diff --git a/BurnOutSharp/FileType/MicrosoftCAB.cs b/BurnOutSharp/FileType/MicrosoftCAB.cs index 3f9788b7..80fe8b79 100644 --- a/BurnOutSharp/FileType/MicrosoftCAB.cs +++ b/BurnOutSharp/FileType/MicrosoftCAB.cs @@ -62,6 +62,7 @@ namespace BurnOutSharp.FileType } catch { } #endif + return null; } }