#26: Fix macOS dependency install
This commit is contained in:
32
src/App.js
32
src/App.js
@@ -162,16 +162,9 @@ class App extends IPCContainer {
|
||||
}
|
||||
};
|
||||
|
||||
onInstallDependencyComplete = (source, url, result) => {
|
||||
onInstallDependencyComplete = () => {
|
||||
if (this._isMounted) {
|
||||
if (result.Success && source.toLowerCase().endsWith('.dmg')) {
|
||||
this.waitForDependencyInstall(source, url);
|
||||
} else {
|
||||
this.sendRequest(Constants.IPC_Delete_File, {
|
||||
FilePath: source,
|
||||
});
|
||||
this.checkVersionInstalled();
|
||||
}
|
||||
this.checkVersionInstalled();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -215,27 +208,6 @@ class App extends IPCContainer {
|
||||
}
|
||||
};
|
||||
|
||||
waitForDependencyInstall = (source, url) => {
|
||||
const dep = this.props.MissingDependencies.find(d => {
|
||||
return d.download === url;
|
||||
});
|
||||
|
||||
const i = setInterval(()=> {
|
||||
const ret = this.sendSyncRequest(Constants.IPC_Check_Dependency_Installed, {
|
||||
File: dep.file,
|
||||
});
|
||||
if (ret.data.Exists) {
|
||||
clearInterval(i);
|
||||
setTimeout(() => {
|
||||
this.sendRequest(Constants.IPC_Delete_File, {
|
||||
FilePath: source,
|
||||
});
|
||||
this.checkVersionInstalled();
|
||||
}, 10000);
|
||||
}
|
||||
}, 3000);
|
||||
};
|
||||
|
||||
render() {
|
||||
const selectedVersion = this.getSelectedVersion();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user