[plt-scheme] collects-dir

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Nov 21 07:51:41 EST 2006

At Mon, 20 Nov 2006 22:48:22 -0700, "Chongkai Zhu" wrote:
> 'collects-dir -- a path to the main collection of libraries (see section 16). 
> If this path is relative, it's relative to the directory of (find-system-path 
> 'exec-file). This path is normally embedded in a stand-alone MzScheme 
> executable, but it can be overridden by the --collects or -X command-line flag.
> I'm not sure what does "embedded in a stand-alone MzScheme executable" mean. 

One example is an executable created by `mzc --exe'.

Unfortunately, this description is easily confused with "a program that
embeds MzScheme". I'll work on that.

> But as I test (in my embeded MzScheme program, under Windows): 

You're working with a program that embeds MzScheme, right? In that
case, your embedding application can call

  void scheme_set_collects_path(Scheme_Object *p);

to install a path to be returned by `(find-system-path 'collects-dir)'.

Similarly, you can call

 Scheme_Object *scheme_set_exec_cmd(char *s);


 Scheme_Object *scheme_set_run_cmd(char *s);

to install the results for `(find-system-path 'exec-file)' and
`(find-system-path 'run-file)', respectively.

Finally, you may want to call

  void scheme_set_original_dir(Scheme_Object *d);

to record the initial current directory, so that it can be returned by
`(find-system-path 'orig-dir)'.

I'll get all of these setup functions documented properly.


Posted on the users mailing list.