Bug 345386 - remove optional component bits from installer, since there aren't any optional components, r=rob_strong
authorPhil Ringnalda <philringnalda@gmail.com>
Mon, 20 Oct 2008 15:39:18 -0700
changeset 653 35e3e61336a8b62315614f1471a963890da0c8c9
parent 652 131887be33a59ecf7a3dcb2d21daf62db0e52c64
child 654 3795036c606778c6e9c3ad0a892d23202907e56c
push idunknown
push userunknown
push dateunknown
reviewersrob_strong
bugs345386
Bug 345386 - remove optional component bits from installer, since there aren't any optional components, r=rob_strong
mail/installer/windows/nsis/installer.nsi
mail/locales/en-US/installer/custom.properties
--- a/mail/installer/windows/nsis/installer.nsi
+++ b/mail/installer/windows/nsis/installer.nsi
@@ -50,17 +50,16 @@ SetCompress off
 CRCCheck on
 
 RequestExecutionLevel user
 
 !addplugindir ./
 
 ; empty files - except for the comment line - for generating custom pages.
 !system 'echo ; > options.ini'
-!system 'echo ; > components.ini'
 !system 'echo ; > shortcuts.ini'
 !system 'echo ; > summary.ini'
 
 ; USE_UAC_PLUGIN is temporary until other apps have been updated to use the UAC plugin
 !define USE_UAC_PLUGIN
 
 Var TmpVal
 Var StartMenuDir
@@ -132,17 +131,16 @@ VIAddVersionKey "OriginalFilename" "setu
 
 Name "${BrandFullName}"
 OutFile "setup.exe"
 InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} (${AppVersion})" "InstallLocation"
 InstallDir "$PROGRAMFILES\${BrandFullName}\"
 ShowInstDetails nevershow
 
 ReserveFile options.ini
-ReserveFile components.ini
 ReserveFile shortcuts.ini
 ReserveFile summary.ini
 
 ################################################################################
 # Modern User Interface - MUI
 
 !define MUI_ABORTWARNING
 !define MUI_ICON setup.ico
@@ -169,19 +167,16 @@ ReserveFile summary.ini
 ; License Page
 !define MUI_PAGE_CUSTOMFUNCTION_SHOW showLicense
 !define MUI_LICENSEPAGE_CHECKBOX
 !insertmacro MUI_PAGE_LICENSE license.rtf
 
 ; Custom Options Page
 Page custom preOptions leaveOptions
 
-; Custom Components Page
-Page custom preComponents leaveComponents
-
 ; Select Install Directory Page
 !define MUI_PAGE_CUSTOMFUNCTION_PRE preDirectory
 !define MUI_PAGE_CUSTOMFUNCTION_LEAVE leaveDirectory
 !define MUI_DIRECTORYPAGE_VERIFYONLEAVE
 !insertmacro MUI_PAGE_DIRECTORY
 
 ; Custom Shortcuts Page
 Page custom preShortcuts leaveShortcuts
@@ -231,27 +226,16 @@ Section "-InstallStartCleanup"
     ; If the user closed the application it can take several seconds for it to
     ; shut down completely. If the application is being used by another user we
     ; can rename the file and then delete is when the system is restarted.
     Sleep 5000
     ${DeleteFile} "$INSTDIR\${FileMainEXE}"
     ClearErrors
   ${EndIf}
 
-  ${If} $InstallType == ${INSTALLTYPE_CUSTOM}
-    ; Custom installs.
-    ; If DOMi is installed and this install includes DOMi remove it from
-    ; the installation directory. This will remove it if the user deselected
-    ; DOMi on the components page.
-    ${If} ${FileExists} "$INSTDIR\extensions\inspector@mozilla.org"
-    ${AndIf} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
-      RmDir /r "$INSTDIR\extensions\inspector@mozilla.org"
-    ${EndIf}
-  ${EndIf}
-
   ; Remove the updates directory for Vista and above
   ${CleanUpdatesDir} "Thunderbird"
 
   ${InstallStartCleanupCommon}
 SectionEnd
 
 Section "-Application" APP_IDX
   ${StartUninstallLog}
@@ -442,32 +426,16 @@ Section "-Application" APP_IDX
     CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0
     ${LogUninstall} "File: $DESKTOP\${BrandFullName}.lnk"
     ${LogMsg} "Added Shortcut: $DESKTOP\${BrandFullName}.lnk"
   ${EndIf}
 
   !insertmacro MUI_STARTMENU_WRITE_END
 SectionEnd
 
-Section /o "Developer Tools" DOMI_IDX
-  ${If} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
-    SetDetailsPrint both
-    DetailPrint $(STATUS_INSTALL_OPTIONAL)
-    SetDetailsPrint none
-
-    ${RemoveDir} "$INSTDIR\extensions\inspector@mozilla.org"
-    ClearErrors
-    ${LogHeader} "Installing Developer Tools"
-    ${CopyFilesFromDir} "$EXEDIR\optional\extensions\inspector@mozilla.org" \
-                        "$INSTDIR\extensions\inspector@mozilla.org" \
-                        "$(ERROR_CREATE_DIRECTORY_PREFIX)" \
-                        "$(ERROR_CREATE_DIRECTORY_SUFFIX)"
-  ${EndIf}
-SectionEnd
-
 ; Cleanup operations to perform at the end of the installation.
 Section "-InstallEndCleanup"
   SetDetailsPrint both
   DetailPrint "$(STATUS_CLEANUP)"
   SetDetailsPrint none
 
   ${LogHeader} "Updating Uninstall Log With Previous Uninstall Log"
 
@@ -638,33 +606,16 @@ Function leaveOptions
     StrCmp "$R9" "false" +2 +1
     StrCpy $INSTDIR "$R9"
 !endif
 
     Call CheckExistingInstall
   ${EndIf}
 FunctionEnd
 
-Function preComponents
-  ${CheckCustomCommon}
-  ; If DOMi isn't available skip the components page
-  ${Unless} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
-    Abort
-  ${EndUnless}
-  !insertmacro MUI_HEADER_TEXT "$(OPTIONAL_COMPONENTS_TITLE)" "$(OPTIONAL_COMPONENTS_SUBTITLE)"
-  !insertmacro MUI_INSTALLOPTIONS_DISPLAY "components.ini"
-FunctionEnd
-
-Function leaveComponents
-  ${MUI_INSTALLOPTIONS_READ} $R0 "components.ini" "Field 2" "State"
-  ; State will be 1 for checked and 0 for unchecked so we can use that to set
-  ; the section flags for installation.
-  SectionSetFlags ${DOMI_IDX} $R0
-FunctionEnd
-
 Function preDirectory
   ${PreDirectoryCommon}
 FunctionEnd
 
 Function leaveDirectory
   ${LeaveDirectoryCommon} "$(WARN_DISK_SPACE)" "$(WARN_WRITE_ACCESS)"
 FunctionEnd
 
@@ -741,21 +692,16 @@ Function preSummary
   GetDlgItem $0 $HWNDPARENT 1
   System::Call "user32::SetFocus(i r0, i 0x0007, i,i)i"
   ${MUI_INSTALLOPTIONS_READ} $1 "summary.ini" "Field 2" "HWND"
   SendMessage $1 ${WM_SETTEXT} 0 "STR:$INSTDIR"
   !insertmacro MUI_INSTALLOPTIONS_SHOW
 FunctionEnd
 
 Function leaveSummary
-  ${If} $InstallType != ${INSTALLTYPE_CUSTOM}
-    ; Set DOMi to be installed
-    SectionSetFlags ${DOMI_IDX} 1
-  ${EndIf}
-
   ; Try to delete the app executable and if we can't delete it try to find the
   ; app's message window and prompt the user to close the app. This allows
   ; running an instance that is located in another directory. If for whatever
   ; reason there is no message window we will just rename the app's files and
   ; then remove them on restart.
   ClearErrors
   ${DeleteFile} "$INSTDIR\${FileMainEXE}"
   ${If} ${Errors}
@@ -775,17 +721,16 @@ FunctionEnd
 
 Function .onInit
   StrCpy $LANGUAGE 0
   ${SetBrandNameVars} "$EXEDIR\localized\distribution\setup.ini"
 
   ${InstallOnInitCommon} "$(WARN_UNSUPPORTED_MSG)"
 
   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "options.ini"
-  !insertmacro MUI_INSTALLOPTIONS_EXTRACT "components.ini"
   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "shortcuts.ini"
   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "summary.ini"
 
   ; Setup the options.ini file for the Custom Options Page
   WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "5"
 
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Type   "label"
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Text   "$(OPTIONS_SUMMARY)"
@@ -820,46 +765,16 @@ Function .onInit
 
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Type   "label"
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Text   "$(OPTION_CUSTOM_DESC)"
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Left   "30"
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Right  "-1"
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Top    "67"
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 5" Bottom "87"
 
-  ; Setup the components.ini file for the Custom Components Page  
-  WriteINIStr "$PLUGINSDIR\components.ini" "Settings" NumFields "3"
-
-  WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Type   "label"
-  WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Text   "$(OPTIONAL_COMPONENTS_LABEL)"
-  WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Left   "0"
-  WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Right  "-1"
-  WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Top    "5"
-  WriteINIStr "$PLUGINSDIR\components.ini" "Field 1" Bottom "15"
-
-  ${If} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Type   "checkbox"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Text   "$(DOMI_TITLE)"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Left   "15"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Right  "-1"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Top    "20"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Bottom "30"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" State  "1"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Flags  "GROUP"
-  ${EndIf}
-
-  ${If} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 3" Type   "label"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 3" Text   "$(DOMI_TEXT)"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 3" Left   "30"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 3" Right  "-1"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 3" Top    "32"
-    WriteINIStr "$PLUGINSDIR\components.ini" "Field 3" Bottom "52"
-  ${EndIf}
-
   ; Setup the shortcuts.ini for the Custom Shortcuts Page
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Settings" NumFields "4"
 
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Type   "label"
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Text   "$(CREATE_ICONS_DESC)"
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Left   "0"
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Right  "-1"
   WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 1" Top    "5"
@@ -894,25 +809,16 @@ Function .onInit
   ${GetSize} "$EXEDIR\nonlocalized\" "/S=0K" $R5 $R7 $R8
   ${GetSize} "$EXEDIR\localized\" "/S=0K" $R6 $R7 $R8
   IntOp $R8 $R5 + $R6
   ; Add 1024 Kb to the diskspace requirement since the installer makes a copy
   ; of the MAPI dll's (around 20 Kb)... also, see Bug 434338.
   IntOp $R8 $R8 + 1024
   SectionSetSize ${APP_IDX} $R8
 
-  ${If} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org"
-    ; Set the section size for DOMi.
-    ${GetSize} "$EXEDIR\optional\extensions\inspector@mozilla.org" "/S=0K" $0 $8 $9
-    SectionSetSize ${DOMI_IDX} $0
-  ${Else}
-    ; Hide DOMi in the components page if it isn't available.
-    SectionSetText ${DOMI_IDX} ""
-  ${EndIf}
-
   ; Initialize $hHeaderBitmap to prevent redundant changing of the bitmap if
   ; the user clicks the back button
   StrCpy $hHeaderBitmap ""
 FunctionEnd
 
 Function .onGUIEnd
   ${OnEndCommon}
 FunctionEnd
--- a/mail/locales/en-US/installer/custom.properties
+++ b/mail/locales/en-US/installer/custom.properties
@@ -42,24 +42,17 @@
 # accesskey with an ampersand (e.g. &).
 
 # Don't replace ${BrandShortName}, $(^Name), or $(^NameDA) with a custom string.
 
 # You can use \n to create a newline in the string but only when the string
 # from en-US contains a \n.
 
 REG_APP_DESC=${BrandShortName} is a full-featured email application. ${BrandShortName} supports IMAP and POP mail protocols, as well as HTML mail formatting. Built-in junk mail controls, RSS capabilities, powerful quick search, spell check as you type, global inbox, and advanced message filtering round out ${BrandShortName}'s modern feature set.
-OPTIONAL_COMPONENTS_TITLE=Choose Optional Components
-OPTIONAL_COMPONENTS_SUBTITLE=Choose which features of $(^NameDA) you want to install.
-OPTIONAL_COMPONENTS_LABEL=Optional Components:
 APP_DESC=Required files for the ${BrandShortName} application
-DOMI_TITLE=DOM Inspector
-DOMI_TEXT=Inspects the structure and properties of a window and its contents.
-QFA_TITLE=Quality Feedback Agent
-QFA_TEXT=Sends information about program crashes to Mozilla.
 CONTEXT_OPTIONS=${BrandShortName} &Options
 CONTEXT_SAFE_MODE=${BrandShortName} &Safe Mode
 SAFE_MODE=Safe Mode
 OPTIONS_PAGE_TITLE=Setup Type
 OPTIONS_PAGE_SUBTITLE=Choose setup options
 SHORTCUTS_PAGE_TITLE=Set Up Shortcuts
 SHORTCUTS_PAGE_SUBTITLE=Create Program Icons
 SUMMARY_PAGE_TITLE=Summary
@@ -91,17 +84,16 @@ UN_CONFIRM_PAGE_TITLE=Uninstall $BrandFu
 UN_CONFIRM_PAGE_SUBTITLE=Remove $BrandFullName from your computer.
 UN_CONFIRM_UNINSTALLED_FROM=$BrandShortName will be uninstalled from the following location:
 UN_CONFIRM_CLICK=Click Uninstall to continue.
 
 BANNER_CHECK_EXISTING=Checking existing installation…
 
 STATUS_INSTALL_APP=Installing ${BrandShortName}…
 STATUS_INSTALL_LANG=Installing Language Files (${AB_CD})…
-STATUS_INSTALL_OPTIONAL=Installing Optional Components…
 STATUS_UNINSTALL_MAIN=Uninstalling ${BrandShortName}…
 STATUS_CLEANUP=Cleaning up the birdcage…
 
 # _DESC strings support approximately 65 characters per line.
 # One line
 OPTIONS_SUMMARY=Choose the type of setup you prefer, then click Next.
 # One line
 OPTION_STANDARD_DESC=${BrandShortName} will be installed with the most common options.