Modified the update logic

This commit is contained in:
Ashley 2020-02-06 14:55:26 -05:00
parent 792af7a616
commit a1360f9d9a
3 changed files with 7 additions and 5 deletions

View file

@ -56,8 +56,6 @@ namespace Ryujinx.Updater
return;
}
//Write version comparison logic here
Console.WriteLine($"Updating Ryujinx... | {File.ReadAllText(Path.Combine(localAppPath, "Version.json"))} -> {args[1]}");
File.WriteAllText(Path.Combine(localAppPath, "Version.json"), args[1]);

View file

@ -70,9 +70,12 @@ namespace Ryujinx
{
try
{
var VersionJSON = JObject.Parse(Path.Combine(Environment.CurrentDirectory, "Version.json"));
(string)currentVersionJson = (string)_VersionJSON["BuildVer"];
(string)currentVersionPr = (string)_VersionJSON["BuildPR"];
(string)currentVersionBranch = (string)_VersionJSON["BuildBranch"];
Version newVersion = Version.Parse(_buildVer);
string currentVersionJson = File.ReadAllLines(Path.Combine(localAppPath, "Version.json"))[0];
Version currentVersion = Version.Parse(currentVersionJson);
if (newVersion.CompareTo(currentVersion) == 0)

View file

@ -1,4 +1,5 @@
{
"BuildVer":"_ver",
"BuildCommit":"_commit"
"BuildPr":"_pr",
"BuildBranch":"_branch"
}