Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3DS patching implementation #9

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Mara.Generator/Mara.Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

Expand Down
15 changes: 14 additions & 1 deletion Mara.Lib/Common/Xdelta.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.IO;
using Pleosoft.XdeltaSharp;
using PleOps.XdeltaSharp.Decoder;

namespace Mara.Lib.Common
{
Expand All @@ -15,5 +15,18 @@ public static void Apply(FileStream file, byte[] xdeltaFile, string outfile)
outStream.Close();
file.Close();
}

public static void ApplyFileStream(string file, string xdeltaFile, string outfile)
{
using var fileStream = new FileStream(file, FileMode.Open);
using var xdeltaStream = new FileStream(xdeltaFile, FileMode.Open);
using var outStream = new FileStream(outfile, FileMode.Create, FileAccess.ReadWrite, FileShare.Read);

var decoder = new Decoder(fileStream, xdeltaStream, outStream);
decoder.Run();
fileStream.Close();
xdeltaStream.Close();
outStream.Close();
}
}
}
120 changes: 0 additions & 120 deletions Mara.Lib/Dll/Pleosoft.XdeltaSharp.deps.json

This file was deleted.

Binary file removed Mara.Lib/Dll/Pleosoft.XdeltaSharp.dll
Binary file not shown.
34 changes: 0 additions & 34 deletions Mara.Lib/Dll/Pleosoft.XdeltaSharp.xml

This file was deleted.

10 changes: 4 additions & 6 deletions Mara.Lib/Mara.Lib.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="SceneGate.Lemon" Version="0.1.0-preview.69" />
<PackageReference Include="PleOps.XdeltaSharp" Version="1.3.0-preview.14" />
<PackageReference Include="SceneGate.Lemon" Version="0.1.0-preview.86" />
<PackageReference Include="SharpCompress" Version="0.28.1" />
<PackageReference Include="Yarhl" Version="3.1.1-preview.23" />
<PackageReference Include="Yarhl" Version="3.1.1-preview.55" />
</ItemGroup>

<ItemGroup>
Expand All @@ -19,9 +20,6 @@
<Reference Include="LibHac">
<HintPath>Dll\LibHac.dll</HintPath>
</Reference>
<Reference Include="Pleosoft.XdeltaSharp">
<HintPath>Dll\Pleosoft.XdeltaSharp.dll</HintPath>
</Reference>
</ItemGroup>

</Project>
Loading