diff --git a/Makefile.in b/Makefile.in index dd01436810e..8e009f1dd3b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -213,13 +213,6 @@ ifdef ACCESSIBILITY tier_9_dirs += accessible endif -ifdef MOZ_ENABLE_LIBXUL -tier_9_dirs += \ - toolkit/library \ - xpcom/stub \ - $(NULL) -endif - # # tier 50 - xpfe & toolkit # @@ -236,10 +229,6 @@ endif tier_50_dirs += profile -ifdef MOZ_PSM -tier_50_dirs += security/manager -endif - # This must preceed xpfe ifdef MOZ_JPROF tier_50_dirs += tools/jprof @@ -252,15 +241,10 @@ endif tier_50_dirs += \ db \ xpfe \ - themes \ $(NULL) -ifdef MOZ_LEAKY -tier_50_dirs += tools/leaky -endif - -ifdef MOZ_MAPINFO -tier_50_dirs += tools/codesighs +ifndef MOZ_XUL_APP +tier_50_dirs += themes endif ifdef MOZ_XUL_APP @@ -273,7 +257,6 @@ ifdef MOZ_PHOENIX tier_50_dirs += browser/components/bookmarks/public browser/components/shell/public endif -# toolkit/xre/ depends on xpinstall, so it must be in tier 50 ifdef MOZ_XPINSTALL tier_50_dirs += xpinstall endif @@ -282,6 +265,17 @@ ifdef NS_TRACE_MALLOC tier_50_dirs += tools/trace-malloc endif +ifdef MOZ_ENABLE_LIBXUL +tier_50_dirs += \ + toolkit/library \ + xpcom/stub \ + $(NULL) +endif + +ifdef MOZ_PSM +tier_50_dirs += security/manager +endif + ifdef MOZ_STORAGE tier_50_dirs += db/sqlite3/src storage endif @@ -296,6 +290,14 @@ tier_50_dirs += toolkit/components/gnome endif endif +ifdef MOZ_LEAKY +tier_50_dirs += tools/leaky +endif + +ifdef MOZ_MAPINFO +tier_50_dirs += tools/codesighs +endif + # # tier 9x - application features # diff --git a/browser/app/nsBrowserApp.cpp b/browser/app/nsBrowserApp.cpp index e089d290182..021196fb8ea 100644 --- a/browser/app/nsBrowserApp.cpp +++ b/browser/app/nsBrowserApp.cpp @@ -57,7 +57,7 @@ static const nsXREAppData kAppData = { int main(int argc, char* argv[]) { - return xre_main(argc, argv, &kAppData); + return XRE_main(argc, argv, &kAppData); } #if defined( XP_WIN ) && defined( WIN32 ) && !defined(__GNUC__) diff --git a/calendar/sunbird/app/nsCalendarApp.cpp b/calendar/sunbird/app/nsCalendarApp.cpp index 958a675b82c..ba7b6c22450 100644 --- a/calendar/sunbird/app/nsCalendarApp.cpp +++ b/calendar/sunbird/app/nsCalendarApp.cpp @@ -58,7 +58,7 @@ static const nsXREAppData kAppData = { int main(int argc, char* argv[]) { - return xre_main(argc, argv, &kAppData); + return XRE_main(argc, argv, &kAppData); } #if defined( XP_WIN ) && defined( WIN32 ) && !defined(__GNUC__) diff --git a/chrome/Makefile.in b/chrome/Makefile.in index e2fcbbff062..4bece18ce5b 100644 --- a/chrome/Makefile.in +++ b/chrome/Makefile.in @@ -42,7 +42,9 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = public src tools +DIRS = public src + +TOOL_DIRS = tools include $(topsrcdir)/config/rules.mk diff --git a/chrome/src/Makefile.in b/chrome/src/Makefile.in index 1e618f3678c..2dcdffbceb3 100644 --- a/chrome/src/Makefile.in +++ b/chrome/src/Makefile.in @@ -48,6 +48,7 @@ EXPORT_LIBRARY = 1 IS_COMPONENT = 1 MODULE_NAME = nsChromeModule GRE_MODULE = 1 +LIBXUL_LIBRARY = 1 PACKAGE_FILE = chrome.pkg diff --git a/config/config.mk b/config/config.mk index c8eca580d52..3fa9afd9bd6 100644 --- a/config/config.mk +++ b/config/config.mk @@ -483,6 +483,7 @@ DEFINES += \ -D_IMPL_NS_COM_OBSOLETE \ -D_IMPL_NS_GFX \ -D_IMPL_NS_WIDGET \ + -DIMPL_XULAPI \ $(NULL) ifndef MOZ_NATIVE_ZLIB diff --git a/db/mork/build/Makefile.in b/db/mork/build/Makefile.in index fb1e9103492..a65b5af6946 100644 --- a/db/mork/build/Makefile.in +++ b/db/mork/build/Makefile.in @@ -47,6 +47,7 @@ LIBRARY_NAME = mork EXPORT_LIBRARY = 1 IS_COMPONENT = 1 MODULE_NAME = nsMorkModule +LIBXUL_LIBRARY = 1 PACKAGE_FILE = mork.pkg diff --git a/mail/app/nsMailApp.cpp b/mail/app/nsMailApp.cpp index 2d6ea7a64b6..e2c70125be4 100644 --- a/mail/app/nsMailApp.cpp +++ b/mail/app/nsMailApp.cpp @@ -58,7 +58,7 @@ static const nsXREAppData kAppData = { int main(int argc, char* argv[]) { - return xre_main(argc, argv, &kAppData); + return XRE_main(argc, argv, &kAppData); } #if defined( XP_WIN ) && defined( WIN32 ) && !defined(__GNUC__) diff --git a/toolkit/components/alerts/src/Makefile.in b/toolkit/components/alerts/src/Makefile.in index 649d40060fb..1fc07d263b8 100644 --- a/toolkit/components/alerts/src/Makefile.in +++ b/toolkit/components/alerts/src/Makefile.in @@ -45,6 +45,9 @@ include $(DEPTH)/config/autoconf.mk MODULE = alerts LIBRARY_NAME = alerts_s +FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 + REQUIRES = xpcom \ string \ windowwatcher \ @@ -55,10 +58,6 @@ CPPSRCS = \ nsAlertsService.cpp \ $(NULL) -# we don't want the shared lib, but we want to force the creation of a -# static lib. -FORCE_STATIC_LIB = 1 - include $(topsrcdir)/config/rules.mk EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) diff --git a/toolkit/components/autocomplete/src/Makefile.in b/toolkit/components/autocomplete/src/Makefile.in index a963aadbd8c..2f69bbb8cb3 100644 --- a/toolkit/components/autocomplete/src/Makefile.in +++ b/toolkit/components/autocomplete/src/Makefile.in @@ -46,6 +46,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = autocomplete LIBRARY_NAME = autocomplete_s FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 REQUIRES = xpcom \ string \ diff --git a/toolkit/components/build/Makefile.in b/toolkit/components/build/Makefile.in index 954ba65b2b3..ee98a93e99d 100644 --- a/toolkit/components/build/Makefile.in +++ b/toolkit/components/build/Makefile.in @@ -48,6 +48,7 @@ SHORT_LIBNAME = tkitcmps EXPORT_LIBRARY = 1 IS_COMPONENT = 1 MODULE_NAME = nsToolkitCompsModule +LIBXUL_LIBRARY = 1 REQUIRES = \ xpcom \ diff --git a/toolkit/components/commandlines/src/Makefile.in b/toolkit/components/commandlines/src/Makefile.in index 1d151e8186c..4c809294074 100644 --- a/toolkit/components/commandlines/src/Makefile.in +++ b/toolkit/components/commandlines/src/Makefile.in @@ -51,6 +51,7 @@ SHORT_LIBNAME = cmdlines EXPORT_LIBRARY = 1 IS_COMPONENT = 1 MODULE_NAME = CommandLineModule +LIBXUL_LIBRARY = 1 REQUIRES = \ xpcom \ diff --git a/toolkit/components/downloads/src/Makefile.in b/toolkit/components/downloads/src/Makefile.in index 697f2a63af7..3dedd3de554 100644 --- a/toolkit/components/downloads/src/Makefile.in +++ b/toolkit/components/downloads/src/Makefile.in @@ -46,6 +46,8 @@ include $(DEPTH)/config/autoconf.mk MODULE = downloads LIBRARY_NAME = download_s +FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 REQUIRES = xpcom \ string \ @@ -67,15 +69,11 @@ REQUIRES = xpcom \ ifeq ($(OS_ARCH),WINNT) REQUIRES += alerts endif - + CPPSRCS = \ nsDownloadManager.cpp \ $(NULL) -# we don't want the shared lib, but we want to force the creation of a -# static lib. -FORCE_STATIC_LIB = 1 - include $(topsrcdir)/config/rules.mk EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) diff --git a/toolkit/components/history/src/Makefile.in b/toolkit/components/history/src/Makefile.in index c66d83f5d7d..36be1739bf2 100644 --- a/toolkit/components/history/src/Makefile.in +++ b/toolkit/components/history/src/Makefile.in @@ -46,6 +46,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = history LIBRARY_NAME = history_s FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 REQUIRES = xpcom \ string \ diff --git a/toolkit/components/passwordmgr/base/Makefile.in b/toolkit/components/passwordmgr/base/Makefile.in index 5581b843a27..ac09e784b25 100644 --- a/toolkit/components/passwordmgr/base/Makefile.in +++ b/toolkit/components/passwordmgr/base/Makefile.in @@ -45,6 +45,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = passwordmgr LIBRARY_NAME = passwordmgr_s FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 REQUIRES = \ necko \ diff --git a/toolkit/components/satchel/src/Makefile.in b/toolkit/components/satchel/src/Makefile.in index 59b8bc747b7..d1e983d562d 100644 --- a/toolkit/components/satchel/src/Makefile.in +++ b/toolkit/components/satchel/src/Makefile.in @@ -46,6 +46,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = satchel LIBRARY_NAME = satchel_s FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 REQUIRES = \ xpcom \ diff --git a/toolkit/components/startup/src/Makefile.in b/toolkit/components/startup/src/Makefile.in index b47d14fdb0a..3a6c755c3da 100644 --- a/toolkit/components/startup/src/Makefile.in +++ b/toolkit/components/startup/src/Makefile.in @@ -44,6 +44,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = toolkitcomps LIBRARY_NAME = appstartup_s FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 REQUIRES = \ xpcom \ diff --git a/toolkit/components/typeaheadfind/src/Makefile.in b/toolkit/components/typeaheadfind/src/Makefile.in index 39b2934928f..6362abfbc55 100755 --- a/toolkit/components/typeaheadfind/src/Makefile.in +++ b/toolkit/components/typeaheadfind/src/Makefile.in @@ -45,6 +45,7 @@ MODULE = fastfind LIBRARY_NAME = fastfind_s GRE_MODULE = 1 FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 PACKAGE_FILE = typeaheadfind.pkg diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index da03ec067b7..e4831bb580d 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -53,6 +53,7 @@ REQUIRES = \ string \ xpcom_obsolete \ $(ZLIB_REQUIRES) \ + xulapp \ $(NULL) CPPSRCS = \ @@ -67,6 +68,7 @@ CPPSRCS += \ dlldeps-obs.cpp \ nsGFXDeps.cpp \ nsDllMain.cpp \ + dlldeps-xul.cpp \ $(NULL) ifndef MOZ_NATIVE_ZLIB @@ -89,6 +91,7 @@ STATIC_LIBS = \ ucvutil_s \ gkgfx \ gfxshared_s \ + xulapp_s \ $(NULL) # component libraries @@ -113,6 +116,13 @@ COMPONENT_LIBS += \ nsappshell \ txmgr \ composer \ + chrome \ + mork \ + mozfind \ + appcomps \ + commandlines \ + toolkitcomps \ + xpinstall \ $(NULL) ifeq ($(OS_ARCH),WINNT) @@ -262,6 +272,7 @@ DEFINES += \ -D_IMPL_NS_COM_OBSOLETE \ -D_IMPL_NS_GFX \ -D_IMPL_NS_WIDGET \ + -DIMPL_XULAPI \ $(NULL) EXTRA_DSO_LDOPTS += $(NSPR_LIBS) diff --git a/toolkit/library/dlldeps-xul.cpp b/toolkit/library/dlldeps-xul.cpp new file mode 100755 index 00000000000..b0628107854 --- /dev/null +++ b/toolkit/library/dlldeps-xul.cpp @@ -0,0 +1,44 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla embedding code. + * + * The Initial Developer of the Original Code is + * Benjamin Smedberg + * + * Portions created by the Initial Developer are Copyright (C) 2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#include "nsXULAppAPI.h" + +void xxxNeverCalledXUL() +{ + XRE_main(0, nsnull, nsnull); + XRE_GetFileFromPath(nsnull, nsnull); +} diff --git a/toolkit/library/nsStaticXULComponents.cpp b/toolkit/library/nsStaticXULComponents.cpp index d8a2f36bfc5..94c8a0d246e 100644 --- a/toolkit/library/nsStaticXULComponents.cpp +++ b/toolkit/library/nsStaticXULComponents.cpp @@ -178,6 +178,13 @@ MODULE(appshell) \ MODULE(nsTransactionManagerModule) \ MODULE(nsComposerModule) \ + MODULE(nsChromeModule) \ + MODULE(nsMorkModule) \ + MODULE(nsFindComponent) \ + MODULE(application) \ + MODULE(CommandLineModule) \ + MODULE(nsToolkitCompsModule) \ + MODULE(nsSoftwareUpdate) \ /* end of list */ #define MODULE(_name) \ diff --git a/toolkit/profile/src/Makefile.in b/toolkit/profile/src/Makefile.in index 82ee3cc924f..7815a4a7889 100644 --- a/toolkit/profile/src/Makefile.in +++ b/toolkit/profile/src/Makefile.in @@ -45,6 +45,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = xulapp LIBRARY_NAME = profile_s FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 REQUIRES = \ xpcom \ diff --git a/toolkit/profile/src/nsToolkitProfileService.cpp b/toolkit/profile/src/nsToolkitProfileService.cpp index a76241bd3ed..4fa68fa61fb 100644 --- a/toolkit/profile/src/nsToolkitProfileService.cpp +++ b/toolkit/profile/src/nsToolkitProfileService.cpp @@ -769,7 +769,7 @@ NS_NewToolkitProfileService(nsIToolkitProfileService* *aResult) } nsresult -NS_GetFileFromPath(const char *aPath, nsILocalFile* *aResult) +XRE_GetFileFromPath(const char *aPath, nsILocalFile* *aResult) { #if defined(XP_MACOSX) PRInt32 pathLen = strlen(aPath); diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in index 4a6834d9f18..5b5366b6a80 100644 --- a/toolkit/xre/Makefile.in +++ b/toolkit/xre/Makefile.in @@ -45,6 +45,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = xulapp LIBRARY_NAME = xulapp_s EXPORT_LIBRARY = 1 +LIBXUL_LIBRARY = 1 REQUIRES = \ appcomps \ diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index dcad82aac7e..78f80f7c506 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -1313,7 +1313,7 @@ SelectProfile(nsIProfileLock* *aResult, nsINativeAppSupport* aNative, } if (ar) { nsCOMPtr lf; - rv = NS_GetFileFromPath(arg, getter_AddRefs(lf)); + rv = XRE_GetFileFromPath(arg, getter_AddRefs(lf)); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr unlocker; @@ -1555,7 +1555,8 @@ public: typedef void (*_g_set_application_name_fn)(const gchar *application_name); #endif -int xre_main(int argc, char* argv[], const nsXREAppData* aAppData) +int +XRE_main(int argc, char* argv[], const nsXREAppData* aAppData) { nsresult rv; NS_TIMELINE_MARK("enter main"); @@ -1643,7 +1644,7 @@ int xre_main(int argc, char* argv[], const nsXREAppData* aAppData) const char *appDataFile; if (CheckArg("app", &appDataFile) == ARG_FOUND) { nsCOMPtr lf; - NS_GetFileFromPath(appDataFile, getter_AddRefs(lf)); + XRE_GetFileFromPath(appDataFile, getter_AddRefs(lf)); lf->GetParent(getter_AddRefs(xulAppDir)); } diff --git a/toolkit/xre/nsAppRunner.h b/toolkit/xre/nsAppRunner.h index 211fee5be12..2e3a32c4446 100644 --- a/toolkit/xre/nsAppRunner.h +++ b/toolkit/xre/nsAppRunner.h @@ -87,9 +87,6 @@ nsresult NS_CreateNativeAppSupport(nsINativeAppSupport* *aResult); NS_HIDDEN_(nsresult) NS_NewToolkitProfileService(nsIToolkitProfileService* *aResult); -NS_HIDDEN_(nsresult) -NS_GetFileFromPath(const char *aPath, nsILocalFile* *aResult); - NS_HIDDEN_(nsresult) NS_LockProfilePath(nsILocalFile* aPath, nsIProfileUnlocker* *aUnlocker, nsIProfileLock* *aResult); diff --git a/toolkit/xre/nsXULAppAPI.h b/toolkit/xre/nsXULAppAPI.h index 992320ebf10..2fa32e3cf9a 100644 --- a/toolkit/xre/nsXULAppAPI.h +++ b/toolkit/xre/nsXULAppAPI.h @@ -42,17 +42,28 @@ #include "prtypes.h" #include "nsID.h" +#include "nscore.h" + +// XXXbsmedberg - eventually we're going to freeze the XULAPI +// symbols, and we don't want every consumer to define MOZ_ENABLE_LIBXUL. +// Reverse the logic so that those who aren't using libxul have to do the +// work. +#ifdef MOZ_ENABLE_LIBXUL +#ifdef IMPL_XULAPI +#define XULAPI NS_EXPORT +#else +#define XULAPI NS_IMPORT +#endif +#else +#define XULAPI +#endif + +class nsILocalFile; /** * This API is "not even kinda frozen yet" */ -/** - * Indicates whether or not to heed "general.startup.*" prefs. - * XXXbsmedberg this is going away - */ -#define NS_XRE_USE_STARTUP_PREFS (1 << 0) - /** * Indicates whether or not the profile migrator service may be * invoked at startup when creating a profile. @@ -130,6 +141,14 @@ struct nsXREAppData * SetCurrentDirectory, and relative paths on the command line * won't be correct. */ -int xre_main(int argc, char* argv[], const nsXREAppData* aAppData); +extern "C" XULAPI int +XRE_main(int argc, char* argv[], const nsXREAppData* aAppData); + +/** + * Given a path relative to the current working directory (or an absolute + * path), return an appropriate nsILocalFile object. + */ +extern "C" XULAPI nsresult +XRE_GetFileFromPath(const char *aPath, nsILocalFile* *aResult); #endif // _nsXULAppAPI_h__ diff --git a/xpfe/bootstrap/appleevents/Makefile.in b/xpfe/bootstrap/appleevents/Makefile.in index 6156f037016..1d7ae0c9754 100644 --- a/xpfe/bootstrap/appleevents/Makefile.in +++ b/xpfe/bootstrap/appleevents/Makefile.in @@ -89,6 +89,7 @@ CPPSRCS = \ # we don't want the shared lib, but we want to force the creation of a static lib. FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 LOCAL_INCLUDES = \ -I$(srcdir) \ diff --git a/xpfe/browser/src/Makefile.in b/xpfe/browser/src/Makefile.in index dfb07f73c0b..dd5389d87a7 100644 --- a/xpfe/browser/src/Makefile.in +++ b/xpfe/browser/src/Makefile.in @@ -45,6 +45,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = browser LIBRARY_NAME = mozbrwsr_s FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 MODULE_NAME = nsBrowserModule REQUIRES = xpcom \ string \ diff --git a/xpfe/components/build/Makefile.in b/xpfe/components/build/Makefile.in index df442fc4130..987444128c1 100644 --- a/xpfe/components/build/Makefile.in +++ b/xpfe/components/build/Makefile.in @@ -47,6 +47,7 @@ LIBRARY_NAME = appcomps EXPORT_LIBRARY = 1 IS_COMPONENT = 1 MODULE_NAME = application +LIBXUL_LIBRARY = 1 PACKAGE_FILE = appcomps.pkg PACKAGE_VARS += MOZ_PHOENIX diff --git a/xpfe/components/directory/Makefile.in b/xpfe/components/directory/Makefile.in index 4b65ff17e31..708819e156b 100644 --- a/xpfe/components/directory/Makefile.in +++ b/xpfe/components/directory/Makefile.in @@ -43,8 +43,10 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = appcomps +XPIDL_MODULE = directory LIBRARY_NAME = directory_s -XPIDL_MODULE=directory +LIBXUL_LIBRARY = 1 + XPIDLSRCS = nsIHTTPIndex.idl REQUIRES = xpcom \ string \ diff --git a/xpfe/components/find/src/Makefile.in b/xpfe/components/find/src/Makefile.in index aafe085ac5c..3bcba8232e4 100644 --- a/xpfe/components/find/src/Makefile.in +++ b/xpfe/components/find/src/Makefile.in @@ -48,6 +48,7 @@ LIBRARY_NAME = mozfind EXPORT_LIBRARY = 1 IS_COMPONENT = 1 MODULE_NAME = nsFindComponent +LIBXUL_LIBRARY = 1 PACKAGE_FILE = mozfind.pkg diff --git a/xpfe/components/intl/Makefile.in b/xpfe/components/intl/Makefile.in index 19e636f0596..2872fe7c5e3 100644 --- a/xpfe/components/intl/Makefile.in +++ b/xpfe/components/intl/Makefile.in @@ -42,8 +42,11 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE=appcomps -LIBRARY_NAME=appcompintl_s +MODULE = appcomps +LIBRARY_NAME = appcompintl_s +FORCE_STATIC_LIB = 1 +LIBXUL_LIBRARY = 1 + REQUIRES = xpcom \ string \ uconv \ @@ -68,6 +71,4 @@ CPPSRCS= \ nsFontPackageHandler.cpp \ $(NULL) -FORCE_STATIC_LIB=1 - include $(topsrcdir)/config/rules.mk diff --git a/xpfe/components/search/src/Makefile.in b/xpfe/components/search/src/Makefile.in index 3a8d7179e06..f2dc1855d1b 100755 --- a/xpfe/components/search/src/Makefile.in +++ b/xpfe/components/search/src/Makefile.in @@ -44,6 +44,12 @@ 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 + REQUIRES = xpcom \ string \ rdf \ @@ -63,9 +69,5 @@ CPPSRCS = \ nsLocalSearchService.cpp \ $(NULL) -# we don't want the shared lib, but we want to force the creation of a -# static lib. -FORCE_STATIC_LIB = 1 - include $(topsrcdir)/config/rules.mk diff --git a/xpfe/components/windowds/Makefile.in b/xpfe/components/windowds/Makefile.in index 14b45f6f2cd..4ea891b9b45 100644 --- a/xpfe/components/windowds/Makefile.in +++ b/xpfe/components/windowds/Makefile.in @@ -42,9 +42,11 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MODULE = appcomps -XPIDL_MODULE = windowds -LIBRARY_NAME = windowds_s +MODULE = appcomps +XPIDL_MODULE = windowds +LIBRARY_NAME = windowds_s +LIBXUL_LIBRARY = 1 +FORCE_STATIC_LIB = 1 REQUIRES = xpcom \ string \ @@ -58,9 +60,5 @@ CPPSRCS = nsWindowDataSource.cpp XPIDLSRCS = nsIWindowDataSource.idl -# we don't want the shared lib, but we want to force the creation of a -# static lib. -FORCE_STATIC_LIB = 1 - include $(topsrcdir)/config/rules.mk diff --git a/xpinstall/Makefile.in b/xpinstall/Makefile.in index 67282a88624..bca7b542ed2 100644 --- a/xpinstall/Makefile.in +++ b/xpinstall/Makefile.in @@ -47,7 +47,11 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = xpinstall -DIRS = public src stub cleanup +DIRS = public src cleanup + +ifndef MOZ_ENABLE_LIBXUL +DIRS += stub +endif ifndef MOZ_XUL_APP DIRS += res diff --git a/xpinstall/src/Makefile.in b/xpinstall/src/Makefile.in index 66e617a42cf..ba756a97925 100644 --- a/xpinstall/src/Makefile.in +++ b/xpinstall/src/Makefile.in @@ -53,11 +53,12 @@ ifndef MOZ_ENABLE_LIBXUL # this component is shared by installer FORCE_SHARED_LIB = 1 MOZ_STATIC_COMPONENT_LIBS= -endif SHORT_LIBNAME = xpinstal +endif IS_COMPONENT = 1 MODULE_NAME = nsSoftwareUpdate GRE_MODULE = 1 +LIBXUL_LIBRARY = 1 PACKAGE_FILE = base.pkg @@ -144,9 +145,7 @@ CPPSRCS += \ nsAppleSingleDecoder.cpp \ $(NULL) -LIBS += \ - $(DEPTH)/dist/lib/libmacmorefiles_s.a \ - $(NULL) +EXTRA_DSO_LDOPTS += $(DEPTH)/dist/lib/libmacmorefiles_s.a endif LOCAL_INCLUDES = -I$(srcdir)/../public @@ -158,13 +157,8 @@ EXTRA_DSO_LDOPTS = \ $(MOZ_COMPONENT_LIBS) \ $(MOZ_UNICHARUTIL_LIBS) \ $(ZLIB_LIBS) \ - $(NULL) - -ifndef MOZ_ENABLE_LIBXUL -EXTRA_DSO_LDOPTS += \ $(MOZ_XPCOM_OBSOLETE_LIBS) \ $(NULL) -endif ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) EXTRA_DSO_LDOPTS += $(TK_LIBS) diff --git a/xulrunner/app/Makefile.in b/xulrunner/app/Makefile.in index 78d0c442360..d4315105f0b 100644 --- a/xulrunner/app/Makefile.in +++ b/xulrunner/app/Makefile.in @@ -65,6 +65,10 @@ REQUIRES = \ CPPSRCS = nsXULRunnerApp.cpp +ifdef MOZ_ENABLE_LIBXUL +CPPSRCS += nsINIParser.cpp +endif + LOCAL_INCLUDES += \ -I$(topsrcdir)/toolkit/xre \ -I$(topsrcdir)/toolkit/profile/src \ @@ -81,13 +85,16 @@ endif LIBS = \ $(STATIC_COMPONENTS_LINKER_PATH) \ $(EXTRA_DSO_LIBS) \ - $(DIST)/lib/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \ $(MOZ_JS_LIBS) \ $(XPCOM_LIBS) \ $(NSPR_LIBS) \ $(TK_LIBS) \ $(NULL) +ifndef MOZ_ENABLE_LIBXUL +LIBS += $(DIST)/lib/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) +endif + # Add explicit X11 dependency when building against X11 toolkits ifneq (,$(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT))) LIBS += $(XLDFLAGS) $(XLIBS) @@ -203,8 +210,6 @@ LDFLAGS += /HEAP:0x40000 endif endif -$(PROGRAM): $(DIST)/lib/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) - ifeq ($(OS_ARCH),OS2) ifdef BUILD_STATIC_LIBS $(EXE_DEF_FILE): @@ -317,6 +322,11 @@ endif README_FILE = $(topsrcdir)/README.txt +ifdef MOZ_ENABLE_LIBXUL +export:: + $(INSTALL) $(topsrcdir)/toolkit/profile/src/nsINIParser.cpp . +endif + libs:: $(INSTALL) $(README_FILE) $(DIST)/bin $(INSTALL) $(topsrcdir)/LICENSE $(DIST)/bin diff --git a/xulrunner/app/nsXULRunnerApp.cpp b/xulrunner/app/nsXULRunnerApp.cpp index a0273f17d33..7f3f55aabf9 100644 --- a/xulrunner/app/nsXULRunnerApp.cpp +++ b/xulrunner/app/nsXULRunnerApp.cpp @@ -109,7 +109,7 @@ static const nsXREAppData* LoadAppData(const char* appDataFile) vendor, name, version, buildID, {0,0,0,{0,0,0,0,0,0,0,0}}, copyright, 0 }; nsCOMPtr lf; - NS_GetFileFromPath(appDataFile, getter_AddRefs(lf)); + XRE_GetFileFromPath(appDataFile, getter_AddRefs(lf)); if (!lf) return nsnull; @@ -180,7 +180,6 @@ static const nsXREAppData* LoadAppData(const char* appDataFile) const char* key; PRUint32 flag; } boolean_fields[] = { - { "UseStartupPrefs", NS_XRE_USE_STARTUP_PREFS }, { "EnableProfileMigrator", NS_XRE_ENABLE_PROFILE_MIGRATOR }, { "EnableExtensionManager", NS_XRE_ENABLE_EXTENSION_MANAGER } }; @@ -283,14 +282,14 @@ int main(int argc, char* argv[]) argc++; } - int rv = xre_main(argc, argv, appData); + int rv = XRE_main(argc, argv, appData); if (argv2) free(argv2); return rv; } - + #if defined( XP_WIN ) && defined( WIN32 ) && !defined(__GNUC__) // We need WinMain in order to not be a console app. This function is // unused if we are a console application.