Modified the update logic
This commit is contained in:
parent
792af7a616
commit
a1360f9d9a
3 changed files with 7 additions and 5 deletions
|
@ -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]);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"BuildVer":"_ver",
|
||||
"BuildCommit":"_commit"
|
||||
"BuildPr":"_pr",
|
||||
"BuildBranch":"_branch"
|
||||
}
|
Loading…
Add table
Reference in a new issue