From a5f9909ad999e41b34647e07222f370a63883474 Mon Sep 17 00:00:00 2001
From: Josh Stewart
Date: Tue, 9 Jul 2019 16:15:31 +1000
Subject: [PATCH] First cut at having Windows driver install button
---
index.html | 3 ++-
main.js | 12 ++++++++++++
renderer.js | 8 ++++++++
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 2f09721..eee66d5 100644
--- a/index.html
+++ b/index.html
@@ -76,8 +76,9 @@ Select Serial Port
Available Ports:
diff --git a/main.js b/main.js
index 8c549ed..f809276 100644
--- a/main.js
+++ b/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 .\.inf
+
+ var execArgs = ['syssetup,SetupInfObjectInstallAction', 'DefaultInstall 128', infName];
+
+ const child = execFile("rundll32", execArgs);
+
+});
+
ipcMain.on('uploadFW', (e, args) => {
if(avrdudeIsRunning == true) { return; }
diff --git a/renderer.js b/renderer.js
index b90d301..9ee8aca 100644
--- a/renderer.js
+++ b/renderer.js
@@ -166,6 +166,14 @@ function downloadIni()
}
+//Installing the Windows drivers
+function installDrivers()
+{
+ ipcRenderer.send("installWinDrivers", {
+ });
+
+}
+
function downloadTune()
{