Unshield uses zlib.net which isn't .NET Core...

This commit is contained in:
Matt Nadareski
2020-11-01 22:13:46 -08:00
parent 0a2477e1b3
commit 28d6d06033
3 changed files with 8 additions and 1 deletions

View File

@@ -30,7 +30,7 @@
<PackageReference Include="LessIO" Version="1.0.34" Condition="'$(TargetFramework)'!='netcoreapp3.1'" />
<PackageReference Include="libmspack4n" Version="0.9.10" Condition="'$(TargetFramework)'!='netcoreapp3.1'" />
<PackageReference Include="SharpCompress" Version="0.26.0" />
<PackageReference Include="UnshieldSharp" Version="1.4.2.3" />
<PackageReference Include="UnshieldSharp" Version="1.4.2.3" Condition="'$(TargetFramework)'!='netcoreapp3.1'" />
<PackageReference Include="WiseUnpacker" Version="1.0.1" />
<PackageReference Include="wix-libs" Version="3.11.1" Condition="'$(TargetFramework)'!='netcoreapp3.1'" />
</ItemGroup>

View File

@@ -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<string, List<string>> 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;
}

View File

@@ -62,6 +62,7 @@ namespace BurnOutSharp.FileType
}
catch { }
#endif
return null;
}
}