mhulden / foma

Automatically exported from code.google.com/p/foma
117 stars 90 forks source link

Don't require GraphViz GUI app on MacOS #133

Open reynoldsnlp opened 3 years ago

reynoldsnlp commented 3 years ago
$ foma -v
foma 0.10.0alpha

I have graphviz installed (via MacPorts) on my machine:

$ type dot
dot is hashed (/opt/local/bin/dot)

However, after adding rules in the REPL, when I type view net I get the following:

foma[1]: view net
foma[1]: Unable to find application named 'Graphviz'

The code requires the GUI app, rather than the command line utilities: https://github.com/mhulden/foma/blob/master/foma/iface.c#L1704. This seems unnecessary.

The code should call dot or other algorithms directly. The MacPorts graphviz package is a dependency of graphviz-gui so the command line utilities would be present in either case.

reynoldsnlp commented 3 years ago

Really, Mac should be exactly the same as Linux except that it would use open instead of xdg-open.

simon-clematide commented 3 years ago

I fully agree and provided a pull request https://github.com/mhulden/foma/pull/81 with same suggestion. MacOS users of foma should be able to install graphviz via macports or brew. I don't think that GraphViz will be back soonish as a simple installable package under MacOS (if I understand correctly).