Index: src/mzscheme/src/file.c =================================================================== --- src/mzscheme/src/file.c (.../trunk) (revision 16835) +++ src/mzscheme/src/file.c (.../branches/cce/plt+addon-dir) (revision 16850) @@ -5768,6 +5768,19 @@ 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 @@ 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; { Index: collects/scribblings/reference/filesystem.scrbl =================================================================== --- collects/scribblings/reference/filesystem.scrbl (.../trunk) (revision 16835) +++ collects/scribblings/reference/filesystem.scrbl (.../branches/cce/plt+addon-dir) (revision 16850) @@ -81,9 +81,11 @@ ]} @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 Property changes on: . ___________________________________________________________________ Modified: svn:ignore - bin lib include *.app *.exe + bin lib include add-on *.app *.exe