Skip to content

Commit

Permalink
Added -libdir, an option to tell Doomsday the location where to load …
Browse files Browse the repository at this point in the history
…shared libraries.
  • Loading branch information
skyjake committed Jan 3, 2007
1 parent 4837ce5 commit 7c2a695
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions doomsday/engine/unix/src/sys_dylib.c
Expand Up @@ -82,7 +82,11 @@ void lt_dladdsearchdir(const char *searchPath)

static void getBundlePath(char *path)
{
if(ArgCheckWith("-appdir", 1))
if(ArgCheckWith("-libdir", 1))
{
strcpy(path, ArgNext());
}
else if(ArgCheckWith("-appdir", 1))
{
sprintf(path, "%s/%s", appDir, ArgNext());
}
Expand All @@ -95,9 +99,10 @@ static void getBundlePath(char *path)
#ifdef UNIX
#ifdef DENG_LIBRARY_DIR
sprintf(path, DENG_LIBRARY_DIR, appDir);
#else
// Assume they are in the cwd.
strcpy(path, appDir);
#endif
// There should be a fallback here, but as DENG_LIBRARY_DIR is
// defined by cmake there is not. FIXME
#endif
}
}
Expand All @@ -110,7 +115,6 @@ int lt_dlforeachfile(const char *searchPath,
struct dirent *entry = NULL;
filename_t bundlePath;


// This is the default location where bundles are.
getBundlePath(bundlePath);

Expand Down

0 comments on commit 7c2a695

Please sign in to comment.