Merged changes from branches/cce/plt+addon-dir:
- Added PLTADDONDIR environment variable to control the location of generated files from Planet and Scribble, specifically by overriding the result of (find-system-path 'addon-dir). - Updated documentation of find-system-path to report this change. svn: r17121
This commit is contained in:
parent
f01aa1161a
commit
b4a32ddc1c
|
@ -81,9 +81,11 @@ by @scheme[kind], which must be one of the following:
|
|||
]}
|
||||
|
||||
@item{@indexed-scheme['addon-dir] --- a directory for installing PLT Scheme
|
||||
extensions. It's the same as @scheme['pref-dir], except under Mac OS
|
||||
X, where it is @filepath{Library/PLT Scheme} in the user's home
|
||||
directory. This directory might not exist.}
|
||||
extensions. This directory is specified by the @indexed-envvar{PLTADDONDIR}
|
||||
environment variable. If the environment variable is undefined or not a legal
|
||||
path name, this directory defaults to @filepath{Library/PLT Scheme} in the
|
||||
user's home directory under Mac OS X and @scheme['pref-dir] otherwise. This
|
||||
directory might not exist.}
|
||||
|
||||
@item{@indexed-scheme['doc-dir] --- the standard directory for
|
||||
storing the current user's documents. Under Unix, it's the same as
|
||||
|
|
|
@ -5768,6 +5768,19 @@ find_system_path(int argc, Scheme_Object **argv)
|
|||
|
||||
return CURRENT_WD();
|
||||
}
|
||||
|
||||
/* first option for addon_dir: PLTADDONDIR environment variable */
|
||||
if (which == id_addon_dir) {
|
||||
char* p;
|
||||
|
||||
if ((p = getenv("PLTADDONDIR"))) {
|
||||
p = scheme_expand_filename(p, -1, NULL, NULL, 0);
|
||||
if (p)
|
||||
return scheme_make_path(p);
|
||||
}
|
||||
|
||||
/* If PLTADDONDIR is undefined or malformed, fall through to default */
|
||||
}
|
||||
|
||||
{
|
||||
/* Everything else is in ~: */
|
||||
|
@ -5854,6 +5867,17 @@ find_system_path(int argc, Scheme_Object **argv)
|
|||
return CURRENT_WD();
|
||||
}
|
||||
|
||||
/* first option for addon_dir: PLTADDONDIR environment variable */
|
||||
if (which == id_addon_dir) {
|
||||
if ((p = getenv("PLTADDONDIR"))) {
|
||||
p = scheme_expand_filename(p, -1, NULL, NULL, 0);
|
||||
if (p)
|
||||
return scheme_make_path(p);
|
||||
}
|
||||
|
||||
/* If PLTADDONDIR is undefined or malformed, fall through to default */
|
||||
}
|
||||
|
||||
home = NULL;
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user