updated dependencies

This commit is contained in:
Timerix 2025-07-04 23:45:45 +03:00
parent 6bdf66b326
commit d609b409f9
8 changed files with 26 additions and 17 deletions

View File

@ -8,7 +8,7 @@
<RootNamespace>diff_text</RootNamespace> <RootNamespace>diff_text</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="google-diff-match-patch" Version="1.3.98" /> <PackageReference Include="google-diff-match-patch" Version="1.3.100" />
<PackageReference Include="DTLib" Version="1.3.0" /> <PackageReference Include="DTLib" Version="1.4.3" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -7,8 +7,8 @@
<RootNamespace>ParadoxDlcMetadataParser</RootNamespace> <RootNamespace>ParadoxDlcMetadataParser</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DTLib" Version="1.6.1" /> <PackageReference Include="DTLib" Version="1.7.4" />
<PackageReference Include="DTLib.Demystifier" Version="1.1.0" /> <PackageReference Include="DTLib.Demystifier" Version="1.1.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -17,6 +17,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution_files", "solution_
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "diff-text", "diff-text\diff-text.csproj", "{720D8D44-A9D3-4F58-BA1E-EA95808D1376}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "diff-text", "diff-text\diff-text.csproj", "{720D8D44-A9D3-4F58-BA1E-EA95808D1376}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "paradox-dlc-metadata-parser", "paradox-dlc-metadata-parser\paradox-dlc-metadata-parser.csproj", "{8663EF88-08DE-4641-AAAE-9FBB54BFF66C}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
@ -31,6 +33,10 @@ Global
{720D8D44-A9D3-4F58-BA1E-EA95808D1376}.Release|Any CPU.Build.0 = Release|Any CPU {720D8D44-A9D3-4F58-BA1E-EA95808D1376}.Release|Any CPU.Build.0 = Release|Any CPU
{720D8D44-A9D3-4F58-BA1E-EA95808D1376}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {720D8D44-A9D3-4F58-BA1E-EA95808D1376}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{720D8D44-A9D3-4F58-BA1E-EA95808D1376}.Debug|Any CPU.Build.0 = Debug|Any CPU {720D8D44-A9D3-4F58-BA1E-EA95808D1376}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8663EF88-08DE-4641-AAAE-9FBB54BFF66C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8663EF88-08DE-4641-AAAE-9FBB54BFF66C}.Release|Any CPU.Build.0 = Release|Any CPU
{8663EF88-08DE-4641-AAAE-9FBB54BFF66C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8663EF88-08DE-4641-AAAE-9FBB54BFF66C}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -1,5 +1,6 @@
using diff_text; using diff_text;
using DTLib.Dtsod; using DTLib.Dtsod;
using DTLib.XXHash;
namespace ParadoxModMerger; namespace ParadoxModMerger;
@ -70,9 +71,7 @@ static class Diff
line_i = 0; line_i = 0;
for (int confl_i = 0; confl_i < conflicts.Length; confl_i++) for (int confl_i = 0; confl_i < conflicts.Length; confl_i++)
{ {
if (confl_i == selected_confl_i) lines[line_i].color = confl_i == selected_confl_i ? ConsoleColor.Blue : ConsoleColor.White;
lines[line_i].color = ConsoleColor.Blue;
else lines[line_i].color = ConsoleColor.White;
line_i++; line_i++;
for (int mod_i = 0; mod_i < conflicts[confl_i].Mods.Length; mod_i++) for (int mod_i = 0; mod_i < conflicts[confl_i].Mods.Length; mod_i++)
@ -207,9 +206,15 @@ static class Diff
{ {
if (filePathDiff.State == DiffState.Equal) if (filePathDiff.State == DiffState.Equal)
{ {
Hasher hasher = new Hasher(); ulong hash0, hash1;
string hash0=hasher.HashFile(Path.Concat(dir0, filePathDiff.Value)).HashToString(); using (var file0 = File.OpenRead(Path.Concat(dir0, filePathDiff.Value)))
string hash1=hasher.HashFile(Path.Concat(dir1, filePathDiff.Value)).HashToString(); {
hash0 = xxHash64.ComputeHash(file0);
}
using (var file1 = File.OpenRead(Path.Concat(dir1, filePathDiff.Value)))
{
hash1 = xxHash64.ComputeHash(file1);
}
if (hash0 != hash1) if (hash0 != hash1)
yield return filePathDiff with { State = DiffState.Changed }; yield return filePathDiff with { State = DiffState.Changed };
else yield return filePathDiff; else yield return filePathDiff;

View File

@ -34,9 +34,9 @@ public static class IronyIntegration
} }
} }
if (name.IsNullOrEmpty()) if (string.IsNullOrEmpty(name))
throw new NullReferenceException("name=null"); throw new NullReferenceException("name=null");
if (remote_file_id.IsNullOrEmpty()) if (string.IsNullOrEmpty(remote_file_id))
throw new NullReferenceException("remote_file_id=null"); throw new NullReferenceException("remote_file_id=null");
mod_desc_values.Add((name,remote_file_id)!); mod_desc_values.Add((name,remote_file_id)!);
Log("b",$"[{mod_desc_values.Count-1}] {{ ", "c", name!, "b", $", {remote_file_id!} }}"); Log("b",$"[{mod_desc_values.Count-1}] {{ ", "c", name!, "b", $", {remote_file_id!} }}");

View File

@ -61,7 +61,7 @@ static class Merge
while (true) while (true)
{ {
Log("y", question + " [y/n]"); Log("y", question + " [y/n]");
string answ = Program.YesAll ? "y" : ColoredConsole.Read("w").ToLower(); string answ = Program.YesAll ? "y" : (ColoredConsole.Read("w") ?? "").ToLower();
if (answ == "y") if (answ == "y")
{ {
Log("c",$"answer: {answ}"); Log("c",$"answer: {answ}");

View File

@ -8,7 +8,7 @@ global using DTLib;
global using DTLib.Extensions; global using DTLib.Extensions;
global using DTLib.Filesystem; global using DTLib.Filesystem;
global using DTLib.Logging; global using DTLib.Logging;
global using DTLib.Ben.Demystifier; global using DTLib.Demystifier;
global using DTLib.Console; global using DTLib.Console;
namespace ParadoxModMerger; namespace ParadoxModMerger;

View File

@ -10,9 +10,7 @@
<AssemblyName>paradox-mod-merger</AssemblyName> <AssemblyName>paradox-mod-merger</AssemblyName>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DTLib.Ben.Demystifier" Version="1.0.4" /> <PackageReference Include="DTLib.XXHash" Version="1.0.4" />
<PackageReference Include="DTLib.Dtsod" Version="1.3.0" />
<PackageReference Include="DTLib.Logging" Version="1.3.0" />
<PackageReference Include="Fizzler.Systems.HtmlAgilityPack" Version="1.2.1" /> <PackageReference Include="Fizzler.Systems.HtmlAgilityPack" Version="1.2.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>