From 17f3cf95a42f323f16749377ec498653c9bd6208 Mon Sep 17 00:00:00 2001 From: ArchLeaders Date: Thu, 18 Jan 2024 02:33:13 -0800 Subject: [PATCH] Use args[2] as yaml output (runner) --- src/BymlLibrary.Runner/Program.cs | 11 ++++++----- src/BymlLibrary.Runner/Properties/launchSettings.json | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/BymlLibrary.Runner/Program.cs b/src/BymlLibrary.Runner/Program.cs index bbba2b4..e2d189c 100644 --- a/src/BymlLibrary.Runner/Program.cs +++ b/src/BymlLibrary.Runner/Program.cs @@ -10,13 +10,14 @@ using Revrs; byte[] buffer = File.ReadAllBytes(args[0]); + RevrsReader reader = new(buffer); -ImmutableByml immutableByml = new(ref reader); +ImmutableByml byml = new(ref reader); -string yaml = immutableByml.ToYaml(); -File.WriteAllText("./Output.yml", yaml); +string yaml = byml.ToYaml(); +Byml fromYaml = Byml.FromText(yaml); -Byml byml = Byml.FromText(yaml); -byml.WriteBinary(args[1], immutableByml.Endianness); +File.WriteAllBytes(args[1], fromYaml.ToBinary(byml.Endianness)); +File.WriteAllText(args[2], yaml); #endif \ No newline at end of file diff --git a/src/BymlLibrary.Runner/Properties/launchSettings.json b/src/BymlLibrary.Runner/Properties/launchSettings.json index 82256bc..fdff9bc 100644 --- a/src/BymlLibrary.Runner/Properties/launchSettings.json +++ b/src/BymlLibrary.Runner/Properties/launchSettings.json @@ -2,7 +2,7 @@ "profiles": { "BymlLibrary.Runner": { "commandName": "Project", - "commandLineArgs": "\"D:\\bin\\Byml-v7\\be_ActorInfo.product.byml\" \"D:\\bin\\Byml-v7\\OUT-ActorInfo.product.byml\"" + "commandLineArgs": "\"D:\\bin\\nxe\\(src)-GameDataList.Product.110.byml\" \"D:\\bin\\nxe\\GameDataList.Product.110.byml\" \"D:\\bin\\nxe\\output.yml\"" } } } \ No newline at end of file