[racket-dev] Caching rendered icons
Neither of these is relevant now, but still:
An hour ago, Neil Toronto wrote:
>
> Which directory would I put them in? Would I make a subdirectory of
> 'pref-dir? (Not 'temp-dir, because that might be the current
> directory.)
The temp directory is a bad idea because it's shared. The preferences
would be much better, but you'd need to worry about locking too.
> 2. Compile time: Provide macros that render icons during expansion and
> try to store them in the "compiled" directory. They expand to code
> that loads the icon if the file exists; renders it otherwise. This
> turns rendering into compiling and icons into program binaries,
> which Seems Right.
>
> Is there a way to reliably get the "compiled" directory path during
> expansion, and then load files from it at runtime? Can I ensure that
> .PNG files are distributed automatically?
Putting other stuff in compiled directories would probably complicate
distributions (of both kinds), so the compile-to-bytestring is really
better. (One possible thing to keep in mind is to avoid compilation
relying on having a display.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!