betwo / vscode-doxygen-runner

VS Code extension for Doxygen generation and preview
https://marketplace.visualstudio.com/items?itemName=betwo.vscode-doxygen-runner
MIT License
0 stars 2 forks source link

Doxygen needs to be run from a specific path #5

Open pknowles opened 3 years ago

pknowles commented 3 years ago

For reasons I can't comprehend, the paths in a Doxyfile INPUT are actually relative to the directory you run doxygen from. This means doxygen also needs to be run from the right spot.. which sadly could be anywhere. This is probably just a matter of adding a config option for it.

https://stackoverflow.com/questions/33276260/how-can-i-use-relative-path-names-in-doxygen-configuration

betwo commented 3 years ago

Hi @pknowles,

yeah, this is a frustrating part of Doxygen. A lot of the heuristics in this extensions are only there to deal with finding this "right spot":

https://github.com/betwo/vscode-doxygen-runner/blob/ad7a3e105ef917a3116911dc6a91507bdfc1d992/src/utils.ts#L140

We first try to find a directory relative to the configuration file to run Doxygen from. If that fails, we try to match the output directory. Finally, if also the second heuristic fails, we show an error.

How does this fail in your case? Could you please give me a minimal example setup?

pknowles commented 3 years ago

IIRC I got errors about not being able to find the input files (but I thought they were from doxygen itself). I'm not sure that this is something that can be solved for all cases automatically. It probably works for most people but the case I hit was the input files just being in a totally different directory. I can understand adding config options to support every possible environment might be too much, and the point of this is something quick and convenient.