Skip to content

Commit

Permalink
Update dialog messages to stop/uninstall Spyder. Remove uninstall exe…
Browse files Browse the repository at this point in the history
…cution exit code validation
  • Loading branch information
dalthviz committed Jul 8, 2022
1 parent 0baccd3 commit 0593a90
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions nsist/spyder.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@ Function validate_pre_install

FindWindow $0 "" "${PRODUCT_NAME}"
IntCmp $0 0 notRunning
MessageBox MB_YESNO|MB_ICONINFORMATION "${PRODUCT_NAME} is running. You will need to close it first to proceed. Do you want to close ${PRODUCT_NAME} now?" \
MessageBox MB_YESNO|MB_ICONINFORMATION "${PRODUCT_NAME} is running. It is necessary to close it before installing a new version. Do you want to close ${PRODUCT_NAME} now?" \
/SD IDYES IDYES Confirm IDNO NoClose
Confirm:
MessageBox MB_YESNO|MB_ICONINFORMATION "All unsaved files and changes will be lost. All ${PRODUCT_NAME} running processes will stop. Are you sure you are want to close ${PRODUCT_NAME}?" \
MessageBox MB_YESNO|MB_ICONINFORMATION "All unsaved files and changes will be lost. In addition, any program that you are running in ${PRODUCT_NAME}'s IPython console will be stopped. Are you sure you want to close ${PRODUCT_NAME}?" \
/SD IDYES IDYES CloseSpyder IDNO NoClose
CloseSpyder:
Banner::show /set 76 "Please wait while closing Spyder..." " "
Banner::show /set 76 "Please wait while closing ${PRODUCT_NAME}..." " "
nsExec::Exec 'TaskKill /FI "WINDOWTITLE eq Spyder" /F /T'
Banner::destroy
GoTo notRunning
Expand All @@ -299,15 +299,12 @@ Function validate_pre_install
MessageBox MB_YESNO|MB_ICONINFORMATION "${PRODUCT_NAME} is already installed. Uninstall the existing version?" \
/SD IDYES IDYES UninstallPreviousInstallation IDNO NoUninstall
UninstallPreviousInstallation:
Banner::show /set 76 "Please wait while uninstalling..." " "
Banner::show /set 76 "Please wait while uninstalling ${PRODUCT_NAME}..." " "
CreateDirectory $TEMP\spyder-uninstaller
CopyFiles /SILENT "$uninstallPreviousInstallation" $TEMP\spyder-uninstaller\uninstall.exe
ExecWait '"$TEMP\spyder-uninstaller\uninstall.exe" /S _?=$INSTDIR' $0
ExecWait '"$TEMP\spyder-uninstaller\uninstall.exe" /S _?=$INSTDIR'
RMDir /r $TEMP\spyder-uninstaller
Banner::destroy
${If} $0 <> 0
MessageBox MB_YESNO|MB_ICONSTOP "Failed to uninstall, continue anyway?" /SD IDYES IDYES NotInstalled IDNO NoUninstall
${EndIf}
GoTo NotInstalled
NoUninstall:
Quit
Expand Down

0 comments on commit 0593a90

Please sign in to comment.