GNOME Bugzilla – Bug 792846
Unable to quote file filter command
Last modified: 2018-07-30 10:17:21 UTC
While trying to configure Doxygen to run a file filter that works on both Windows and Linux, there doesn't seem to be a way to quote the path to the command. FILTER_PATTERNS = *.glsl=""scripts/runpython" scripts/doxygen-glslfilter.py" The scripts/runpython needs to be quoted on Windows to allowing the forward slash. However, the quotes seem to be stripped away. The command ends up with a Executing popen(` scripts/runpython scripts/doxygen-glslfilter.py "C:/dev/g3d/G3D10/data-files/shader/AlphaFilter.glsl"`) The function getFileFilter() in util.cpp seems to only remove the surrounding quotes, so we were hoping the quotes around the path would stay. /* remove surrounding double quotes */ if ((filterName.right(1) == "\"") && (filterName.left(1) == "\"")) { filterName.remove(filterName.length() - 1, 1); filterName.remove(0, 1); } The call to popen in readCodeFragement() in definition.cpp does not seem to add this space or remove other quotes. QCString cmd=filter+" \""+fileName+"\""; Debug::print(Debug::ExtCmd,0,"Executing popen(`%s`)\n",qPrint(cmd)); f = portable_popen(cmd,"r"); Would it be possible to allow specifying a quoted path/command? Without this, there doesn't seem to be a way to run a script on both Windows and Linux from the file filter.
Relevant discussion on StackExchange: https://stackoverflow.com/questions/48394181/is-it-possible-to-wrap-a-doxygen-filter-command-in-quotes. Wouldn't it be better that doxygen replaces the '/' by '\' on windows?
Similar StachOverflow issue: https://stackoverflow.com/questions/49750869/what-is-the-qhg-location-path-relative-to-for-doxygen. For this pull request 703 has been submitted( https://github.com/doxygen/doxygen/pull/703).
I think that would work, thanks!
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to https://github.com/doxygen/doxygen/issues All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github. Hence I am closing this GNOME Bugzilla ticket. Please use the corresponding ticket in Github instead. Thanks a lot!