diff --git a/mozilla/toolkit/library/libxul-config.mk b/mozilla/toolkit/library/libxul-config.mk index 1851e2a788d..b21712a4905 100644 --- a/mozilla/toolkit/library/libxul-config.mk +++ b/mozilla/toolkit/library/libxul-config.mk @@ -92,10 +92,8 @@ STATIC_LIBS += \ COMPONENT_LIBS += \ xpconnect \ necko \ - auth \ uconv \ i18n \ - universalchardet \ jar$(VERSION_NUMBER) \ pref \ caps \ @@ -112,10 +110,10 @@ COMPONENT_LIBS += \ editor \ nsappshell \ txmgr \ - composer \ chrome \ mozfind \ appcomps \ + windowds \ commandlines \ toolkitcomps \ xpinstall \ @@ -125,6 +123,22 @@ COMPONENT_LIBS += \ autoconfig \ $(NULL) +ifdef MOZ_AUTH_EXTENSION +COMPONENT_LIBS += auth +DEFINES += -DMOZ_AUTH_EXTENSION +endif + +ifdef MOZ_UNIVERSALCHARDET +COMPONENT_LIBS += universalchardet +DEFINES += -DMOZ_UNIVERSALCHARDET +endif + +ifndef MOZ_PLAINTEXT_EDITOR_ONLY +COMPONENT_LIBS += composer +else +DEFINES += -DMOZ_PLAINTEXT_EDITOR_ONLY +endif + ifdef MOZ_PLACES COMPONENT_LIBS += storagecomps STATIC_LIBS += morkreader_s diff --git a/mozilla/toolkit/library/nsStaticXULComponents.cpp b/mozilla/toolkit/library/nsStaticXULComponents.cpp index 808206dc750..bec82b9d3f5 100644 --- a/mozilla/toolkit/library/nsStaticXULComponents.cpp +++ b/mozilla/toolkit/library/nsStaticXULComponents.cpp @@ -47,6 +47,18 @@ #define NSGETMODULE(_name) _name##_NSGetModule +#ifdef MOZ_AUTH_EXTENSION +#define AUTH_MODULE MODULE(nsAuthModule) +#else +#define AUTH_MODULE +#endif + +#ifdef MOZ_UNIVERSALCHARDET +#define UNIVERSALCHARDET_MODULE MODULE(nsUniversalCharDetModule) +#else +#define UNIVERSALCHARDET_MODULE +#endif + #ifdef MOZ_MATHML #define MATHML_MODULES MODULE(nsUCvMathModule) #else @@ -135,6 +147,12 @@ #define OJI_MODULES #endif +#ifdef MOZ_PLAINTEXT_EDITOR_ONLY +#define COMPOSER_MODULE +#else +#define COMPOSER_MODULE MODULE(nsComposerModule) +#endif + #ifdef ACCESSIBILITY #define ACCESS_MODULES MODULE(nsAccessibilityModule) #else @@ -177,9 +195,9 @@ MODULE(nsUConvModule) \ MODULE(nsI18nModule) \ INTL_COMPAT_MODULES \ - MODULE(nsUniversalCharDetModule) \ + UNIVERSALCHARDET_MODULE \ MODULE(necko) \ - MODULE(nsAuthModule) \ + AUTH_MODULE \ IPC_MODULE \ MODULE(nsJarModule) \ MODULE(nsPrefModule) \ @@ -203,10 +221,11 @@ ACCESS_MODULES \ MODULE(appshell) \ MODULE(nsTransactionManagerModule) \ - MODULE(nsComposerModule) \ + COMPOSER_MODULE \ MODULE(nsChromeModule) \ MODULE(nsFindComponent) \ MODULE(application) \ + MODULE(nsWindowDataSourceModule) \ MODULE(Apprunner) \ MODULE(CommandLineModule) \ PLACES_MODULES \ diff --git a/mozilla/xpfe/components/build/Makefile.in b/mozilla/xpfe/components/build/Makefile.in index 8490fb80e78..20daa961834 100644 --- a/mozilla/xpfe/components/build/Makefile.in +++ b/mozilla/xpfe/components/build/Makefile.in @@ -109,7 +109,6 @@ SHARED_LIBRARY_LIBS = \ ifneq ($(MOZ_BUILD_APP),macbrowser) SHARED_LIBRARY_LIBS += \ ../intl/$(LIB_PREFIX)appcompintl_s.$(LIB_SUFFIX) \ - ../windowds/$(LIB_PREFIX)windowds_s.$(LIB_SUFFIX) \ ../../browser/src/$(LIB_PREFIX)mozbrwsr_s.$(LIB_SUFFIX) \ $(NULL) endif @@ -150,7 +149,6 @@ endif # MOZ_PHOENIX LOCAL_INCLUDES = \ -I$(srcdir)/../../browser/src \ -I$(srcdir)/../directory \ - -I$(srcdir)/../windowds \ $(NULL) ifndef MOZ_PHOENIX diff --git a/mozilla/xpfe/components/build/nsModule.cpp b/mozilla/xpfe/components/build/nsModule.cpp index c0d34cc88b5..a3389ef6fed 100644 --- a/mozilla/xpfe/components/build/nsModule.cpp +++ b/mozilla/xpfe/components/build/nsModule.cpp @@ -42,7 +42,6 @@ #include "nsCharsetMenu.h" #include "nsDirectoryViewer.h" #include "nsFontPackageHandler.h" -#include "nsWindowDataSource.h" #include "nsRDFCID.h" #if !defined(MOZ_PHOENIX) && !defined(MOZ_XULRUNNER) && !defined(MOZ_MACBROWSER) @@ -90,7 +89,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory) #if !defined(MOZ_MACBROWSER) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontPackageHandler) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowDataSource, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter) NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserInstance) #endif @@ -159,22 +157,6 @@ UnregisterProc(nsIComponentManager *aCompMgr, "application/http-index-format", PR_TRUE); } -static NS_METHOD -RegisterWindowDS(nsIComponentManager *aCompMgr, - nsIFile *aPath, - const char *registryLocation, - const char *componentType, - const nsModuleComponentInfo *info) -{ - nsresult rv; - nsCOMPtr catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); - if (NS_FAILED(rv)) return rv; - - return catman->AddCategoryEntry("app-startup", "Window Data Source", - "service," NS_RDF_DATASOURCE_CONTRACTID_PREFIX "window-mediator", - PR_TRUE, PR_TRUE, nsnull); -} - static const nsModuleComponentInfo components[] = { { "Directory Viewer", NS_DIRECTORYVIEWERFACTORY_CID, "@mozilla.org/xpfe/http-index-format-factory-constructor", @@ -231,10 +213,6 @@ static const nsModuleComponentInfo components[] = { { "nsFontPackageHandler", NS_FONTPACKAGEHANDLER_CID, "@mozilla.org/locale/default-font-package-handler;1", nsFontPackageHandlerConstructor }, - { "nsWindowDataSource", - NS_WINDOWDATASOURCE_CID, - NS_RDF_DATASOURCE_CONTRACTID_PREFIX "window-mediator", - nsWindowDataSourceConstructor, RegisterWindowDS }, { NS_BROWSERSTATUSFILTER_CLASSNAME, NS_BROWSERSTATUSFILTER_CID, NS_BROWSERSTATUSFILTER_CONTRACTID, diff --git a/mozilla/xpfe/components/build2/Makefile.in b/mozilla/xpfe/components/build2/Makefile.in index 458717ba079..43536cab29f 100644 --- a/mozilla/xpfe/components/build2/Makefile.in +++ b/mozilla/xpfe/components/build2/Makefile.in @@ -73,12 +73,10 @@ REQUIRES = xpcom \ CPPSRCS = nsModule.cpp SHARED_LIBRARY_LIBS = \ - ../windowds/$(LIB_PREFIX)windowds_s.$(LIB_SUFFIX) \ ../intl/$(LIB_PREFIX)appcompintl_s.$(LIB_SUFFIX) \ $(NULL) LOCAL_INCLUDES = \ - -I$(srcdir)/../windowds \ -I$(srcdir)/../../browser/src \ $(NULL) diff --git a/mozilla/xpfe/components/build2/nsModule.cpp b/mozilla/xpfe/components/build2/nsModule.cpp index 4239a84d909..1a3575bdade 100644 --- a/mozilla/xpfe/components/build2/nsModule.cpp +++ b/mozilla/xpfe/components/build2/nsModule.cpp @@ -54,7 +54,6 @@ #include "nsCURILoader.h" // Factory constructors -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowDataSource, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontPackageHandler) @@ -62,23 +61,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontPackageHandler) NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsHooks) #endif // Windows -static NS_METHOD -RegisterWindowDS(nsIComponentManager *aCompMgr, - nsIFile *aPath, - const char *registryLocation, - const char *componentType, - const nsModuleComponentInfo *info) -{ - nsresult rv; - nsCOMPtr catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); - if (NS_FAILED(rv)) return rv; - - return catman->AddCategoryEntry("app-startup", "Window Data Source", - "service," NS_RDF_DATASOURCE_CONTRACTID_PREFIX "window-mediator", - PR_TRUE, PR_TRUE, nsnull); - return NS_OK; -} - static const nsModuleComponentInfo components[] = { { "nsCharsetMenu", NS_CHARSETMENU_CID, NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_CHARSETMENU_PID, @@ -86,10 +68,6 @@ static const nsModuleComponentInfo components[] = { { "nsFontPackageHandler", NS_FONTPACKAGEHANDLER_CID, "@mozilla.org/locale/default-font-package-handler;1", nsFontPackageHandlerConstructor }, - { "nsWindowDataSource", - NS_WINDOWDATASOURCE_CID, - NS_RDF_DATASOURCE_CONTRACTID_PREFIX "window-mediator", - nsWindowDataSourceConstructor, RegisterWindowDS }, }; NS_IMPL_NSGETMODULE(application, components) diff --git a/mozilla/xpfe/components/windowds/Makefile.in b/mozilla/xpfe/components/windowds/Makefile.in index 4ea891b9b45..8f14df27d9b 100644 --- a/mozilla/xpfe/components/windowds/Makefile.in +++ b/mozilla/xpfe/components/windowds/Makefile.in @@ -44,9 +44,11 @@ include $(DEPTH)/config/autoconf.mk MODULE = appcomps XPIDL_MODULE = windowds -LIBRARY_NAME = windowds_s +LIBRARY_NAME = windowds +MODULE_NAME = nsWindowDataSourceModule LIBXUL_LIBRARY = 1 -FORCE_STATIC_LIB = 1 +IS_COMPONENT = 1 +EXPORT_LIBRARY = 1 REQUIRES = xpcom \ string \ @@ -60,5 +62,8 @@ CPPSRCS = nsWindowDataSource.cpp XPIDLSRCS = nsIWindowDataSource.idl -include $(topsrcdir)/config/rules.mk +EXTRA_DSO_LDOPTS = \ + $(MOZ_COMPONENT_LIBS) \ + $(NULL) +include $(topsrcdir)/config/rules.mk diff --git a/mozilla/xpfe/components/windowds/nsWindowDataSource.cpp b/mozilla/xpfe/components/windowds/nsWindowDataSource.cpp index e1444a98673..e5cec257601 100644 --- a/mozilla/xpfe/components/windowds/nsWindowDataSource.cpp +++ b/mozilla/xpfe/components/windowds/nsWindowDataSource.cpp @@ -44,6 +44,8 @@ #include "nsIObserverService.h" #include "nsIWindowMediator.h" #include "nsXPCOMCID.h" +#include "nsICategoryManager.h" +#include "nsIGenericFactory.h" // just to do the reverse-lookup! sheesh. #include "nsIInterfaceRequestorUtils.h" @@ -591,3 +593,33 @@ NS_IMETHODIMP nsWindowDataSource::EndUpdateBatch() return mInner->EndUpdateBatch(); return NS_OK; } + +// The module goop + +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowDataSource, Init) + +static NS_METHOD +RegisterWindowDS(nsIComponentManager *aCompMgr, + nsIFile *aPath, + const char *registryLocation, + const char *componentType, + const nsModuleComponentInfo *info) +{ + nsresult rv; + nsCOMPtr catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv); + if (NS_FAILED(rv)) return rv; + + return catman->AddCategoryEntry("app-startup", "Window Data Source", + "service," NS_RDF_DATASOURCE_CONTRACTID_PREFIX "window-mediator", + PR_TRUE, PR_TRUE, nsnull); + return NS_OK; +} + +static const nsModuleComponentInfo components[] = { + { "nsWindowDataSource", + NS_WINDOWDATASOURCE_CID, + NS_RDF_DATASOURCE_CONTRACTID_PREFIX "window-mediator", + nsWindowDataSourceConstructor, RegisterWindowDS } +}; + +NS_IMPL_NSGETMODULE(nsWindowDataSourceModule, components) diff --git a/mozilla/xpinstall/packager/packages-os2 b/mozilla/xpinstall/packager/packages-os2 index 4aa76bc9809..e67963859c7 100644 --- a/mozilla/xpinstall/packager/packages-os2 +++ b/mozilla/xpinstall/packager/packages-os2 @@ -80,6 +80,7 @@ bin/components/accessibility.xpt bin/components/appshell.xpt bin/components/appshell.dll bin/components/appcomps.dll +bin/components/windowds.dll bin/components/xpautoc.dll bin/components/srchsvc.dll bin/components/appstartup.xpt diff --git a/mozilla/xpinstall/packager/packages-unix b/mozilla/xpinstall/packager/packages-unix index 9c9c26c39cf..afde394c2db 100644 --- a/mozilla/xpinstall/packager/packages-unix +++ b/mozilla/xpinstall/packager/packages-unix @@ -81,6 +81,7 @@ bin/components/libaccessibility.so bin/components/accessibility.xpt bin/components/accessibility-atk.xpt bin/components/libappcomps.so +bin/components/libwindowds.so bin/components/libxpautocomplete.so bin/components/libsearchservice.so bin/components/appstartup.xpt diff --git a/mozilla/xpinstall/packager/packages-win b/mozilla/xpinstall/packager/packages-win index 2c8d7755c11..c2563768aee 100644 --- a/mozilla/xpinstall/packager/packages-win +++ b/mozilla/xpinstall/packager/packages-win @@ -63,6 +63,7 @@ bin\xpicleanup.exe bin\components\AcctIdl.dll bin\components\AcctIdl.xpt bin\components\appcomps.dll +bin\components\windowds.dll bin\components\xpautoc.dll bin\components\srchsvc.dll bin\components\autocomplete.xpt