Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiotomasello committed Jun 10, 2015
2 parents 4d226ad + 8bb756c commit 222e67b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
2 changes: 1 addition & 1 deletion modules/Menu/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ define(function (require, exports, module) {
CommandManager.register(Strings.ARDUINO.MENU.HELP.ITEM_ABOUT, ARDUINO_MENU_HELP_ABOUT, helpMenu_showAboutDialog);

if(brackets.platform === 'win')
CommandManager.register(Strings.ARDUINO.MENU.HELP.ITEM_WIN_DRIVER, ARDUINO_MENU_HELP_DRIVER, helpMenu_driver);
CommandManager.register(Strings.ARDUINO.MENU.HELP.ITEM_DRIVER, ARDUINO_MENU_HELP_DRIVER, helpMenu_driver);

HelpMenu.addMenuDivider();
if(brackets.platform === 'win')
Expand Down
36 changes: 14 additions & 22 deletions node/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,38 +42,30 @@

function install(driverPath){console.log("A "+driverPath);
async.series([
function(callback){console.log("B1");
function(callback){
console.log("C1 ");
// atmel windows drivers
var fileexe = path.join(driverPath , 'driver-atmel-bundle-7.0.712.exe'); console.log("CC " + fileexe);
var atmelInstallation = exec( "\""+ fileexe + "\"" ,
function (error, stdout, stderr) {
callback(null, 'arduino');
});
},
function(callback){
console.log("B1");
// arduino and linino windows drivers
var fileexe = isWin64() ? path.join(driverPath , 'dpinst-amd64.exe') : path.join(driverPath + 'dpinst-x86.exe'); console.log("B2 " + fileexe);
var fileexe = isWin64() ? path.join(driverPath , 'dpinst-amd64.exe') : path.join(driverPath, 'dpinst-x86.exe');
console.log("B2 " + fileexe);
var driverInstallation = exec("\""+fileexe+"\"",
function (error, stdout, stderr) {
console.log("B2.1");
if (error !== null){
console.error('B3: ' + error);
callback(error);
}
else{
console.log("B3 " + stdout);
callback(null, 'arduino');
}
});
},
function(callback){console.log("C1 ");
// atmel windows drivers
var fileexe = path.join(driverPath + 'driver-atmel-bundle-7.0.712.exe'); console.log("CC " + fileexe);
var atmelInstallation = exec( "\""+ fileexe + "\"" ,
function (error, stdout, stderr) {
if (error !== null)
//console.log('exec error: ' + error);
callback(error);
else
callback(null, 'arduino');
});
}
],
// optional callback
function(err, results){
if(!err){console.log("ERR "+err);
if(err){console.log("ERR "+err);
console.error(err);
}
else{
Expand Down

0 comments on commit 222e67b

Please sign in to comment.