[INTERPRETER]
* NEW: Support for the GB_PATH environment variable, that gives the Gambas interpreter path if set. git-svn-id: svn://localhost/gambas/trunk@5918 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
db6e8a39b3
commit
27c21ea450
2 changed files with 14 additions and 8 deletions
|
@ -215,6 +215,7 @@ COMPONENT *COMPONENT_create(const char *name)
|
|||
|
||||
path = FILE_buffer();
|
||||
sprintf(path, LIB_PATTERN, COMPONENT_path, name);
|
||||
//fprintf(stderr, "COMPONENT_create: %s\n", path);
|
||||
|
||||
if (FILE_exist(path))
|
||||
comp->library = LIBRARY_create(name);
|
||||
|
|
|
@ -1138,6 +1138,10 @@ const char *FILE_find_gambas(void)
|
|||
{
|
||||
const char *path;
|
||||
|
||||
path = getenv("GB_PATH");
|
||||
|
||||
if (!path || !*path)
|
||||
{
|
||||
if (FILE_exist(GAMBAS_LINK_PATH))
|
||||
{
|
||||
path = FILE_readlink(GAMBAS_LINK_PATH);
|
||||
|
@ -1148,6 +1152,7 @@ const char *FILE_find_gambas(void)
|
|||
{
|
||||
path = GAMBAS_PATH "/gbx" GAMBAS_VERSION_STRING;
|
||||
}
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue