First cut at having Windows driver install button
This commit is contained in:
parent
6f793b9301
commit
a5f9909ad9
|
@ -76,8 +76,9 @@
|
|||
<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>
|
||||
|
|
12
main.js
12
main.js
|
@ -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; }
|
||||
|
|
|
@ -166,6 +166,14 @@ function downloadIni()
|
|||
|
||||
}
|
||||
|
||||
//Installing the Windows drivers
|
||||
function installDrivers()
|
||||
{
|
||||
ipcRenderer.send("installWinDrivers", {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function downloadTune()
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue