[tlbuild] asymptote search path

T T t34www at googlemail.com
Tue Aug 11 23:39:42 CEST 2009


On 11/08/2009, Karl Berry <karl at freefriends.org> wrote:
> It seems to me that the unusual case of running asy from USB should not
> outweigh the advantage of using the common location ~/.asy by default.
>
> How about if we have an envvar, say, ASYHOME.  Unset by default.  The
> code effectively does getenv("ASYHOME") || "~/.asy" to find the location.

This is pretty much my initial suggestion (including the ASYHOME name
:). I would only use ASYMPTOTE_HOME to stay consistent with asy way of
naming (now that I know about it).

However, instead of getenv I would suggest using system("kpsewhich
--var-value=ASYMPTOTE_HOME"). This way we can use either environment
or texmf.cnf to configure asy (for my portable installation I use
texmf.cnf to redirect various TEXMF* trees, which is very handy and
doesn't require any extra script/wrapper magic).

> Then our tl-portable script, and/or users running asy from USB, can set
> the envvar, and the rest of the world doesn't need to worry.

Portable use is one aspect. Another is uninstallation. Currently we
just delete our directory structures, but if asy will write outside of
that, we will need an extra check for that.

Personally, I think it is simpler if we don't have too many special
cases to consider. However, if using ~/.asy by default is more
important, I'm sure we can think of something.

Cheers,

Tomek


More information about the tlbuild mailing list