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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Write version comparison logic here
|
|
||||||
|
|
||||||
Console.WriteLine($"Updating Ryujinx... | {File.ReadAllText(Path.Combine(localAppPath, "Version.json"))} -> {args[1]}");
|
Console.WriteLine($"Updating Ryujinx... | {File.ReadAllText(Path.Combine(localAppPath, "Version.json"))} -> {args[1]}");
|
||||||
|
|
||||||
File.WriteAllText(Path.Combine(localAppPath, "Version.json"), args[1]);
|
File.WriteAllText(Path.Combine(localAppPath, "Version.json"), args[1]);
|
||||||
|
|
|
@ -70,9 +70,12 @@ namespace Ryujinx
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Version newVersion = Version.Parse(_buildVer);
|
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"];
|
||||||
|
|
||||||
string currentVersionJson = File.ReadAllLines(Path.Combine(localAppPath, "Version.json"))[0];
|
Version newVersion = Version.Parse(_buildVer);
|
||||||
Version currentVersion = Version.Parse(currentVersionJson);
|
Version currentVersion = Version.Parse(currentVersionJson);
|
||||||
|
|
||||||
if (newVersion.CompareTo(currentVersion) == 0)
|
if (newVersion.CompareTo(currentVersion) == 0)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
"BuildVer":"_ver",
|
"BuildVer":"_ver",
|
||||||
"BuildCommit":"_commit"
|
"BuildPr":"_pr",
|
||||||
|
"BuildBranch":"_branch"
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue