|
42 | 42 |
|
43 | 43 | function install(driverPath){console.log("A "+driverPath);
|
44 | 44 | async.series([
|
45 |
| - function(callback){console.log("B1"); |
| 45 | + function(callback){ |
| 46 | + console.log("C1 "); |
| 47 | + // atmel windows drivers |
| 48 | + var fileexe = path.join(driverPath , 'driver-atmel-bundle-7.0.712.exe'); console.log("CC " + fileexe); |
| 49 | + var atmelInstallation = exec( "\""+ fileexe + "\"" , |
| 50 | + function (error, stdout, stderr) { |
| 51 | + callback(null, 'arduino'); |
| 52 | + }); |
| 53 | + }, |
| 54 | + function(callback){ |
| 55 | + console.log("B1"); |
46 | 56 | // arduino and linino windows drivers
|
47 |
| - var fileexe = isWin64() ? path.join(driverPath , 'dpinst-amd64.exe') : path.join(driverPath + 'dpinst-x86.exe'); console.log("B2 " + fileexe); |
| 57 | + var fileexe = isWin64() ? path.join(driverPath , 'dpinst-amd64.exe') : path.join(driverPath, 'dpinst-x86.exe'); |
| 58 | + console.log("B2 " + fileexe); |
48 | 59 | var driverInstallation = exec("\""+fileexe+"\"",
|
49 | 60 | function (error, stdout, stderr) {
|
50 | 61 | console.log("B2.1");
|
51 |
| - if (error !== null){ |
52 |
| - console.error('B3: ' + error); |
53 |
| - callback(error); |
54 |
| - } |
55 |
| - else{ |
56 |
| - console.log("B3 " + stdout); |
57 | 62 | callback(null, 'arduino');
|
58 |
| - } |
59 |
| - }); |
60 |
| - }, |
61 |
| - function(callback){console.log("C1 "); |
62 |
| - // atmel windows drivers |
63 |
| - var fileexe = path.join(driverPath + 'driver-atmel-bundle-7.0.712.exe'); console.log("CC " + fileexe); |
64 |
| - var atmelInstallation = exec( "\""+ fileexe + "\"" , |
65 |
| - function (error, stdout, stderr) { |
66 |
| - if (error !== null) |
67 |
| - //console.log('exec error: ' + error); |
68 |
| - callback(error); |
69 |
| - else |
70 |
| - callback(null, 'arduino'); |
71 | 63 | });
|
72 | 64 | }
|
73 | 65 | ],
|
74 | 66 | // optional callback
|
75 | 67 | function(err, results){
|
76 |
| - if(!err){console.log("ERR "+err); |
| 68 | + if(err){console.log("ERR "+err); |
77 | 69 | console.error(err);
|
78 | 70 | }
|
79 | 71 | else{
|
|
0 commit comments