Skip to content

Commit

Permalink
First cut at having Windows driver install button
Browse files Browse the repository at this point in the history
  • Loading branch information
noisymime committed Jul 9, 2019
1 parent 6f793b9 commit a5f9909
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ <h1>Select Serial Port</h1>
<p>Available Ports:
<select name="ports" class="select" id="portsSelect" size="10" width="20"></select>
<ul class="actions">
<li><input type='button' value="Install Serial Drivers" onclick="installDrivers();" /></li>
<li><input type='button' value="Refresh" onclick="refreshSerialPorts();" /></li>
<li><input type='button' value="Install" id="btnInstall" onclick="uploadFW();" /></li>
<li><input type='button' value="Upload" id="btnInstall" onclick="uploadFW();" /></li>
</ul>
</p>
</div>
Expand Down
12 changes: 12 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ ipcMain.on('download', (e, args) => {

});

ipcMain.on('installWinDrivers', (e, args) => {
var infName = __dirname + "/bin/drivers-win/arduino.inf";
infName = infName.replace('app.asar','');
console.log("INF File " + infName);
//syssetup,SetupInfObjectInstallAction DefaultInstall 128 .\<file>.inf

var execArgs = ['syssetup,SetupInfObjectInstallAction', 'DefaultInstall 128', infName];

const child = execFile("rundll32", execArgs);

});

ipcMain.on('uploadFW', (e, args) => {

if(avrdudeIsRunning == true) { return; }
Expand Down
8 changes: 8 additions & 0 deletions renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ function downloadIni()

}

//Installing the Windows drivers
function installDrivers()
{
ipcRenderer.send("installWinDrivers", {
});

}

function downloadTune()
{

Expand Down

0 comments on commit a5f9909

Please sign in to comment.