526 |
use the usual names for each of these: |
use the usual names for each of these: |
527 |
|
|
528 |
ASCENDDIST defaults to $PROGDIR/@ASC_DATADIR_REL_BIN@ (also in config.h) |
ASCENDDIST defaults to $PROGDIR/@ASC_DATADIR_REL_BIN@ (also in config.h) |
529 |
ASCENDTK defaults to $ASCENDDIST/@ASC_TK_SUBDIR_NAME@ (latter is from config.h) |
ASCENDTK defaults to $ASCENDDIST/TK (latter is from config.h) |
530 |
ASCENDBITMAPS defaults $ASCENDTK/bitmaps |
ASCENDBITMAPS defaults $ASCENDTK/bitmaps |
531 |
ASCENDLIBRARY defaults to $ASCENDDIST/models |
ASCENDLIBRARY defaults to $ASCENDDIST/models |
532 |
|
|
533 |
Also check for the existence of the file AscendRC in $ASCENDTK |
Also check for the existence of the file AscendRC in $ASCENDTK |
534 |
and if found, export the location of that file to the Tcl |
and if found, export the location of that file to the Tcl |
535 |
variable tcl_rcFileName. |
variable tcl_rcFileName. |
536 |
|
|
537 |
|
If you set ASC_ABSOLUTE_PATHS then ASCENDDIST defaults to @ASC_DATADIR@ and |
538 |
|
the rest follows through as above. |
539 |
*/ |
*/ |
540 |
static int AscCheckEnvironVars(Tcl_Interp *interp,const char *progname){ |
static int AscCheckEnvironVars(Tcl_Interp *interp,const char *progname){ |
541 |
char *distdir, *tkdir, *bitmapsdir, *librarydir; |
char *distdir, *tkdir, *bitmapsdir, *librarydir; |
569 |
if(distdir == NULL){ |
if(distdir == NULL){ |
570 |
CONSOLE_DEBUG("NO " ASC_ENV_DIST " VAR DEFINED"); |
CONSOLE_DEBUG("NO " ASC_ENV_DIST " VAR DEFINED"); |
571 |
|
|
572 |
# ifdef ASC_RELATIVE_PATHS |
# ifndef ASC_ABSOLUTE_PATHS |
573 |
|
|
574 |
// read the executable's name/relative path. |
// read the executable's name/relative path. |
575 |
fp = ospath_new(progname); |
fp = ospath_new(progname); |
594 |
|
|
595 |
# else |
# else |
596 |
distfp = ospath_new(ASC_DATADIR); |
distfp = ospath_new(ASC_DATADIR); |
|
fp = ospath_new("ascend"); |
|
|
|
|
|
ospath_append(distfp,fp); |
|
|
ospath_free(fp); |
|
597 |
# endif |
# endif |
598 |
distdir = ospath_str(distfp); |
distdir = ospath_str(distfp); |
599 |
CONSOLE_DEBUG("GUESSING %s = %s",ASC_ENV_DIST,distdir); |
CONSOLE_DEBUG("GUESSING %s = %s",ASC_ENV_DIST,distdir); |