From 3d2d932088fc6f074b7a15920f71d4c72719e97e Mon Sep 17 00:00:00 2001 From: "ben%bengoodger.com" Date: Mon, 10 May 2004 00:54:11 +0000 Subject: [PATCH] bug 243091 - don't package unnecessary components in Firefox. Disable building a bunch of XPFE chrome (over a megabyte of it on disk) along with the seamonkey classic skin. Provide a stub communicator skin for the profile manager to use. --- browser/extensions/Makefile.in | 2 ++ browser/extensions/package-fixup/Makefile.in | 0 .../extensions/package-fixup/communicator.css | 0 browser/extensions/package-fixup/jar.mn | 14 ++++++++++ themes/Makefile.in | 2 ++ xpfe/Makefile.in | 24 ++++++++++++---- xpfe/components/build/Makefile.in | 28 +++++++------------ xpfe/components/build/nsModule.cpp | 18 ++++++------ xpinstall/Makefile.in | 6 +++- 9 files changed, 61 insertions(+), 33 deletions(-) create mode 100644 browser/extensions/package-fixup/Makefile.in create mode 100644 browser/extensions/package-fixup/communicator.css create mode 100644 browser/extensions/package-fixup/jar.mn diff --git a/browser/extensions/Makefile.in b/browser/extensions/Makefile.in index 07f6e209136..8964e0a5494 100644 --- a/browser/extensions/Makefile.in +++ b/browser/extensions/Makefile.in @@ -50,4 +50,6 @@ ifneq (,$(findstring layout-debug,$(MOZ_EXTENSIONS))) DIRS += layout-debug endif +DIRS += package-fixup + include $(topsrcdir)/config/rules.mk diff --git a/browser/extensions/package-fixup/Makefile.in b/browser/extensions/package-fixup/Makefile.in new file mode 100644 index 00000000000..e69de29bb2d diff --git a/browser/extensions/package-fixup/communicator.css b/browser/extensions/package-fixup/communicator.css new file mode 100644 index 00000000000..e69de29bb2d diff --git a/browser/extensions/package-fixup/jar.mn b/browser/extensions/package-fixup/jar.mn new file mode 100644 index 00000000000..9e5d878b717 --- /dev/null +++ b/browser/extensions/package-fixup/jar.mn @@ -0,0 +1,14 @@ +classic.jar: + skin/classic/communicator/profile/migrate.gif (../../../themes/classic/communicator/profile/migrate.gif) + skin/classic/communicator/profile/profile.css (../../../themes/classic/communicator/profile/profile.css) + skin/classic/communicator/profile/profileManager.css (../../../themes/classic/communicator/profile/profileManager.css) + skin/classic/communicator/profile/profileicon-large.gif (../../../themes/classic/communicator/profile/profileicon-large.gif) + skin/classic/communicator/communicator.css +* skin/classic/communicator/contents.rdf (../../../themes/classic/communicator/contents.rdf) + +comm.jar: +* content/communicator/contents.rdf (../../../xpfe/communicator/resources/content/contents.rdf) + +en-US.jar: +* locale/en-US/communicator/contents.rdf (../../../xpfe/communicator/resources/locale/en-US/contents.rdf) + diff --git a/themes/Makefile.in b/themes/Makefile.in index c1a7074f206..51a1cd41a56 100644 --- a/themes/Makefile.in +++ b/themes/Makefile.in @@ -42,7 +42,9 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +ifndef MOZ_PHOENIX DIRS = classic +endif ifndef MOZ_XUL_APP DIRS += modern diff --git a/xpfe/Makefile.in b/xpfe/Makefile.in index 860c430c065..76da68609cd 100644 --- a/xpfe/Makefile.in +++ b/xpfe/Makefile.in @@ -46,10 +46,24 @@ MODULE = browser PACKAGE_FILE = xpfe.pkg PACKAGE_VARS = USE_SHORT_LIBNAME -DIRS = browser components/shistory communicator -ifndef MOZ_PHOENIX -DIRS += global -endif +# *Don't* build browser or communicator for Firefox - it's unnecessary cruft. +ifdef MOZ_PHOENIX +DIRS += \ + browser/public \ + browser/src \ + components/directory \ + components/filepicker \ + components/find \ + components/intl \ + components/killAll \ + components/resetPref \ + components/search \ + components/shistory \ + components/windowds \ + components/build \ + $(NULL) +else +DIRS += browser components/shistory communicator global # Because of our great use of encapsulation, there are # some header file in xpfe/components that are required @@ -59,10 +73,10 @@ endif ifdef MOZ_XPFE_COMPONENTS DIRS += components endif +endif include $(topsrcdir)/config/rules.mk - ifndef MOZ_XPFE_COMPONENTS export:: $(MAKE) -C components export diff --git a/xpfe/components/build/Makefile.in b/xpfe/components/build/Makefile.in index 174de3be828..82eaea67456 100644 --- a/xpfe/components/build/Makefile.in +++ b/xpfe/components/build/Makefile.in @@ -91,9 +91,8 @@ EXTRA_DSO_LIBS += mozutil_s endif SHARED_LIBRARY_LIBS = \ - $(DIST)/lib/$(LIB_PREFIX)directory_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)appcompintl_s.$(LIB_SUFFIX) \ - $(DIST)/lib/$(LIB_PREFIX)related_s.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)directory_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)search_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)windowds_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)mozbrwsr_s.$(LIB_SUFFIX) \ @@ -101,16 +100,18 @@ SHARED_LIBRARY_LIBS = \ ifndef MOZ_PHOENIX SHARED_LIBRARY_LIBS += \ + $(DIST)/lib/$(LIB_PREFIX)autocomplete_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)bookmarks_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)downloadmanager_s.$(LIB_SUFFIX) \ - $(DIST)/lib/$(LIB_PREFIX)autocomplete_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)history_s.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)related_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)urlbarhistory_s.$(LIB_SUFFIX) \ $(NULL) ifeq ($(OS_ARCH),WINNT) SHARED_LIBRARY_LIBS += \ $(DIST)/lib/$(LIB_PREFIX)alerts_s.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)urlwidgt_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)winhooks_s.$(LIB_SUFFIX) \ $(NULL) endif @@ -118,25 +119,26 @@ endif endif LOCAL_INCLUDES = \ + -I$(srcdir)/../../browser/src \ -I$(srcdir)/../directory \ - -I$(srcdir)/../related/src \ -I$(srcdir)/../search/src \ -I$(srcdir)/../windowds \ - -I$(srcdir)/../../browser/src \ $(NULL) ifndef MOZ_PHOENIX LOCAL_INCLUDES += \ - -I$(srcdir)/../bookmarks/src \ -I$(srcdir)/../autocomplete/src \ - -I$(srcdir)/../history/src \ - -I$(srcdir)/../urlbarhistory/src \ + -I$(srcdir)/../bookmarks/src \ -I$(srcdir)/../download-manager/src \ + -I$(srcdir)/../history/src \ + -I$(srcdir)/../related/src \ + -I$(srcdir)/../urlbarhistory/src \ $(NULL) ifeq ($(OS_ARCH),WINNT) LOCAL_INCLUDES += \ -I$(srcdir)/../alerts/src \ + -I$(srcdir)/../urlwidget \ -I$(srcdir)/../winhooks \ $(NULL) endif @@ -144,17 +146,7 @@ endif endif ifeq ($(OS_ARCH),WINNT) - -SHARED_LIBRARY_LIBS += \ - $(DIST)/lib/$(LIB_PREFIX)urlwidgt_s.$(LIB_SUFFIX) \ - $(NULL) - - OS_LIBS += $(call EXPAND_LIBNAME,ole32 shell32) - -LOCAL_INCLUDES += \ - -I$(srcdir)/../urlwidget \ - $(NULL) endif EXTRA_DSO_LDOPTS = \ diff --git a/xpfe/components/build/nsModule.cpp b/xpfe/components/build/nsModule.cpp index 88cbec008f3..cb94881bbdc 100644 --- a/xpfe/components/build/nsModule.cpp +++ b/xpfe/components/build/nsModule.cpp @@ -36,19 +36,19 @@ * ***** END LICENSE BLOCK ***** */ #include "nsIGenericFactory.h" #include "nsICategoryManager.h" -#include "nsDirectoryViewer.h" #include "rdf.h" #include "nsLocalSearchService.h" #include "nsInternetSearchService.h" -#include "nsRelatedLinksHandlerImpl.h" #include "nsXPIDLString.h" #include "nsCharsetMenu.h" +#include "nsDirectoryViewer.h" #include "nsFontPackageHandler.h" #include "nsWindowDataSource.h" #include "nsRDFCID.h" #ifndef MOZ_PHOENIX #include "nsAutoComplete.h" #include "nsBookmarksService.h" +#include "nsRelatedLinksHandlerImpl.h" #include "nsGlobalHistory.h" #include "nsDocShellCID.h" #include "nsUrlbarHistory.h" @@ -62,8 +62,8 @@ #ifndef MOZ_PHOENIX #include "nsWindowsHooks.h" #include "nsAlertsService.h" -#endif #include "nsUrlWidget.h" +#endif #endif // Windows #include "nsBrowserStatusFilter.h" @@ -82,10 +82,10 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(LocalSearchDataSource, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(InternetSearchDataSource, Init) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(RelatedLinksHandlerImpl, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontPackageHandler) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowDataSource, Init) #ifndef MOZ_PHOENIX +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(RelatedLinksHandlerImpl, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteItem) NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteResults) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsBookmarksService, Init) @@ -101,8 +101,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsLDAPAutoCompleteSession) #ifndef MOZ_PHOENIX NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsHooks) NS_GENERIC_FACTORY_CONSTRUCTOR(nsAlertsService) -#endif NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUrlWidget, Init) +#endif #endif // Windows NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter) @@ -145,7 +145,7 @@ UnregisterProc(nsIComponentManager *aCompMgr, } static const nsModuleComponentInfo components[] = { - { "Directory Viewer", NS_DIRECTORYVIEWERFACTORY_CID, + { "Directory Viewer", NS_DIRECTORYVIEWERFACTORY_CID, "@mozilla.org/xpfe/http-index-format-factory-constructor", nsDirectoryViewerFactoryConstructor, RegisterProc, UnregisterProc }, { "Directory Viewer", NS_HTTPINDEX_SERVICE_CID, NS_HTTPINDEX_SERVICE_CONTRACTID, @@ -178,6 +178,8 @@ static const nsModuleComponentInfo components[] = { "@mozilla.org/autocompleteSession;1?type=ldap", nsLDAPAutoCompleteSessionConstructor }, #endif + { "Related Links Handler", NS_RELATEDLINKSHANDLER_CID, NS_RELATEDLINKSHANDLER_CONTRACTID, + RelatedLinksHandlerImplConstructor}, #endif { "Local Search", NS_RDFFINDDATASOURCE_CID, NS_LOCALSEARCH_SERVICE_CONTRACTID, LocalSearchDataSourceConstructor }, @@ -187,8 +189,6 @@ static const nsModuleComponentInfo components[] = { NS_INTERNETSEARCH_SERVICE_CONTRACTID, InternetSearchDataSourceConstructor }, { "Internet Search", NS_RDFSEARCHDATASOURCE_CID, NS_INTERNETSEARCH_DATASOURCE_CONTRACTID, InternetSearchDataSourceConstructor }, - { "Related Links Handler", NS_RELATEDLINKSHANDLER_CID, NS_RELATEDLINKSHANDLER_CONTRACTID, - RelatedLinksHandlerImplConstructor}, { "nsCharsetMenu", NS_CHARSETMENU_CID, NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_CHARSETMENU_PID, NS_NewCharsetMenu }, @@ -200,9 +200,9 @@ static const nsModuleComponentInfo components[] = { NS_RDF_DATASOURCE_CONTRACTID_PREFIX "window-mediator", nsWindowDataSourceConstructor }, #if defined(XP_WIN) +#ifndef MOZ_PHOENIX { NS_IURLWIDGET_CLASSNAME, NS_IURLWIDGET_CID, NS_IURLWIDGET_CONTRACTID, nsUrlWidgetConstructor }, -#ifndef MOZ_PHOENIX { "nsAlertsService", NS_ALERTSSERVICE_CID, NS_ALERTSERVICE_CONTRACTID, nsAlertsServiceConstructor}, { NS_IWINDOWSHOOKS_CLASSNAME, NS_IWINDOWSHOOKS_CID, NS_IWINDOWSHOOKS_CONTRACTID, nsWindowsHooksConstructor }, diff --git a/xpinstall/Makefile.in b/xpinstall/Makefile.in index e3405cb86b8..f82bd8ac83a 100644 --- a/xpinstall/Makefile.in +++ b/xpinstall/Makefile.in @@ -47,7 +47,11 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = xpinstall -DIRS = public res src stub cleanup +DIRS = public src stub cleanup + +ifndef MOZ_PHOENIX +DIRS += res +endif ifdef MOZ_INSTALLER DIRS += wizard/libxpnet