Fix upgrades

This commit is contained in:
Scott E. Graves
2019-07-02 21:13:56 -05:00
parent 37ce52df75
commit c632c2eaaa
3 changed files with 26 additions and 14 deletions

View File

@@ -53,6 +53,7 @@ class App extends IPCContainer {
this.props.checkInstalled(dependencies, selectedVersion);
} else {
this.props.setInstalledVersion('none');
this.props.setAllowDownload(true);
}
};
@@ -113,7 +114,7 @@ class App extends IPCContainer {
handleDownloadUpgrade = () => {
const url = this.props.UpgradeData.urls[0];
const name = this.props.Platform === 'win32' ? 'upgrade.exe' : extractFileNameFromURL(url);
const name = this.props.Platform === 'win32' ? 'upgrade.exe' : this.props.Platform === 'darwin' ? 'upgrade.dmg' : extractFileNameFromURL(url);
this.props.downloadItem(name, Constants.INSTALL_TYPES.Upgrade, url, this.onDownloadFileComplete);
};
@@ -136,9 +137,9 @@ class App extends IPCContainer {
installUpgrade = result => {
if (result.Success) {
const info = this.props.LocationsLookup[this.props.AppPlatform][this.props.VersionLookup[this.props.AppPlatform][0]];
const sha256 = info.sha256;
const signature = info.sig;
//const info = this.props.LocationsLookup[this.props.AppPlatform][this.props.VersionLookup[this.props.AppPlatform][0]];
const sha256 = null;//info.sha256;
const signature = null;//info.sig;
this.props.installUpgrade(result.Destination, sha256, signature, !!result.SkipVerification, this.onInstallUpgradeComplete);
}
};
@@ -239,7 +240,8 @@ class App extends IPCContainer {
!this.props.DisplayError &&
!showConfig &&
!this.props.DownloadActive &&
!this.props.UpgradeDismissed;
!this.props.UpgradeDismissed &&
!this.props.InstallActive;
const showDependencies = !showUpgrade &&
missingDependencies &&