From 9279505fc23dd44683080278d2f8a036338489e3 Mon Sep 17 00:00:00 2001 From: "bsmedberg%covad.net" Date: Wed, 21 Dec 2005 15:18:49 +0000 Subject: [PATCH] Bug 320988 - Make xulrunner + activex control + mfcembed happy with frozen-only symbols, r=darin --- embedding/browser/activex/src/control/Makefile.in | 3 +-- embedding/tests/mfcembed/components/Makefile.in | 2 +- xulrunner/app/Makefile.in | 3 +-- xulrunner/app/nsRegisterGREUnix.cpp | 6 ++++-- xulrunner/app/nsRegisterGREWin.cpp | 8 +++++--- xulrunner/app/nsXULRunnerApp.cpp | 12 +++++++----- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/embedding/browser/activex/src/control/Makefile.in b/embedding/browser/activex/src/control/Makefile.in index 672d10f10591..d5a9093d9c93 100644 --- a/embedding/browser/activex/src/control/Makefile.in +++ b/embedding/browser/activex/src/control/Makefile.in @@ -93,12 +93,11 @@ CPPSRCS = \ WindowCreator.cpp \ $(NULL) - EXTRA_DSO_LDOPTS = \ - $(DIST)/lib/$(LIB_PREFIX)gkgfx.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)embed_base_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)ax_common_s.$(LIB_SUFFIX) \ $(MOZ_UNICHARUTIL_LIBS) \ + $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ $(XPCOM_LIBS) \ $(NSPR_LIBS) \ $(NULL) diff --git a/embedding/tests/mfcembed/components/Makefile.in b/embedding/tests/mfcembed/components/Makefile.in index cc7f2df10ff1..90b5b17e0ad8 100644 --- a/embedding/tests/mfcembed/components/Makefile.in +++ b/embedding/tests/mfcembed/components/Makefile.in @@ -36,7 +36,6 @@ include $(DEPTH)/config/autoconf.mk LIBRARY_NAME = mfcEmbedComponents RESFILE = Dialogs.res -MOZILLA_INTERNAL_API = 1 REQUIRES = \ xpcom \ @@ -70,6 +69,7 @@ EXTRA_DSO_LIBS = gkgfx EXTRA_DSO_LDOPTS += \ $(EXTRA_DSO_LIBS) \ + $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ $(XPCOM_LIBS) \ $(NSPR_LIBS) \ $(MOZ_UNICHARUTIL_LIBS) \ diff --git a/xulrunner/app/Makefile.in b/xulrunner/app/Makefile.in index f7d4576a28ac..896c48ab6f02 100644 --- a/xulrunner/app/Makefile.in +++ b/xulrunner/app/Makefile.in @@ -47,8 +47,6 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -MOZILLA_INTERNAL_API = 1 - DIRS = profile PREF_JS_EXPORTS = $(srcdir)/xulrunner.js @@ -107,6 +105,7 @@ endif LIBS += \ $(EXTRA_DSO_LIBS) \ $(MOZ_JS_LIBS) \ + $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ $(XPCOM_LIBS) \ $(NSPR_LIBS) \ $(TK_LIBS) \ diff --git a/xulrunner/app/nsRegisterGREUnix.cpp b/xulrunner/app/nsRegisterGREUnix.cpp index f13cde97881b..a3ca3ab321ee 100755 --- a/xulrunner/app/nsRegisterGREUnix.cpp +++ b/xulrunner/app/nsRegisterGREUnix.cpp @@ -38,13 +38,15 @@ #include "nsRegisterGRE.h" #include "nsXPCOMGlue.h" +#include "nsXPCOM.h" #include "nsIFile.h" #include "nsILocalFile.h" #include "nsBuildID.h" #include "nsAppRunner.h" // for MAXPATHLEN -#include "nsString.h" +#include "nsStringAPI.h" #include "nsINIParser.h" +#include "nsCOMPtr.h" #include "prio.h" #include "prprf.h" @@ -143,7 +145,7 @@ RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, PR_snprintf(root, MAXPATHLEN, "%s/.gre.d", home); } - nsCAutoString greHome; + nsCString greHome; rv = aLocation->GetNativePath(greHome); if (NS_FAILED(rv)) return rv; diff --git a/xulrunner/app/nsRegisterGREWin.cpp b/xulrunner/app/nsRegisterGREWin.cpp index 9b7c222acc6a..0e2d037ec589 100755 --- a/xulrunner/app/nsRegisterGREWin.cpp +++ b/xulrunner/app/nsRegisterGREWin.cpp @@ -37,13 +37,15 @@ #include "nsRegisterGRE.h" +#include "nsXPCOM.h" #include "nsIFile.h" #include "nsILocalFile.h" #include "nsBuildID.h" #include "nsAppRunner.h" // for MAXPATHLEN -#include "nsString.h" +#include "nsStringAPI.h" #include "nsXPCOMGlue.h" +#include "nsCOMPtr.h" #include "prio.h" @@ -54,7 +56,7 @@ static const char kRegFileGlobal[] = "global.reginfo"; static const char kRegFileUser[] = "user.reginfo"; static nsresult -MakeVersionKey(HKEY root, const char* keyname, const nsCAutoString &grehome, +MakeVersionKey(HKEY root, const char* keyname, const nsCString &grehome, const GREProperty *aProperties, PRUint32 aPropertiesLen) { HKEY subkey; @@ -104,7 +106,7 @@ RegisterXULRunner(PRBool aRegisterGlobally, nsIFile* aLocation, PRBool irv; int i; - nsCAutoString greHome; + nsCString greHome; rv = aLocation->GetNativePath(greHome); if (NS_FAILED(rv)) return rv; diff --git a/xulrunner/app/nsXULRunnerApp.cpp b/xulrunner/app/nsXULRunnerApp.cpp index a3c8b6507341..3f26a831a9f5 100644 --- a/xulrunner/app/nsXULRunnerApp.cpp +++ b/xulrunner/app/nsXULRunnerApp.cpp @@ -50,8 +50,9 @@ #include "nsIXULAppInstall.h" #include "nsCOMPtr.h" #include "nsMemory.h" -#include "nsNativeCharsetUtils.h" #include "nsBuildID.h" +#include "nsStringAPI.h" +#include "nsServiceManagerUtils.h" #include "plstr.h" #include "prprf.h" #include "prenv.h" @@ -172,7 +173,7 @@ static int LoadAppData(const char* appDataFile, nsXREAppData* aResult, // TODO: If these version checks fail, then look for a compatible XULRunner // version on the system, and launch it instead. - nsCAutoString gkVersion; + nsCString gkVersion; rv = parser.GetString("Gecko", "MinVersion", gkVersion); if (NS_FAILED(rv) || !CheckMinVersion(gkVersion.get())) { @@ -310,7 +311,7 @@ InstallXULApp(nsIFile* aXULRunnerDir, { nsCOMPtr appLocation; nsCOMPtr installTo; - nsAutoString leafName; + nsString leafName; nsresult rv = XRE_GetFileFromPath(aAppLocation, getter_AddRefs(appLocation)); if (NS_FAILED(rv)) @@ -323,7 +324,8 @@ InstallXULApp(nsIFile* aXULRunnerDir, } if (aLeafName) - NS_CopyNativeToUnicode(nsDependentCString(aLeafName), leafName); + NS_CStringToUTF16(nsDependentCString(aLeafName), + NS_CSTRING_ENCODING_NATIVE_FILESYSTEM, leafName); rv = NS_InitXPCOM2(nsnull, aXULRunnerDir, nsnull); if (NS_FAILED(rv)) @@ -503,7 +505,7 @@ int main(int argc, char* argv[]) PR_SetEnv(kAppEnv); } - nsCAutoString vendor, name, version, buildID, appID, copyright; + nsCString vendor, name, version, buildID, appID, copyright; nsXREAppData appData = { sizeof(nsXREAppData), 0 };