diff --git a/main/gbx/gbx_component.c b/main/gbx/gbx_component.c index dfb2e4668..27c79b7a2 100644 --- a/main/gbx/gbx_component.c +++ b/main/gbx/gbx_component.c @@ -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); diff --git a/main/share/gb_file_temp.h b/main/share/gb_file_temp.h index da59af97e..dd07adfbe 100644 --- a/main/share/gb_file_temp.h +++ b/main/share/gb_file_temp.h @@ -1138,15 +1138,20 @@ const char *FILE_find_gambas(void) { const char *path; - if (FILE_exist(GAMBAS_LINK_PATH)) + path = getenv("GB_PATH"); + + if (!path || !*path) { - path = FILE_readlink(GAMBAS_LINK_PATH); - if (!path) - path = GAMBAS_LINK_PATH; - } - else - { - path = GAMBAS_PATH "/gbx" GAMBAS_VERSION_STRING; + if (FILE_exist(GAMBAS_LINK_PATH)) + { + path = FILE_readlink(GAMBAS_LINK_PATH); + if (!path) + path = GAMBAS_LINK_PATH; + } + else + { + path = GAMBAS_PATH "/gbx" GAMBAS_VERSION_STRING; + } } return path;