Refine Windows installer update process to handle in-app updates more effectively
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
- Adjusted the success signal emission in the `restartFarmControlAfterUpdate` function to ensure the application quits and restarts correctly during in-app updates. - Added a conditional check to control the progress success indication based on the update state, improving the user experience during installations.
This commit is contained in:
parent
de2c93d82f
commit
6bf8648e1f
@ -115,7 +115,12 @@ Section "Farm Control" SecMain
|
||||
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
; For in-app updates (/RESTARTFC) the success signal is emitted from
|
||||
; restartFarmControlAfterUpdate, right before the install directory swap,
|
||||
; so the running app quits while this installer stays alive.
|
||||
${If} $RestartAfterInstall != "1"
|
||||
!insertmacro progressSuccess
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
@ -304,8 +304,14 @@ Function restartFarmControlAfterUpdate
|
||||
Return
|
||||
${EndIf}
|
||||
|
||||
; All files are copied and we are about to rename the install directory.
|
||||
; Emit the success line (matched by isWindowsInstallSuccessful in
|
||||
; winappupdate.js) so the app knows to quit and restart; this installer
|
||||
; stays alive to swap the folders and relaunch Farm Control.
|
||||
!insertmacro progressSuccess
|
||||
|
||||
!insertmacro progressStatus "Waiting for Farm Control to close..."
|
||||
Sleep 1000
|
||||
Sleep 1500
|
||||
|
||||
restart_wait_loop:
|
||||
ExecWait 'cmd.exe /c tasklist /FI "IMAGENAME eq FarmControl.exe" 2>nul | find /I "FarmControl.exe"' $R0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user