mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-21 13:57:48 +00:00
30 lines
612 B
JavaScript
30 lines
612 B
JavaScript
var commandExistsSync = require('command-exists').sync;
|
|
var app = require('electron').app;
|
|
|
|
exports.getInstalledSoftware = (softwareList) => {
|
|
const installed = {};
|
|
for(var software of softwareList) {
|
|
var name = software.name;
|
|
var commands = software.commands;
|
|
|
|
installed[name] = [];
|
|
|
|
for(var command of commands) {
|
|
var exists = commandExistsSync(command);
|
|
if(exists) {
|
|
installed[name].push(command);
|
|
}
|
|
}
|
|
}
|
|
return installed;
|
|
}
|
|
|
|
exports.install = (software) => {
|
|
var type = software.type;
|
|
|
|
if (type == 'web') {
|
|
|
|
}
|
|
|
|
console.log(app.getAppPath());
|
|
} |