Update SabreTools libraries and add .NET 9 support (#1)
* Update SabreTools libraries and add .NET 9 support * Update build script * Handle net9.0-specific complaints
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Assembly Properties -->
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetName>irdkit</TargetName>
|
||||
<AssemblyName>irdkit</AssemblyName>
|
||||
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
|
||||
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
|
||||
<CheckEolTargetFramework>false</CheckEolTargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||
<PackageReference Include="SabreTools.Hashing" Version="1.1.4" />
|
||||
<PackageReference Include="SabreTools.RedumpLib" Version="1.3.4" />
|
||||
<PackageReference Include="SabreTools.Hashing" Version="1.4.0" />
|
||||
<PackageReference Include="SabreTools.RedumpLib" Version="1.5.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+3
-16
@@ -944,13 +944,8 @@ namespace IRDKit
|
||||
uint crc32UInt = BitConverter.ToUInt32(crc32, 0);
|
||||
|
||||
// Search for ISO on redump.org
|
||||
#if !NETFRAMEWORK
|
||||
RedumpHttpClient redump = new();
|
||||
RedumpClient redump = new();
|
||||
List<int> ids = redump.CheckSingleSitePage("http://redump.org/discs/system/ps3/quicksearch/" + crc32String).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
#else
|
||||
RedumpWebClient redump = new();
|
||||
List<int> ids = redump.CheckSingleSitePage("http://redump.org/discs/system/ps3/quicksearch/" + crc32String);
|
||||
#endif
|
||||
int id;
|
||||
if (ids.Count == 0)
|
||||
{
|
||||
@@ -963,11 +958,7 @@ namespace IRDKit
|
||||
string sha1String = HashTool.GetFileHash(isoPath, HashType.SHA1);
|
||||
|
||||
// Search redump.org for SHA1 hash
|
||||
#if !NETFRAMEWORK
|
||||
List<int> ids2 = redump.CheckSingleSitePage("http://redump.org/discs/system/ps3/quicksearch/" + sha1String).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
#else
|
||||
List<int> ids2 = redump.CheckSingleSitePage("http://redump.org/discs/system/ps3/quicksearch/" + sha1String);
|
||||
#endif
|
||||
if (ids2.Count == 0)
|
||||
{
|
||||
Console.Error.WriteLine("ISO not found in redump and no valid key provided, cannot create IRD");
|
||||
@@ -987,12 +978,8 @@ namespace IRDKit
|
||||
}
|
||||
|
||||
// Download key file from redump.org
|
||||
#if !NETFRAMEWORK
|
||||
byte[] key = redump.GetByteArrayAsync($"http://redump.org/disc/{id}/key").ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
#else
|
||||
byte[] key = redump.DownloadData($"http://redump.org/disc/{id}/key");
|
||||
#endif
|
||||
if (key.Length != 16)
|
||||
byte[] key = redump.DownloadData($"http://redump.org/disc/{id}/key").ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
if (key == null || key.Length != 16)
|
||||
{
|
||||
Console.Error.WriteLine("Invalid key obtained from redump and no valid key provided, cannot create IRD");
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user