Bug 288640 - xpfe/components/search is app-specific, not part of the toolkit. Remove bad dependencies by moving it to tier_99 and only building it for Seamonkey/Firefox r=Neil a=asa

This commit is contained in:
bsmedberg%covad.net 2005-04-08 17:20:34 +00:00
parent 709f874ed8
commit 3a4772821b
9 changed files with 38 additions and 33 deletions

View File

@ -252,9 +252,8 @@ tier_50_dirs += toolkit
endif
ifdef MOZ_PHOENIX
#xpfe/components/search depends on nsIBookmarksService.idl
#XXXBlake this shell path is a temp hack; toolkit shouldn't depend on browser
tier_50_dirs += browser/components/bookmarks/public browser/components/shell/public
tier_50_dirs += browser/components/shell/public
endif
ifdef MOZ_XPINSTALL
@ -332,6 +331,10 @@ tier_99_dirs += \
endif
endif
ifneq (,$(filter browser suite,$(MOZ_BUILD_APP)))
tier_99_dirs += xpfe/components/search
endif
ifdef MOZ_PHOENIX
ifdef MOZ_USE_OFFICIAL_BRANDING
tier_99_dirs += other-licenses/branding/firefox

View File

@ -69,7 +69,6 @@ ifdef MOZ_HAVE_BROWSER
DIRS = \
directory \
find \
search \
intl \
resetPref \
killAll \
@ -99,12 +98,6 @@ DIRS += \
endif
endif
# XXX because 'search' depends on nsIBookmarksService
# XXX we need to clean up the set of xulrunner dependencies
ifdef MOZ_XULRUNNER
DIRS += bookmarks/public
endif
ifeq ($(OS_ARCH),WINNT)
ifndef MOZ_PHOENIX
ifndef MOZ_XULRUNNER

View File

@ -101,7 +101,6 @@ SHARED_LIBRARY_LIBS = \
ifneq ($(MOZ_BUILD_APP),macbrowser)
SHARED_LIBRARY_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)appcompintl_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) \
$(NULL)
@ -137,7 +136,6 @@ endif # MOZ_PHOENIX
LOCAL_INCLUDES = \
-I$(srcdir)/../../browser/src \
-I$(srcdir)/../directory \
-I$(srcdir)/../search/src \
-I$(srcdir)/../windowds \
$(NULL)

View File

@ -38,8 +38,6 @@
#include "nsIGenericFactory.h"
#include "nsICategoryManager.h"
#include "rdf.h"
#include "nsLocalSearchService.h"
#include "nsInternetSearchService.h"
#include "nsXPIDLString.h"
#include "nsCharsetMenu.h"
#include "nsDirectoryViewer.h"
@ -93,8 +91,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory)
#if !defined(MOZ_MACBROWSER)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(LocalSearchDataSource, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(InternetSearchDataSource, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontPackageHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowDataSource, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter)
@ -242,14 +238,6 @@ static const nsModuleComponentInfo components[] = {
#endif // !defined(MOZ_PHOENIX) && !defined(MOZ_XULRUNNER) && !defined(MOZ_MACBROWSER)
#if !defined(MOZ_MACBROWSER)
{ "Local Search", NS_RDFFINDDATASOURCE_CID,
NS_LOCALSEARCH_SERVICE_CONTRACTID, LocalSearchDataSourceConstructor },
{ "Local Search", NS_RDFFINDDATASOURCE_CID,
NS_LOCALSEARCH_DATASOURCE_CONTRACTID, LocalSearchDataSourceConstructor },
{ "Internet Search", NS_RDFSEARCHDATASOURCE_CID,
NS_INTERNETSEARCH_SERVICE_CONTRACTID, InternetSearchDataSourceConstructor },
{ "Internet Search", NS_RDFSEARCHDATASOURCE_CID,
NS_INTERNETSEARCH_DATASOURCE_CONTRACTID, InternetSearchDataSourceConstructor },
{ "nsCharsetMenu", NS_CHARSETMENU_CID,
NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_CHARSETMENU_PID,
NS_NewCharsetMenu },

View File

@ -43,12 +43,12 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = appcomps
LIBRARY_NAME = search_s
FORCE_STATIC_LIB = 1
# XXXbsmedberg: this really shouldn't be part of toolkit, but part of
# tier_99 app-specific code. Fix me!
LIBXUL_LIBRARY = 1
LIBRARY_NAME = searchservice
SHORT_LIBNAME = srchsvc
IS_COMPONENT = 1
EXPORT_LIBRARY = 1
MODULE_NAME = SearchServiceModule
MOZILLA_INTERNAL_API = 1
REQUIRES = xpcom \
string \
@ -58,12 +58,9 @@ REQUIRES = xpcom \
uconv \
intl \
unicharutil \
bookmarks \
$(NULL)
ifdef MOZ_PHOENIX
REQUIRES += bookmarks
endif
CPPSRCS = \
nsInternetSearchService.cpp \
nsLocalSearchService.cpp \
@ -71,3 +68,7 @@ CPPSRCS = \
include $(topsrcdir)/config/rules.mk
EXTRA_DSO_LDOPTS += \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)

View File

@ -41,6 +41,8 @@
*/
#include "nsInternetSearchService.h"
#include "nsLocalSearchService.h"
#include "nscore.h"
#include "nsIEnumerator.h"
#include "nsIRDFObserver.h"
@ -82,6 +84,7 @@
#include "nsUnicharUtils.h"
#include "nsReadableUtils.h"
#include "nsIPrefLocalizedString.h"
#include "nsIGenericFactory.h"
#ifdef XP_MAC
#include <Files.h>
@ -6422,3 +6425,19 @@ InternetSearchDataSource::Observe(nsISupports *aSubject, const char *aTopic, con
return rv;
}
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(LocalSearchDataSource, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(InternetSearchDataSource, Init)
static const nsModuleComponentInfo components[] = {
{ "Local Search", NS_RDFFINDDATASOURCE_CID,
NS_LOCALSEARCH_SERVICE_CONTRACTID, LocalSearchDataSourceConstructor },
{ "Local Search", NS_RDFFINDDATASOURCE_CID,
NS_LOCALSEARCH_DATASOURCE_CONTRACTID, LocalSearchDataSourceConstructor },
{ "Internet Search", NS_RDFSEARCHDATASOURCE_CID,
NS_INTERNETSEARCH_SERVICE_CONTRACTID, InternetSearchDataSourceConstructor },
{ "Internet Search", NS_RDFSEARCHDATASOURCE_CID,
NS_INTERNETSEARCH_DATASOURCE_CONTRACTID, InternetSearchDataSourceConstructor },
};
NS_IMPL_NSGETMODULE(SearchServiceModule, components)

View File

@ -87,6 +87,7 @@ bin/components/accessibility.xpt
bin/components/appshell.xpt
bin/components/appshell.dll
bin/components/appcomps.dll
bin/components/srchsvc.dll
bin/components/appstartup.xpt
bin/components/autocomplete.xpt
bin/components/bookmarks.xpt

View File

@ -88,6 +88,7 @@ bin/components/libaccessibility.so
bin/components/accessibility.xpt
bin/components/accessibility-atk.xpt
bin/components/libappcomps.so
bin/components/libsearchservice.so
bin/components/appstartup.xpt
bin/components/bookmarks.xpt
bin/components/directory.xpt

View File

@ -75,6 +75,7 @@ bin\xpicleanup.exe
bin\components\AcctIdl.dll
bin\components\AcctIdl.xpt
bin\components\appcomps.dll
bin\components\srchsvc.dll
bin\components\autocomplete.xpt
bin\components\bookmarks.xpt
bin\components\directory.xpt