From 37243c6f146ee653797686a5552f02ded8d117bc Mon Sep 17 00:00:00 2001 From: "Vladimir.Orlov" Date: Fri, 25 Jul 2014 18:57:48 +0400 Subject: [PATCH] IDEA-127773 Incorrect uninstaller behavior in the setup wizard IDEA-126110 Installation page "Uninstall old versions" usability and ambiguity IDEA-126621 Wording and usability issues in IntelliJ IDEA setup wizard --- build/conf/nsis/DeleteSettings.ini | 4 +- build/conf/nsis/UninstallOldVersions.ini | 120 +++++++++++++---------- build/conf/nsis/idea.nsi | 71 ++------------ build/conf/nsis/idea_en.nsi | 4 +- 4 files changed, 79 insertions(+), 120 deletions(-) diff --git a/build/conf/nsis/DeleteSettings.ini b/build/conf/nsis/DeleteSettings.ini index 63ace3ce0702..c43b9124fd78 100644 --- a/build/conf/nsis/DeleteSettings.ini +++ b/build/conf/nsis/DeleteSettings.ini @@ -3,14 +3,14 @@ NumFields=5 [Field 1] Type=label -Left=0 +Left=5 Right=-1 Top=0 Bottom=10 [Field 2] Type=label -Left=0 +Left=5 Right=-1 Top=15 Bottom=35 diff --git a/build/conf/nsis/UninstallOldVersions.ini b/build/conf/nsis/UninstallOldVersions.ini index 0a8f760498c6..f8444c383a8a 100644 --- a/build/conf/nsis/UninstallOldVersions.ini +++ b/build/conf/nsis/UninstallOldVersions.ini @@ -1,5 +1,5 @@ [Settings] -NumFields=10 +NumFields=13 [Field 1] Type=label @@ -7,94 +7,112 @@ Text=List of JB products Left=5 Right=-1 Top=0 -Bottom=15 +Bottom=10 [Field 2] Type=checkbox -Text=Uninstall old version -Left=12 -Right=200 -Top=25 -Bottom=35 -State=0 -Flags=NOTIFY - -[Field 3] -Type=checkbox -Text=Quick uninstallation -Left=12 -Right=200 +Text=Uninstall silently (settings and configuration from old versions will not be deleted) +Left=5 +Right=-1 Top=123 Bottom=133 State=0 -Flags=DISABLED + +[Field 3] +Type=checkbox +Text=An old installation +Left=12 +Right=-1 +Top=12 +Bottom=22 +State=0 [Field 4] Type=checkbox Text=An old installation -Left=20 -Right=300 -Top=39 -Bottom=49 +Left=12 +Right=-1 +Top=22 +Bottom=32 State=0 -Flags=DISABLED [Field 5] Type=checkbox Text=An old installation -Left=20 -Right=300 -Top=51 -Bottom=61 +Left=12 +Right=-1 +Top=32 +Bottom=42 State=0 -Flags=DISABLED [Field 6] Type=checkbox Text=An old installation -Left=20 -Right=300 -Top=63 -Bottom=73 +Left=12 +Right=-1 +Top=42 +Bottom=52 State=0 -Flags=DISABLED [Field 7] Type=checkbox Text=An old installation -Left=20 -Right=300 -Top=75 -Bottom=85 +Left=12 +Right=-1 +Top=52 +Bottom=62 State=0 -Flags=DISABLED [Field 8] Type=checkbox Text=An old installation -Left=20 -Right=300 -Top=87 -Bottom=97 +Left=12 +Right=-1 +Top=62 +Bottom=72 State=0 -Flags=DISABLED [Field 9] Type=checkbox Text=An old installation -Left=20 -Right=300 -Top=99 -Bottom=109 +Left=12 +Right=-1 +Top=72 +Bottom=82 State=0 -Flags=DISABLED [Field 10] Type=checkbox Text=An old installation -Left=20 -Right=300 -Top=111 -Bottom=121 +Left=12 +Right=-1 +Top=82 +Bottom=92 +State=0 + +[Field 11] +Type=checkbox +Text=An old installation +Left=12 +Right=-1 +Top=92 +Bottom=102 +State=0 + +[Field 12] +Type=checkbox +Text=An old installation +Left=12 +Right=-1 +Top=102 +Bottom=112 +State=0 + +[Field 13] +Type=checkbox +Text=An old installation +Left=12 +Right=-1 +Top=112 +Bottom=122 State=0 -Flags=DISABLED \ No newline at end of file diff --git a/build/conf/nsis/idea.nsi b/build/conf/nsis/idea.nsi index 593b7a8c7d1e..73418e56f1e5 100644 --- a/build/conf/nsis/idea.nsi +++ b/build/conf/nsis/idea.nsi @@ -342,7 +342,7 @@ FunctionEnd !insertmacro MUI_PAGE_WELCOME -Page custom uninstallOldVersionDialog leaveUninstallOldVersionDialog +Page custom uninstallOldVersionDialog Var control_fields Var max_fields @@ -473,10 +473,10 @@ remove_previous_installation: CopyFiles "$3\bin\${PRODUCT_EXE_FILE}_copy" "$3\bin\${PRODUCT_EXE_FILE}" Delete "$3\bin\${PRODUCT_EXE_FILE}_copy" IfErrors 0 +3 - MessageBox MB_YESNOCANCEL|MB_ICONQUESTION|MB_TOPMOST "$(application_running)" IDYES remove_previous_installation IDNO complete + MessageBox MB_OKCANCEL|MB_ICONQUESTION|MB_TOPMOST "$(application_running)" IDOK remove_previous_installation IDCANCEL complete goto complete ; uninstallation mode - !insertmacro INSTALLOPTIONS_READ $9 "UninstallOldVersions.ini" "Field 3" "State" + !insertmacro INSTALLOPTIONS_READ $9 "UninstallOldVersions.ini" "Field 2" "State" ${If} $9 == "1" ExecWait '"$3\bin\Uninstall.exe" /S' ${else} @@ -518,8 +518,8 @@ FunctionEnd Function uninstallOldVersionDialog - StrCpy $control_fields 3 - StrCpy $max_fields 10 + StrCpy $control_fields 2 + StrCpy $max_fields 13 StrCpy $0 "HKLM" StrCpy $4 0 ReserveFile "UninstallOldVersions.ini" @@ -565,7 +565,7 @@ ${If} $8 > $control_fields !insertmacro INSTALLOPTIONS_DISPLAY "UninstallOldVersions.ini" ;uninstall chosen installation(s) - StrCmp $2 "OK" loop finish + ;no disabled controls. StrCmp $2 "OK" loop finish loop: !insertmacro INSTALLOPTIONS_READ $0 "UninstallOldVersions.ini" "Field $8" "State" !insertmacro INSTALLOPTIONS_READ $3 "UninstallOldVersions.ini" "Field $8" "Text" @@ -579,65 +579,6 @@ finish: FunctionEnd -Function leaveUninstallOldVersionDialog - Push $1 - Push $4 - !insertmacro INSTALLOPTIONS_READ $2 "UninstallOldVersions.ini" "Settings" "State" - StrCmp $2 2 enable_disable - Goto done - -enable_disable: - !insertmacro INSTALLOPTIONS_READ $0 "UninstallOldVersions.ini" "Field 2" "State" - StrCmp $0 1 enable disable -enable: - StrCpy $1 "" - Goto setFlag -disable: - Call setState - StrCpy $1 "DISABLED" - -setFlag: - Push $1 - Call setFlags -done: - Pop $4 - Pop $1 - StrCmp $2 0 skip_abort - Pop $2 - Abort -skip_abort: - StrCpy $2 "OK" -FunctionEnd - -Function setFlags - Pop $1 - !insertmacro INSTALLOPTIONS_READ $max_fields "UninstallOldVersions.ini" "Settings" "NumFields" - StrCpy $4 3 - ; change flags of fields in according of master checkbox -loop: - !insertmacro INSTALLOPTIONS_READ $1 "UninstallOldVersions.ini" "Field $4" "HWND" - EnableWindow $1 $0 - !insertmacro INSTALLOPTIONS_WRITE "UninstallOldVersions.ini" "Field $4" "Flags" "$1" - IntOp $4 $4 + 1 - ${If} $4 <= $max_fields - Goto loop - ${EndIf} -FunctionEnd - -Function setState - !insertmacro INSTALLOPTIONS_READ $max_fields "UninstallOldVersions.ini" "Settings" "NumFields" - StrCpy $4 3 - ; change state of fields in according of master checkbox -loop: - !insertmacro INSTALLOPTIONS_READ $1 "UninstallOldVersions.ini" "Field $4" "HWND" - SendMessage $1 ${BM_SETCHECK} 0 "0" - !insertmacro INSTALLOPTIONS_WRITE "UninstallOldVersions.ini" "Field $4" "State" 0 - IntOp $4 $4 + 1 - ${If} $4 <= $max_fields - Goto loop - ${EndIf} -FunctionEnd - Function getInstallationPath Push $1 Push $2 diff --git a/build/conf/nsis/idea_en.nsi b/build/conf/nsis/idea_en.nsi index a076a06d9734..1cb4408d1143 100644 --- a/build/conf/nsis/idea_en.nsi +++ b/build/conf/nsis/idea_en.nsi @@ -17,6 +17,6 @@ LangString confirm_delete_settings ${LANG_ENGLISH} "Delete ${MUI_PRODUCT} ${MUI_ LangString current_version_already_installed ${LANG_ENGLISH} "Current version of ${MUI_PRODUCT} is already installed. Do you wish to continue?" LangString uninstall_previous_installations_title ${LANG_ENGLISH} "Uninstall old versions" LangString uninstall_previous_installations ${LANG_ENGLISH} "" -LangString uninstall_previous_installations_prompt ${LANG_ENGLISH} "Please select the version$2 of ${MUI_PRODUCT} which you would like to uninstall and mode of uninstallation." +LangString uninstall_previous_installations_prompt ${LANG_ENGLISH} "Select the ${MUI_PRODUCT} version$2 that you want to uninstall." LangString empty_or_upgrade_folder ${LANG_ENGLISH} "Please select an empty folder or a folder where ${MUI_PRODUCT} ${UPGRADE_VERSION} is installed as the target for installing ${MUI_PRODUCT}." -LangString application_running ${LANG_ENGLISH} "Installation detects that $3 is running. Can you stop the application and then continue uninstallation please?" +LangString application_running ${LANG_ENGLISH} "$3 is running. Close the application and retry the installation."