From 7ca835f481625214501025ebbf2ac65100de2daa Mon Sep 17 00:00:00 2001 From: "rob_strong%exchangecode.com" Date: Wed, 30 Aug 2006 00:08:35 +0000 Subject: [PATCH] Bug 349551 - Updated builds won't uninstall via Windows Control Panel. r=bsmedberg git-svn-id: svn://10.0.0.236/trunk@208771 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/Makefile.in | 10 +- mozilla/browser/installer/windows/Makefile.in | 8 +- .../windows/nsis/SetProgramAccess.nsi | 126 ---- .../installer/windows/nsis/installer.nsi | 705 +++++------------- .../installer/windows/nsis/uninstaller.nsi | 496 ++++++++++++ .../browser/installer/windows/packages-static | 6 +- mozilla/browser/locales/Makefile.in | 8 + mozilla/configure.in | 15 + mozilla/toolkit/mozapps/Makefile.in | 11 - .../installer/windows/nsis/makensis.mk | 15 +- .../mozapps/installer/windows/nsis/setup.ico | Bin 0 -> 10134 bytes .../mozapps/update/src/nsPostUpdateWin.js | 264 ++++--- 12 files changed, 898 insertions(+), 766 deletions(-) delete mode 100755 mozilla/browser/installer/windows/nsis/SetProgramAccess.nsi create mode 100755 mozilla/browser/installer/windows/nsis/uninstaller.nsi create mode 100755 mozilla/toolkit/mozapps/installer/windows/nsis/setup.ico diff --git a/mozilla/browser/Makefile.in b/mozilla/browser/Makefile.in index dd2b2e71728..280431d8395 100644 --- a/mozilla/browser/Makefile.in +++ b/mozilla/browser/Makefile.in @@ -54,12 +54,10 @@ ifdef MOZ_BRANDING_DIRECTORY DEFINES += -DOFFICIAL_BRANDING=1 endif -# Generate uninstall.ini (en-US only for now) -UNINSTALLER_INC = $(topsrcdir)/browser/installer/windows/uninstaller.inc -$(FINAL_TARGET)/uninstall/uninstall.ini: $(topsrcdir)/browser/installer/windows/uninstall.it $(UNINSTALLER_INC) - $(NSINSTALL) -D $(@D) - $(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) -I$(UNINSTALLER_INC) $< > $@ -libs:: $(FINAL_TARGET)/uninstall/uninstall.ini +# For Windows build the uninstaller during the application build since the +# uninstaller is included with the application for mar file generation. +libs:: + $(MAKE) -C installer/windows uninstaller endif endif diff --git a/mozilla/browser/installer/windows/Makefile.in b/mozilla/browser/installer/windows/Makefile.in index 464f8f1f863..07ae4202333 100644 --- a/mozilla/browser/installer/windows/Makefile.in +++ b/mozilla/browser/installer/windows/Makefile.in @@ -50,13 +50,12 @@ SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/firefox/7zSD.sfx PP_LOCALIZED_FILES = \ packages-static \ - installer.cfg \ $(NULL) INSTALLER_FILES = \ app.tag \ nsis/installer.nsi \ - nsis/SetProgramAccess.nsi \ + nsis/uninstaller.nsi \ $(NULL) BRANDING_FILES = \ @@ -81,11 +80,14 @@ installer:: $(MAKE) -C .. installer-stage $(MAKE) $(CONFIG_DIR)/setup.exe +# For building the uninstaller during the application build so it can be +# included for mar file generation. +uninstaller:: + $(CONFIG_DIR)/setup.exe:: $(RM) -rf $(CONFIG_DIR) && mkdir $(CONFIG_DIR) $(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR) $(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR) - cp $(topsrcdir)/browser/EULA $(CONFIG_DIR)/license.txt cp $(topsrcdir)/browser/EULA.rtf $(CONFIG_DIR)/license.rtf $(EXIT_ON_ERROR) \ for i in $(PP_LOCALIZED_FILES); do \ diff --git a/mozilla/browser/installer/windows/nsis/SetProgramAccess.nsi b/mozilla/browser/installer/windows/nsis/SetProgramAccess.nsi deleted file mode 100755 index 78ebfb1c111..00000000000 --- a/mozilla/browser/installer/windows/nsis/SetProgramAccess.nsi +++ /dev/null @@ -1,126 +0,0 @@ -# ***** BEGIN LICENSE BLOCK ***** -# Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# The Original Code is the Mozilla Installer code. -# -# The Initial Developer of the Original Code is Mozilla Foundation -# Portions created by the Initial Developer are Copyright (C) 2006 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# Robert Strong -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -; Provides the Set Access portion of the "Set Program Access and Defaults" that -; is available with Win2K Pro SP3 and WinXP SP1 (this does not specifically call -; out Windows Vista which has not been released at the time of this comment or -; any other future versions of Windows). - -; This is fairly evil. We have a reg key of -; Software\Clients\StartMenuInternet\firefox.exe\InstallInfo -; yet we can have multiple installations of the program. -; this key provides info as to whether shortcuts are displayed and can hide -; and unhide these same shortcuts. This just seems wrong and prone to problems. -; For example, one instance installed in c:\firefox1 has set this key. Another -; instance is then installed in c:\firefox2. Under what specific circumstances -; do we set this key? What if the other instance is not the default browser... -; which shortcuts should be displayed on the desktop and quicklaunch as well as -; which ones affect the "set program access and defaults", etc. - -; We probably need to have some verification of whether we are installing as the -; new default browser, etc. -; When installing with defaults we should always install into the previous location -; ReadRegStr $0 HKCR "http\shell\open\command" "" - -; Sets program access and defaults - hide / show shortcuts on the Desktop and in -; QuickLaunch. This is a royal PITA since the application version can change out -; from under us and there may also be more than one version of the application -; installed. This also needs to respect whether the shortcuts have been modified -; since their initial creation and take into account whether the shortcut is -; located in all users or the current user desktop. -; To remove a shortcut it must point to this installation main executable and it -; must not have additional arguments. -; To create a shortcut a shortcut must not already exist with the same name. -Function un.SetAccess - ${un.GetParameters} $R0 - - StrCpy $R1 "Software\Clients\StartMenuInternet\${FileMainEXE}\InstallInfo" - SetShellVarContext all ; Set $DESKTOP to All Users - - ; Hide icons - initiated from Set Program Access and Defaults - ${If} $R0 == '/ua "${AppVersion} (${AB_CD})" /hs browser' - WriteRegDWORD HKLM $R1 "IconsVisible" 0 - ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - SetShellVarContext current ; Set $DESKTOP to the current user's desktop - ${EndUnless} - - ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - ShellLink::GetShortCutArgs "$DESKTOP\${BrandFullName}.lnk" - Pop $0 - ${If} $0 == "" - ShellLink::GetShortCutTarget "$DESKTOP\${BrandFullName}.lnk" - Pop $0 - ${If} $0 == "$INSTDIR\${FileMainEXE}" - Delete "$DESKTOP\${BrandFullName}.lnk" - ${EndIf} - ${EndIf} - ${EndIf} - - ${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" - ShellLink::GetShortCutArgs "$QUICKLAUNCH\${BrandFullName}.lnk" - Pop $0 - ${If} $0 == "" - ShellLink::GetShortCutTarget "$QUICKLAUNCH\${BrandFullName}.lnk" - Pop $0 - ${If} $0 == "$INSTDIR\${FileMainEXE}" - Delete "$QUICKLAUNCH\${BrandFullName}.lnk" - ${EndIf} - ${EndIf} - ${EndIf} - Abort - ${EndIf} - - ; Show icons - initiated from Set Program Access and Defaults - ${If} $R0 == '/ua "${AppVersion} (${AB_CD})" /ss browser' - WriteRegDWORD HKLM $R1 "IconsVisible" 1 - ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 - ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR" - ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - SetShellVarContext current ; Set $DESKTOP to the current user's desktop - ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" - CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 - ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR" - ${EndUnless} - ${EndUnless} - ${EndUnless} - ${Unless} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" - CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 - ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR" - ${EndUnless} - Abort - ${EndIf} -FunctionEnd diff --git a/mozilla/browser/installer/windows/nsis/installer.nsi b/mozilla/browser/installer/windows/nsis/installer.nsi index b9daa5a3026..e50852f084f 100755 --- a/mozilla/browser/installer/windows/nsis/installer.nsi +++ b/mozilla/browser/installer/windows/nsis/installer.nsi @@ -37,11 +37,8 @@ # Also requires: # ShellLink plugin http://nsis.sourceforge.net/ShellLink_plug-in -; NOTES -; Size matters! Try different methods to accomplish the same result and use the -; one that results in the smallest size. Every KB counts! -; LogicLib.nsh must be included in all installers to ease script creation and -; readability. It adds a couple of KB to the size but it is worth it. +; Set verbosity to 3 (e.g. no script) to lessen the noise in the build logs +!verbose 3 ; 7-Zip provides better compression than the lzma from NSIS so we add the files ; uncompressed and use 7-Zip to create a SFX archive of it @@ -49,14 +46,24 @@ SetDatablockOptimize on SetCompress off CRCCheck on +!addplugindir ./ + ; empty files - except for the comment line - for generating custom pages. !system 'echo ; > options.ini' !system 'echo ; > components.ini' !system 'echo ; > shortcuts.ini' -!addplugindir ./ +Var TmpVal +Var StartMenuDir +Var InstallType +Var AddStartMenuSC +Var AddQuickLaunchSC +Var AddDesktopSC +Var fhInstallLog +Var fhUninstallLog -; Other files may depend upon these includes! +; Other included files may depend upon these includes! +; The following includes are provided by NSIS. !include FileFunc.nsh !include LogicLib.nsh !include TextFunc.nsh @@ -67,48 +74,30 @@ CRCCheck on !insertmacro FileJoin !insertmacro GetTime !insertmacro LineFind -!insertmacro un.LineFind !insertmacro StrFilter !insertmacro TrimNewLines -!insertmacro un.TrimNewLines !insertmacro WordFind !insertmacro WordReplace !insertmacro GetSize !insertmacro GetParameters -!insertmacro un.GetParameters !insertmacro GetOptions !insertmacro GetRoot !insertmacro DriveSpace -; Use the pre-processor where ever possible -; Remember that !define's create smaller packages than Var's! -Var TmpVal -Var StartMenuDir -Var InstallType -Var AddStartMenuSC -Var AddQuickLaunchSC -Var AddDesktopSC -Var fhInstallLog -Var fhUninstallLog - +; The following includes are custom. !include branding.nsi !include defines.nsi -!include SetProgramAccess.nsi !include common.nsh !include locales.nsi !include version.nsh !insertmacro RegCleanMain -!insertmacro un.RegCleanMain !insertmacro RegCleanUninstall -!insertmacro un.RegCleanUninstall !insertmacro CloseApp -!insertmacro un.CloseApp !insertmacro WriteRegStr2 !insertmacro WriteRegDWORD2 !insertmacro WriteRegStrHKCR !insertmacro CreateRegKey -!insertmacro un.GetSecondInstallPath !insertmacro CanWriteToInstallDir !insertmacro CheckDiskSpace @@ -120,28 +109,22 @@ Name "${BrandFullName}" OutFile "setup.exe" InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} (${AppVersion})" "InstallLocation" InstallDir "$PROGRAMFILES\${BrandFullName}" - ShowInstDetails nevershow -ShowUnInstDetails nevershow + +ReserveFile options.ini +ReserveFile components.ini +ReserveFile shortcuts.ini ################################################################################ # Modern User Interface - MUI -ReserveFile options.ini -ReserveFile shortcuts.ini -ReserveFile components.ini - !define MUI_ABORTWARNING -!define MUI_COMPONENTSPAGE_SMALLDESC - !define MUI_ICON setup.ico !define MUI_UNICON setup.ico - !define MUI_WELCOMEPAGE_TITLE_3LINES -!define MUI_WELCOMEFINISHPAGE_BITMAP wizWatermark.bmp -!define MUI_UNWELCOMEFINISHPAGE_BITMAP wizWatermark.bmp !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_RIGHT +!define MUI_WELCOMEFINISHPAGE_BITMAP wizWatermark.bmp ; Use a right to left header image when the language is right to left !ifdef ${AB_CD}_rtl @@ -161,27 +144,22 @@ ReserveFile components.ini !insertmacro MUI_PAGE_LICENSE license.rtf ; Custom Options Page -Page custom preOptions ChangeOptions +Page custom preOptions leaveOptions - -Page custom preComponents checkComponents - - -; Select Install Components Page -;!define MUI_PAGE_CUSTOMFUNCTION_PRE preComponents -;!insertmacro MUI_PAGE_COMPONENTS +; Custom Components Page +Page custom preComponents leaveComponents ; Select Install Directory Page -!define MUI_PAGE_CUSTOMFUNCTION_PRE preCheckInstallDir -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE leaveCheckInstallDir +!define MUI_PAGE_CUSTOMFUNCTION_PRE preDirectory +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE leaveDirectory !define MUI_DIRECTORYPAGE_VERIFYONLEAVE !insertmacro MUI_PAGE_DIRECTORY -; Custom Shortcuts Page - CheckCustom is Called in Shortcuts -Page custom preShortcuts ChangeShortcuts +; Custom Shortcuts Page +Page custom preShortcuts leaveShortcuts ; Start Menu Folder Page Configuration -!define MUI_PAGE_CUSTOMFUNCTION_PRE preCheckStartMenu +!define MUI_PAGE_CUSTOMFUNCTION_PRE preStartMenu !define MUI_STARTMENUPAGE_NODISABLE !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM" !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})\Main" @@ -189,7 +167,7 @@ Page custom preShortcuts ChangeShortcuts !insertmacro MUI_PAGE_STARTMENU Application $StartMenuDir ; Install Files Page -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE FinishInstall +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE leaveInstFiles !insertmacro MUI_PAGE_INSTFILES ; Finish Page @@ -198,180 +176,11 @@ Page custom preShortcuts ChangeShortcuts !define MUI_FINISHPAGE_RUN !define MUI_FINISHPAGE_RUN_FUNCTION LaunchApp !define MUI_FINISHPAGE_RUN_TEXT $(LAUNCH_TEXT) -!define MUI_PAGE_CUSTOMFUNCTION_PRE disableCancel +!define MUI_PAGE_CUSTOMFUNCTION_PRE preFinish !insertmacro MUI_PAGE_FINISH -/** - * Uninstall Pages - */ -; Welcome Page -!insertmacro MUI_UNPAGE_WELCOME - -; Uninstall Confirm Page -!insertmacro MUI_UNPAGE_CONFIRM - -; Remove Files Page -!define MUI_PAGE_CUSTOMFUNCTION_PRE un.checkIfAppIsLoaded -!insertmacro MUI_UNPAGE_INSTFILES - -; Finish Page -!define MUI_PAGE_CUSTOMFUNCTION_PRE un.disableCancel -!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED -!define MUI_FINISHPAGE_SHOWREADME "" - -; Setup the survey controls, functions, etc. except when the application has -; defined NO_UNINSTALL_SURVEY -!ifndef NO_UNINSTALL_SURVEY -!define MUI_FINISHPAGE_SHOWREADME_TEXT $(SURVEY_TEXT) -!define MUI_FINISHPAGE_SHOWREADME_FUNCTION un.survey -!endif - -!insertmacro MUI_UNPAGE_FINISH - -/** - * Adds a section divider to the human readable log. - */ -Function WriteLogSeparator - FileWrite $fhInstallLog "$\r$\n-------------------------------------------------------------------------------$\r$\n" -FunctionEnd - -; Callback used to check if the app being uninstalled is running. -Function un.checkIfAppIsLoaded - ; Try to delete the app executable and if we can't delete it try to close the - ; app. This allows running an instance that is located in another directory. - ClearErrors - ${If} ${FileExists} "$INSTDIR\${FileMainEXE}" - ${DeleteFile} "$INSTDIR\${FileMainEXE}" - ${EndIf} - ${If} ${Errors} - ClearErrors - ${un.CloseApp} "true" $(WARN_APP_RUNNING_UNINSTALL) - ; Try to delete it again to prevent launching the app while we are - ; installing. - ${DeleteFile} "$INSTDIR\${FileMainEXE}" - ClearErrors - ${EndIf} -FunctionEnd - -; Setup the survey controls, functions, etc. except when the application has -; defined NO_UNINSTALL_SURVEY -!ifndef NO_UNINSTALL_SURVEY -Function un.survey - Exec "$\"$TmpVal$\" $\"${SurveyURL}$\"" -FunctionEnd -!endif - -; Check whether to display the current page (e.g. if we aren't performing a -; custom install don't display the custom pages). -Function CheckCustom - ${If} $InstallType != 4 - Abort - ${EndIf} -FunctionEnd - -Function preCheckInstallDir - ${If} $InstallType != 4 - ${CheckDiskSpace} $R9 - ${If} $R9 != "false" - ${CanWriteToInstallDir} $R9 - ${If} $R9 != "false" - Abort - ${EndIf} - ${EndIf} - ${EndIf} -FunctionEnd - -Function leaveCheckInstallDir - ${CheckDiskSpace} $R9 - ${If} $R9 == "false" - MessageBox MB_OK "$(WARN_DISK_SPACE)" - Abort - ${EndIf} - - ${CanWriteToInstallDir} $R9 - ${If} $R9 == "false" - MessageBox MB_OK "$(WARN_WRITE_ACCESS)" - Abort - ${EndIf} -FunctionEnd - -Function preCheckStartMenu - Call CheckCustom - ${If} $AddStartMenuSC != 1 - Abort - ${EndIf} -FunctionEnd - -Function onInstallDeleteFile - ${TrimNewLines} "$R9" "$R9" - StrCpy $R1 "$R9" 5 - ${If} $R1 == "File:" - StrCpy $R9 "$R9" "" 6 - ${If} ${FileExists} "$INSTDIR$R9" - ClearErrors - Delete "$INSTDIR$R9" - ${If} ${Errors} - ${LogMsg} "** ERROR Deleting File: $INSTDIR$R9 **" - ${Else} - ${LogMsg} "Deleted File: $INSTDIR$R9" - ${EndIf} - ${EndIf} - ${EndIf} - ClearErrors - Push 0 -FunctionEnd - -; The previous installer removed directories even when they aren't empty so this -; funtion does as well. -Function onInstallRemoveDir - ${TrimNewLines} "$R9" "$R9" - StrCpy $R1 "$R9" 4 - ${If} $R1 == "Dir:" - StrCpy $R9 "$R9" "" 5 - StrCpy $R1 "$R9" "" -1 - ${If} $R1 == "\" - StrCpy $R9 "$R9" -1 - ${EndIf} - ${If} ${FileExists} "$INSTDIR$R9" - ClearErrors - RmDir /r "$INSTDIR$R9" - ${If} ${Errors} - ${LogMsg} "** ERROR Removing Directory: $INSTDIR$R9 **" - ${Else} - ${LogMsg} "Removed Directory: $INSTDIR$R9" - ${EndIf} - ${EndIf} - ${EndIf} - ClearErrors - Push 0 -FunctionEnd - -Function FinishInstall - FileClose $fhUninstallLog - ; Diff and add missing entries from the previous file log if it exists - ${If} ${FileExists} "$INSTDIR\uninstall\uninstall.bak" - SetDetailsPrint textonly - DetailPrint $(STATUS_CLEANUP) - SetDetailsPrint none - ${LogHeader} "Updating Uninstall Log With Previous Uninstall Log" - StrCpy $R0 "$INSTDIR\uninstall\uninstall.log" - StrCpy $R1 "$INSTDIR\uninstall\uninstall.bak" - GetTempFileName $R2 - FileOpen $R3 $R2 w - ${TextCompareNoDetails} "$R1" "$R0" "SlowDiff" "GetDiff" - FileClose $R3 - ${Unless} ${Errors} - ${FileJoin} "$INSTDIR\uninstall\uninstall.log" "$R2" "$INSTDIR\uninstall\uninstall.log" - ${EndUnless} - ${DeleteFile} "$INSTDIR\uninstall\uninstall.bak" - ${DeleteFile} "$R2" - ${EndIf} - - Call WriteLogSeparator - ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6 - FileWrite $fhInstallLog "${BrandFullName} Installation Finished: $2-$1-$0 $4:$5:$6$\r$\n" - FileClose $fhInstallLog -FunctionEnd +################################################################################ +# Install Sections Section "-Application" Section1 SectionIn 1 RO @@ -521,9 +330,9 @@ Section "-Application" Section1 Call DoCopyFiles ${If} $InstallType != 4 - Call install_talkback + Call installTalkback ${If} ${FileExists} "$INSTDIR\extensions\inspector@mozilla.org" - Call install_inspector + Call installInspector ${EndIf} ${EndIf} @@ -640,14 +449,14 @@ Section "-Application" Section1 ; The Reinstall Command is defined at ; http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/registeringapps.asp StrCpy $0 "Software\Clients\StartMenuInternet\$R9\InstallInfo" - StrCpy $1 "$\"$INSTDIR\uninstall\uninstaller.exe$\" /ua $\"${AppVersion} (${AB_CD})$\" /hs browser" + StrCpy $1 "$\"$INSTDIR\uninstall\uninst.exe$\" /ua $\"${AppVersion} (${AB_CD})$\" /hs browser" ${WriteRegStr2} $TmpVal "$0" "HideIconsCommand" "$1" 0 ${WriteRegDWORD2} $TmpVal "$0" "IconsVisible" 1 0 StrCpy $0 "Software\Clients\StartMenuInternet\$R9\InstallInfo" StrCpy $1 "$\"$INSTDIR\${FileMainEXE}$\" -silent -setDefaultBrowser" ${WriteRegStr2} $TmpVal "$0" "ReinstallCommand" "$1" 0 - StrCpy $1 "$\"$INSTDIR\uninstall\uninstaller.exe$\" /ua $\"${AppVersion} (${AB_CD})$\" /ss browser" + StrCpy $1 "$\"$INSTDIR\uninstall\uninst.exe$\" /ua $\"${AppVersion} (${AB_CD})$\" /ss browser" ${WriteRegStr2} $TmpVal "$0" "ShowIconsCommand" "$1" 0 StrCpy $0 "Software\Clients\StartMenuInternet\$R9\shell\open\command" @@ -672,7 +481,7 @@ Section "-Application" Section1 ; Write the uninstall registry keys StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} (${AppVersion})" - StrCpy $1 "$\"$INSTDIR\uninstall\uninstaller.exe$\" $\"/ua ${AppVersion} (${AB_CD})$\"" + StrCpy $1 "$INSTDIR\uninstall\uninst.exe" ${WriteRegStr2} $TmpVal "$0" "Comments" "${BrandFullNameInternal}" 0 ${WriteRegStr2} $TmpVal "$0" "DisplayIcon" "$INSTDIR\${FileMainEXE},0" 0 @@ -711,27 +520,27 @@ Section "-Application" Section1 !insertmacro MUI_STARTMENU_WRITE_END - ; Refresh destop icons + ; Refresh desktop icons System::Call "shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)" - - WriteUninstaller "$INSTDIR\uninstall\uninstaller.exe" - SectionEnd Section /o "Developer Tools" Section2 - Call install_inspector + Call installInspector SectionEnd Section /o "Quality Feedback Agent" Section3 - Call install_talkback + Call installTalkback SectionEnd -Function install_inspector +################################################################################ +# Helper Functions + +Function installInspector ${If} ${FileExists} "$EXEDIR\optional\extensions\inspector@mozilla.org" SetDetailsPrint textonly DetailPrint $(STATUS_INSTALL_OPTIONAL) SetDetailsPrint none - ${RemoveDir} "$INSTDIR\extensions\extensions\inspector@mozilla.org" + ${RemoveDir} "$INSTDIR\extensions\inspector@mozilla.org" ClearErrors ${LogHeader} "Installing Developer Tools" StrCpy $R0 "$EXEDIR\optional\extensions\inspector@mozilla.org" @@ -740,7 +549,7 @@ Function install_inspector ${EndIf} FunctionEnd -Function install_talkback +Function installTalkback StrCpy $R0 "$EXEDIR\optional\extensions\talkback@mozilla.org" ${If} ${FileExists} "$R0" SetDetailsPrint textonly @@ -777,152 +586,61 @@ Function install_talkback ${EndIf} FunctionEnd -Section "Uninstall" - SetDetailsPrint textonly - DetailPrint $(STATUS_UNINSTALL_MAIN) - SetDetailsPrint none - ; Remove registry entries for non-existent apps and for apps that point to our - ; install location in the Software\Mozilla key. - SetShellVarContext current ; Sets SHCTX to HKCU - ${un.RegCleanMain} "Software\Mozilla" - SetShellVarContext all ; Sets SHCTX to HKLM - ${un.RegCleanMain} "Software\Mozilla" - - ; Remove uninstall entries that point to our install location - ${un.RegCleanUninstall} - - SetShellVarContext all ; Set SHCTX to HKLM - ${un.GetSecondInstallPath} "Software\Mozilla" $R9 - ${If} $R9 == "false" - SetShellVarContext current ; Set SHCTX to HKCU - ${un.GetSecondInstallPath} "Software\Mozilla" $R9 - ${EndIf} - - StrCpy $0 "Software\Clients\StartMenuInternet\${FileMainEXE}\shell\open\command" - ReadRegStr $1 HKLM "$0" "" - Push $1 - ${GetPathFromRegStr} - Pop $R0 - Push $R0 - ${GetParentDir} - Pop $R1 - - ; Only remove the StartMenuInternet key if it refers to this install location. - ; The StartMenuInternet registry key is independent of the default browser - ; settings. The XPInstall base un-installer always removes this key if it is - ; uninstalling the default browser and it will always replace the keys when - ; installing even if there is another install of Firefox that is set as the - ; default browser. Now the key is always updated on install but it is only - ; removed if it refers to this install location. - ${If} $INSTDIR == $R1 - ; XXXrstrong - if there is another installation of the same app ideally we - ; would just modify these values. The GetSecondInstallPath macro could be - ; made to provide enough information to do this. - DeleteRegKey HKLM "Software\Clients\StartMenuInternet\${FileMainEXE}" - ${EndIf} - - StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}" - ${If} $R9 == "false" - DeleteRegKey HKLM "$0" - DeleteRegKey HKCU "$0" - StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\$R9" - DeleteRegKey HKLM "$0" - DeleteRegKey HKCU "$0" - StrCpy $0 "MIME\Database\Content Type\application/x-xpinstall;app=firefox" - DeleteRegKey HKCR "$0" - ${Else} - ReadRegStr $1 HKLM "$0" "" - Push $1 - ${GetPathFromRegStr} - Pop $R0 - Push $R0 - ${GetParentDir} - Pop $R1 - ${If} $INSTDIR == $R1 - WriteRegStr HKLM "$0" "" "$R9" - Push $R9 - ${GetParentDir} - Pop $R1 - WriteRegStr HKLM "$0" "Path" "$R1" - ${EndIf} - ${EndIf} - - ; Remove files. If we don't have a log file skip - ${If} ${FileExists} "$INSTDIR\uninstall\uninstall.log" - ; Copy the uninstall log file to a temporary file - GetTempFileName $TmpVal - CopyFiles "$INSTDIR\uninstall\uninstall.log" "$TmpVal" - - ; Unregister DLL's - ${un.LineFind} "$TmpVal" "/NUL" "1:-1" "un.UnRegDLLsCallback" - - ; Delete files - ${un.LineFind} "$TmpVal" "/NUL" "1:-1" "un.RemoveFilesCallback" - - ; Remove directories we always control - RmDir /r "$INSTDIR\uninstall" - RmDir /r "$INSTDIR\updates" - RmDir /r "$INSTDIR\defaults\shortcuts" - - ; Remove empty directories - ${un.LineFind} "$TmpVal" "/NUL" "1:-1" "un.RemoveDirsCallback" - - ; Delete the temporary uninstall log file - ${DeleteFile} "$TmpVal" - - ; Remove the installation directory if it is empty - ${RemoveDir} "$INSTDIR" - ${EndIf} - - ; Refresh destop icons otherwise the start menu internet item won't be removed - ; and other ugly things will happen like recreation of the registry key by the - ; OS under some conditions. - System::Call "shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)" -SectionEnd - -; When we add an optional action to the finish page the cancel button is -; enabled. The next two function disable it for install and uninstall and leave -; the finish button as the only choice. -Function disableCancel - !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "cancelenabled" "0" +; Adds a section divider to the human readable log. +Function WriteLogSeparator + FileWrite $fhInstallLog "$\r$\n-------------------------------------------------------------------------------$\r$\n" FunctionEnd -Function un.disableCancel - !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "cancelenabled" "0" - - ; Setup the survey controls, functions, etc. except when the application has - ; defined NO_UNINSTALL_SURVEY - !ifdef NO_UNINSTALL_SURVEY - !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "NumFields" "3" - !else - StrCpy $TmpVal "SOFTWARE\Microsoft\IE Setup\Setup" - ClearErrors - ReadRegStr $0 HKLM $TmpVal "Path" - ${If} ${Errors} - !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "NumFields" "3" - ${Else} - ExpandEnvStrings $0 "$0" ; this value will usually contain %programfiles% - ${If} $0 != "\" - StrCpy $0 "$0\" - ${EndIf} - StrCpy $0 "$0\iexplore.exe" - ClearErrors - GetFullPathName $TmpVal $0 - ${If} ${Errors} - !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "NumFields" "3" - ${EndIf} - ${EndIf} - !endif -FunctionEnd - -Function ChangeShortcuts - ${MUI_INSTALLOPTIONS_READ} $0 "shortcuts.ini" "Settings" "State" - ${If} $0 != 0 +; Check whether to display the current page (e.g. if we aren't performing a +; custom install don't display the custom pages). +Function CheckCustom + ${If} $InstallType != 4 Abort ${EndIf} - ${MUI_INSTALLOPTIONS_READ} $AddDesktopSC "shortcuts.ini" "Field 2" "State" - ${MUI_INSTALLOPTIONS_READ} $AddStartMenuSC "shortcuts.ini" "Field 3" "State" - ${MUI_INSTALLOPTIONS_READ} $AddQuickLaunchSC "shortcuts.ini" "Field 4" "State" +FunctionEnd + +Function onInstallDeleteFile + ${TrimNewLines} "$R9" "$R9" + StrCpy $R1 "$R9" 5 + ${If} $R1 == "File:" + StrCpy $R9 "$R9" "" 6 + ${If} ${FileExists} "$INSTDIR$R9" + ClearErrors + Delete "$INSTDIR$R9" + ${If} ${Errors} + ${LogMsg} "** ERROR Deleting File: $INSTDIR$R9 **" + ${Else} + ${LogMsg} "Deleted File: $INSTDIR$R9" + ${EndIf} + ${EndIf} + ${EndIf} + ClearErrors + Push 0 +FunctionEnd + +; The previous installer removed directories even when they aren't empty so this +; function does as well. +Function onInstallRemoveDir + ${TrimNewLines} "$R9" "$R9" + StrCpy $R1 "$R9" 4 + ${If} $R1 == "Dir:" + StrCpy $R9 "$R9" "" 5 + StrCpy $R1 "$R9" "" -1 + ${If} $R1 == "\" + StrCpy $R9 "$R9" -1 + ${EndIf} + ${If} ${FileExists} "$INSTDIR$R9" + ClearErrors + RmDir /r "$INSTDIR$R9" + ${If} ${Errors} + ${LogMsg} "** ERROR Removing Directory: $INSTDIR$R9 **" + ${Else} + ${LogMsg} "Removed Directory: $INSTDIR$R9" + ${EndIf} + ${EndIf} + ${EndIf} + ClearErrors + Push 0 FunctionEnd Function GetDiff @@ -975,119 +693,13 @@ Function CopyFile ; If the file is installed into the installation directory remove the ; installation directory's path from the file path when writing to the ; uninstall.log so it will be a relative path. This allows the same - ; uninstaller.exe to be used with zip builds if we supply an uninstall.log. + ; uninst.exe to be used with zip builds if we supply an uninstall.log. ${WordReplace} "$R1$R3\$R7" "$INSTDIR" "" "+" $R3 ${LogUninstall} "File: $R3" ${EndIf} Push 0 FunctionEnd -Function un.RemoveFilesCallback - ${un.TrimNewLines} "$R9" "$R9" - StrCpy $R1 "$R9" 5 - ${If} $R1 == "File:" - StrCpy $R9 "$R9" "" 6 - StrCpy $R0 "$R9" 1 - ; If the path is relative prepend the install directory - ${If} $R0 == "\" - StrCpy $R0 "$INSTDIR$R9" - ${Else} - StrCpy $R0 "$R9" - ${EndIf} - ${If} ${FileExists} "$R0" - ${DeleteFile} "$R0" - ${EndIf} - ${EndIf} - ClearErrors - Push 0 -FunctionEnd - -; Using locate will leave file handles open to some of the directories which -; will prevent the deletion of these directories. This parses the uninstall.log -; and uses the file entries to find / remove empty directories. -Function un.RemoveDirsCallback - ${un.TrimNewLines} "$R9" "$R9" - StrCpy $R1 "$R9" 5 - ${If} $R1 == "File:" - StrCpy $R9 "$R9" "" 6 - StrCpy $R1 "$R9" 1 - ${If} $R1 == "\" - StrCpy $R2 "INSTDIR" - StrCpy $R1 "$INSTDIR$R9" - ${Else} - StrCpy $R2 " " - StrCpy $R1 "$R9" - ${EndIf} - loop: - Push $R1 - Call un.GetParentDir - Pop $R0 - GetFullPathName $R1 "$R0" - ; We only try to remove empty directories but the Desktop, StartMenu, and - ; QuickLaunch directories can be empty so guard against removing them. - SetShellVarContext all - ${If} $R1 == "$DESKTOP" - ${OrIf} $R1 == "$STARTMENU" - GoTo end - ${EndIf} - SetShellVarContext current - ${If} $R1 == "$QUICKLAUNCH" - ${OrIf} $R1 == "$DESKTOP" - ${OrIf} $R1 == "$STARTMENU" - GoTo end - ${EndIf} - ${If} ${FileExists} "$R1" - RmDir "$R1" - ${EndIf} - ${If} ${Errors} - ${OrIf} $R1 != "$INSTDIR" - GoTo end - ${EndIf} - GoTo loop - ${EndIf} - - end: - ClearErrors - Push 0 -FunctionEnd - -Function un.UnRegDLLsCallback - ${un.TrimNewLines} "$R9" "$R9" - StrCpy $R1 "$R9" 7 - ${If} $R1 == "DLLReg:" - StrCpy $R9 "$R9" "" 8 - StrCpy $R1 "$R9" 1 - ${If} $R1 == "\" - StrCpy $R1 "$INSTDIR$R9" - ${Else} - StrCpy $R1 "$R9" - ${EndIf} - UnRegDLL $R1 - ${EndIf} - ClearErrors - Push 0 -FunctionEnd - -Function un.GetParentDir - Exch $R0 ; old $R0 is on top of stack - Push $R1 - Push $R2 - Push $R3 - StrLen $R3 $R0 - loop: - IntOp $R1 $R1 - 1 - IntCmp $R1 -$R3 exit exit - StrCpy $R2 $R0 1 $R1 - StrCmp $R2 "\" exit - Goto loop - exit: - StrCpy $R0 $R0 $R1 - Pop $R3 - Pop $R2 - Pop $R1 - Exch $R0 ; put $R0 on top of stack, restore $R0 to original value - FunctionEnd - ; Clean up the old log files. We only diff the first two found since it is ; possible for there to be several MB and comparing that many would take a very ; long time to diff. @@ -1167,11 +779,13 @@ Function CleanOldLogFilesCallback Push 0 FunctionEnd -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(APP_DESC) - !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DEV_TOOLS_DESC) - !insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(QFA_DESC) -!insertmacro MUI_FUNCTION_DESCRIPTION_END +Function LaunchApp + ${CloseApp} "true" $(WARN_APP_RUNNING_INSTALL) + Exec "$INSTDIR\${FileMainEXE}" +FunctionEnd + +################################################################################ +# Language !insertmacro MOZ_MUI_LANGUAGE 'baseLocale' !verbose push @@ -1184,18 +798,15 @@ FunctionEnd ; using " " for BrandingText will hide the "Nullsoft Install System..." branding BrandingText " " -Function preShortcuts - Call CheckCustom - !insertmacro MUI_HEADER_TEXT "$(SHORTCUTS_PAGE_TITLE)" "$(SHORTCUTS_PAGE_SUBTITLE)" - !insertmacro MUI_INSTALLOPTIONS_DISPLAY "shortcuts.ini" -FunctionEnd +################################################################################ +# Page pre and leave functions Function preOptions !insertmacro MUI_HEADER_TEXT "$(OPTIONS_PAGE_TITLE)" "$(OPTIONS_PAGE_SUBTITLE)" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "options.ini" FunctionEnd -Function ChangeOptions +Function leaveOptions ${MUI_INSTALLOPTIONS_READ} $0 "options.ini" "Settings" "State" ${If} $0 != 0 Abort @@ -1222,7 +833,7 @@ Function preComponents !insertmacro MUI_INSTALLOPTIONS_DISPLAY "components.ini" FunctionEnd -Function checkComponents +Function leaveComponents ; If DOMi exists then it will be Field 2. ; If DOMi doesn't exist and talkback exists then TalkBack will be Field 2 but ; if DOMi doesn't exist we won't display this page anyways. @@ -1247,15 +858,95 @@ Function checkComponents ${EndIf} FunctionEnd -Function LaunchApp - ${CloseApp} "true" $(WARN_APP_RUNNING_INSTALL) - Exec "$INSTDIR\${FileMainEXE}" +Function preDirectory + ${If} $InstallType != 4 + ${CheckDiskSpace} $R9 + ${If} $R9 != "false" + ${CanWriteToInstallDir} $R9 + ${If} $R9 != "false" + Abort + ${EndIf} + ${EndIf} + ${EndIf} FunctionEnd +Function leaveDirectory + ${CheckDiskSpace} $R9 + ${If} $R9 == "false" + MessageBox MB_OK "$(WARN_DISK_SPACE)" + Abort + ${EndIf} + + ${CanWriteToInstallDir} $R9 + ${If} $R9 == "false" + MessageBox MB_OK "$(WARN_WRITE_ACCESS)" + Abort + ${EndIf} +FunctionEnd + +Function preShortcuts + Call CheckCustom + !insertmacro MUI_HEADER_TEXT "$(SHORTCUTS_PAGE_TITLE)" "$(SHORTCUTS_PAGE_SUBTITLE)" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "shortcuts.ini" +FunctionEnd + +Function leaveShortcuts + ${MUI_INSTALLOPTIONS_READ} $0 "shortcuts.ini" "Settings" "State" + ${If} $0 != 0 + Abort + ${EndIf} + ${MUI_INSTALLOPTIONS_READ} $AddDesktopSC "shortcuts.ini" "Field 2" "State" + ${MUI_INSTALLOPTIONS_READ} $AddStartMenuSC "shortcuts.ini" "Field 3" "State" + ${MUI_INSTALLOPTIONS_READ} $AddQuickLaunchSC "shortcuts.ini" "Field 4" "State" +FunctionEnd + +Function preStartMenu + Call CheckCustom + ${If} $AddStartMenuSC != 1 + Abort + ${EndIf} +FunctionEnd + +Function leaveInstFiles + FileClose $fhUninstallLog + ; Diff and add missing entries from the previous file log if it exists + ${If} ${FileExists} "$INSTDIR\uninstall\uninstall.bak" + SetDetailsPrint textonly + DetailPrint $(STATUS_CLEANUP) + SetDetailsPrint none + ${LogHeader} "Updating Uninstall Log With Previous Uninstall Log" + StrCpy $R0 "$INSTDIR\uninstall\uninstall.log" + StrCpy $R1 "$INSTDIR\uninstall\uninstall.bak" + GetTempFileName $R2 + FileOpen $R3 $R2 w + ${TextCompareNoDetails} "$R1" "$R0" "SlowDiff" "GetDiff" + FileClose $R3 + ${Unless} ${Errors} + ${FileJoin} "$INSTDIR\uninstall\uninstall.log" "$R2" "$INSTDIR\uninstall\uninstall.log" + ${EndUnless} + ${DeleteFile} "$INSTDIR\uninstall\uninstall.bak" + ${DeleteFile} "$R2" + ${EndIf} + + Call WriteLogSeparator + ${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6 + FileWrite $fhInstallLog "${BrandFullName} Installation Finished: $2-$1-$0 $4:$5:$6$\r$\n" + FileClose $fhInstallLog +FunctionEnd + +; When we add an optional action to the finish page the cancel button is +; enabled. This disables it and leaves the finish button as the only choice. +Function preFinish + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "cancelenabled" "0" +FunctionEnd + +################################################################################ +# Initialization Functions + Function .onInit ${GetParameters} $R0 ${If} $R0 != "" - ; Command line argument found + ClearErrors ${GetOptions} "$R0" "-ms" $R1 ${If} ${Errors} ; Default install type @@ -1360,8 +1051,8 @@ Function .onInit StrCpy $LANGUAGE 0 !insertmacro MUI_INSTALLOPTIONS_EXTRACT "options.ini" - !insertmacro MUI_INSTALLOPTIONS_EXTRACT "shortcuts.ini" !insertmacro MUI_INSTALLOPTIONS_EXTRACT "components.ini" + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "shortcuts.ini" !insertmacro createBasicCustomOptionsINI !insertmacro createComponentsINI !insertmacro createShortcutsINI @@ -1390,11 +1081,3 @@ Function .onInit SectionSetText 2 "" ${EndIf} FunctionEnd - -Function un.onInit - GetFullPathName $INSTDIR "$INSTDIR\.." - StrCpy $LANGUAGE 0 -; XXXrstrong - should we quit when the app exe is not present? - Call un.SetAccess -FunctionEnd - diff --git a/mozilla/browser/installer/windows/nsis/uninstaller.nsi b/mozilla/browser/installer/windows/nsis/uninstaller.nsi new file mode 100755 index 00000000000..0a3e8919ae7 --- /dev/null +++ b/mozilla/browser/installer/windows/nsis/uninstaller.nsi @@ -0,0 +1,496 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is the Mozilla Installer code. +# +# The Initial Developer of the Original Code is Mozilla Foundation +# Portions created by the Initial Developer are Copyright (C) 2006 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Robert Strong +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +# Also requires: +# ShellLink plugin http://nsis.sourceforge.net/ShellLink_plug-in + +; Set verbosity to 3 (e.g. no script) to lessen the noise in the build logs +!verbose 3 + +; 7-Zip provides better compression than the lzma from NSIS so we add the files +; uncompressed and use 7-Zip to create a SFX archive of it +SetDatablockOptimize on +SetCompress off +CRCCheck on + +!addplugindir ./ + +Var TmpVal + +; Other included files may depend upon these includes! +; The following includes are provided by NSIS. +!include FileFunc.nsh +!include LogicLib.nsh +!include TextFunc.nsh +!include WinMessages.nsh +!include WordFunc.nsh +!include MUI.nsh + +!insertmacro GetParameters +!insertmacro un.LineFind +!insertmacro un.TrimNewLines + +; The following includes are custom. +!include branding.nsi +!include defines.nsi +!include common.nsh +!include locales.nsi +!include version.nsh + +!insertmacro un.RegCleanMain +!insertmacro un.RegCleanUninstall +!insertmacro un.CloseApp +!insertmacro un.GetSecondInstallPath + +Name "${BrandFullName}" +OutFile "uninst.exe" +InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} (${AppVersion})" "InstallLocation" +InstallDir "$PROGRAMFILES\${BrandFullName}" +ShowUnInstDetails nevershow + +################################################################################ +# Modern User Interface - MUI + +!define MUI_ABORTWARNING +!define MUI_ICON setup.ico +!define MUI_UNICON setup.ico +!define MUI_WELCOMEPAGE_TITLE_3LINES +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_RIGHT +!define MUI_UNWELCOMEFINISHPAGE_BITMAP wizWatermark.bmp + +; Use a right to left header image when the language is right to left +!ifdef ${AB_CD}_rtl +!define MUI_HEADERIMAGE_BITMAP_RTL wizHeaderRTL.bmp +!else +!define MUI_HEADERIMAGE_BITMAP wizHeader.bmp +!endif + +/** + * Uninstall Pages + */ +; Welcome Page +!insertmacro MUI_UNPAGE_WELCOME + +; Uninstall Confirm Page +!insertmacro MUI_UNPAGE_CONFIRM + +; Remove Files Page +!define MUI_PAGE_CUSTOMFUNCTION_PRE un.preInstFiles +!insertmacro MUI_UNPAGE_INSTFILES + +; Finish Page +!define MUI_PAGE_CUSTOMFUNCTION_PRE un.preFinish +!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED +!define MUI_FINISHPAGE_SHOWREADME "" + +; Setup the survey controls, functions, etc. except when the application has +; defined NO_UNINSTALL_SURVEY +!ifndef NO_UNINSTALL_SURVEY +!define MUI_FINISHPAGE_SHOWREADME_TEXT $(SURVEY_TEXT) +!define MUI_FINISHPAGE_SHOWREADME_FUNCTION un.Survey +!endif + +!insertmacro MUI_UNPAGE_FINISH + +################################################################################ +# Install Sections +; Empty section required for the installer to compile as an uninstaller +Section "" +SectionEnd + +################################################################################ +# Uninstall Sections + +Section "Uninstall" + SetDetailsPrint textonly + DetailPrint $(STATUS_UNINSTALL_MAIN) + SetDetailsPrint none + ; Remove registry entries for non-existent apps and for apps that point to our + ; install location in the Software\Mozilla key. + SetShellVarContext current ; Sets SHCTX to HKCU + ${un.RegCleanMain} "Software\Mozilla" + SetShellVarContext all ; Sets SHCTX to HKLM + ${un.RegCleanMain} "Software\Mozilla" + + ; Remove uninstall entries that point to our install location + ${un.RegCleanUninstall} + + SetShellVarContext all ; Set SHCTX to HKLM + ${un.GetSecondInstallPath} "Software\Mozilla" $R9 + ${If} $R9 == "false" + SetShellVarContext current ; Set SHCTX to HKCU + ${un.GetSecondInstallPath} "Software\Mozilla" $R9 + ${EndIf} + + StrCpy $0 "Software\Clients\StartMenuInternet\${FileMainEXE}\shell\open\command" + ReadRegStr $1 HKLM "$0" "" + Push $1 + ${GetPathFromRegStr} + Pop $R0 + Push $R0 + ${GetParentDir} + Pop $R1 + + ; Only remove the StartMenuInternet key if it refers to this install location. + ; The StartMenuInternet registry key is independent of the default browser + ; settings. The XPInstall base un-installer always removes this key if it is + ; uninstalling the default browser and it will always replace the keys when + ; installing even if there is another install of Firefox that is set as the + ; default browser. Now the key is always updated on install but it is only + ; removed if it refers to this install location. + ${If} $INSTDIR == $R1 + ; XXXrstrong - if there is another installation of the same app ideally we + ; would just modify these values. The GetSecondInstallPath macro could be + ; made to provide enough information to do this. + DeleteRegKey HKLM "Software\Clients\StartMenuInternet\${FileMainEXE}" + ${EndIf} + + StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\App Paths\${FileMainEXE}" + ${If} $R9 == "false" + DeleteRegKey HKLM "$0" + DeleteRegKey HKCU "$0" + StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\$R9" + DeleteRegKey HKLM "$0" + DeleteRegKey HKCU "$0" + StrCpy $0 "MIME\Database\Content Type\application/x-xpinstall;app=firefox" + DeleteRegKey HKCR "$0" + ${Else} + ReadRegStr $1 HKLM "$0" "" + Push $1 + ${GetPathFromRegStr} + Pop $R0 + Push $R0 + ${GetParentDir} + Pop $R1 + ${If} $INSTDIR == $R1 + WriteRegStr HKLM "$0" "" "$R9" + Push $R9 + ${GetParentDir} + Pop $R1 + WriteRegStr HKLM "$0" "Path" "$R1" + ${EndIf} + ${EndIf} + + ; Remove files. If we don't have a log file skip + ${If} ${FileExists} "$INSTDIR\uninstall\uninstall.log" + ; Copy the uninstall log file to a temporary file + GetTempFileName $TmpVal + CopyFiles "$INSTDIR\uninstall\uninstall.log" "$TmpVal" + + ; Unregister DLL's + ${un.LineFind} "$TmpVal" "/NUL" "1:-1" "un.UnRegDLLsCallback" + + ; Delete files + ${un.LineFind} "$TmpVal" "/NUL" "1:-1" "un.RemoveFilesCallback" + + ; Remove directories we always control + RmDir /r "$INSTDIR\uninstall" + RmDir /r "$INSTDIR\updates" + RmDir /r "$INSTDIR\defaults\shortcuts" + + ; Remove empty directories + ${un.LineFind} "$TmpVal" "/NUL" "1:-1" "un.RemoveDirsCallback" + + ; Delete the temporary uninstall log file + ${DeleteFile} "$TmpVal" + + ; Remove the installation directory if it is empty + ${RemoveDir} "$INSTDIR" + ${EndIf} + + ; Refresh desktop icons otherwise the start menu internet item won't be + ; removed and other ugly things will happen like recreation of the registry + ; key by the OS under some conditions. + System::Call "shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)" +SectionEnd + +################################################################################ +# Helper Functions + +Function un.RemoveFilesCallback + ${un.TrimNewLines} "$R9" "$R9" + StrCpy $R1 "$R9" 5 + ${If} $R1 == "File:" + StrCpy $R9 "$R9" "" 6 + StrCpy $R0 "$R9" 1 + ; If the path is relative prepend the install directory + ${If} $R0 == "\" + StrCpy $R0 "$INSTDIR$R9" + ${Else} + StrCpy $R0 "$R9" + ${EndIf} + ${If} ${FileExists} "$R0" + ${DeleteFile} "$R0" + ${EndIf} + ${EndIf} + ClearErrors + Push 0 +FunctionEnd + +; Using locate will leave file handles open to some of the directories which +; will prevent the deletion of these directories. This parses the uninstall.log +; and uses the file entries to find / remove empty directories. +Function un.RemoveDirsCallback + ${un.TrimNewLines} "$R9" "$R9" + StrCpy $R1 "$R9" 5 + ${If} $R1 == "File:" + StrCpy $R9 "$R9" "" 6 + StrCpy $R1 "$R9" 1 + ${If} $R1 == "\" + StrCpy $R2 "$INSTDIR" + StrCpy $R1 "$INSTDIR$R9" + ${Else} + StrCpy $R2 "" + StrCpy $R1 "$R9" + ${EndIf} + loop: + Push $R1 + ${GetParentDir} + Pop $R0 + GetFullPathName $R1 "$R0" + ; We only try to remove empty directories but the Desktop, StartMenu, and + ; QuickLaunch directories can be empty so guard against removing them. + ${If} "$R2" != "$INSTDIR" + SetShellVarContext all + ${If} $R1 == "$DESKTOP" + ${OrIf} $R1 == "$STARTMENU" + GoTo end + ${EndIf} + SetShellVarContext current + ${If} $R1 == "$QUICKLAUNCH" + ${OrIf} $R1 == "$DESKTOP" + ${OrIf} $R1 == "$STARTMENU" + GoTo end + ${EndIf} + ${ElseIf} "$R1" == "$INSTDIR" + GoTo end + ${EndIf} + ${If} ${FileExists} "$R1" + RmDir "$R1" + ${EndIf} + ${If} ${Errors} + ${OrIf} "$R2" != "$INSTDIR" + GoTo end + ${EndIf} + GoTo loop + ${EndIf} + + end: + ClearErrors + Push 0 +FunctionEnd + +Function un.UnRegDLLsCallback + ${un.TrimNewLines} "$R9" "$R9" + StrCpy $R1 "$R9" 7 + ${If} $R1 == "DLLReg:" + StrCpy $R9 "$R9" "" 8 + StrCpy $R1 "$R9" 1 + ${If} $R1 == "\" + StrCpy $R1 "$INSTDIR$R9" + ${Else} + StrCpy $R1 "$R9" + ${EndIf} + UnRegDLL $R1 + ${EndIf} + ClearErrors + Push 0 +FunctionEnd + +; Setup the survey controls, functions, etc. except when the application has +; defined NO_UNINSTALL_SURVEY +!ifndef NO_UNINSTALL_SURVEY +Function un.Survey + Exec "$\"$TmpVal$\" $\"${SurveyURL}$\"" +FunctionEnd +!endif + +################################################################################ +# Language + +!insertmacro MOZ_MUI_LANGUAGE 'baseLocale' +!verbose push +!verbose 3 +!include "overrideLocale.nsh" +!include "customLocale.nsh" +!verbose pop + +; Set this after the locale files to override it if it is in the locale. Using +; " " for BrandingText will hide the "Nullsoft Install System..." branding. +BrandingText " " + +################################################################################ +# Page pre and leave functions + +; Checks if the app being uninstalled is running. +Function un.preInstFiles + ; Try to delete the app executable and if we can't delete it try to close the + ; app. This allows running an instance that is located in another directory. + ClearErrors + ${If} ${FileExists} "$INSTDIR\${FileMainEXE}" + ${DeleteFile} "$INSTDIR\${FileMainEXE}" + ${EndIf} + ${If} ${Errors} + ClearErrors + ${un.CloseApp} "true" $(WARN_APP_RUNNING_UNINSTALL) + ; Delete the app exe to prevent launching the app while we are uninstalling. + ${DeleteFile} "$INSTDIR\${FileMainEXE}" + ClearErrors + ${EndIf} +FunctionEnd + +; When we add an optional action to the finish page the cancel button is +; enabled. This disables it and leaves the finish button as the only choice. +Function un.preFinish + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "cancelenabled" "0" + + ; Setup the survey controls, functions, etc. except when the application has + ; defined NO_UNINSTALL_SURVEY + !ifdef NO_UNINSTALL_SURVEY + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "NumFields" "3" + !else + StrCpy $TmpVal "SOFTWARE\Microsoft\IE Setup\Setup" + ClearErrors + ReadRegStr $0 HKLM $TmpVal "Path" + ${If} ${Errors} + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "NumFields" "3" + ${Else} + ExpandEnvStrings $0 "$0" ; this value will usually contain %programfiles% + ${If} $0 != "\" + StrCpy $0 "$0\" + ${EndIf} + StrCpy $0 "$0\iexplore.exe" + ClearErrors + GetFullPathName $TmpVal $0 + ${If} ${Errors} + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "settings" "NumFields" "3" + ${EndIf} + ${EndIf} + !endif +FunctionEnd + +################################################################################ +# Initialization Functions + +Function .onInit + GetFullPathName $INSTDIR "$EXEDIR\.." + ${Unless} ${FileExists} "$INSTDIR\${FileMainEXE}" + Abort + ${EndUnless} + ${GetParameters} $R0 + + StrCpy $R1 "Software\Clients\StartMenuInternet\${FileMainEXE}\InstallInfo" + SetShellVarContext all ; Set $DESKTOP to All Users + + ; Hide icons - initiated from Set Program Access and Defaults + ${If} $R0 == '/ua "${AppVersion} (${AB_CD})" /hs browser' + WriteRegDWORD HKLM $R1 "IconsVisible" 0 + ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" + SetShellVarContext current ; Set $DESKTOP to the current user's desktop + ${EndUnless} + + ${If} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" + ShellLink::GetShortCutArgs "$DESKTOP\${BrandFullName}.lnk" + Pop $0 + ${If} $0 == "" + ShellLink::GetShortCutTarget "$DESKTOP\${BrandFullName}.lnk" + Pop $0 + ${If} $0 == "$INSTDIR\${FileMainEXE}" + Delete "$DESKTOP\${BrandFullName}.lnk" + ${EndIf} + ${EndIf} + ${EndIf} + + ${If} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" + ShellLink::GetShortCutArgs "$QUICKLAUNCH\${BrandFullName}.lnk" + Pop $0 + ${If} $0 == "" + ShellLink::GetShortCutTarget "$QUICKLAUNCH\${BrandFullName}.lnk" + Pop $0 + ${If} $0 == "$INSTDIR\${FileMainEXE}" + Delete "$QUICKLAUNCH\${BrandFullName}.lnk" + ${EndIf} + ${EndIf} + ${EndIf} + Abort + ${EndIf} + + ; Show icons - initiated from Set Program Access and Defaults + ${If} $R0 == '/ua "${AppVersion} (${AB_CD})" /ss browser' + WriteRegDWORD HKLM $R1 "IconsVisible" 1 + ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" + CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 + ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR" + ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" + SetShellVarContext current ; Set $DESKTOP to the current user's desktop + ${Unless} ${FileExists} "$DESKTOP\${BrandFullName}.lnk" + CreateShortCut "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 + ShellLink::SetShortCutWorkingDirectory "$DESKTOP\${BrandFullName}.lnk" "$INSTDIR" + ${EndUnless} + ${EndUnless} + ${EndUnless} + ${Unless} ${FileExists} "$QUICKLAUNCH\${BrandFullName}.lnk" + CreateShortCut "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}" "" "$INSTDIR\${FileMainEXE}" 0 + ShellLink::SetShortCutWorkingDirectory "$QUICKLAUNCH\${BrandFullName}.lnk" "$INSTDIR" + ${EndUnless} + Abort + ${EndIf} + + ; If we made it this far then this installer is being used as an uninstaller. + WriteUninstaller "$EXEDIR\uninstaller.exe" + + ${If} $R0 == "/S" + StrCpy $TmpVal "$\"$EXEDIR\uninstaller.exe$\" /S" + ${Else} + StrCpy $TmpVal "$\"$EXEDIR\uninstaller.exe$\"" + ${EndIf} + + ; When the uninstaller is launched it copies itself to the temp directory so + ; it won't be in use so it can delete itself. + ExecWait $TmpVal + ${DeleteFile} "$EXEDIR\uninstaller.exe" + SetErrorLevel 0 + Quit +FunctionEnd + +Function un.onInit + GetFullPathName $INSTDIR "$INSTDIR\.." + ${Unless} ${FileExists} "$INSTDIR\${FileMainEXE}" + Abort + ${EndUnless} + StrCpy $LANGUAGE 0 +FunctionEnd diff --git a/mozilla/browser/installer/windows/packages-static b/mozilla/browser/installer/windows/packages-static index bbb45ca7075..61edfe0c434 100644 --- a/mozilla/browser/installer/windows/packages-static +++ b/mozilla/browser/installer/windows/packages-static @@ -24,6 +24,7 @@ bin\defaults\profile\prefs.js bin\defaults\profile\search.rdf bin\defaults\profile\mimeTypes.rdf bin\defaults\profile\chrome\* +bin\uninstall\uninst.exe bin\updater.ini bin\dictionaries\* @@ -329,11 +330,6 @@ bin\chrome\pippki.manifest ; bin\updater.exe -; [Uninstaller] -; -bin\uninstall\uninstall.exe -bin\uninstall\uninstall.ini - ; [Additional Developer Tools] [adt] bin\extensions\inspector@mozilla.org\install.rdf diff --git a/mozilla/browser/locales/Makefile.in b/mozilla/browser/locales/Makefile.in index d95c7d4f279..4128b39cb07 100644 --- a/mozilla/browser/locales/Makefile.in +++ b/mozilla/browser/locales/Makefile.in @@ -192,12 +192,15 @@ endif mv $(DIST)/xpi-stage/locale-$(AB_CD) l10n-stage/localized $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx cp ../installer/windows/l10ngen/setup.exe l10n-stage + $(NSINSTALL) -D l10n-stage/localized/uninstall + cp ../installer/windows/l10ngen/uninst.exe l10n-stage/localized/uninstall rm -f app.7z cd l10n-stage && \ $(CYGWIN_WRAPPER) 7z a -r -t7z ../app.7z -mx -m0=BCJ2 -m1=LZMA:d24 -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3 cat ../installer/windows/l10ngen/7zSD.sfx \ $(topsrcdir)/browser/installer/windows/app.tag \ app.7z > $(WIN32_INSTALLER_OUT) + chmod 0755 $(WIN32_INSTALLER_OUT) repackage-win32-installer-%: WIN32_INSTALLER_IN=$(_ABS_DIST)/install/sea/$(PKG_BASENAME).installer.exe repackage-win32-installer-%: $(WIN32_INSTALLER_IN) @@ -226,6 +229,11 @@ repackage-zip: $(ZIP_IN) $(STAGEDIST)/chrome/en-US $(RM) -rf $(DIST)/xpi-stage/locale-$(AB_CD) $(MAKE) libs-$(AB_CD) +ifeq (WINNT,$(OS_ARCH)) + $(RM) -r $(STAGEDIST)/uninstall + $(NSINSTALL) -D $(STAGEDIST)/uninstall + cp ../installer/windows/l10ngen/uninst.exe $(STAGEDIST)/uninstall +endif $(RM) -r $(DIST)/xpi-stage/locale-$(AB_CD)/chrome/$(AB_CD) cd $(DIST)/xpi-stage/locale-$(AB_CD) && \ tar $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - ) diff --git a/mozilla/configure.in b/mozilla/configure.in index bc67ccc989e..16931a8c442 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -5726,6 +5726,21 @@ MOZ_ARG_DISABLE_BOOL(installer, [ --disable-installer Disable building of installer], MOZ_INSTALLER=, MOZ_INSTALLER=1 ) +if test -n "$MOZ_INSTALLER" -a -n "$MOZ_XUL_APP" -a "$OS_ARCH" = "WINNT"; then + # Disable installer for Windows builds that use the new toolkit if NSIS + # isn't in the path. + AC_PATH_PROGS(MAKENSIS, makensis) + if test -z "$MAKENSIS" || test "$MAKENSIS" = ":"; then + AC_MSG_ERROR([To build the installer makensis is required in your path. To build without the installer reconfigure using --disable-installer.]) + fi + # The Windows build for NSIS requires the iconv command line utility to + # convert the charset of the locale files. + AC_PATH_PROGS(HOST_ICONV, $HOST_ICONV "iconv", "") + if test -z "$HOST_ICONV"; then + AC_MSG_ERROR([To build the installer iconv is required in your path. To build without the installer reconfigure using --disable-installer.]) + fi +fi + # Automatically disable installer if xpinstall isn't built if test -z "$MOZ_XPINSTALL"; then MOZ_INSTALLER= diff --git a/mozilla/toolkit/mozapps/Makefile.in b/mozilla/toolkit/mozapps/Makefile.in index 77d9f3bb124..58b270da8db 100755 --- a/mozilla/toolkit/mozapps/Makefile.in +++ b/mozilla/toolkit/mozapps/Makefile.in @@ -44,15 +44,4 @@ include $(DEPTH)/config/autoconf.mk DIRS = downloads extensions update xpinstall plugins -# XXX SUITE doesn't want to build the toolkit installer yet -ifndef MOZ_SUITE -# The installer is built during the packaging phase, but the uninstaller needs -# to be built earlier. -ifdef MOZ_INSTALLER -ifeq ($(OS_ARCH),WINNT) -DIRS += installer/windows/wizard/uninstall -endif -endif -endif - include $(topsrcdir)/config/rules.mk diff --git a/mozilla/toolkit/mozapps/installer/windows/nsis/makensis.mk b/mozilla/toolkit/mozapps/installer/windows/nsis/makensis.mk index a413775140a..82163eb4b1f 100755 --- a/mozilla/toolkit/mozapps/installer/windows/nsis/makensis.mk +++ b/mozilla/toolkit/mozapps/installer/windows/nsis/makensis.mk @@ -55,8 +55,12 @@ TOOLKIT_NSIS_FILES = \ $(CONFIG_DIR)/setup.exe:: $(INSTALL) $(addprefix $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR) - $(INSTALL) $(topsrcdir)/toolkit/mozapps/installer/windows/wizard/setuprsc/setup.ico $(CONFIG_DIR) + $(INSTALL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/setup.ico $(CONFIG_DIR) cd $(CONFIG_DIR) && makensis.exe installer.nsi +# Support for building the uninstaller when repackaging locales +ifeq ($(CONFIG_DIR),l10ngen) + cd $(CONFIG_DIR) && makensis.exe uninstaller.nsi +endif $(CONFIG_DIR)/7zSD.sfx: $(CYGWIN_WRAPPER) upx --best -o $(CONFIG_DIR)/7zSD.sfx $(SFX_MODULE) @@ -68,3 +72,12 @@ installer:: $(NSINSTALL) -D $(DIST)/install/sea cat $(CONFIG_DIR)/7zSD.sfx $(CONFIG_DIR)/app.tag $(CONFIG_DIR)/app.7z > $(DIST)/install/sea/$(PKG_BASENAME).installer.exe chmod 0755 $(DIST)/install/sea/$(PKG_BASENAME).installer.exe + +# For building the uninstaller during the application build so it can be +# included for mar file generation. +uninstaller:: + $(INSTALL) $(addprefix $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/,$(TOOLKIT_NSIS_FILES)) $(CONFIG_DIR) + $(INSTALL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/setup.ico $(CONFIG_DIR) + cd $(CONFIG_DIR) && makensis.exe uninstaller.nsi + $(NSINSTALL) -D $(DIST)/bin/uninstall + cp $(CONFIG_DIR)/uninst.exe $(DIST)/bin/uninstall diff --git a/mozilla/toolkit/mozapps/installer/windows/nsis/setup.ico b/mozilla/toolkit/mozapps/installer/windows/nsis/setup.ico new file mode 100755 index 0000000000000000000000000000000000000000..228e50b84b647f82f459dc8d8173035197ae67db GIT binary patch literal 10134 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