[partial] #30: Add uninstall feature with reboot to handle WinFSP upgrades/downgrades
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
} from './release_version_actions';
|
||||
import {
|
||||
setApplicationReady,
|
||||
setRebootRequired,
|
||||
showWindow,
|
||||
shutdownApplication
|
||||
} from './common_actions';
|
||||
@@ -81,7 +82,7 @@ export const checkVersionInstalled = () => {
|
||||
};
|
||||
};
|
||||
|
||||
export const installDependency = (source, url) => {
|
||||
export const installDependency = (source, url, isWinFSP) => {
|
||||
return (dispatch, getState) => {
|
||||
if (ipcRenderer && !getState().install.InstallActive) {
|
||||
dispatch(setInstallActive(Constants.INSTALL_TYPES.Dependency));
|
||||
@@ -89,11 +90,15 @@ export const installDependency = (source, url) => {
|
||||
const installDependencyComplete = (event, arg) => {
|
||||
const result = arg.data;
|
||||
const handleCompleted = ()=> {
|
||||
ipcRenderer.send(Constants.IPC_Delete_File, {
|
||||
FilePath: source,
|
||||
});
|
||||
dispatch(setInstallComplete(result));
|
||||
dispatch(checkVersionInstalled());
|
||||
if (result.RebootRequired) {
|
||||
dispatch(setRebootRequired());
|
||||
} else {
|
||||
ipcRenderer.send(Constants.IPC_Delete_File, {
|
||||
FilePath: source,
|
||||
});
|
||||
dispatch(setInstallComplete(result));
|
||||
dispatch(checkVersionInstalled());
|
||||
}
|
||||
};
|
||||
|
||||
if (result.Success && source.toLowerCase().endsWith('.dmg')) {
|
||||
@@ -121,6 +126,7 @@ export const installDependency = (source, url) => {
|
||||
ipcRenderer.send(Constants.IPC_Install_Dependency, {
|
||||
Source: source,
|
||||
URL: url,
|
||||
IsWinFSP: isWinFSP,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user