fixes bug 307296 "MAR files do not contain updates to the uninstaller" r=bsmedberg

This commit is contained in:
darin%meer.net 2006-01-10 02:36:05 +00:00
Родитель 76c2868c0e
Коммит 878b6e7f9d
44 изменённых файлов: 399 добавлений и 370 удалений

Просмотреть файл

@ -40,13 +40,21 @@ topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
DIRS = base components locales extensions themes app
ifeq ($(OS_ARCH),WINNT)
ifdef MOZ_INSTALLER
DIRS += installer/windows
# Generate uninstall.ini (en-US only for now)
UNINSTALLER_INC = $(topsrcdir)/browser/locales/en-US/installer/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
endif
endif

Просмотреть файл

@ -1,6 +1,7 @@
# These values are used to construct the registry keys for the Add/Remove
# Programs dialog under Windows. They must be kept in sync with the values
# used by the installer.
fileUninstall=UninstallDeerPark.exe
# XXX fileUninstall is no longer brand-specific, and can therefore be removed.
fileUninstall=uninstall.exe
URLInfoAbout=http://www.mozilla.org/
URLUpdateInfo=http://www.mozilla.org/products/firefox/

Просмотреть файл

@ -50,3 +50,5 @@ extensions/reporter@mozilla.org/install.rdf
extensions/reporter@mozilla.org/chrome.manifest
extensions/reporter@mozilla.org/chrome/reporter.jar
extensions/reporter@mozilla.org/defaults/preferences/reporter.js
uninstall/UninstallFirefox.exe
uninstall/UninstallDeerPark.exe

Просмотреть файл

@ -51,7 +51,6 @@ SRC_DIR=$(shell cygpath -a $(topsrcdir))
PP_LOCALIZED_FILES = \
packages-static \
uninstall.it \
installer.cfg \
$(NULL)

Просмотреть файл

@ -256,7 +256,7 @@ function registerMainKeys(winreg)
data = "\"" + fProgram + "$MainExeFile$\"";
winreg.setValueString(subkey + "\\shell\\open\\command", "", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /hs browser";
data = "\"" + fProgram + "uninstall\\uninstall.exe\" /ua \"$UserAgent$\" /hs browser";
winreg.setValueString(subkey + "\\InstallInfo", "HideIconsCommand", data);
winreg.setValueNumber(subkey + "\\InstallInfo", "IconsVisible", 1);
@ -264,7 +264,7 @@ function registerMainKeys(winreg)
data = "\"" + fProgram + "$MainExeFile$\" -silent -nosplash -setDefaultBrowser ";
winreg.setValueString(subkey + "\\InstallInfo", "ReinstallCommand", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /ss browser";
data = "\"" + fProgram + "uninstall\\uninstall.exe\" /ua \"$UserAgent$\" /ss browser";
winreg.setValueString(subkey + "\\InstallInfo", "ShowIconsCommand", data);
}
}

Просмотреть файл

@ -71,8 +71,6 @@ Program Name=$MainExeFile$
Program Folder Name=$ProductName$
Program Folder Path=[PROGRAMS]
Uninstall Filename=$UninstallFile$
; This key is used as a fail over key. This url will be used when the
; url in the Site Selector fails.
url=$ArchiveUrl$
@ -215,11 +213,10 @@ Description Long={TYPE_STANDARD_DESC}
; this Setup Type is selected.
C0=Component XPCOM
C1=Component Browser
C2=Component Uninstaller
C3=Component Langpack
C2=Component Langpack
; Make sure Component QFA is LAST so 3rd party developers who might not want
; this component can easily remove it.
C4=Component QFA
C3=Component QFA
[Setup Type1]
Description Short={TYPE_CUSTOM}
@ -231,11 +228,10 @@ Description Long={TYPE_CUSTOM_DESC}
C0=Component XPCOM
C1=Component Browser
C2=Component ADT
C3=Component Uninstaller
C4=Component Langpack
C3=Component Langpack
; Make sure Component QFA is LAST so 3rd party developers who might not want
; this component can easily remove it.
C5=Component QFA
C4=Component QFA
[Dialog Select Components]
Show Dialog=TRUE
@ -541,22 +537,6 @@ Attributes=FORCE_UPGRADE|VISIBLE
Force Upgrade File0=[SETUP PATH]\chrome\inspector.jar
FileCount=$FileCount$
[Component Uninstaller]
Description Short={UNINSTALL_SHORT}
Description Long={UNINSTALL_SHORT}
Archive=$UninstallFileZip$
$InstallSize$:$UninstallFileZip$
$InstallSizeSystem$
$InstallSizeArchive$:$UninstallFileZip$
Attributes=SELECTED|INVISIBLE|DOWNLOAD_ONLY
FileCount=$FileCount$
;Since the uninstaller program is going to be installed into the Windows folder,
;Setup.exe needs to know to calculate the disk space required for the Windows folder.
;This section overrides the default user-chosen path for the Uninstaller only.
[Component Uninstaller-Destination Path0]
Path=[WINDIR]
[Component Langpack]
Description Short={AB_CD} {LANGPACK_TITLE}
Description Long={AB_CD} {LANGPACK_TITLE}
@ -630,32 +610,8 @@ Message=
; if reboot is necessary, installer can set it up so
; the app runs once upon windows reboot.
;Uncompress FileX sections
[Uncompress File0]
Timing=post smartupdate
Source=[XPI PATH]\$UninstallFileZip$
Destination=[WINDIR]
Message={INST_UNINST}
Only If Exists=FALSE
;Copy FileX sections
;Copy the uninstaller to the [Setup Path]\uninstall folder.
;This copy is to be used when the user installed on a system with
;restricted access.
[Copy File0]
Timing=post smartupdate
Source=[WINDIR]\$UninstallFile$
Destination=[SETUP PATH]\uninstall
Fail If Exists=FALSE
Do Not Uninstall=FALSE
[Copy File1]
Timing=post smartupdate
Source=[XPI PATH]\$UninstallFile$
Destination=[WINDIR]
Fail If Exists=FALSE
Do Not Uninstall=TRUE
; nss3.dll, softokn3.dll, ssl3.dll, and smime3.dll all need to be copied from
; the GRE dir to the destination app folder (see bug 202326)
@ -913,7 +869,7 @@ Timing=post smartupdate
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Microsoft\Windows\CurrentVersion\Uninstall\$ProductName$ ($UserAgentShort$)
Name=UninstallString
Name Value=[WINDIR]\$UninstallFile$ /ua "$UserAgent$"
Name Value=[SETUP PATH]\uninstall\uninstall.exe /ua "$UserAgent$"
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE

Просмотреть файл

@ -8,8 +8,6 @@ VersionProduct = @MOZ_APP_VERSION@
FileInstallerEXE = @PKG_BASENAME@.installer.exe
FileInstallerMSI = @PKG_BASENAME@.installer.msi
FileMainEXE = firefox.exe
FileUninstall = UninstallDeerPark.exe
FileUninstallZIP = UninstallDeerPark.zip
FileInstallerNETRoot = @PKG_BASENAME@.net-installer
ComponentList = xpcom,browser,talkback,@AB_CD@,adt
LicenseFile = browser/EULA

Просмотреть файл

@ -298,6 +298,11 @@ 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

Просмотреть файл

@ -9,8 +9,8 @@
; values.
Run Mode=Normal
Company Name=$CompanyName$
Product Name=$ProductName$
Company Name=@BRAND_COMPANY_NAME@
Product Name=@BRAND_PRODUCT_NAME@
; Valid Path values:
; PROGRAMFILESDIR
@ -56,13 +56,11 @@ Root Key=HKEY_LOCAL_MACHINE
Key=[Product CurrentVersion]\Uninstall
Decrypt Key=TRUE
Uninstall Filename=$UninstallFile$
[Check Instance0]
Class Name=FirefoxMessageWindow
Window Name=
Process Name=$MainExeFile$
Pretty Name=$ProductNameInternal$
Process Name=firefox.exe
Pretty Name=@BRAND_PRODUCT_NAME@
Message=@UNINST_RUNNING@
Message wait=@UNINST_SHUTDOWN@
@ -73,7 +71,7 @@ Close All Process Windows=TRUE
; These keys are not normally necessary for checking instances. They are
; set here because Mozilla requires a way to shut down it's turbo mode.
Extra Cmd0 Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\$MainExeFile$
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe
Extra Cmd0 Reg Name=
Extra Cmd0 Parameter=-kill

Просмотреть файл

@ -0,0 +1,58 @@
#filter emptyLines
# This file is in the UTF-8 encoding
#define BRAND_COMPANY_NAME Mozilla
#define BRAND_PRODUCT_NAME Mozilla Firefox
#define UNINST_RUNNING Mozilla Firefox is detected to be currently running. Please quit Mozilla Firefox before continuing. Click OK to exit Mozilla Firefox automatically and proceed with uninstallation.
#define UNINST_SHUTDOWN Shutting down Mozilla Firefox. Please wait...
#define UNINST_FONT MS Sans Serif
#define UNINST_FONTSIZE 8
#define UNINST_CHARSET 0
# Here is a partial list CHAR_SETS
# ANSI_CHARSET = 0
# DEFAULT_CHARSET = 1
# SYMBOL_CHARSET = 2
# SHIFTJIS_CHARSET = 128
# GB2312_CHARSET = 134
# HANGEUL_CHARSET = 129
# CHINESEBIG5_CHARSET = 136
# OEM_CHARSET 255
#define UNINST_TITLE Mozilla Firefox Uninstaller
#define UNINST_MESSAGE0 Are you sure you want to completely remove %s and all of its components?
#define BTN_UNINST &Uninstall
#define BTN_CANCEL &Cancel
#define BTN_MESSAGE1 Uninstall has detected that the following shared file is no longer used by any programs. If any programs still require the shared file and it is removed, those programs may no longer function. Are you sure you want to remove this shared file?
#define BTN_MESSAGE2 Leaving this file will not harm your system. If you are not sure, it is recommended that the shared file be not removed from the system.
#define BTN_FILENAME File name:
#define BTN_NO &No
#define BTN_NOTOALL N&o to all
#define BTN_YES &Yes
#define BTN_YESTOALL Y&es to all
#define ERROR_DLL_LOAD Could not load %s
#define ERROR_STRING_LOAD Could not load string resource ID %d
#define ERROR_STRING_NULL Null pointer encountered.
#define ERROR_GLOBALALLOC Memory allocation error.
#define ERROR_FAILED %s failed.
#define ERROR_DIALOG_CREATE Could not create %s dialog.
#define DLGQUITTITLE Question
#define DLGQUITMSG Are you sure you want to cancel?
#define ERROR_GET_SYSTEM_DIRECTORY_FAILED GetSystemDirectory() failed.
#define ERROR_GET_WINDOWS_DIRECTORY_FAILED GetWindowsDirectory() failed.
#define ERROR_CREATE_TEMP_DIR Uninstall was not able to create the TEMP directory: %s
#define ERROR_SETUP_REQUIREMENT Windows95 or greater Operating System is required! Exiting Uninstall...
#define MB_WARNING_STR Warning
#define ERROR_UNINSTALL_LOG_FOLDER Uninstall log folder not found:%s
#define MB_MESSAGE_STR Message
#define DLG_REMOVE_FILE_TITLE Remove File?
#define ERROR_GETVERSION GetVersionEx() failed!
#define MB_ATTENTION_STR Attention
#define MSG_FORCE_QUIT_PROCESS Uninstall has detected that %s (%s) is still running. Click OK to quit %s and proceed with uninstallation. Alternatively, use the Windows Task Manager to quit %s, and then click OK to continue with uninstallation.
#define MSG_FORCE_QUIT_PROCESS_FAILED Uninstall will now exit. Uninstall could not continue because %s (%s) is still running. Try manually quitting %s using Windows Task Manager, and then run Uninstall again.
#define MSG_DELETE_INSTALLATION_PATH Not all files were uninstalled from the installation directory:\n\n %s\n\nDo you want to completely delete this directory?
#define MSG_INSTALLATION_PATH_WITHIN_WINDIR Uninstall has detected that the installation path of Mozilla Firefox is installed to a folder within your Windows folder. Uninstall will not attempt to delete this installation due to the potential removal of critical system files.
#unfilter emptyLines

Просмотреть файл

@ -40,7 +40,7 @@ topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
DIRS = base locales components extensions themes app
@ -50,6 +50,14 @@ DIRS = base locales components extensions themes app
ifeq ($(OS_ARCH),WINNT)
ifdef MOZ_INSTALLER
DIRS += installer/windows
# Generate uninstall.ini (en-US only for now)
UNINSTALLER_INC = $(topsrcdir)/mail/locales/en-US/installer/uninstaller.inc
$(FINAL_TARGET)/uninstall/uninstall.ini: $(topsrcdir)/mail/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
endif
endif

Просмотреть файл

@ -1,6 +1,7 @@
# These values are used to construct the registry keys for the Add/Remove
# Programs dialog under Windows. They must be kept in sync with the values
# used by the installer.
fileUninstall=UninstallThunderbird.exe
# XXX fileUninstall is no longer brand-specific, and can therefore be removed.
fileUninstall=uninstall.exe
URLInfoAbout=http://www.mozilla.org/
URLUpdateInfo=http://www.mozilla.org/products/thunderbird/

Просмотреть файл

@ -192,3 +192,4 @@ components/talkback/master.ini
components/talkback/talkback
components/talkback/talkback.so
components/talkback/XTalkback.ad
uninstall/UninstallThunderbird.exe

Просмотреть файл

@ -51,7 +51,6 @@ SRC_DIR=$(shell cygpath -a $(topsrcdir))
PP_LOCALIZED_FILES = \
packages-static \
uninstall.it \
installer.cfg \
$(NULL)

Просмотреть файл

@ -225,7 +225,7 @@ function createShortcuts()
data = "\"" + fProgram + "$MainExeFile$\"";
winreg.setValueString(subkey + "\\shell\\open\\command", "", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /hs";
data = "\"" + fProgram + "uninstall\\uninstall.exe\" /ua \"$UserAgent$\" /hs";
winreg.setValueString(subkey + "\\InstallInfo", "HideIconsCommand", data);
// set this value to 0 because we're not creating the mail shortcuts yet.
@ -234,7 +234,7 @@ function createShortcuts()
data = "\"" + fProgram + "$MainExeFile$\" -silent -nosplash -setDefaultMail";
winreg.setValueString(subkey + "\\InstallInfo", "ReinstallCommand", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /ss mail";
data = "\"" + fProgram + "uninstall\\uninstall.exe\" /ua \"$UserAgent$\" /ss mail";
winreg.setValueString(subkey + "\\InstallInfo", "ShowIconsCommand", data);
}
}

Просмотреть файл

@ -71,8 +71,6 @@ Program Name=$MainExeFile$
Program Folder Name=$ProductName$
Program Folder Path=[PROGRAMS]
Uninstall Filename=$UninstallFile$
; This key is used as a fail over key. This url will be used when the
; url in the Site Selector fails.
url=$ArchiveUrl$
@ -215,13 +213,12 @@ Description Long={Standard_Long}
; this Setup Type is selected.
C0=Component XPCOM
C1=Component Mail
C2=Component Uninstaller
C3=Component Langpack
C4=Component Offline
C5=Component RSS
C2=Component Langpack
C3=Component Offline
C4=Component RSS
; Make sure Component QFA is LAST so 3rd party developers who might not want
; this component can easily remove it.
C6=Component QFA
C5=Component QFA
[Setup Type1]
Description Short={Custom_Short}
@ -232,14 +229,13 @@ Description Long={Custom_Long}
; this Setup Type is selected.
C0=Component XPCOM
C1=Component Mail
C2=Component Uninstaller
C3=Component Langpack
C4=Component Offline
C5=Component RSS
C2=Component Langpack
C3=Component Offline
C4=Component RSS
;C7=Component ADT
; Make sure Component QFA is LAST so 3rd party developers who might not want
; this component can easily remove it.
C6=Component QFA
C5=Component QFA
[Dialog Select Components]
Show Dialog=TRUE
@ -579,22 +575,6 @@ FileCount=$FileCount$
;Force Upgrade File0=[SETUP PATH]\chrome\inspector.jar
;FileCount=$FileCount$
[Component Uninstaller]
Description Short=$CompanyName$ Uninstaller
Description Long=$CompanyName$ Uninstaller
Archive=$UninstallFileZip$
$InstallSize$:$UninstallFileZip$
$InstallSizeSystem$
$InstallSizeArchive$:$UninstallFileZip$
Attributes=SELECTED|INVISIBLE|DOWNLOAD_ONLY
FileCount=$FileCount$
;Since the uninstaller program is going to be installed into the Windows folder,
;Setup.exe needs to know to calculate the disk space required for the Windows folder.
;This section overrides the default user-chosen path for the Uninstaller only.
[Component Uninstaller-Destination Path0]
Path=[WINDIR]
[Component Langpack]
Description Short={AB_CD} {LANGPACK_TITLE}
Description Long={AB_CD} {LANGPACK_TITLE}
@ -670,33 +650,7 @@ Message=
; if reboot is necessary, installer can set it up so
; the app runs once upon windows reboot.
;Uncompress FileX sections
[Uncompress File0]
Timing=post smartupdate
Source=[XPI PATH]\$UninstallFileZip$
Destination=[WINDIR]
;*** LOCALIZE ME BABY ***
Message=Installing the uninstaller, please wait...
Only If Exists=FALSE
;Copy FileX sections
;Copy the uninstaller to the [Setup Path]\uninstall folder.
;This copy is to be used when the user installed on a system with
;restricted access.
[Copy File0]
Timing=post smartupdate
Source=[WINDIR]\$UninstallFile$
Destination=[SETUP PATH]\uninstall
Fail If Exists=FALSE
Do Not Uninstall=FALSE
[Copy File1]
Timing=post smartupdate
Source=[XPI PATH]\$UninstallFile$
Destination=[WINDIR]
Fail If Exists=FALSE
Do Not Uninstall=TRUE
; nss3.dll, softokn3.dll, ssl3.dll, and smime3.dll all need to be copied from
; the GRE dir to the destination app folder (see bug 202326)
@ -954,7 +908,7 @@ Timing=post smartupdate
Root Key=HKEY_LOCAL_MACHINE
Key=Software\Microsoft\Windows\CurrentVersion\Uninstall\$ProductName$ ($UserAgentShort$)
Name=UninstallString
Name Value=[WINDIR]\$UninstallFile$ /ua "$UserAgent$"
Name Value=[SETUP PATH]\uninstall\uninstall.exe /ua "$UserAgent$"
Type=REG_SZ
Decrypt Key=FALSE
Decrypt Name=FALSE
@ -1139,11 +1093,11 @@ Show Folder=HIDE
Program Folder=[Default Folder]
[Program Folder0-Shortcut0]
File=[SETUP PATH]\uninstall\$UninstallFile$
File=[SETUP PATH]\uninstall\uninstall.exe
Arguments=/ua "$UserAgent$"
Working Dir=[SETUP PATH]
Description=Uninstall $ProductName$
Icon Path=[SETUP PATH]\uninstall\$UninstallFile$
Icon Path=[SETUP PATH]\uninstall\uninstall.exe
Icon Id=0
; Default value:

Просмотреть файл

@ -9,8 +9,6 @@ DistSubdir = bin
FileInstallerEXE = @PKG_BASENAME@.installer.exe
FileInstallerMSI = @PKG_BASENAME@.installer.msi
FileMainEXE = thunderbird.exe
FileUninstall = UninstallThunderbird.exe
FileUninstallZIP = UninstallThunderbird.zip
FileInstallerNETRoot = @PKG_BASENAME@.net-installer
ComponentList = xpcom,mail,talkback,@AB_CD@,offline,newsblog
LicenseFile = mail/LICENSE.txt

Просмотреть файл

@ -369,3 +369,7 @@ bin\components\dom_svg.xpt
; [Updater]
bin\updater.exe
; [Uninstaller]
bin\uninstall\uninstall.exe
bin\uninstall\uninstall.ini

Просмотреть файл

@ -7,8 +7,8 @@
; values.
Run Mode=Normal
Company Name=$CompanyName$
Product Name=$ProductName$
Company Name=@BRAND_COMPANY_NAME@
Product Name=@BRAND_PRODUCT_NAME@
; Valid Path values:
; PROGRAMFILESDIR
@ -54,13 +54,11 @@ Root Key=HKEY_LOCAL_MACHINE
Key=[Product CurrentVersion]\Uninstall
Decrypt Key=TRUE
Uninstall Filename=$UninstallFile$
[Check Instance0]
Class Name=MozillaMessageWindow
Window Name=
Process Name=$MainExeFile$
Pretty Name=$ProductNameInternal$
Process Name=thunderbird.exe
Pretty Name=@BRAND_PRODUCT_NAME@
;*** LOCALIZE ME BABY ***
Message=$ProductNameInternal$ is detected to be currently running. Please quit $ProductNameInternal$ before continuing. Click OK to exit $ProductNameInternal$ automatically and proceed with uninstallation.
;*** LOCALIZE ME BABY ***
@ -73,7 +71,7 @@ Close All Process Windows=TRUE
; These keys are not normally necessary for checking instances. They are
; set here because Mozilla requires a way to shut down it's turbo mode.
Extra Cmd0 Reg Key Root=HKEY_LOCAL_MACHINE
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\$MainExeFile$
Extra Cmd0 Reg Key=Software\Microsoft\Windows\CurrentVersion\App Paths\thunderbird.exe
Extra Cmd0 Reg Name=
Extra Cmd0 Parameter=-kill

Просмотреть файл

@ -0,0 +1,58 @@
#filter emptyLines
# This file is in the UTF-8 encoding
#define BRAND_COMPANY_NAME Mozilla
#define BRAND_PRODUCT_NAME Mozilla Thunderbird
#define UNINST_RUNNING Mozilla Thunderbird is detected to be currently running. Please quit Mozilla Thunderbird before continuing. Click OK to exit Mozilla Thunderbird automatically and proceed with uninstallation.
#define UNINST_SHUTDOWN Shutting down Mozilla Thunderbird. Please wait...
#define UNINST_FONT MS Sans Serif
#define UNINST_FONTSIZE 8
#define UNINST_CHARSET 0
# Here is a partial list CHAR_SETS
# ANSI_CHARSET = 0
# DEFAULT_CHARSET = 1
# SYMBOL_CHARSET = 2
# SHIFTJIS_CHARSET = 128
# GB2312_CHARSET = 134
# HANGEUL_CHARSET = 129
# CHINESEBIG5_CHARSET = 136
# OEM_CHARSET 255
#define UNINST_TITLE Mozilla Thunderbird Uninstaller
#define UNINST_MESSAGE0 Are you sure you want to completely remove %s and all of its components?
#define BTN_UNINST &Uninstall
#define BTN_CANCEL &Cancel
#define BTN_MESSAGE1 Uninstall has detected that the following shared file is no longer used by any programs. If any programs still require the shared file and it is removed, those programs may no longer function. Are you sure you want to remove this shared file?
#define BTN_MESSAGE2 Leaving this file will not harm your system. If you are not sure, it is recommended that the shared file be not removed from the system.
#define BTN_FILENAME File name:
#define BTN_NO &No
#define BTN_NOTOALL N&o to all
#define BTN_YES &Yes
#define BTN_YESTOALL Y&es to all
#define ERROR_DLL_LOAD Could not load %s
#define ERROR_STRING_LOAD Could not load string resource ID %d
#define ERROR_STRING_NULL Null pointer encountered.
#define ERROR_GLOBALALLOC Memory allocation error.
#define ERROR_FAILED %s failed.
#define ERROR_DIALOG_CREATE Could not create %s dialog.
#define DLGQUITTITLE Question
#define DLGQUITMSG Are you sure you want to cancel?
#define ERROR_GET_SYSTEM_DIRECTORY_FAILED GetSystemDirectory() failed.
#define ERROR_GET_WINDOWS_DIRECTORY_FAILED GetWindowsDirectory() failed.
#define ERROR_CREATE_TEMP_DIR Uninstall was not able to create the TEMP directory: %s
#define ERROR_SETUP_REQUIREMENT Windows95 or greater Operating System is required! Exiting Uninstall...
#define MB_WARNING_STR Warning
#define ERROR_UNINSTALL_LOG_FOLDER Uninstall log folder not found:%s
#define MB_MESSAGE_STR Message
#define DLG_REMOVE_FILE_TITLE Remove File?
#define ERROR_GETVERSION GetVersionEx() failed!
#define MB_ATTENTION_STR Attention
#define MSG_FORCE_QUIT_PROCESS Uninstall has detected that %s (%s) is still running. Click OK to quit %s and proceed with uninstallation. Alternatively, use the Windows Task Manager to quit %s, and then click OK to continue with uninstallation.
#define MSG_FORCE_QUIT_PROCESS_FAILED Uninstall will now exit. Uninstall could not continue because %s (%s) is still running. Try manually quitting %s using Windows Task Manager, and then run Uninstall again.
#define MSG_DELETE_INSTALLATION_PATH Not all files were uninstalled from the installation directory:\n\n %s\n\nDo you want to completely delete this directory?
#define MSG_INSTALLATION_PATH_WITHIN_WINDIR Uninstall has detected that the installation path of Mozilla Thunderbird is installed to a folder within your Windows folder. Uninstall will not attempt to delete this installation due to the potential removal of critical system files.
#unfilter emptyLines

Просмотреть файл

@ -1,6 +1,7 @@
# These values are used to construct the registry keys for the Add/Remove
# Programs dialog under Windows. They must be kept in sync with the values
# used by the installer.
fileUninstall=UninstallFirefox.exe
# XXX fileUninstall is no longer brand-specific, and can therefore be removed.
fileUninstall=uninstall.exe
URLInfoAbout=http://www.mozilla.org/
URLUpdateInfo=http://www.mozilla.org/products/firefox/

Просмотреть файл

@ -1,6 +1,7 @@
# These values are used to construct the registry keys for the Add/Remove
# Programs dialog under Windows. They must be kept in sync with the values
# used by the installer.
fileUninstall=UninstallThunderbird.exe
# XXX fileUninstall is no longer brand-specific, and can therefore be removed.
fileUninstall=uninstall.exe
URLInfoAbout=http://www.mozilla.org/
URLUpdateInfo=http://www.mozilla.org/products/thunderbird/

Просмотреть файл

@ -44,5 +44,12 @@ include $(DEPTH)/config/autoconf.mk
DIRS = downloads extensions update xpinstall plugins
include $(topsrcdir)/config/rules.mk
# 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
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -81,12 +81,6 @@ sub ParseInstallerCfg
elsif ($prop eq "FileInstallerEXE") {
$ENV{WIZ_fileInstallerExe} = $value;
}
elsif ($prop eq "FileUninstall") {
$ENV{WIZ_fileUninstall} = $value;
}
elsif ($prop eq "FileUninstallZIP") {
$ENV{WIZ_fileUninstallZip} = $value;
}
elsif ($prop eq "FileMainEXE") {
$ENV{WIZ_fileMainExe} = $value;
}

Просмотреть файл

@ -90,8 +90,6 @@ $seiFileNameGeneric = "nsinstall".$exe_suffix;
$seiFileNameSpecific = $ENV{WIZ_fileInstallerExe};
$seiStubRootName = $ENV{WIZ_fileNetStubRootName};
$seiFileNameSpecificStub = "$seiStubRootName".$exe_suffix;
$seuFileNameSpecific = $ENV{WIZ_fileUninstall};
$seuzFileNameSpecific = $ENV{WIZ_fileUninstallZip};
if(defined($ENV{DEBUG_INSTALLER_BUILD}))
{

Просмотреть файл

@ -109,8 +109,6 @@ $nameProduct = $ENV{WIZ_nameProduct};
$shortNameProduct = $ENV{WIZ_shortNameProduct};
$nameProductInternal = $ENV{WIZ_nameProductInternal};
$fileMainExe = $ENV{WIZ_fileMainExe};
$fileUninstall = $ENV{WIZ_fileUninstall};
$fileUninstallZip = $ENV{WIZ_fileUninstallZip};
$greBuildID = $ENV{WIZ_greBuildID};
$greFileVersion = $ENV{WIZ_greFileVersion};
$greUniqueID = $ENV{WIZ_greUniqueID};
@ -157,12 +155,6 @@ while($line = <fpInIt>)
chop($componentName);
}
if($componentName =~ /\$UninstallFileZip\$/i)
{
$installSize = OutputInstallSizeArchive("$inXpiPath/$fileUninstallZip") * 2;
}
else
{
$installSize = OutputInstallSize("$inStagePath/$componentName");
# special oji consideration here. Since it's an installer that
@ -178,7 +170,6 @@ while($line = <fpInIt>)
$installSize = int($installSize * 4.48);
}
}
}
# Read the next line to calculate for the "Install Size System="
if($line = <fpInIt>)
@ -208,7 +199,6 @@ while($line = <fpInIt>)
else {
chop($componentName);
}
$componentName =~ s/\$UninstallFileZip\$/$fileUninstallZip/gi;
$installSizeArchive = OutputInstallSizeArchive("$inXpiPath/$componentName");
}
@ -252,8 +242,6 @@ while($line = <fpInIt>)
$line =~ s/\$ProductNameInternal\$/$nameProductInternal/gi;
$line =~ s/\$ProductShortName\$/$shortNameProduct/gi;
$line =~ s/\$MainExeFile\$/$fileMainExe/gi;
$line =~ s/\$UninstallFile\$/$fileUninstall/gi;
$line =~ s/\$UninstallFileZip\$/$fileUninstallZip/gi;
$line =~ s/\$GreBuildID\$/$greBuildID/gi;
$line =~ s/\$GreFileVersion\$/$greFileVersion/gi;
$line =~ s/\$GreUniqueID\$/$greUniqueID/gi;

Просмотреть файл

@ -85,7 +85,6 @@ $nameProduct = $ENV{WIZ_nameProduct};
$nameProductInternal = $ENV{WIZ_nameProductInternal};
$shortNameProduct = $ENV{WIZ_shortNameProduct};
$fileMainExe = $ENV{WIZ_fileMainExe};
$fileUninstall = $ENV{WIZ_fileUninstall};
$greBuildID = $ENV{WIZ_greBuildID};
$greFileVersion = $ENV{WIZ_greFileVersion};
$greUniqueID = $ENV{WIZ_greUniqueID};
@ -141,7 +140,6 @@ while($line = <fpInTemplate>)
$line =~ s/\$ProductShortName\$/$shortNameProduct/i;
$line =~ s/\$ProductNameInternal\$/$nameProductInternal/gi;
$line =~ s/\$MainExeFile\$/$fileMainExe/i;
$line =~ s/\$UninstallFile\$/$fileUninstall/i;
$line =~ s/\$GreBuildID\$/$greBuildID/gi;
$line =~ s/\$GreFileVersion\$/$greFileVersion/gi;
$line =~ s/\$GreUniqueID\$/$greUniqueID/gi;

Просмотреть файл

@ -11,9 +11,6 @@ $exe_suffix = '.exe';
sub BuildPlatformInstaller
{
print "Making uninstaller...\n";
MakeUninstall() && die;
# copy the lean installer to stub\ dir
print "\n****************************\n";
print "* *\n";
@ -211,55 +208,6 @@ sub BuildPlatformInstaller
return 0;
}
sub MakeUninstall
{
chdir($inConfigFiles);
if(MakeUninstallIniFile())
{
return(1);
}
# Copy the uninstall files to the dist uninstall directory.
copy("uninstall.ini", "$gDirDistInstall") ||
die "copy uninstall.ini $gDirDistInstall: $!\n";
copy("uninstall.ini", "$gDirDistInstall/uninstall") ||
die "copy uninstall.ini $gDirDistInstall/uninstall: $!\n";
copy("$gDirDistInstall/uninstall.exe", "$gDirDistInstall/uninstall") ||
die "copy $gDirDistInstall/uninstall.exe $gDirDistInstall/uninstall: $!\n";
# build the self-extracting .exe (uninstaller) file.
print "\nbuilding self-extracting uninstaller ($seuFileNameSpecific)...\n";
copy("$gDirDistInstall/$seiFileNameGeneric", "$gDirDistInstall/$seuFileNameSpecific") ||
die "copy $gDirDistInstall/$seiFileNameGeneric $gDirDistInstall/$seuFileNameSpecific: $!\n";
$origCwd = cwd();
chdir($gDirDistInstall);
if(system("./nsztool.exe $seuFileNameSpecific uninstall/*.*"))
{
print "\n Error: ./nsztool.exe $seuFileNameSpecific uninstall/*.*\n";
return(1);
}
chdir($origCwd);
MakeExeZip($gDirDistInstall, $seuFileNameSpecific, $seuzFileNameSpecific);
unlink <$gDirDistInstall/$seuFileNameSpecific>;
return(0);
}
sub MakeUninstallIniFile
{
# Make config.ini file
chdir($inConfigFiles);
if(system("perl $gDirPackager/windows/makeuninstallini.pl uninstall.it $gDefaultProductVersion"))
{
print "\n Error: perl $gDirPackager/windows/makeuninstallini.pl uninstall.it $gDefaultProductVersion\n";
return(1);
}
return(0);
}
sub MakeExeZip
{
my($aSrcDir, $aExeFile, $aZipFile) = @_;

Просмотреть файл

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = uninstall setuprsc setup
DIRS = setuprsc setup
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -268,7 +268,6 @@ void InitSequence(HINSTANCE hInstance)
RefreshIcons();
UnsetSetupState(); // clear setup state
ClearWinRegUninstallFileDeletion();
if (!gbIgnoreProgramFolderX)
ProcessProgramFolderShowCmd();
@ -2189,7 +2188,6 @@ LRESULT CALLBACK DlgProcInstallSuccessful(HWND hDlg, UINT msg, WPARAM wParam, LO
RefreshIcons();
UnsetSetupState(); // clear setup state
ClearWinRegUninstallFileDeletion();
if (!gbIgnoreProgramFolderX)
ProcessProgramFolderShowCmd();

Просмотреть файл

@ -640,51 +640,6 @@ void RemoveDelayedDeleteFileEntries(const char *aPathToMatch)
free(pathToMatch);
}
/* Looks for and removes the uninstaller from the Windows Registry
* that is set to delete the uninstaller at the next restart of
* Windows. This key is set/created when the user does the following:
*
* 1) Runs the uninstaller from the previous version of the product.
* 2) User does not reboot the OS and starts the installation of
* the next version of the product.
*
* This functions prevents the uninstaller from being deleted on a
* system reboot after the user performs 2).
*/
void ClearWinRegUninstallFileDeletion(void)
{
char szLCUninstallFilenameLongBuf[MAX_BUF];
char szLCUninstallFilenameShortBuf[MAX_BUF];
char szWinInitFile[MAX_BUF];
char szTempInitFile[MAX_BUF];
char szWinDir[MAX_BUF];
if(!GetWindowsDirectory(szWinDir, sizeof(szWinDir)))
return;
wsprintf(szLCUninstallFilenameLongBuf, "%s\\%s", szWinDir, sgProduct.szUninstallFilename);
GetShortPathName(szLCUninstallFilenameLongBuf, szLCUninstallFilenameShortBuf, sizeof(szLCUninstallFilenameShortBuf));
if(gSystemInfo.dwOSType & OS_NT)
{
RemoveDelayedDeleteFileEntries(szLCUninstallFilenameShortBuf);
}
else
{
/* OS type is win9x */
wsprintf(szWinInitFile, "%s\\wininit.ini", szWinDir);
wsprintf(szTempInitFile, "%s\\wininit.moz", szWinDir);
if(FileExists(szWinInitFile))
{
if(UpdateFile(szWinInitFile, szTempInitFile, szLCUninstallFilenameLongBuf))
CopyFile(szTempInitFile, szWinInitFile, FALSE);
DeleteFile(szTempInitFile);
}
}
}
HRESULT Initialize(HINSTANCE hInstance)
{
char szBuf[MAX_BUF];
@ -3941,8 +3896,6 @@ HRESULT InitSetupGeneral()
return(1);
if((sgProduct.szProductNamePrevious = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((sgProduct.szUninstallFilename = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((sgProduct.szUserAgent = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((sgProduct.szProgramFolderName = NS_GlobalAlloc(MAX_BUF)) == NULL)
@ -3981,7 +3934,6 @@ void DeInitSetupGeneral()
FreeMemory(&(sgProduct.szProductName));
FreeMemory(&(sgProduct.szProductNameInternal));
FreeMemory(&(sgProduct.szProductNamePrevious));
FreeMemory(&(sgProduct.szUninstallFilename));
FreeMemory(&(sgProduct.szUserAgent));
FreeMemory(&(sgProduct.szProgramFolderName));
FreeMemory(&(sgProduct.szProgramFolderPath));
@ -7276,7 +7228,6 @@ HRESULT ParseConfigIni(LPSTR lpszCmdLine)
lstrcpy(sgProduct.szProductNameInternal, sgProduct.szProductName);
GetConfigIniProfileString("General", "Product Name Previous", "", sgProduct.szProductNamePrevious, MAX_BUF);
GetConfigIniProfileString("General", "Uninstall Filename", "", sgProduct.szUninstallFilename, MAX_BUF);
GetConfigIniProfileString("General", "User Agent", "", sgProduct.szUserAgent, MAX_BUF);
GetConfigIniProfileString("General", "Sub Path", "", sgProduct.szSubPath, MAX_BUF);
GetConfigIniProfileString("General", "Program Name", "", sgProduct.szProgramName, MAX_BUF);

Просмотреть файл

@ -202,7 +202,6 @@ void Delay(DWORD dwSeconds);
void UnsetSetupState(void);
void SetSetupState(char *szState);
siCD *InitWinInitNodes(char *szInFile);
void UpdateWininit(LPSTR szUninstallFilename);
char *GetSaveInstallerPath(char *szBuf, DWORD dwBufSize);
void SaveInstallerFiles(void);
void ResetComponentAttributes(char *szFileIni);
@ -227,7 +226,6 @@ void RestoreInvisibleFlag(siC *siCNode);
void RestoreAdditionalFlag(siC *siCNode);
void RestoreEnabledFlag(siC *siCNode);
void SwapFTPAndHTTP(char *szInUrl, DWORD dwInUrlSize);
void ClearWinRegUninstallFileDeletion(void);
void RemoveDelayedDeleteFileEntries(const char *aPathToMatch);
int AppendToGlobalMessageStream(char *szInfo);
char *GetOSTypeString(char *szOSType, DWORD dwOSTypeBufSize);

Просмотреть файл

@ -121,11 +121,10 @@ void LogISProductInfo(void)
}
UpdateInstallStatusLog(szBuf);
wsprintf(szBuf, " Company name: %s\n Product name (external): %s\n Product name (internal): %s\n Uninstall Filename: %s\n UserAgent: %s\n Alternate search path: %s\n",
wsprintf(szBuf, " Company name: %s\n Product name (external): %s\n Product name (internal): %s\n UserAgent: %s\n Alternate search path: %s\n",
sgProduct.szCompanyName,
sgProduct.szProductName,
sgProduct.szProductNameInternal,
sgProduct.szUninstallFilename,
sgProduct.szUserAgent,
sgProduct.szAlternateArchiveSearchPath);
UpdateInstallStatusLog(szBuf);

Просмотреть файл

@ -541,7 +541,6 @@ typedef struct setupStruct
LPSTR szProductName;
LPSTR szProductNameInternal;
LPSTR szProductNamePrevious;
LPSTR szUninstallFilename;
LPSTR szUserAgent;
LPSTR szProgramFolderName;
LPSTR szProgramFolderPath;

Просмотреть файл

@ -68,7 +68,7 @@ LOCAL_INCLUDES = -I$(srcdir)
ifdef GNU_CC
OS_LIBS += -lshell32 -lversion -lgdi32
else
OS_LIBS += shell32.lib version.lib
OS_LIBS += shell32.lib version.lib ole32.lib
endif
NO_DIST_INSTALL = 1
@ -76,11 +76,10 @@ NO_DIST_INSTALL = 1
include $(topsrcdir)/config/rules.mk
libs:: $(PROGRAM)
$(INSTALL) $(PROGRAM) $(DIST)/install
$(INSTALL) $(PROGRAM) $(DIST)/bin/uninstall
install:: $(PROGRAM)
$(INSTALL) $(PROGRAM) $(DESTDIR)$(mozappdir)/install
$(INSTALL) $(PROGRAM) $(DESTDIR)$(mozappdir)/bin/uninstall
clean clobber realclean clobber_all::
$(RM) $(DIST)/install/$(PROGRAM)
$(RM) $(DIST)/bin/uninstall/$(PROGRAM)

Просмотреть файл

@ -267,9 +267,6 @@ void ParseAllUninstallLogs()
lstrcat(szKey, ugUninstall.szUninstallKeyDescription);
RegDeleteKey(HKEY_LOCAL_MACHINE, szKey);
/* update Wininit.ini to remove itself at reboot */
RemoveUninstaller(ugUninstall.szUninstallFilename);
// Calling SHChangeNotify() will update the file association icons
// in case they had been reset.
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);

Просмотреть файл

@ -75,4 +75,6 @@ extern BOOL gbAllowMultipleInstalls;
extern uninstallGen ugUninstall;
extern diU diUninstall;
extern DWORD dwParentPID;
#endif

Просмотреть файл

@ -253,21 +253,12 @@ HRESULT Initialize(HINSTANCE hInstance)
{
lstrcpy(szTempDir, szUninstallDir);
}
else
{
int i;
for(i = 1; i <= 100 && (FileExists(szTempDir) != FALSE); i++)
{
itoa(i, (szTempDir + dwLen), 10);
}
if (FileExists(szTempDir) != FALSE)
else if (!MakeUniquePath(szTempDir))
{
MessageBox(hWndMain, "Cannot create temp directory", NULL, MB_OK | MB_ICONEXCLAMATION);
exit(1);
}
}
}
else
{
// we're not running in mmi mode (allow multiple instances of installer
@ -854,8 +845,6 @@ HRESULT InitUninstallGeneral()
return(1);
if((ugUninstall.szUninstallKeyDescription = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((ugUninstall.szUninstallFilename = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((ugUninstall.szClientAppID = NS_GlobalAlloc(MAX_BUF)) == NULL)
return(1);
if((ugUninstall.szClientAppPath = NS_GlobalAlloc(MAX_BUF)) == NULL)
@ -871,7 +860,6 @@ void DeInitUninstallGeneral()
FreeMemory(&(ugUninstall.szLogFilename));
FreeMemory(&(ugUninstall.szDescription));
FreeMemory(&(ugUninstall.szUninstallKeyDescription));
FreeMemory(&(ugUninstall.szUninstallFilename));
FreeMemory(&(ugUninstall.szUserAgent));
FreeMemory(&(ugUninstall.szDefaultComponent));
FreeMemory(&(ugUninstall.szWrKey));
@ -1023,6 +1011,17 @@ DWORD ParseCommandLine(LPSTR lpszCmdLine)
{
gbAllowMultipleInstalls = TRUE;
}
else if(!lstrcmpi(szArgVBuf, "-ppid") || !lstrcmpi(szArgVBuf, "/ppid"))
{
if((i + 1) < iArgC)
{
char buf[32];
if (GetArgV(lpszCmdLine, ++i, buf, sizeof(buf)))
{
dwParentPID = (DWORD) atoi(buf);
}
}
}
++i;
}
@ -2068,9 +2067,6 @@ HRESULT ParseUninstallIni()
RemoveBackSlash(ugUninstall.szWrMainKey);
GetPrivateProfileString("General", "Uninstall Filename", "", ugUninstall.szUninstallFilename, MAX_BUF, szFileIniUninstall);
/* Uninstall dialog */
GetPrivateProfileString("Dialog Uninstall", "Show Dialog", "", szShowDialog, MAX_BUF, szFileIniUninstall);
GetPrivateProfileString("Dialog Uninstall", "Title", "", diUninstall.szTitle, MAX_BUF, szFileIniUninstall);
@ -2581,6 +2577,18 @@ HRESULT FileExists(LPSTR szFile)
}
}
BOOL MakeUniquePath(LPSTR szPath)
{
int i, dwLen;
dwLen = lstrlen(szPath);
for(i = 1; i <= 999 && (FileExists(szPath) != FALSE); i++)
{
itoa(i, (szPath + dwLen), 10);
}
return !FileExists(szPath);
}
BOOL WinRegNameExists(HKEY hkRootKey, LPSTR szKey, LPSTR szName)
{
HKEY hkResult;

Просмотреть файл

@ -91,6 +91,7 @@ void AppendBackSlash(LPSTR szInput, DWORD dwInputSize);
void RemoveSlash(LPSTR szInput);
void AppendSlash(LPSTR szInput, DWORD dwInputSize);
HRESULT FileExists(LPSTR szFile);
BOOL MakeUniquePath(LPSTR szPath);
BOOL IsWin95Debute(void);
HRESULT CheckInstances();
BOOL GetFileVersion(LPSTR szFile, verBlock *vbVersion);

Просмотреть файл

@ -46,22 +46,17 @@
#define KEY_SHARED_DLLS "Software\\Microsoft\\Windows\\CurrentVersion\\SharedDlls"
BOOL DeleteOrDelayUntilReboot(LPSTR szFile)
BOOL DeleteOnReboot(LPSTR szFile)
{
FILE *ofp;
char szWinDir[MAX_BUF];
char szWininitFile[MAX_BUF];
BOOL bDelayDelete = FALSE;
BOOL bWriteRenameSection;
FileDelete(szFile);
if(FileExists(szFile))
{
bDelayDelete = TRUE;
if(ulOSType & OS_NT)
MoveFileEx(szFile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
else
{
char szWinDir[MAX_BUF];
char szWininitFile[MAX_BUF];
BOOL bWriteRenameSection;
FILE *ofp;
if(GetWindowsDirectory(szWinDir, sizeof(szWinDir)) == 0)
return(FALSE);
@ -83,32 +78,16 @@ BOOL DeleteOrDelayUntilReboot(LPSTR szFile)
fprintf(ofp, "NUL=%s\n", szFile);
fclose(ofp);
}
}
else
bDelayDelete = FALSE;
return(bDelayDelete);
return(TRUE);
}
void RemoveUninstaller(LPSTR szUninstallFilename)
BOOL DeleteOrDelayUntilReboot(LPSTR szFile)
{
char szBuf[MAX_BUF];
char szWinDir[MAX_BUF];
char szUninstallFile[MAX_BUF];
FileDelete(szFile);
if(FileExists(szFile))
return DeleteOnReboot(szFile);
if(SearchForUninstallKeys(szUninstallFilename))
/* Found the uninstall file name in the windows registry uninstall
* key sections. We should not try to delete ourselves. */
return;
if(GetWindowsDirectory(szWinDir, sizeof(szWinDir)) == 0)
return;
lstrcpy(szBuf, szWinDir);
AppendBackSlash(szBuf, sizeof(szBuf));
lstrcat(szBuf, szUninstallFilename);
GetShortPathName(szBuf, szUninstallFile, sizeof(szUninstallFile));
DeleteOrDelayUntilReboot(szUninstallFile);
return(TRUE);
}
sil *InitSilNodes(char *szInFile)

Просмотреть файл

@ -50,9 +50,9 @@ HRESULT ParseForWinRegInfo(LPSTR szString, LPSTR szKeyStr, LPSTR szRootKey,
void ParseForUninstallCommand(LPSTR szString, LPSTR szKeyStr, LPSTR szFile, DWORD dwFileBufSize, LPSTR szParam, DWORD dwParamBufSize);
void DeleteWinRegKey(HKEY hkRootKey, LPSTR szKey, BOOL bAbsoluteDelete);
DWORD GetLogFile(LPSTR szTargetPath, LPSTR szInFilename, LPSTR szOutBuf, DWORD dwOutBufSize);
void RemoveUninstaller(LPSTR szUninstallFilename);
DWORD DecrementSharedFileCounter(char *file);
BOOL DeleteOrDelayUntilReboot(LPSTR szFile);
BOOL DeleteOnReboot(LPSTR szFile);
BOOL UnregisterServer(char *file);
int GetSharedFileCount(char *file);
BOOL DetermineUnRegisterServer(sil *silInstallLogHead, LPSTR szFile);

Просмотреть файл

@ -41,6 +41,7 @@
#include "extra.h"
#include "dialogs.h"
#include "ifuncns.h"
#include "parser.h"
/* global variables */
HINSTANCE hInst;
@ -75,6 +76,123 @@ BOOL gbAllowMultipleInstalls = FALSE;
uninstallGen ugUninstall;
diU diUninstall;
DWORD dwParentPID = 0;
/* Copy a file into a directory. Write the path to the new file
* into the result buffer (MAX_PATH in size). */
static BOOL CopyTo(LPCSTR file, LPCSTR destDir, LPSTR result)
{
char leaf[MAX_BUF_TINY];
ParsePath(file, leaf, sizeof(leaf), PP_FILENAME_ONLY);
lstrcpy(result, destDir);
lstrcat(result, "\\");
lstrcat(result, leaf);
return CopyFile(file, result, TRUE);
}
/* Spawn child process. */
static BOOL SpawnProcess(LPCSTR exePath, LPCSTR cmdLine)
{
STARTUPINFO si = {sizeof(si), 0};
PROCESS_INFORMATION pi = {0};
BOOL ok = CreateProcess(exePath,
cmdLine,
NULL, // no special security attributes
NULL, // no special thread attributes
FALSE, // don't inherit filehandles
0, // No special process creation flags
NULL, // inherit my environment
NULL, // use my current directory
&si,
&pi);
if (ok) {
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
return ok;
}
/* This function is called to ensure that the running executable is a copy of
* the actual uninstaller. If not, then this function copies the uninstaller
* into a temporary directory and invokes the copy of itself. This is done to
* enable the uninstaller to remove itself. */
static BOOL EnsureRunningAsCopy(LPCSTR cmdLine)
{
char uninstExe[MAX_PATH], uninstIni[MAX_PATH];
char tempBuf[MAX_PATH], tempDir[MAX_PATH] = "";
DWORD n;
if (dwParentPID != 0)
{
HANDLE hParent;
/* OpenProcess may return NULL if the parent process has already gone away.
* If not, then wait for the parent process to exit. NOTE: The process may
* be signaled before it releases the executable image, so we sit in a loop
* until OpenProcess returns NULL. */
while ((hParent = OpenProcess(SYNCHRONIZE, FALSE, dwParentPID)) != NULL)
{
DWORD rv = WaitForSingleObject(hParent, 5000);
CloseHandle(hParent);
if (rv != WAIT_OBJECT_0)
return FALSE;
Sleep(50); /* prevent burning CPU while waiting */
}
return TRUE;
}
/* otherwise, copy ourselves to a temp location and execute the copy. */
/* make unique folder under the Temp folder */
n = GetTempPath(sizeof(tempDir)-1, tempDir);
if (n == 0 || n > sizeof(tempDir)-1)
return FALSE;
lstrcat(tempDir, "nstmp");
if (!MakeUniquePath(tempDir) || !CreateDirectory(tempDir, NULL))
return FALSE;
if (!GetModuleFileName(hInst, tempBuf, sizeof(tempBuf)))
return FALSE;
/* copy exe file into temp folder */
if (!CopyTo(tempBuf, tempDir, uninstExe))
{
RemoveDirectory(tempDir);
return FALSE;
}
/* copy ini file into temp folder */
ParsePath(tempBuf, uninstIni, sizeof(uninstIni), PP_PATH_ONLY);
lstrcat(uninstIni, FILE_INI_UNINSTALL);
if (!CopyTo(uninstIni, tempDir, tempBuf))
{
DeleteFile(uninstExe);
RemoveDirectory(tempDir);
return FALSE;
}
/* schedule temp dir and contents to be deleted on reboot */
DeleteOnReboot(uninstExe);
DeleteOnReboot(tempBuf);
DeleteOnReboot(tempDir);
/* append -ppid command line flag */
_snprintf(tempBuf, sizeof(tempBuf), "%s -ppid %lu\n",
cmdLine, GetCurrentProcessId());
/* call CreateProcess */
SpawnProcess(uninstExe, tempBuf);
return FALSE; /* exit this process */
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
/***********************************************************************/
@ -92,10 +210,10 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmd
if(!hPrevInstance)
{
hInst = GetModuleHandle(NULL);
if(InitUninstallGeneral())
PostQuitMessage(1);
else if(ParseCommandLine(lpszCmdLine))
if(InitUninstallGeneral() || ParseCommandLine(lpszCmdLine))
{
PostQuitMessage(1);
}
else if((hwndFW = FindWindow(CLASS_NAME_UNINSTALL_DLG, NULL)) != NULL && !gbAllowMultipleInstalls)
{
/* Allow only one instance of setup to run.
@ -107,7 +225,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmd
iRv = WIZ_SETUP_ALREADY_RUNNING;
PostQuitMessage(1);
}
else if(Initialize(hInst))
else if(!EnsureRunningAsCopy(lpszCmdLine) || Initialize(hInst))
{
PostQuitMessage(1);
}

Просмотреть файл

@ -172,7 +172,6 @@ typedef struct uninstallStruct
LPSTR szProductName;
LPSTR szDescription;
LPSTR szUninstallKeyDescription;
LPSTR szUninstallFilename;
HKEY hWrMainRoot;
LPSTR szWrMainKey;
HKEY hWrRoot;

Просмотреть файл

@ -46,7 +46,6 @@ const URI_BRAND_PROPERTIES = "chrome://branding/locale/brand.properties";
const URI_UNINSTALL_PROPERTIES = "chrome://branding/content/uninstall.properties";
const KEY_APPDIR = "XCurProcD";
const KEY_WINDIR = "WinD";
const KEY_COMPONENTS_DIR = "ComsD";
const KEY_PLUGINS_DIR = "APlugns";
const KEY_EXECUTABLE_FILE = "XREExeF";
@ -713,9 +712,10 @@ function updateRegistry(rootKey) {
var uninstallBundle = sbs.createBundle(URI_UNINSTALL_PROPERTIES);
var nameWithVersion = brandFullName + " (" + app.version + ")";
var uninstaller = getFile(KEY_WINDIR);
uninstaller.append(uninstallBundle.GetStringFromName("fileUninstall"));
// XXX copy latest uninstaller to this location
var uninstaller = getFile(KEY_APPDIR);
uninstaller.append("uninstall");
uninstaller.append("uninstall.exe");
var uninstallString =
uninstaller.path + " /ua \"" + versionWithLocale + "\"";