Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
How to configure output directory of CCCC plugin ?
(1/1)
eranon:
Hello. Is there a simple way to indicate the output directory used by the CCCC plugin ? The default one is "<project_dir>/.cccc" and I would like to go with "<project_dir>/analysis/cccc" because I'm using several metrics tools and have added the "analysis" subdirectory in my SVN/Git ignore lists.
oBFusCATed:
Read the source...
eranon:
OK, no problem to look at the source, but it's not a reply Obfuscated. When you have an answer and someone look for, the easiest way is to give him... It's the way I go when I see someone looking for answer I have. Anyone (any dev, I mean) is able to browse source, but, sometime, you have no time (and it's the reason why of my question here).
Well, I take 5 minutes to do it (maybe it will help someone else a day)... Here is what the code shows :
CCCC is launched from :
--- Code: ---wxExecute(CommandLine, Output, Errors);
--- End code ---
with command line being :
--- Code: ---wxString CommandLine = m_CcccApp + _T(" ") + ListOfFileNames.Trim();
--- End code ---
So, we see that not any output location is explicitely indicated, and it falls in the default CCCC one... At the end of the process, we see that the plugin just look at the produced report in an hardcoded path :
--- Code: ---const wxString FileName = _T("./.cccc/cccc.html");
--- End code ---
So, unless mistake, I can conclude there's not any provided way to configure the outdir option of CCCC, unless patching the plugin...
oBFusCATed:
If I knew the answer, I would have answered you directly.
I had just wild guess that it is not possible and I had to read the source in order to find out 100%.
So this was a question of wasting my time or wasting your time. I have no interest in CCC, so you've got the answer. ::)
eranon:
OK, so sorry for the wrong interpretation, Obfuscated (I'm a little bit nervous these days)... Well, unless patching the source to hardcode a new outdir path, or provide a conf dialog, or use an ini file under %appdata% (talking about Windows), I didn't found a way with the CCCC plugin.
So, I've taken a look at the other side (the CCCC one), hoping it could exist an environment variable about default outdir... But, no ! So, of course, again, I could rebuilt cccc.exe since it's open source... But, rhâaaa, not now.
Finally, awaiting a better/smarter way, I've disabled the plugin (not uninstalled, I'll be back) and added an entry in the C::B's Tools menu, launching :
--- Code: ---"C:\Program Files (x86)\CCCC\cccc.exe" --outdir="analysis\cccc" *.h *.cpp
--- End code ---
Of course, with ${PROJECT_DIR} as working directory.
Navigation
[0] Message Index
Go to full version