diff --git a/build/conf/nsis/customInstallActions.nsi b/build/conf/nsis/customInstallActions.nsi index b039ae044d84..d8a8a94694ab 100644 --- a/build/conf/nsis/customInstallActions.nsi +++ b/build/conf/nsis/customInstallActions.nsi @@ -21,13 +21,25 @@ FunctionEnd Function ConfirmDesktopShortcut !insertmacro MUI_HEADER_TEXT "$(installation_options)" "$(installation_options_prompt)" - !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 2" "Text" "32-bit launcher" - ${StrRep} $R0 ${PRODUCT_EXE_FILE_64} "64.exe" ".exe" - ${If} $R0 == ${PRODUCT_EXE_FILE} - call searchJava64 - ${If} $3 != "" - !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 3" "Type" "checkbox" - !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 3" "Text" "64-bit launcher" + ${StrRep} $0 ${PRODUCT_EXE_FILE} "64.exe" ".exe" + ${If} $0 == ${PRODUCT_EXE_FILE} + StrCpy $R0 "32-bit launcher" + StrCpy $R1 "64-bit launcher" + ${Else} + ;there is only one launcher and it is 64-bit. + StrCpy $R0 "64-bit launcher" + StrCpy $R1 "" + ${EndIf} + !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 2" "Text" $R0 + + ${If} $R1 != "" + ${StrRep} $R0 ${PRODUCT_EXE_FILE_64} "64.exe" ".exe" + ${If} $R0 == ${PRODUCT_EXE_FILE} + call searchJava64 + ${If} $3 != "" + !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 3" "Type" "checkbox" + !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 3" "Text" $R1 + ${EndIf} ${EndIf} ${EndIf} StrCmp "${ASSOCIATION}" "NoAssociation" skip_association