Removed the XPTDIR environment variable requirement; the xpt typelib directory is now constructed by adding 'components' to the executable directory. This adds an -lraptorbase requirement to linking against xptinfo.

This commit is contained in:
mccabe%netscape.com 1999-04-23 09:10:09 +00:00
parent f9df0964f2
commit ceb11bcb32
7 changed files with 35 additions and 0 deletions

View File

@ -46,6 +46,7 @@ LIBS = \
-lxptcall \
-lxptcmd \
-lreg \
-lraptorbase \
-l$(MOZ_LIB_UTIL_PREFIX)util \
$(NSPR_LIBS) \
$(NULL)

View File

@ -41,6 +41,7 @@ LIBS = \
-lxptcmd \
-lxptinfo \
-lreg \
-lraptorbase \
-l$(MOZ_LIB_UTIL_PREFIX)util \
$(NSPR_LIBS) \
$(NULL)

View File

@ -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;

View File

@ -37,6 +37,7 @@ LIBS = \
-lxpt \
-lxpcom \
-lreg \
-lraptorbase \
$(NSPR_LIBS) \
$(NULL)

View File

@ -41,6 +41,7 @@ LIBS = \
-lxptcmd \
-lxptinfo \
-lreg \
-lraptorbase \
-l$(MOZ_LIB_UTIL_PREFIX)util \
$(NSPR_LIBS) \
$(NULL)

View File

@ -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;

View File

@ -37,6 +37,7 @@ LIBS = \
-lxpt \
-lxpcom \
-lreg \
-lraptorbase \
$(NSPR_LIBS) \
$(NULL)