Hi,<br><br>I can't help you with your first question.<br><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Another thing I would like is a self-contained command line executable<br>
that I can easily distribute to people without racket installed. ++lib<br>
embeds libraries in the executable<br>
but I use so many libraries that finding them all in order to list them is a<br>
pain. Is there a way to tell raco exe to embed them all? If not, is<br>
there any automated way to find all used so I can easily generate the<br>
correct command line with all the ++lib?<br></blockquote><div><br>Maybe my own experience can be of some help.<br><br>Personally, I use an additional *collection* path where I put all my personal additional libraries,<br>
but then you need to use the library tools like `create-embedded-executable' and others which provide more options than the raco command line.<br>If the libs are in a collection that is known to the current environment (is that the correct word?) then they are automatically embedded inside the executable, which is much simpler that adding each lib by hand.<br>
<br>Here is how I use it.<br>It may not be optimal since most of this comes from trial&error and analogy, but at least it works for me:<br>
<br> (create-embedding-executable<br> dest-exe<br> #:modules '((#f "main-file.ss"))<br> #:configure-via-first-module? #t<br> #:literal-expression<br> (parameterize ([current-namespace (make-base-namespace)])<br>
(compile `(namespace-require ''main-file)))<br> #:collects-path <br> (current-library-collection-paths)<br> )<br> <br>In order for (current-library-collection-paths) to work correctly, additional collections must be set either in Languages inside DrRacket, or on the command line to 'racket' with the -S option followed by the full path to the collection.<br>
You can also modify the `current-library-collection-paths' parameter directly.<br>
Also, if compiling inside DrRacket, you need to deactivate the Debugging option in Languages (unless that bug is fixed).<br><br>Personally, I had less problems with using a file, say compile.rkt, that defines a `main' function that executes the above code, and call it from the command line with something like:<br>
<br>racket -S "<full-path-to-additional-collection-root>" -t compile.rkt --main release<br><br>where "release" is an option passed to the `main' function.<br><br>
</div></div>HTH,<br>Laurent<br>