Skip to content

Commit

Permalink
Replace Cead with managed SarcLibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchLeaders committed Jul 4, 2023
1 parent 35a62f1 commit 19f9519
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 23 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

11 changes: 0 additions & 11 deletions Totk.ZStdTool.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ VisualStudioVersion = 17.5.33530.505
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Totk.ZStdTool", "src\Totk.ZStdTool.csproj", "{82E909E6-EDF7-4C14-9F71-4CB1C95467D2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{D14822C2-1D12-49D3-A4A5-BABDDD344A1F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cead", "lib\Cead\src\Cead.csproj", "{DE4302A7-52AA-428B-B9E9-80972435998E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -19,17 +15,10 @@ Global
{82E909E6-EDF7-4C14-9F71-4CB1C95467D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82E909E6-EDF7-4C14-9F71-4CB1C95467D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82E909E6-EDF7-4C14-9F71-4CB1C95467D2}.Release|Any CPU.Build.0 = Release|Any CPU
{DE4302A7-52AA-428B-B9E9-80972435998E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE4302A7-52AA-428B-B9E9-80972435998E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE4302A7-52AA-428B-B9E9-80972435998E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE4302A7-52AA-428B-B9E9-80972435998E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{DE4302A7-52AA-428B-B9E9-80972435998E} = {D14822C2-1D12-49D3-A4A5-BABDDD344A1F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4C991AA9-DCD8-435F-8DEC-DB833B7B9CED}
EndGlobalSection
Expand Down
1 change: 0 additions & 1 deletion lib/Cead
Submodule Cead deleted from fb2a6f
4 changes: 2 additions & 2 deletions src/Helpers/ZStdHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Cead;
using SarcLibrary;
using ZstdSharp;

namespace Totk.ZStdTool.Helpers;
Expand All @@ -17,7 +17,7 @@ public class ZStdHelper
static ZStdHelper()
{
Span<byte> data = _commonDecompressor.Unwrap(File.ReadAllBytes(TotkConfig.ZsDicPath));
using Sarc sarc = Sarc.FromBinary(data);
SarcFile sarc = SarcFile.FromBinary(data.ToArray());

_commonDecompressor.LoadDictionary(sarc["zs.zsdic"]);
_mapDecompressor.LoadDictionary(sarc["bcett.byml.zsdic"]);
Expand Down
3 changes: 0 additions & 3 deletions src/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Avalonia;
using Avalonia.ReactiveUI;
using Cead.Interop;

namespace Totk.ZStdTool;

Expand All @@ -12,8 +11,6 @@ internal class Program
[STAThread]
public static void Main(string[] args)
{
DllManager.LoadCead();

if (args.Length > 0) {
CommandProcessor.Process(args.ToList());
}
Expand Down
4 changes: 1 addition & 3 deletions src/Totk.ZStdTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview7" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview7" />
<PackageReference Include="FluentAvaloniaUI" Version="2.0.0-preview7" />
<PackageReference Include="SarcLibrary" Version="2.0.2" />
<PackageReference Include="ZstdSharp.Port" Version="0.7.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\lib\Cead\src\Cead.csproj" />
</ItemGroup>
<ItemGroup>
<Using Include="ReactiveUI" />
</ItemGroup>
Expand Down

0 comments on commit 19f9519

Please sign in to comment.