Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Environment Variable for DOT path in Doxygen for Windows

My team has developers who are using Windows and Linux. We store Doxyfiles in our version control system. Because of that we leave the DOT_PATH blank, and when I pull from the repo to do a code review I always need to modify the DOT_PATH locally. Can I somehow modify the PATH environment variable in windows such that Doxygen will always find Dot when DOT_PATH is empty? The documentation makes it sound like I should be able to:

# The DOT_PATH tag can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found in the path.
# This tag requires that the tag HAVE_DOT is set to YES.

DOT_PATH               =

I edited the PATH variable for my windows account and put in my dot path, C:\Program Files (x86)\Graphviz2.30\bin\, I see that path when I type path in a command shell, but Doxygen doesn't seem to see it.

like image 289
Nick Avatar asked May 02 '17 13:05

Nick


2 Answers

We had a similar issue recently for PLANTUML with doxygen, see below for a solution.

In the configuration file (Doxyfile) checked in, use an environment variable, as in:

PLANTUML_JAR_PATH      = $(PLANTUML_JAR_PATH)

In each developer environment, define the variable with the proper path, depending on platform and specific machines.

In my case for linux, for example:

malff@linux-8edv:GIT_TRUNK> uname -a
Linux linux-8edv 4.1.39-53-default #1 SMP PREEMPT Thu Mar 30 06:44:23 UTC 2017 (56cc5a0) x86_64 x86_64 x86_64 GNU/Linux
malff@linux-8edv:GIT_TRUNK> env | grep PLANTUML_JAR_PATH
PLANTUML_JAR_PATH=/home/malff/plantuml/plantuml.8053.jar

Not tested, but I think something similar should work for DOT_PATH.

like image 106
Marc Alff Avatar answered Oct 22 '22 05:10

Marc Alff


You can try to use the full path in the short name notation (also known as 8.3 or DOS). It looks like this:

C:\PROGRA~1\COMMON~1\graphviz\bin\

You can find out all short names in the path using this shell script (you may name it shortpath.cmd):

@echo %~s1

The script accepts a single argument which will be translated into the short notation, so run it like this:

shortpath.cmd "C:\Program Files\Common Files\graphviz\bin"

Replace the argument with actual location of your copy of graphviz. Credits go to this answer.

like image 38
Stan Avatar answered Oct 22 '22 05:10

Stan