[racket] Redex on Windows - problem with GraphViz / find-executable-path

From: Rodolfo Carvalho (rhcarvalho at gmail.com)
Date: Tue Jan 17 13:34:42 EST 2012

Hi,

I'm playing with
lc-with-redex<http://telefonica.net/web2/koot/lc-with-redex.zip>by Jos
Koot, with example uses of Redex.

When I use the traces function (miu-traces.rkt) I get the "PLT Redex
Reduction Graph" window, but if I try to redo the layout, clicking on "Fix
layout" I get an error:
"Could not find the dot binary".

I figured out it is about dot from GraphViz, but I couldn't find anywhere
in the docs any mention to this dependency.

Anyway, I installed GraphViz and made sure that its bin/ directory is in
the path.

However, Redex (dot.rkt) searches for the executable using
(find-executable-path "dot"), which doesn't work since on Windows it is
called dot.exe.

(find-executable-path "dot.exe") works.


I believe this kind of problem may arise in other situations. Windows has a
PATHEXT environment variable that maybe could be used in find-executable-path
to try appending an extension to the name of the executable (eg: .exe,
.bat, ...).

Or maybe there is a better way to patch this part of Redex to support
Windows?


[]'s
Rodolfo Carvalho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120117/d6135071/attachment.html>

Posted on the users mailing list.