Bug 1396912 - Advance the stub installer progress bar at the correct rate during the install phase. r?agashlin draft
authorMatt Howell <mhowell@mozilla.com>
Tue, 05 Sep 2017 15:44:49 -0700
changeset 659312 bee5f07011909a787f47144e2c95e2b3f391bb72
parent 659233 973e8b890a62aee4b3170558ac3b608928162ef6
child 660822 cd2d45292a53f0254b8ab18d85be80c6ab858e39
push id78108
push usermhowell@mozilla.com
push dateTue, 05 Sep 2017 22:45:18 +0000
reviewersagashlin
bugs1396912
milestone57.0a1
Bug 1396912 - Advance the stub installer progress bar at the correct rate during the install phase. r?agashlin MozReview-Commit-ID: Gs3ls8iEGqr
browser/installer/windows/nsis/stub.nsi
--- a/browser/installer/windows/nsis/stub.nsi
+++ b/browser/installer/windows/nsis/stub.nsi
@@ -1432,17 +1432,20 @@ Function CheckInstall
     System::Call 'kernel32::CloseHandle(i $HandleDownload)'
     StrCpy $ExitCode "${ERR_INSTALL_TIMEOUT}"
     ; Use a timer so the UI has a chance to update
     ${NSD_CreateTimer} DisplayDownloadError ${InstallIntervalMS}
     Return
   ${EndIf}
 
   ${If} $ProgressCompleted < ${PROGRESS_BAR_INSTALL_END_STEP}
-    IntOp $ProgressCompleted $ProgressCompleted + 1
+    IntOp $0 ${PROGRESS_BAR_INSTALL_END_STEP} - ${PROGRESS_BAR_DOWNLOAD_END_STEP}
+    IntOp $0 $InstallCounterStep * $0
+    IntOp $0 $0 / $InstallTotalSteps
+    IntOp $ProgressCompleted ${PROGRESS_BAR_DOWNLOAD_END_STEP} + $0
     Call SetProgressBars
   ${EndIf}
 
   ${If} ${FileExists} "$INSTDIR\install.log"
     Delete "$INSTDIR\install.tmp"
     CopyFiles /SILENT "$INSTDIR\install.log" "$INSTDIR\install.tmp"
 
     ; The unfocus and refocus that happens approximately here is caused by the