checkUpates: installer support (Win), use GUI buildTag and version

This commit is contained in:
xiphon
2020-04-23 14:19:20 +00:00
parent 585fb2810d
commit 9b98e0a2f5
5 changed files with 86 additions and 5 deletions

View File

@@ -45,6 +45,7 @@ import "pages/merchant" as MoneroMerchant
import "wizard"
import "js/Utils.js" as Utils
import "js/Windows.js" as Windows
import "version.js" as Version
ApplicationWindow {
id: appWindow
@@ -1988,8 +1989,26 @@ ApplicationWindow {
}
}
function getBuildTag() {
if (isMac) {
return "mac-x64";
}
if (isWindows) {
return oshelper.installed ? "install-win-x64" : "win-x64";
}
if (isLinux) {
return "linux-x64";
}
return "source";
}
function checkUpdates() {
walletManager.checkUpdatesAsync("monero-gui", "gui")
const version = Version.GUI_VERSION.match(/\d+\.\d+\.\d+\.\d+/);
if (version) {
walletManager.checkUpdatesAsync("monero-gui", "gui", getBuildTag(), version[0]);
} else {
console.error("failed to parse version number", Version.GUI_VERSION);
}
}
Timer {