From c1b8ac5b5cb29bb1573d4feaf04a57fa929221f3 Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Wed, 10 Jul 2019 11:07:18 +0100 Subject: [PATCH 1/7] also install USB drivers silently when doing silent install --- resources/installer.nsh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/resources/installer.nsh b/resources/installer.nsh index fc9ef163cf..e8f53215d3 100644 --- a/resources/installer.nsh +++ b/resources/installer.nsh @@ -32,6 +32,9 @@ RequestExecutionLevel admin !macro customInstall Var /GLOBAL DriverDir + Var /GLOBAL Installer_x64 + Var /GLOBAL Installer_x86 + StrCpy $DriverDir "$INSTDIR\resources\driver" ; Add our certificate to the local store to prevent unnecessary pop-up @@ -44,21 +47,29 @@ RequestExecutionLevel admin CopyFiles $DriverDir\win10\* $DriverDir ${EndIf} + ${If} ${IsSilent} + StrCpy $Installer_x64 "$DriverDir\TidepoolUSBDriver_x64.exe /q" + StrCpy $Installer_x86 "$DriverDir\TidepoolUSBDriver_x86.exe /q" + ${Else} + StrCpy $Installer_x64 "$DriverDir\TidepoolUSBDriver_x64.exe" + StrCpy $Installer_x86 "$DriverDir\TidepoolUSBDriver_x86.exe" + ${EndIf} + ${If} ${RunningX64} ${If} ${IsWin7} ; 64-bit Windows 7 CopyFiles $DriverDir\win7x64\* $DriverDir\amd64 - ExecWait "$DriverDir\TidepoolUSBDriver_x64.exe" + ExecWait $Installer_x64 ${Else} - ExecWait "$DriverDir\TidepoolUSBDriver_x64.exe" + ExecWait $Installer_x64 ${EndIf} ${Else} ${If} ${IsWin7} ; 32-bit Windows 7 CopyFiles $DriverDir\win7x86\* $DriverDir\i386 - ExecWait "$DriverDir\TidepoolUSBDriver_x86.exe" + ExecWait $Installer_x86 ${Else} - ExecWait "$DriverDir\TidepoolUSBDriver_x86.exe" + ExecWait $Installer_x86 ${EndIf} ${EndIf} From 22e9cadbc522f8c14f96b0b056fa3ab18c33118a Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Wed, 10 Jul 2019 11:07:43 +0100 Subject: [PATCH 2/7] v2.17.2 --- app/package.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/package.json b/app/package.json index f4a67b43ed..3d45c170e8 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "tidepool-uploader", "productName": "tidepool-uploader", - "version": "2.17.1", + "version": "2.17.2", "description": "Tidepool Project Universal Uploader", "main": "./main.js", "author": { diff --git a/package.json b/package.json index c15d978cfc..6507aa76e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tidepool-uploader", - "version": "2.17.1", + "version": "2.17.2", "description": "Tidepool Project Universal Uploader", "private": true, "main": "main.js", From 0725a62eac0d56ffb6b56a755019959007c9afa6 Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Wed, 10 Jul 2019 11:28:58 +0100 Subject: [PATCH 3/7] use different syntax for IfSilent --- resources/installer.nsh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/installer.nsh b/resources/installer.nsh index e8f53215d3..ae3082820a 100644 --- a/resources/installer.nsh +++ b/resources/installer.nsh @@ -47,13 +47,13 @@ RequestExecutionLevel admin CopyFiles $DriverDir\win10\* $DriverDir ${EndIf} - ${If} ${IsSilent} - StrCpy $Installer_x64 "$DriverDir\TidepoolUSBDriver_x64.exe /q" - StrCpy $Installer_x86 "$DriverDir\TidepoolUSBDriver_x86.exe /q" - ${Else} - StrCpy $Installer_x64 "$DriverDir\TidepoolUSBDriver_x64.exe" - StrCpy $Installer_x86 "$DriverDir\TidepoolUSBDriver_x86.exe" - ${EndIf} + + StrCpy $Installer_x64 "$DriverDir\TidepoolUSBDriver_x64.exe /q" + StrCpy $Installer_x86 "$DriverDir\TidepoolUSBDriver_x86.exe /q" + + IfSilent +3 ; don't use quiet flag if not silent install + StrCpy $Installer_x64 "$DriverDir\TidepoolUSBDriver_x64.exe" + StrCpy $Installer_x86 "$DriverDir\TidepoolUSBDriver_x86.exe" ${If} ${RunningX64} ${If} ${IsWin7} From 1022585266bf190cc52f3fcaaeaf564b9604c6eb Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Wed, 10 Jul 2019 14:43:37 +0100 Subject: [PATCH 4/7] make CopyFiles silent --- resources/installer.nsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/installer.nsh b/resources/installer.nsh index ae3082820a..48b48dced2 100644 --- a/resources/installer.nsh +++ b/resources/installer.nsh @@ -44,7 +44,7 @@ RequestExecutionLevel admin ${If} ${IsWin10} ; Windows 10 uses drivers with attestation signing - CopyFiles $DriverDir\win10\* $DriverDir + CopyFiles /SILENT $DriverDir\win10\* $DriverDir ${EndIf} From 82dd5bd45d0b7e948de8f476ab2d3f27391052d8 Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Wed, 10 Jul 2019 15:09:47 +0100 Subject: [PATCH 5/7] show when error occurs during install --- resources/installer.nsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/installer.nsh b/resources/installer.nsh index 48b48dced2..5adc9354a6 100644 --- a/resources/installer.nsh +++ b/resources/installer.nsh @@ -73,6 +73,8 @@ RequestExecutionLevel admin ${EndIf} ${EndIf} + IfErrors 0 +2 + MessageBox MB_OK "Error occurred during installation." IDOK +2 WriteINIStr "$TEMP\TidepoolUploader.ini" "InstallCount" "Value" "$8" !macroend From fed38e30f5872643c4b36a471949ff16cc216223 Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Wed, 10 Jul 2019 15:58:51 +0100 Subject: [PATCH 6/7] clear errors at beginning --- resources/installer.nsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/installer.nsh b/resources/installer.nsh index 5adc9354a6..9fae88311e 100644 --- a/resources/installer.nsh +++ b/resources/installer.nsh @@ -35,6 +35,8 @@ RequestExecutionLevel admin Var /GLOBAL Installer_x64 Var /GLOBAL Installer_x86 + ClearErrors + StrCpy $DriverDir "$INSTDIR\resources\driver" ; Add our certificate to the local store to prevent unnecessary pop-up @@ -75,6 +77,7 @@ RequestExecutionLevel admin IfErrors 0 +2 MessageBox MB_OK "Error occurred during installation." IDOK +2 + WriteINIStr "$TEMP\TidepoolUploader.ini" "InstallCount" "Value" "$8" !macroend From d82341eb0d3d8ebb8cf5f083c55840dff1e3864d Mon Sep 17 00:00:00 2001 From: Gerrit Niezen Date: Wed, 10 Jul 2019 16:28:33 +0100 Subject: [PATCH 7/7] removing error message box as it always triggers, and does not give error code --- resources/installer.nsh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/resources/installer.nsh b/resources/installer.nsh index 9fae88311e..48b48dced2 100644 --- a/resources/installer.nsh +++ b/resources/installer.nsh @@ -35,8 +35,6 @@ RequestExecutionLevel admin Var /GLOBAL Installer_x64 Var /GLOBAL Installer_x86 - ClearErrors - StrCpy $DriverDir "$INSTDIR\resources\driver" ; Add our certificate to the local store to prevent unnecessary pop-up @@ -75,9 +73,6 @@ RequestExecutionLevel admin ${EndIf} ${EndIf} - IfErrors 0 +2 - MessageBox MB_OK "Error occurred during installation." IDOK +2 - WriteINIStr "$TEMP\TidepoolUploader.ini" "InstallCount" "Value" "$8" !macroend