DTP wraps graphviz's dot in an automator application, in order to convert a .dot file to a .png.
This is done in order to mitigate the fact that at the time of writing (30 IX 2019), on the latest macOS (10.14.6) graphviz can't be installed as a stand alone app (see: the isssue tracker and SO comment) and hence it can't be associated with opening .dot filetypes.
The approach used here is a mere workaround, that uses dot's ability to set the desired output format to .png, combined with a call to built-in Preview application.
In order to have the application associated with .dot files:
- copy the
dtp.apptoApplicationsfolder, - secondary click (right click) a file with
.dotextension and selectGet Info, - in
Open withdrop down select:Oher..., - select
Applications, thendtp, tickAlways Open Withand clickAdd, - finally, click
Change All...in theGet Infoand confirm that you want to apply the change to all documents with extension.dot.
If the steps were successful, from now on, double clicking a .dot file should result with a Preview showing an image that represent the graph.
The steps will set the default open action for the filetype, so commands such llc's -view-isel-dags and friends (see llvm link here) will automatically pick it up.
The application hard-codes the location of dot binary here (this is the default location used by homebrew). If on your system dot lives somewhere else, this line will need to be adapted.
If you see the
App can’t be opened because it is from an unidentified developer
message, please see this article for steps needed to have it fixed.