Skip to content

Commit

Permalink
Use args[2] as yaml output (runner)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchLeaders committed Jan 18, 2024
1 parent e91e1d1 commit 17f3cf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/BymlLibrary.Runner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/BymlLibrary.Runner/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
}
}
}

0 comments on commit 17f3cf9

Please sign in to comment.