Merge remote-tracking branch 'origin/1.0.3_branch' into 1.0.4_branch

# Conflicts:
#	releases.json
This commit is contained in:
Scott E. Graves
2019-07-02 21:28:46 -05:00
3 changed files with 26 additions and 14 deletions

View File

@@ -765,7 +765,7 @@ ipcMain.on(Constants.IPC_Install_Upgrade, (event, data) => {
.executeAsync(command, args)
.then(() => {
cleanupFiles();
closeApplication();
standardIPCReply(event, Constants.IPC_Install_Upgrade_Reply)
})
.catch(error => {
errorHandler(error);
@@ -791,7 +791,11 @@ ipcMain.on(Constants.IPC_Install_Upgrade, (event, data) => {
errorHandler(Error('Failed to verify installation package hash'));
});
} else {
executeInstall();
if (platform === 'darwin') {
setTimeout(executeInstall, 3000);
} else {
executeInstall();
}
}
} else {
errorHandler(Error('Unsupported upgrade: ' + data.Source));

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 &&

View File

@@ -8,6 +8,10 @@ import {
setInstalledVersion,
setReleaseUpgradeAvailable
} from './release_version_actions';
import {
setApplicationReady,
shutdownApplication
} from './common_actions';
const ipcRenderer = getIPCRenderer();
@@ -126,16 +130,18 @@ export const installRelease = (source, version, completedCallback) => {
export const installUpgrade = (source, sha256, signature, skipVerification, completedCallback) => {
return (dispatch, getState) => {
if (ipcRenderer && !getState().install.InstallActive) {
dispatch(setInstallActive(Constants.INSTALL_TYPES.Dependency));
dispatch(setInstallActive(Constants.INSTALL_TYPES.Upgrade));
dispatch(setApplicationReady(false));
const installUpgradeComplete = (event, arg) => {
ipcRenderer.removeListener(Constants.IPC_Install_Upgrade_Reply, installUpgradeComplete);
ipcRenderer.send(Constants.IPC_Delete_File, {
FilePath: source,
});
dispatch(setInstallComplete(arg.data));
completedCallback(source, arg.data);
if (arg.data.Success) {
dispatch(shutdownApplication());
} else {
dispatch(setApplicationReady(true));
dispatch(setInstallComplete(arg.data));
completedCallback(source, arg.data);
}
};
ipcRenderer.on(Constants.IPC_Install_Upgrade_Reply, installUpgradeComplete);