diff --git a/mozilla/js/src/xpconnect/tests/Makefile.in b/mozilla/js/src/xpconnect/tests/Makefile.in index d0bf7c855e2..e78ca1955b4 100644 --- a/mozilla/js/src/xpconnect/tests/Makefile.in +++ b/mozilla/js/src/xpconnect/tests/Makefile.in @@ -46,6 +46,7 @@ LIBS = \ -lxptcall \ -lxptcmd \ -lreg \ + -lraptorbase \ -l$(MOZ_LIB_UTIL_PREFIX)util \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/xpcom/libxpt/xptcall/tests/Makefile.in b/mozilla/xpcom/libxpt/xptcall/tests/Makefile.in index 8c2349d01e8..b86a8cc0f5d 100644 --- a/mozilla/xpcom/libxpt/xptcall/tests/Makefile.in +++ b/mozilla/xpcom/libxpt/xptcall/tests/Makefile.in @@ -41,6 +41,7 @@ LIBS = \ -lxptcmd \ -lxptinfo \ -lreg \ + -lraptorbase \ -l$(MOZ_LIB_UTIL_PREFIX)util \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/xpcom/libxpt/xptinfo/src/nsInterfaceInfoManager.cpp b/mozilla/xpcom/libxpt/xptinfo/src/nsInterfaceInfoManager.cpp index 25b3899d38d..a294578766f 100644 --- a/mozilla/xpcom/libxpt/xptinfo/src/nsInterfaceInfoManager.cpp +++ b/mozilla/xpcom/libxpt/xptinfo/src/nsInterfaceInfoManager.cpp @@ -25,6 +25,8 @@ #endif #include "nscore.h" +#include "nsSpecialSystemDirectory.h" + #include "nsISupports.h" #include "nsIInterfaceInfoManager.h" #include "nsIInterfaceInfo.h" @@ -307,8 +309,21 @@ nsInterfaceInfoManager::initInterfaceTables() return NS_ERROR_FAILURE; } + // this code stolen from SetupRegistry; it might bear further + // examination, as the code there doesn't look quite done. + nsSpecialSystemDirectory + sysdir(nsSpecialSystemDirectory::OS_CurrentProcessDirectory); + sysdir += "components"; + const char *xptdirname = sysdir.GetCString(); // native path + if (xptdirname != NULL) { + fprintf(stderr, "nsInterfaceInfoManager: Using xpt dir: %s\n", xptdirname); + } + +#if 0 // First, find the xpt directory from the env. XXX Temporary hack. char *xptdirname = PR_GetEnv("XPTDIR"); +#endif + PRDir *xptdir; if (xptdirname == NULL || (xptdir = PR_OpenDir(xptdirname)) == NULL) return NS_ERROR_FAILURE; diff --git a/mozilla/xpcom/libxpt/xptinfo/tests/Makefile.in b/mozilla/xpcom/libxpt/xptinfo/tests/Makefile.in index aade388046a..6c9234370bd 100644 --- a/mozilla/xpcom/libxpt/xptinfo/tests/Makefile.in +++ b/mozilla/xpcom/libxpt/xptinfo/tests/Makefile.in @@ -37,6 +37,7 @@ LIBS = \ -lxpt \ -lxpcom \ -lreg \ + -lraptorbase \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/xpcom/reflect/xptcall/tests/Makefile.in b/mozilla/xpcom/reflect/xptcall/tests/Makefile.in index 8c2349d01e8..b86a8cc0f5d 100644 --- a/mozilla/xpcom/reflect/xptcall/tests/Makefile.in +++ b/mozilla/xpcom/reflect/xptcall/tests/Makefile.in @@ -41,6 +41,7 @@ LIBS = \ -lxptcmd \ -lxptinfo \ -lreg \ + -lraptorbase \ -l$(MOZ_LIB_UTIL_PREFIX)util \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp b/mozilla/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp index 25b3899d38d..a294578766f 100644 --- a/mozilla/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp +++ b/mozilla/xpcom/reflect/xptinfo/src/nsInterfaceInfoManager.cpp @@ -25,6 +25,8 @@ #endif #include "nscore.h" +#include "nsSpecialSystemDirectory.h" + #include "nsISupports.h" #include "nsIInterfaceInfoManager.h" #include "nsIInterfaceInfo.h" @@ -307,8 +309,21 @@ nsInterfaceInfoManager::initInterfaceTables() return NS_ERROR_FAILURE; } + // this code stolen from SetupRegistry; it might bear further + // examination, as the code there doesn't look quite done. + nsSpecialSystemDirectory + sysdir(nsSpecialSystemDirectory::OS_CurrentProcessDirectory); + sysdir += "components"; + const char *xptdirname = sysdir.GetCString(); // native path + if (xptdirname != NULL) { + fprintf(stderr, "nsInterfaceInfoManager: Using xpt dir: %s\n", xptdirname); + } + +#if 0 // First, find the xpt directory from the env. XXX Temporary hack. char *xptdirname = PR_GetEnv("XPTDIR"); +#endif + PRDir *xptdir; if (xptdirname == NULL || (xptdir = PR_OpenDir(xptdirname)) == NULL) return NS_ERROR_FAILURE; diff --git a/mozilla/xpcom/reflect/xptinfo/tests/Makefile.in b/mozilla/xpcom/reflect/xptinfo/tests/Makefile.in index aade388046a..6c9234370bd 100644 --- a/mozilla/xpcom/reflect/xptinfo/tests/Makefile.in +++ b/mozilla/xpcom/reflect/xptinfo/tests/Makefile.in @@ -37,6 +37,7 @@ LIBS = \ -lxpt \ -lxpcom \ -lreg \ + -lraptorbase \ $(NSPR_LIBS) \ $(NULL)