8 Commits
Author SHA1 Message Date
DeterousandGitHub 1935404928 Don't reverse CRC32 2025-11-22 18:25:01 +09:00
DeterousandGitHub 80e515faeb Update packages 2025-11-22 18:07:28 +09:00
DeterousandGitHub 03dc5d7a0e NET10 GHA 2025-11-22 18:05:32 +09:00
DeterousandGitHub fac8168d32 Update GHA 2025-11-22 18:02:34 +09:00
DeterousandGitHub 45d3b3fc7a Support NET10 2025-11-22 18:01:51 +09:00
DeterousandGitHub 85fbd11621 Don't reverse CRC32 hash 2025-11-22 18:00:52 +09:00
DeterousandGitHub 2c7e6423cf Update README.md 2025-08-20 20:43:19 +09:00
DeterousandGitHub 4492862051 Final fix 2025-08-19 23:09:11 +09:00
8 changed files with 21 additions and 57 deletions
+8 -8
View File
@@ -11,17 +11,17 @@ jobs:
matrix: matrix:
project: [IRDKit] project: [IRDKit]
runtime: [win-x86, win-x64, win-arm64, linux-x64, linux-arm64, osx-x64, osx-arm64] runtime: [win-x86, win-x64, win-arm64, linux-x64, linux-arm64, osx-x64, osx-arm64]
framework: [net8.0] framework: [net10.0]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'true' submodules: 'true'
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v5
with: with:
dotnet-version: 9.0.x dotnet-version: 10.0.x
- name: Build - name: Build
run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c Release -p:DebugType=None -p:DebugSymbols=false run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c Release -p:DebugType=None -p:DebugSymbols=false
@@ -40,7 +40,7 @@ jobs:
project: [LibIRD] project: [LibIRD]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v5
with: with:
submodules: 'true' submodules: 'true'
@@ -48,14 +48,14 @@ jobs:
uses: microsoft/setup-msbuild@v2 uses: microsoft/setup-msbuild@v2
- name: Setup NuGet - name: Setup NuGet
uses: NuGet/setup-nuget@v1 uses: NuGet/setup-nuget@v2
with: with:
nuget-version: 'latest' nuget-version: 'latest'
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v5
with: with:
dotnet-version: 9.0.x dotnet-version: 10.0.x
- name: Restore NuGet packages - name: Restore NuGet packages
run: nuget restore LibIRD/LibIRD.csproj run: nuget restore LibIRD/LibIRD.csproj
-24
View File
@@ -1,24 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
]
}
+4 -4
View File
@@ -5,7 +5,7 @@
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetName>irdkit</TargetName> <TargetName>irdkit</TargetName>
<AssemblyName>irdkit</AssemblyName> <AssemblyName>irdkit</AssemblyName>
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks> <TargetFrameworks>net6.0;net7.0;net8.0;net9.0;net10.0</TargetFrameworks>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
<CheckEolTargetFramework>false</CheckEolTargetFramework> <CheckEolTargetFramework>false</CheckEolTargetFramework>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
@@ -14,7 +14,7 @@
<PublishSingleFile>true</PublishSingleFile> <PublishSingleFile>true</PublishSingleFile>
<SelfContained>false</SelfContained> <SelfContained>false</SelfContained>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Version>0.9.5</Version> <Version>1.0.1</Version>
<!-- Package Properties --> <!-- Package Properties -->
<Authors>Deterous</Authors> <Authors>Deterous</Authors>
@@ -33,8 +33,8 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" /> <PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="SabreTools.Hashing" Version="1.5.0" /> <PackageReference Include="SabreTools.Hashing" Version="1.6.0" />
<PackageReference Include="SabreTools.RedumpLib" Version="1.7.0" /> <PackageReference Include="SabreTools.RedumpLib" Version="1.9.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
-1
View File
@@ -1038,7 +1038,6 @@ namespace IRDKit
string crc32String = LibIRD.IRD.ByteArrayToHexString(crc32).ToLowerInvariant(); string crc32String = LibIRD.IRD.ByteArrayToHexString(crc32).ToLowerInvariant();
// Convert to UInt for use as UID in IRD // Convert to UInt for use as UID in IRD
Array.Reverse(crc32);
uint crc32UInt = BitConverter.ToUInt32(crc32, 0); uint crc32UInt = BitConverter.ToUInt32(crc32, 0);
// Search for ISO on redump.org // Search for ISO on redump.org
+4
View File
@@ -46,3 +46,7 @@ The comparison can be printed to a file, e.g. `-o out.txt` or `--output=`
For all options, run `irdkit help rename` For all options, run `irdkit help rename`
To rename an IRD (or folder of IRDs) according to a redump DAT, run `irdkit rename -d redump.dat game.ird` To rename an IRD (or folder of IRDs) according to a redump DAT, run `irdkit rename -d redump.dat game.ird`
## Verifying with an IRD
To verify that a folder containing files from a PS3 disc match the file hashes within an IRD, run `irdkit verify game.ird folder/of/files`
+2 -2
View File
@@ -1159,8 +1159,9 @@ namespace LibIRD
// If making redump-style IRD, save CRC32 hash to UID field // If making redump-style IRD, save CRC32 hash to UID field
if (redump) if (redump)
{ {
isoHasher.Terminate();
crc32 = isoHasher.CurrentHashBytes; crc32 = isoHasher.CurrentHashBytes;
Array.Reverse(crc32); isoHasher.Dispose();
UID = BitConverter.ToUInt32(crc32, 0); UID = BitConverter.ToUInt32(crc32, 0);
} }
@@ -1419,7 +1420,6 @@ namespace LibIRD
// Calculate the little-endian 32-bit "IEEE 802.3" CRC value of the IRD contents so far // Calculate the little-endian 32-bit "IEEE 802.3" CRC value of the IRD contents so far
stream.Position = 0; stream.Position = 0;
byte[] crc32 = HashTool.GetStreamHashArray(stream, HashType.CRC32, true); byte[] crc32 = HashTool.GetStreamHashArray(stream, HashType.CRC32, true);
Array.Reverse(crc32);
// Write final CRC value to the stream // Write final CRC value to the stream
stream.Write(crc32, 0, 4); stream.Write(crc32, 0, 4);
+3 -3
View File
@@ -2,12 +2,12 @@
<PropertyGroup> <PropertyGroup>
<!-- Assembly Properties --> <!-- Assembly Properties -->
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks> <TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework> <CheckEolTargetFramework>false</CheckEolTargetFramework>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Version>0.9.5</Version> <Version>1.0.1</Version>
<PackageOutputPath>../nupkg</PackageOutputPath> <PackageOutputPath>../nupkg</PackageOutputPath>
<!-- Avoid inexact read with 'System.IO.Stream.Read' --> <!-- Avoid inexact read with 'System.IO.Stream.Read' -->
@@ -36,7 +36,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="SabreTools.Hashing" Version="1.5.0" /> <PackageReference Include="SabreTools.Hashing" Version="1.6.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>
-15
View File
@@ -1,15 +0,0 @@
dotnet publish -c Release -f net9.0 -r win-x86 --self-contained=false -p:PublishSingleFile=true -p:DebugType=None IRDKit\IRDKit.csproj
dotnet publish -c Release -f net9.0 -r win-x64 --self-contained=false -p:PublishSingleFile=true -p:DebugType=None IRDKit\IRDKit.csproj
dotnet publish -c Release -f net9.0 -r win-arm64 --self-contained=false -p:PublishSingleFile=true -p:DebugType=None IRDKit\IRDKit.csproj
dotnet publish -c Release -f net9.0 -r linux-x64 --self-contained=false -p:PublishSingleFile=true -p:DebugType=None IRDKit\IRDKit.csproj
dotnet publish -c Release -f net9.0 -r linux-arm64 --self-contained=false -p:PublishSingleFile=true -p:DebugType=None IRDKit\IRDKit.csproj
dotnet publish -c Release -f net9.0 -r osx-x64 --self-contained=false -p:PublishSingleFile=true -p:DebugType=None IRDKit\IRDKit.csproj
dotnet publish -c Release -f net9.0 -r osx-arm64 --self-contained=false -p:PublishSingleFile=true -p:DebugType=None IRDKit\IRDKit.csproj
Compress-Archive -Path "./IRDKit/bin/Release/net9.0/win-x86/publish/irdkit.exe" -Destination "./irdkit-win-x86.zip" -CompressionLevel "Optimal"
Compress-Archive -Path "./IRDKit/bin/Release/net9.0/win-x64/publish/irdkit.exe" -Destination "./irdkit-win-x64.zip" -CompressionLevel "Optimal"
Compress-Archive -Path "./IRDKit/bin/Release/net9.0/win-arm64/publish/irdkit.exe" -Destination "./irdkit-win-arm64.zip" -CompressionLevel "Optimal"
Compress-Archive -Path "./IRDKit/bin/Release/net9.0/linux-x64/publish/irdkit" -Destination "./irdkit-linux-x64.zip" -CompressionLevel "Optimal"
Compress-Archive -Path "./IRDKit/bin/Release/net9.0/linux-arm64/publish/irdkit" -Destination "./irdkit-linux-arm64.zip" -CompressionLevel "Optimal"
Compress-Archive -Path "./IRDKit/bin/Release/net9.0/osx-x64/publish/irdkit" -Destination "./irdkit-osx-x64.zip" -CompressionLevel "Optimal"
Compress-Archive -Path "./IRDKit/bin/Release/net9.0/osx-arm64/publish/irdkit" -Destination "./irdkit-osx-arm64.zip" -CompressionLevel "Optimal"