<br><div class="gmail_quote">On Wed, Sep 30, 2009 at 6:13 AM, Jakub Piotr Cłapa <span dir="ltr">&lt;<a href="mailto:jpc-ml@zenburn.net">jpc-ml@zenburn.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On 09-09-30 14:39, Stephen De Gabrielle wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, I want to include a binary in a module, that I call with (system<br>
command), except I don&#39;t know to reference it, as current-directory is<br>
the users home dir&amp;  none of the others that I found seem to do the<br>
job. The idea is to package win, osx and Linux binaries in the module.<br>
</blockquote>
<br></div>
Perhaps define-runtime-path would help?<br>
<br>
This expects the binaries in the same directory as the module. It also works with Create Executable:<br>
(define-runtime-path *sepack-path* (case (system-type)<br>
                                     [(macosx) &quot;./sepack&quot;]<br>
                                     [(windows) &quot;sepack.exe&quot;]))<br></blockquote><div><br>Another way is to use this-expression-source-directory in mzlib/etc <br><br>(require mzlib/etc) <br>(define path (build-path (this-expression-source-directory) ...)) <br>
<br>Also should you prefer - you can make use of bzlib/os, which helps simplify the writing of the system-type case statements:<br><br>(require (planet bzlib/os)) <br>(define-runtime-path path (+:windows &quot;sepack.exe&quot; &quot;sepack&quot;)) ;; windows =&gt; sepack.exe; else =&gt; sepack<br>
<br>Cheers,<br>yc<br><br></div></div>