Bug 1249972 - Adds a AddTaskbarSC variable. Fixes installer bustage after bug 1229626 rs=Ratty
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Tue, 01 Mar 2016 21:51:12 +0800
changeset 19035 7550f71d73835e7679e7f659c7efdc1df8af9151
parent 19034 8832ce9df1b3dc78ab5016d6f146a3befefef6d9
child 19036 0ebd16588813ce6e4b1ff507409d03451163f1e3
push id11686
push userphilip.chee@gmail.com
push dateTue, 01 Mar 2016 13:51:43 +0000
treeherdercomm-central@7550f71d7383 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersRatty
bugs1249972, 1229626
Bug 1249972 - Adds a AddTaskbarSC variable. Fixes installer bustage after bug 1229626 rs=Ratty Incudes some whitespace cleanups
suite/installer/windows/nsis/installer.nsi
--- a/suite/installer/windows/nsis/installer.nsi
+++ b/suite/installer/windows/nsis/installer.nsi
@@ -28,16 +28,17 @@ RequestExecutionLevel user
 !endif
 
 !addplugindir ./
 
 Var TmpVal
 Var StartMenuDir
 Var InstallType
 Var AddStartMenuSC
+Var AddTaskbarSC
 Var AddQuickLaunchSC
 Var AddDesktopSC
 Var InstallMaintenanceService
 
 ; Other included files may depend upon these includes!
 ; The following includes are provided by NSIS.
 !include FileFunc.nsh
 !include LogicLib.nsh
@@ -252,17 +253,17 @@ Section "-InstallStartCleanup"
   ${CleanUpdateDirectories} "Mozilla\SeaMonkey" "Mozilla\updates"
 
   ${InstallStartCleanupCommon}
 SectionEnd
 
 Section "-Application" APP_IDX
   ${StartUninstallLog}
 
-  SetDetailsPrint both 
+  SetDetailsPrint both
   DetailPrint $(STATUS_INSTALL_APP)
   SetDetailsPrint none
 
   ${LogHeader} "Installing Main Files"
   ${CopyFilesFromDir} "$EXEDIR\core" "$INSTDIR" \
                       "$(ERROR_CREATE_DIRECTORY_PREFIX)" \
                       "$(ERROR_CREATE_DIRECTORY_SUFFIX)"
 
@@ -326,16 +327,22 @@ Section "-Application" APP_IDX
   ClearErrors
 
   ; Default for creating Start Menu folder and shortcuts
   ; (1 = create, 0 = don't create)
   ${If} $AddStartMenuSC == ""
     StrCpy $AddStartMenuSC "1"
   ${EndIf}
 
+; Default for creating Task Bar shortcuts
+  ; (1 = create, 0 = don't create)
+  ${If} $AddTaskbarSC == ""
+    StrCpy $AddTaskbarSC "1"
+  ${EndIf}
+
   ; Default for creating Quick Launch shortcut (1 = create, 0 = don't create)
   ${If} $AddQuickLaunchSC == ""
     StrCpy $AddQuickLaunchSC "1"
   ${EndIf}
 
   ; Default for creating Desktop shortcut (1 = create, 0 = don't create)
   ${If} $AddDesktopSC == ""
     StrCpy $AddDesktopSC "1"
@@ -368,17 +375,17 @@ Section "-Application" APP_IDX
   ; MUST add children first so they will be removed first on uninstall so they
   ; will be empty when the key is deleted. This allows the uninstaller to
   ; specify that only empty keys will be deleted.
   ${SetAppKeys}
 
   ${FixClassKeys}
 
   StrCpy $1 "$\"$8$\" -requestPending -osint -url $\"%1$\""
-  StrCpy $2 "$\"%1$\",,0,0,,,," 
+  StrCpy $2 "$\"%1$\",,0,0,,,,"
   StrCpy $3 "$\"$8$\"  -url $\"%1$\""
   ${GetLongPath} "$INSTDIR\${FileMainEXE}" $8
 
   ; An empty string is used for the 5th param because SeaMonkeyHTML is not a
   ; protocol handler
   ${AddHandlerValues} "SOFTWARE\Classes\SeaMonkeyHTML" "$3" \
                       "$INSTDIR\chrome\icons\default\html-file.ico,0" \
                       "${AppRegName} Document" "" ""
@@ -393,19 +400,21 @@ Section "-Application" APP_IDX
     ${SetUninstallKeys}
 
     ; Set the Start Menu Internet and Vista Registered App HKLM registry keys.
     ${SetStartMenuInternet}
     ${SetClientsMail}
 
     ; If we are writing to HKLM and create the quick launch and the desktop
     ; shortcuts set IconsVisible to 1 otherwise to 0.
+    ; Taskbar shortcuts imply having a start menu shortcut.
     ${StrFilter} "${FileMainEXE}" "+" "" "" $R9
     ${If} $AddQuickLaunchSC == 1
     ${OrIf} $AddDesktopSC == 1
+    ${OrIf} $AddTaskbarSC == 1
       StrCpy $0 "Software\Clients\StartMenuInternet\$R9\InstallInfo"
       WriteRegDWORD HKLM "$0" "IconsVisible" 1
       StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\InstallInfo"
       WriteRegDWORD HKLM "$0" "IconsVisible" 1
     ${Else}
       StrCpy $0 "Software\Clients\StartMenuInternet\$R9\InstallInfo"
       WriteRegDWORD HKLM "$0" "IconsVisible" 0
       StrCpy $0 "Software\Clients\Mail\${BrandFullNameInternal}\InstallInfo"
@@ -480,19 +489,19 @@ Section "-Application" APP_IDX
       ApplicationID::Set "$DESKTOP\${BrandFullName}.lnk" "$AppUserModelID"
     ${EndIf}
     ${LogMsg} "Added Shortcut: $DESKTOP\${BrandFullName}.lnk"
   ${EndIf}
 
   !insertmacro MUI_STARTMENU_WRITE_END
 SectionEnd
 
-Section /o "IRC Client" CZ_IDX 
+Section /o "IRC Client" CZ_IDX
   ${If} ${FileExists} "$EXEDIR\optional\distribution\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
-    SetDetailsPrint both 
+    SetDetailsPrint both
     DetailPrint $(STATUS_INSTALL_OPTIONAL)
     SetDetailsPrint none
 
     ${RemoveDir} "$INSTDIR\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}"
     ${RemoveDir} "$INSTDIR\extensions\langpack-${AB_CD}@chatzilla.mozilla.org"
     ${DeleteFile} "$INSTDIR\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
     ${DeleteFile} "$INSTDIR\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi"
     ${DeleteFile} "$INSTDIR\distribution\extensions\{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi"
@@ -503,35 +512,35 @@ Section /o "IRC Client" CZ_IDX
                       "$INSTDIR\distribution\extensions\"
     ${If} ${FileExists} "$EXEDIR\optional\distribution\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi"
       CopyFiles /SILENT "$EXEDIR\optional\distribution\extensions\langpack-${AB_CD}@chatzilla.mozilla.org.xpi" \
                         "$INSTDIR\distribution\extensions\"
     ${EndIf}
   ${EndIf}
 SectionEnd
 
-Section /o "Developer Tools" DOMI_IDX 
+Section /o "Developer Tools" DOMI_IDX
   ${If} ${FileExists} "$EXEDIR\optional\distribution\extensions\inspector@mozilla.org.xpi"
-    SetDetailsPrint both 
+    SetDetailsPrint both
     DetailPrint $(STATUS_INSTALL_OPTIONAL)
     SetDetailsPrint none
 
     ${RemoveDir} "$INSTDIR\extensions\inspector@mozilla.org"
     ${DeleteFile} "$INSTDIR\extensions\inspector@mozilla.org.xpi"
     ${DeleteFile} "$INSTDIR\distribution\extensions\inspector@mozilla.org.xpi"
     ClearErrors
     ${LogHeader} "Installing Developer Tools"
     CopyFiles /SILENT "$EXEDIR\optional\distribution\extensions\inspector@mozilla.org.xpi" \
                       "$INSTDIR\distribution\extensions\"
-  ${EndIf} 
+  ${EndIf}
 SectionEnd
 
-Section /o "Debug and QA Tools" DEBUG_IDX 
+Section /o "Debug and QA Tools" DEBUG_IDX
   ${If} ${FileExists} "$EXEDIR\optional\distribution\extensions\debugQA@mozilla.org.xpi"
-    SetDetailsPrint both 
+    SetDetailsPrint both
     DetailPrint $(STATUS_INSTALL_OPTIONAL)
     SetDetailsPrint none
 
     ${RemoveDir} "$INSTDIR\extensions\debugQA@mozilla.org"
     ${DeleteFile} "$INSTDIR\extensions\debugQA@mozilla.org.xpi"
     ${DeleteFile} "$INSTDIR\distribution\extensions\debugQA@mozilla.org.xpi"
     ClearErrors
     ${LogHeader} "Installing Debug and QA Tools"
@@ -573,18 +582,18 @@ Section "-InstallEndCleanup"
       FileOpen $0 "$INSTDIR\${FileMainEXE}" w
       FileWrite $0 "Will be deleted on restart"
       Rename /REBOOTOK "$INSTDIR\${FileMainEXE}.moz-upgrade" "$INSTDIR\${FileMainEXE}"
       FileClose $0
       Delete "$INSTDIR\${FileMainEXE}"
       Rename "$INSTDIR\helper.exe" "$INSTDIR\${FileMainEXE}"
     ${EndUnless}
   ${EndIf}
-SectionEnd    
-    
+SectionEnd
+
 Function CheckExistingInstall
   ; If there is a pending file copy from a previous uninstall don't allow
   ; installing until after the system has rebooted.
   IfFileExists "$INSTDIR\${FileMainEXE}.moz-upgrade" +1 +4
   MessageBox MB_YESNO "$(WARN_RESTART_REQUIRED_UPGRADE)" IDNO +2
   Reboot
   Quit
 
@@ -674,17 +683,17 @@ FunctionEnd
 
 Function leaveOptions
   ${MUI_INSTALLOPTIONS_READ} $0 "options.ini" "Settings" "State"
   ${If} $0 != 0
     Abort
   ${EndIf}
   ${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 2" "State"
   StrCmp $R0 "1" +1 +2
-  StrCpy $InstallType ${INSTALLTYPE_BASIC} 
+  StrCpy $InstallType ${INSTALLTYPE_BASIC}
   ${MUI_INSTALLOPTIONS_READ} $R0 "options.ini" "Field 3" "State"
   StrCmp $R0 "1" +1 +2
   StrCpy $InstallType ${INSTALLTYPE_CUSTOM}
 
   ${LeaveOptionsCommon}
 
   ${If} $InstallType == ${INSTALLTYPE_BASIC}
     Call CheckExistingInstall