[plt-scheme] Application distribution mechanisms ...

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Jan 7 12:12:40 EST 2009

At Wed, 7 Jan 2009 11:54:34 -0500, "Henk Boom" wrote:
> 2009/1/7 Matthew Flatt <mflatt at cs.utah.edu>:
> > At Tue, 6 Jan 2009 21:51:47 -0500, "Henk Boom" wrote:
> >> I'll go one step in the other direction and suggest that it would be
> >> useful to have some automatic way of generating *really* standalone
> >> executables. It would be handy for things like ludum dare, where it
> >> has to be super-convenient to run your game or people don't bother; I
> >> have always had trouble getting the environment set up right so things
> >> generated by option 3 above know how to find the included dynamic
> >> libraries on Linux.
> >
> > Do you mean "libmzscheme3m.so"? Or do you mean other libraries, like,
> > say, "libpng.so"?
> 
> I mean libmzscheme3m.so, since it is usual for people to have the
> other libraries I require to be installed (or easy for them to install
> them). I must say that my main problem is having the program not be
> able to find these libraries on Linux systems. I would be more precise
> about the conditions but I don't have a linux machine without mzscheme
> installed handy right now to test.

Hm... Let me know when you (or anyone else on the list) can say more.

The executable created by the distribution-bundling process is supposed
to set LD_LIBRARY_PATH and then exec() the mzscheme executable, so it's
supposed to find the dynamic libraries automatically. It sounds like
there's a problem with that part (though it works for me).

A workaround is to not build PLT Scheme with `--enable-shared', in
which case there is no "libmzscheme3m.so" to not find.

> >> It would also be handy to not be stuck with the
> >> bin/ and lib/ directory structure on Linux, since it makes the paths
> >> to texture and sound files platform-dependent.
> >
> > Are you using `define-runtime-path' to access the files within Scheme?
> 
> I didn't know about this function before, it's useful! I'm curious why
> DrScheme puts the data files used in lib/plt/<name>/exts/ert/ when
> creating a .tgz distribution, what does that path signify?

The name "exts" came from "extensions". The directory was created as a
place to copy `require'd native-code extensions. It became the
directory to hold files that are automatically copied by a particular
phase of the distribution creator.

The "ert" is "e. run time". (Why the "e" here? I've forgotten.) An
extra directory layer is used to ensure that there are no name
conflicts between the files that a program references via
`define-runtime-path' and the native-code extensions that are
referenced via `require'.


Matthew



Posted on the users mailing list.