Bug 1396912 - Advance the stub installer progress bar at the correct rate during the install phase. r?agashlin
MozReview-Commit-ID: Gs3ls8iEGqr
--- 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