micropeak: Install Windows AltusMetrum driver bits
authorKeith Packard <keithp@keithp.com>
Fri, 6 Feb 2015 11:33:28 +0000 (03:33 -0800)
committerKeith Packard <keithp@keithp.com>
Fri, 6 Feb 2015 11:33:28 +0000 (03:33 -0800)
Make AltOS-based ĀµPUSB devices work with MicroPeak

Signed-off-by: Keith Packard <keithp@keithp.com>
micropeak/micropeak-windows.nsi.in

index baa153e94aae45f5330db1e01f2a14336acc7314..a3779630630b40ded1c6b3b8756b6e491f957f23 100644 (file)
@@ -71,6 +71,29 @@ Section "FTDI USB Driver"
        ExecWait $2
 SectionEnd
 
+Section "Install Driver" InstDriver
+
+       InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial
+       Pop $0
+       DetailPrint "InitDriverSetup: $0"
+       InstDrv::DeleteOemInfFiles /NOUNLOAD
+       InstDrv::CreateDevice /NOUNLOAD
+
+       SetOutPath $INSTDIR
+       File "../altusmetrum.inf"
+       File "../altusmetrum.cat"
+
+       ${DisableX64FSRedirection}
+       IfFileExists $WINDIR\System32\PnPutil.exe 0 nopnp
+               ${DisableX64FSRedirection}
+               nsExec::ExecToLog '"$WINDIR\System32\PnPutil.exe" -i -a "$INSTDIR\altusmetrum.inf"'
+               Goto done
+nopnp:
+               InstDrv::InstallDriver /NOUNLOAD "$INSTDIR\altusmetrum.inf"
+done:
+
+SectionEnd
+
 Section "${REG_NAME} Application"
        Call DetectJRE