After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792846 - Unable to quote file filter command
Unable to quote file filter command
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: general
1.8.13
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
Depends on:
Blocks:
 
 
Reported: 2018-01-23 21:56 UTC by corey.taylor.fl
Modified: 2018-07-30 10:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description corey.taylor.fl 2018-01-23 21:56:26 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.
Comment 1 albert 2018-05-04 12:07:02 UTC
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?
Comment 2 albert 2018-05-04 12:29:33 UTC
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).
Comment 3 corey.taylor.fl 2018-05-08 05:19:13 UTC
I think that would work, thanks!
Comment 4 André Klapper 2018-07-30 10:17:21 UTC
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!