#30: Add uninstall feature with reboot to handle WinFSP upgrades/downgrades
This commit is contained in:
@@ -88,9 +88,9 @@ const unmountAllDrives = () => {
|
||||
mountedData = {};
|
||||
};
|
||||
|
||||
function createWindow() {
|
||||
function createWindow() {
|
||||
loadUiSettings();
|
||||
|
||||
|
||||
let extra = {};
|
||||
if (os.platform() === 'linux') {
|
||||
extra = {
|
||||
@@ -726,20 +726,45 @@ ipcMain.on(Constants.IPC_Install_Dependency, (event, data) => {
|
||||
}, error);
|
||||
});
|
||||
} else {
|
||||
helpers
|
||||
.executeAndWait(data.Source)
|
||||
.then(() => {
|
||||
standardIPCReply(event, Constants.IPC_Install_Dependency_Reply, {
|
||||
Source: data.Source,
|
||||
URL: data.URL,
|
||||
const execInstall = () => {
|
||||
helpers
|
||||
.executeAndWait(data.Source)
|
||||
.then(() => {
|
||||
standardIPCReply(event, Constants.IPC_Install_Dependency_Reply, {
|
||||
Source: data.Source,
|
||||
URL: data.URL,
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
standardIPCReply(event, Constants.IPC_Install_Dependency_Reply, {
|
||||
Source: data.Source,
|
||||
URL: data.URL,
|
||||
}, error);
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
standardIPCReply(event, Constants.IPC_Install_Dependency_Reply, {
|
||||
Source: data.Source,
|
||||
URL: data.URL,
|
||||
}, error);
|
||||
});
|
||||
};
|
||||
if (data.IsWinFSP) {
|
||||
helpers
|
||||
.performWindowsUninstall(["WinFsp 2019.3 B1", "WinFsp 2019.3 B2"])
|
||||
.then(uninstalled => {
|
||||
if (uninstalled) {
|
||||
standardIPCReply(event, Constants.IPC_Install_Dependency_Reply, {
|
||||
RebootRequired: true,
|
||||
Source: data.Source,
|
||||
URL: data.URL,
|
||||
});
|
||||
} else {
|
||||
execInstall();
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
standardIPCReply(event, Constants.IPC_Install_Dependency_Reply, {
|
||||
Source: data.Source,
|
||||
URL: data.URL,
|
||||
}, error);
|
||||
});
|
||||
} else {
|
||||
execInstall();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user