ps2patchelf: init at 1.0.0 (#406377)

This commit is contained in:
Aleksana
2025-05-26 15:45:03 +08:00
committed by GitHub
4 changed files with 81 additions and 0 deletions

1
pkgs/by-name/ps/ps2patchelf/deps.json generated Normal file
View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1,40 @@
{
fetchFromGitHub,
buildDotnetModule,
dotnetCorePackages,
lib,
}:
buildDotnetModule rec {
version = "1.0.0";
pname = "PS2PatchElf";
src = fetchFromGitHub {
owner = "CaptainSwag101";
repo = "PS2PatchElf";
tag = "v${version}";
hash = "sha256-iQL3tT71UOEFIYBdf9BNLUM4++Fm9qEhr77NkMCZdrU=";
};
patches = [
./patches/target_net8.0.patch
./patches/fix_arg_check.patch
];
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;
dotnetFlags = [ "-p:TargetFramework=net8.0" ];
nugetDeps = ./deps.json;
projectFile = "PS2PatchElf/PS2PatchElf.csproj";
meta = {
homepage = "https://github.com/CaptainSwag101/PS2PatchElf/";
description = "Very basic tool for converting PCSX2 .pnach cheats to game executable patches";
maintainers = [ lib.maintainers.gigahawk ];
mainProgram = "PS2PatchElf";
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,14 @@
diff --git a/PS2PatchElf/Program.cs b/PS2PatchElf/Program.cs
index 8c0f1b4..78f4042 100644
--- a/PS2PatchElf/Program.cs
+++ b/PS2PatchElf/Program.cs
@@ -9,7 +9,7 @@ namespace PS2PatchElf
{
static void Main(string[] args)
{
- if (args.Length is not 2 or 3)
+ if (args.Length != 2 && args.Length != 3)
{
Console.WriteLine("Improper number of arguments specified.\nPlease pass an input ELF/SLUS, a PNACH file, and optionally the patched ELF/SLUS's output path, in that order!");
return;

View File

@@ -0,0 +1,26 @@
diff --git a/PS2PatchElf/PS2PatchElf.csproj b/PS2PatchElf/PS2PatchElf.csproj
index 3bfd30f..bb0c835 100644
--- a/PS2PatchElf/PS2PatchElf.csproj
+++ b/PS2PatchElf/PS2PatchElf.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
diff --git a/PS2PatchLib/PS2PatchLib.csproj b/PS2PatchLib/PS2PatchLib.csproj
index 4de8048..8d2b232 100644
--- a/PS2PatchLib/PS2PatchLib.csproj
+++ b/PS2PatchLib/PS2PatchLib.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>