Bug 1396912 - Advance the stub installer progress bar at the correct rate during the install phase. r=agashlin
authorMatt Howell <mhowell@mozilla.com>
Tue, 05 Sep 2017 15:44:49 -0700
changeset 379080 fdb66df9fbc217386725e7adf66440f0c1f54ad5
parent 379079 1e6a299da7376df96d15aaa72c8789967eb1fc12
child 379081 3730187f0b9bc9b5b32f149455989452181025db
push id32448
push userarchaeopteryx@coole-files.de
push dateWed, 06 Sep 2017 09:24:33 +0000
treeherdermozilla-central@c6e59f1b2e27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersagashlin
bugs1396912
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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