Bug #300136 --> Full update archives may need to contain remove commands

patch by bsmedberg

sr=me
This commit is contained in:
scott%scott-macgregor.org 2005-09-27 17:43:28 +00:00
Родитель ee0392d13e
Коммит ab35b83f00
5 изменённых файлов: 186 добавлений и 296 удалений

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

@ -87,6 +87,8 @@ NO_PKG_FILES = \
include $(topsrcdir)/config/rules.mk
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
ifdef BUILD_STATIC_LIBS
ifeq (WINNT,$(OS_ARCH))
MOZ_PKG_MANIFEST_P = $(srcdir)/windows/packages-static
@ -111,7 +113,7 @@ endif
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
installer:
installer: removed-files
ifdef INSTALLER_DIR
$(MAKE) -C $(INSTALLER_DIR)
endif

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

@ -0,0 +1,178 @@
components/xpti.dat
components/compreg.dat
components/accessibility.dll
components/appcomps.dll
components/appshell.dll
components/caps.dll
components/chrome.dll
components/composer.dll
components/docshell.dll
components/editor.dll
components/embedcomponents.dll
components/gkgfxwin.dll
components/gklayout.dll
components/gkparser.dll
components/gkwidget.dll
components/i18n.dll
components/imgicon.dll
components/imglib2.dll
components/import.dll
components/mail.dll
components/mork.dll
components/mozfind.dll
components/mozldap.dll
components/msgMapi.dll
components/msgsmime.dll
components/necko.dll
components/necko2.dll
components/nsprefm.dll
components/pipboot.dll
components/pipnss.dll
components/pippki.dll
components/profile.dll
components/profilemigration.dll
components/rdf.dll
components/txmgr.dll
components/uconv.dll
components/wallet.dll
components/webbrwsr.dll
components/wlltvwrs.dll
components/xmlextras.dll
components/xpc3250.dll
components/xpcom_compat_c.dll
components/xppref32.dll
components/accessibility-msaa.xpt
components/accessibility.xpt
components/addrbook.xpt
components/alerts.xpt
components/appshell.xpt
components/autocomplete.xpt
components/caps.xpt
components/chardet.xpt
components/commandhandler.xpt
components/composer.xpt
components/content_base.xpt
components/content_html.xpt
components/content_htmldoc.xpt
components/content_xmldoc.xpt
components/content_xslt.xpt
components/docshell_base.xpt
components/dom.xpt
components/dom_base.xpt
components/dom_core.xpt
components/dom_css.xpt
components/dom_events.xpt
components/dom_html.xpt
components/dom_range.xpt
components/dom_stylesheets.xpt
components/dom_traversal.xpt
components/dom_views.xpt
components/dom_xbl.xpt
components/dom_xpath.xpt
components/dom_xul.xpt
components/downloadmanager.xpt
components/editor.xpt
components/embed_base.xpt
components/exthandler.xpt
components/find.xpt
components/gfx.xpt
components/helperAppDlg.xpt
components/htmlparser.xpt
components/imgicon.xpt
components/imglib2.xpt
components/impComm4xMail.xpt
components/import.xpt
components/intl.xpt
components/jar.xpt
components/jsdservice.xpt
components/jsurl.xpt
components/layout_base.xpt
components/layout_printing.xpt
components/layout_xul.xpt
components/layout_xul_tree.xpt
components/locale.xpt
components/lwbrk.xpt
components/mailnews.xpt
components/mailview.xpt
components/mapihook.xpt
components/mime.xpt
components/mimetype.xpt
components/mozbrwsr.xpt
components/mozfind.xpt
components/mozldap.xpt
components/msgbase.xpt
components/msgcompo.xpt
components/msgdb.xpt
components/msgimap.xpt
components/msglocal.xpt
components/msgnews.xpt
components/msgsearch.xpt
components/msgsmime.xpt
components/necko.xpt
components/necko_cache.xpt
components/necko_cookie.xpt
components/necko_data.xpt
components/necko_dns.xpt
components/necko_file.xpt
components/necko_http.xpt
components/necko_jar.xpt
components/necko_res.xpt
components/necko_strconv.xpt
components/pipboot.xpt
components/pipnss.xpt
components/pippki.xpt
components/pref.xpt
components/prefmigr.xpt
components/profile.xpt
components/progressDlg.xpt
components/proxyObject.xpt
components/rdf.xpt
components/signonviewer.xpt
components/spellchecker.xpt
components/txmgr.xpt
components/txtsvc.xpt
components/uconv.xpt
components/unicharutil.xpt
components/uriloader.xpt
components/wallet.xpt
components/webbrowserpersist.xpt
components/webBrowser_core.xpt
components/webshell_idls.xpt
components/widget.xpt
components/windowds.xpt
components/windowwatcher.xpt
components/winhooks.xpt
components/xmlextras.xpt
components/xpcom_base.xpt
components/xpcom_components.xpt
components/xpcom_ds.xpt
components/xpcom_io.xpt
components/xpcom_obsolete.xpt
components/xpcom_thread.xpt
components/xpcom_xpti.xpt
components/xpconnect.xpt
components/xpinstall.xpt
components/xuldoc.xpt
components/xultmpl.xpt
components/nsBackgroundUpdateService.js
chrome/installed-chrome.txt
chrome/chrome.rdf
chrome/app-chrome.manifest
chrome/mail.jar
chrome/qute.jar
chrome/en-US-mail.jar
chrome/overlayinfo/
defaults/pref/all.js
defaults/pref/security-prefs.js
defaults/pref/winpref.js
defaults/pref/xpinstall.js
defaults/pref/thunderbird.js
@DLL_PREFIX@zlib@DLL_SUFFIX@
component.reg
components/compreg.dat
components/xpti.dat
components/xptitemp.dat

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

@ -59,7 +59,6 @@ INSTALLER_FILES = \
config.it \
app.tag \
adt.jst \
mail.jst \
newsblog.jst \
offline.jst \
talkback.jst \
@ -75,8 +74,12 @@ include $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.m
installer:
$(NSINSTALL) -D instgen
$(PERL) $(topsrcdir)/toolkit/mozapps/installer/make-installjsremoves.pl ../removed-files > instgen/removed-files.js
$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) instgen
iconv -f UTF-8 -t $(WIN_INSTALLER_CHARSET) $(call EXPAND_LOCALE_SRCDIR,mail/locales)/installer/installer.inc > instgen/installer.inc
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) \
-Iinstgen/removed-files.js \
$(srcdir)/mail.jst > instgen/mail.jst
$(EXIT_ON_ERROR) \
for i in $(PP_LOCALIZED_FILES); do \
$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) \

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

@ -184,188 +184,6 @@ function updateWinIni()
}
}
function upgradeCleanup()
{
// Thunderbird used to not be a static build, so we need to clean up all of the stale dlls
// from the non static build..
deleteThisFile("Components", "xpti.dat");
deleteThisFile("Components", "compreg.dat");
deleteThisFile("Components", "accessibility.dll");
deleteThisFile("Components", "appcomps.dll");
deleteThisFile("Components", "appshell.dll");
deleteThisFile("Components", "caps.dll");
deleteThisFile("Components", "chrome.dll");
deleteThisFile("Components", "composer.dll");
deleteThisFile("Components", "docshell.dll");
deleteThisFile("Components", "editor.dll");
deleteThisFile("Components", "embedcomponents.dll");
deleteThisFile("Components", "gkgfxwin.dll");
deleteThisFile("Components", "gklayout.dll");
deleteThisFile("Components", "gkparser.dll");
deleteThisFile("Components", "gkwidget.dll");
deleteThisFile("Components", "i18n.dll");
deleteThisFile("Components", "imgicon.dll");
deleteThisFile("Components", "imglib2.dll");
deleteThisFile("Components", "import.dll");
deleteThisFile("Components", "mail.dll");
deleteThisFile("Components", "mork.dll");
deleteThisFile("Components", "mozfind.dll");
deleteThisFile("Components", "mozldap.dll");
deleteThisFile("Components", "msgMapi.dll");
deleteThisFile("Components", "msgsmime.dll");
deleteThisFile("Components", "necko.dll");
deleteThisFile("Components", "necko2.dll");
deleteThisFile("Components", "nsprefm.dll");
deleteThisFile("Components", "pipboot.dll");
deleteThisFile("Components", "pipnss.dll");
deleteThisFile("Components", "pippki.dll");
deleteThisFile("Components", "profile.dll");
deleteThisFile("Components", "profilemigration.dll");
deleteThisFile("Components", "rdf.dll");
deleteThisFile("Components", "txmgr.dll");
deleteThisFile("Components", "uconv.dll");
deleteThisFile("Components", "wallet.dll");
deleteThisFile("Components", "webbrwsr.dll");
deleteThisFile("Components", "wlltvwrs.dll");
deleteThisFile("Components", "xmlextras.dll");
deleteThisFile("Components", "xpc3250.dll");
deleteThisFile("Components", "xpcom_compat_c.dll");
deleteThisFile("Components", "xppref32.dll");
// xpt files
deleteThisFile("Components", "accessibility-msaa.xpt");
deleteThisFile("Components", "accessibility.xpt");
deleteThisFile("Components", "addrbook.xpt");
deleteThisFile("Components", "alerts.xpt");
deleteThisFile("Components", "appshell.xpt");
deleteThisFile("Components", "autocomplete.xpt");
deleteThisFile("Components", "caps.xpt");
deleteThisFile("Components", "chardet.xpt");
deleteThisFile("Components", "commandhandler.xpt");
deleteThisFile("Components", "composer.xpt");
deleteThisFile("Components", "content_base.xpt");
deleteThisFile("Components", "content_html.xpt");
deleteThisFile("Components", "content_htmldoc.xpt");
deleteThisFile("Components", "content_xmldoc.xpt");
deleteThisFile("Components", "content_xslt.xpt");
deleteThisFile("Components", "docshell_base.xpt");
deleteThisFile("Components", "dom.xpt");
deleteThisFile("Components", "dom_base.xpt");
deleteThisFile("Components", "dom_core.xpt");
deleteThisFile("Components", "dom_css.xpt");
deleteThisFile("Components", "dom_events.xpt");
deleteThisFile("Components", "dom_html.xpt");
deleteThisFile("Components", "dom_range.xpt");
deleteThisFile("Components", "dom_stylesheets.xpt");
deleteThisFile("Components", "dom_traversal.xpt");
deleteThisFile("Components", "dom_views.xpt");
deleteThisFile("Components", "dom_xbl.xpt");
deleteThisFile("Components", "dom_xpath.xpt");
deleteThisFile("Components", "dom_xul.xpt");
deleteThisFile("Components", "downloadmanager.xpt");
deleteThisFile("Components", "editor.xpt");
deleteThisFile("Components", "embed_base.xpt");
deleteThisFile("Components", "exthandler.xpt");
deleteThisFile("Components", "find.xpt");
deleteThisFile("Components", "gfx.xpt");
deleteThisFile("Components", "helperAppDlg.xpt");
deleteThisFile("Components", "htmlparser.xpt");
deleteThisFile("Components", "imgicon.xpt");
deleteThisFile("Components", "imglib2.xpt");
deleteThisFile("Components", "impComm4xMail.xpt");
deleteThisFile("Components", "import.xpt");
deleteThisFile("Components", "intl.xpt");
deleteThisFile("Components", "jar.xpt");
deleteThisFile("Components", "jsdservice.xpt");
deleteThisFile("Components", "jsurl.xpt");
deleteThisFile("Components", "layout_base.xpt");
deleteThisFile("Components", "layout_printing.xpt");
deleteThisFile("Components", "layout_xul.xpt");
deleteThisFile("Components", "layout_xul_tree.xpt");
deleteThisFile("Components", "locale.xpt");
deleteThisFile("Components", "lwbrk.xpt");
deleteThisFile("Components", "mailnews.xpt");
deleteThisFile("Components", "mailview.xpt");
deleteThisFile("Components", "mapihook.xpt");
deleteThisFile("Components", "mime.xpt");
deleteThisFile("Components", "mimetype.xpt");
deleteThisFile("Components", "mozbrwsr.xpt");
deleteThisFile("Components", "mozfind.xpt");
deleteThisFile("Components", "mozldap.xpt");
deleteThisFile("Components", "msgbase.xpt");
deleteThisFile("Components", "msgcompo.xpt");
deleteThisFile("Components", "msgdb.xpt");
deleteThisFile("Components", "msgimap.xpt");
deleteThisFile("Components", "msglocal.xpt");
deleteThisFile("Components", "msgnews.xpt");
deleteThisFile("Components", "msgsearch.xpt");
deleteThisFile("Components", "msgsmime.xpt");
deleteThisFile("Components", "necko.xpt");
deleteThisFile("Components", "necko_cache.xpt");
deleteThisFile("Components", "necko_cookie.xpt");
deleteThisFile("Components", "necko_data.xpt");
deleteThisFile("Components", "necko_dns.xpt");
deleteThisFile("Components", "necko_file.xpt");
deleteThisFile("Components", "necko_http.xpt");
deleteThisFile("Components", "necko_jar.xpt");
deleteThisFile("Components", "necko_res.xpt");
deleteThisFile("Components", "necko_strconv.xpt");
deleteThisFile("Components", "pipboot.xpt");
deleteThisFile("Components", "pipnss.xpt");
deleteThisFile("Components", "pippki.xpt");
deleteThisFile("Components", "pref.xpt");
deleteThisFile("Components", "prefmigr.xpt");
deleteThisFile("Components", "profile.xpt");
deleteThisFile("Components", "progressDlg.xpt");
deleteThisFile("Components", "proxyObject.xpt");
deleteThisFile("Components", "rdf.xpt");
deleteThisFile("Components", "signonviewer.xpt");
deleteThisFile("Components", "spellchecker.xpt");
deleteThisFile("Components", "txmgr.xpt");
deleteThisFile("Components", "txtsvc.xpt");
deleteThisFile("Components", "uconv.xpt");
deleteThisFile("Components", "unicharutil.xpt");
deleteThisFile("Components", "uriloader.xpt");
deleteThisFile("Components", "wallet.xpt");
deleteThisFile("Components", "webbrowserpersist.xpt");
deleteThisFile("Components", "webBrowser_core.xpt");
deleteThisFile("Components", "webshell_idls.xpt");
deleteThisFile("Components", "widget.xpt");
deleteThisFile("Components", "windowds.xpt");
deleteThisFile("Components", "windowwatcher.xpt");
deleteThisFile("Components", "winhooks.xpt");
deleteThisFile("Components", "xmlextras.xpt");
deleteThisFile("Components", "xpcom_base.xpt");
deleteThisFile("Components", "xpcom_components.xpt");
deleteThisFile("Components", "xpcom_ds.xpt");
deleteThisFile("Components", "xpcom_io.xpt");
deleteThisFile("Components", "xpcom_obsolete.xpt");
deleteThisFile("Components", "xpcom_thread.xpt");
deleteThisFile("Components", "xpcom_xpti.xpt");
deleteThisFile("Components", "xpconnect.xpt");
deleteThisFile("Components", "xpinstall.xpt");
deleteThisFile("Components", "xuldoc.xpt");
deleteThisFile("Components", "xultmpl.xpt");
// obsolete JS components
deleteThisFile("Components", "nsBackgroundUpdateService.js");
deleteThisFile("Chrome", "installed-chrome.txt");
deleteThisFile("Chrome", "chrome.rdf");
deleteThisFile("Chrome", "app-chrome.manifest");
deleteThisFile("Chrome", "mail.jar");
deleteThisFile("Chrome", "qute.jar");
deleteThisFile("Chrome", "en-US-mail.jar");
deleteThisFolder("Chrome", "overlayinfo");
deleteThisFile("Program", "defaults/pref/all.js");
deleteThisFile("Program", "defaults/pref/security-prefs.js");
deleteThisFile("Program", "defaults/pref/winpref.js");
deleteThisFile("Program", "defaults/pref/xpinstall.js");
deleteThisFile("Program", "defaults/pref/thunderbird.js");
}
// main
var srDest;
var err;
@ -393,7 +211,7 @@ if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
upgradeCleanup();
removeOldFiles();
err = addDirectory("",
"$Version$",
"bin", // dir name in jar to extract

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

@ -1,111 +0,0 @@
function upgradeCleanup()
{
deleteThisFile("Program", "zlib.dll");
deleteThisFile("Program", "component.reg");
deleteThisFile("Components", "compreg.dat");
deleteThisFile("Components", "xpti.dat");
deleteThisFile("Components", "xptitemp.dat");
}
// main
var srDest;
var err;
var szUninstall;
var fProgram;
var fWindowsSystem;
var fileComponentReg;
var fileComponentRegStr;
var fileMsvcrt;
var fileMsvcirt;
srDest = $SpaceRequired$:bin;
err = initInstall("Mozilla XPCOM", "XPCOM", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
fWindowsSystem = getFolder("Win System");
logComment("fProgram: " + fProgram);
// build the uninstall folder path
szUninstall = fProgram + "Uninstall";
// Log component.reg file so it can be deleted by the uninstaller.
// These two files are created after installation is done, thus
// are normally not logged for uninstall.
logComment("Installing: " + fProgram + "component.reg");
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
upgradeCleanup();
err = addDirectory("",
"$Version$",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() of Program returned: " + err);
if( err == SUCCESS )
{
// install msvcrt.dll *only* if it does not exist
// we don't care if addFile() fails (if the file does not exist in the archive)
// bacause it will still install
fileMsvcrt = getFolder(fWindowsSystem, "msvcrt.dll");
rv = File.exists(fileMsvcrt);
logComment("fileExists() returned: " + rv);
if(rv == false)
{
logComment("File not found: " + fileMsvcrt);
addFile("/Microsoft/Shared/msvcrt.dll",
"$Version$",
"msvcrt.dll", // dir name in jar to extract
fWindowsSystem, // Where to put this file (Returned from getFolder)
"", // subdir name to create relative to fProgram
WIN_SHARED_FILE);
logComment("addFile() of msvcrt.dll returned: " + err);
}
else
{
logComment("File found: " + fileMsvcrt);
}
// install msvcirt.dll *only* if it does not exist
// we don't care if addFile() fails (if the file does not exist in the archive)
// bacause it will still install
fileMsvcirt = getFolder(fWindowsSystem, "msvcirt.dll");
rv = File.exists(fileMsvcirt);
logComment("fileExists() returned: " + rv);
if(rv == false)
{
logComment("File not found: " + fileMsvcirt);
addFile("/Microsoft/Shared/msvcirt.dll",
"$Version$",
"msvcirt.dll", // dir name in jar to extract
fWindowsSystem, // Where to put this file (Returned from getFolder)
"", // subdir name to create relative to fProgram
WIN_SHARED_FILE);
logComment("addFile() of msvcirt.dll returned: " + err);
}
else
{
logComment("File found: " + fileMsvcirt);
}
}
// check return value
if( err == SUCCESS )
{
err = performInstall();
logComment("performInstall() returned: " + err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main