Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Doxygen script plugin

<< < (7/14) > >>

jomeggs:

--- Quote from: kfmfe04 on July 07, 2009, 12:12:13 pm ---I am new to Doxygen so I copied and pasted into MyClass.hpp (the first lines):
...
Any idea what might cause this?

--- End quote ---

No, unfortunately not. But if you are going further with questions about doxygen you risk this thread to be locked by admin. That would be sad :shock:

I've send a private message, hope it was helpful for you.

gd_on:
Hi,
I'm new to doxygen and find it's really nice.
I have installed the plugin, doxygen, graphviz 2.4 and html help workshop (for this last, i had to add manually the path to the binaries in my path system variable).
I have three problems with the plugin :
1) If there is a blank character somewhere in the path or in the .cbp file name, the plugin does not work properly. It says doxygen is not in my path, though it is correctly set. The same for dot.exe. The workaround is to use all names without anay blank characters, but it's not always obvious for big projects. Have you a better solution ?
2) for dot.exe, when my path has no blanks, it does not still work, telling me that dot.exe cannot be initialized, and after, I obtain many errors dialogs, one each time the plugin tries to use it. Finally in my case, the best solution is to avoid usage of dot.exe. But, have you an idea why it does not work ? Something missing on my PC ? Dot.exe itself, in it's own folder does not works, just telling me cannot be initialized. Installation of graphviz had no problems...
3) It looks on my PC that the plugin works only on accounts with administrative rights. Is that true ?

And finally a suggestion.
Could you replace some calls to _T macro by simply _ , especially for strings that may be translated, in dialog boxes for examples or displayed messages (a generalization of a previous Nanyu suggestion).

gd_on

jomeggs:

--- Quote from: gd_on on July 08, 2009, 04:24:05 pm ---I'm new to doxygen and find it's really nice. I have installed the plugin, doxygen, graphviz 2.4 and html help workshop (for this last, i had to add manually the path to the binaries in my path system variable). I have three problems with the plugin...

--- End quote ---

Hi gd_on,

I've checked the doxygen-plugin regarding spaces in path. Neither blanks in application path to doxygen or graphviz/dot nor blanks in CB project path caused any problems.

As you wrote, you're new to doxygen and graphviz. So please ensure this tools are working before throwing a stone on my holy plugin :lol:. I suggest you to open a dos command window, check your path and try to execute doxygen.exe and/or dot.exe. Is that not working, no chance to get it running with my plugin.

Further on I don't believe, that administrative rights are needed for the plugin. Could you please explain what caused this idea? But first, check your installation... If you want me to replace _T against _, please tell me which should be replaced and... No, please change them in your script and send a copy, I'll do the test.

gd_on:
Hi jomeggs,
let me try to explain the problems.

First, I'm on Windows XP and my C::B build is 5686 (the last one in SVN)

Secondly : the problem I met with an account with privileged right was due to the fact that I first ran the plugin under such an account, and when I tried again the plugin on the same project but on an other account (not admin) files normally created by doxygen were already there, but not accessible for writing. Solution : come back to the administrator account, delete all the files created by doxygen, swicth to the normal account and now it works !

Third : there is really a problem with blank characters, but only in the name of the project. When the command to activate doxygen is launched at line 347 in your plugin, the name of the project must be quoted to avoid problems with those blank characters.
Your line is :
local result = IO.Execute(_T("doxygen ") + sCfgBaseFile);
My modified line is :
local result = IO.Execute(_T("doxygen ") + _T("\"") + sCfgBaseFile + _T("\""));
Like that, no problems here with blank characters.

Four :
Nevertheless, there is still an other problem more subtle when you want to launch automatically the .chm file created.
In my case, I have a project whose name is :
Application 1 - V3.cbp
with 3 blank characters inside.
In the cfg file, I find that line :
OUTPUT_DIRECTORY       = doc-Application 1 - V3
quite normal ...
but doxygen creates in fact a folder doc-Application1-V3
It eliminates apparently the blank characters. So, when you build the command line to launch the .chm file, you have two problems.
The first on is that you use the normal name, with blanks, so in my case the command line built is :
cmd /c "rundll32 shell32.dll,ShellExec_RunDLL doc-Application 1 - V3/Application 1 - V3.chm"
This does not work, even when you launch this in a dos window for two reasons :
1)as there are blanks in names I think it should be normally quoted like that:
cmd /c "rundll32 shell32.dll,ShellExec_RunDLL "doc-Application 1 - V3/Application 1 - V3.chm""
2) but as doxygen as eliminated blank character in the folder name it is in fact :
cmd /c "rundll32 shell32.dll,ShellExec_RunDLL "doc-Application1-V3/Application 1 - V3.chm""

This last command works in a dos window, but it not the one built automatically by the plugin. Is it a problem in doxygen, in the plugin ? I don't know...

Five :
Concerning problems with dot.exe, I have until now no solutions. I don't understand why it does not work, even in a dos window. Not a real problem because dot is optional, but ...

Six:
Finally, I have made some modifications in your plugin to make it translatable (I have tested with my french translation of C::B and it works!). Here is the result as a diff output (the modification at line 347 is included):


--- Code: ---123c123
<    Log(_T("\nRunning doxygen_docs.script..."));
---
>    Log(_("\nRunning doxygen_docs.script..."));
127c127
<        local sMsg = _T("Cant' find an active project!");
---
>        local sMsg = _("Cant' find an active project!");
132c132
<    Log(_T("\n--Running doxygen_docs.script..."));
---
>    Log(_("\n--Running doxygen_docs.script..."));
139c139
<    Log(_T("Done"));
---
>    Log(_("Done"));
153c153
<            ShowWarning(_T("Make sure the dot program is installed and somewhere in the path..."));
---
>            ShowWarning(_("Make sure the dot program is installed and somewhere in the path..."));
157c157
<            ShowWarning(_T("Failed. Make sure the doxygen program is installed and somewhere in the path..."));
---
>            ShowWarning(_("Failed. Make sure the doxygen program is installed and somewhere in the path..."));
165,166c165,166
<         sText +=  _T("# Base configuration for doxygen, generated by doxygen_doc.script\n");
<         sText +=  _T("# You may change these defaults for your purposes\n");
---
>         sText +=  _("# Base configuration for doxygen, generated by doxygen_doc.script\n");
>         sText +=  _("# You may change these defaults for your purposes\n");
169c169
<         sText +=  _T("\n########### Configuration options related to the project ##########\n");
---
>         sText +=  _("\n########### Configuration options related to the project ##########\n");
178c178
<         sText +=  _T("\n########### Configuration options HTML ##########\n");
---
>         sText +=  _("\n########### Configuration options HTML ##########\n");
186c186
<         sText +=  _T("\n########### Configuration options CHM ##########\n");
---
>         sText +=  _("\n########### Configuration options CHM ##########\n");
191c191
<         sText +=  _T("\n########### Configuration options MAN ##########\n");
---
>         sText +=  _("\n########### Configuration options MAN ##########\n");
196c196
<         sText +=  _T("\n########### Configuration options LATEX ##########\n");
---
>         sText +=  _("\n########### Configuration options LATEX ##########\n");
200c200
<         sText +=  _T("\n########## Configuration options related to the dot tool ##########\n");
---
>         sText +=  _("\n########## Configuration options related to the dot tool ##########\n");
219c219
<         sText +=  _T("\n########## Configuration options related to the extracted output ##########\n");
---
>         sText +=  _("\n########## Configuration options related to the extracted output ##########\n");
248c248
<         sText +=  _T("\n########## Configuration options related to warnings ##########\n");
---
>         sText +=  _("\n########## Configuration options related to warnings ##########\n");
256c256
<         sText +=  _T("\n########## dont't forget the source files... ##########\n");
---
>         sText +=  _("\n########## dont't forget the source files... ##########\n");
283,284c283,284
<      sInputList +=  _T("# !!! PLEASE DO _NOT_ EDIT THIS FILE !!!\n");
<      sInputList +=  _T("# It will be overidden next time you start doxygen_docs.script!\n");
---
>      sInputList +=  _("# !!! PLEASE DO _NOT_ EDIT THIS FILE !!!\n");
>      sInputList +=  _("# It will be overidden next time you start doxygen_docs.script!\n");
339c339
<         local sMsg = _T("Failed. ") + sCfgBaseFile + _T(" has not been created...");
---
>         local sMsg = _("Failed. ") + sCfgBaseFile + _(" has not been created...");
346,347c346,347
<      Log(_T("doxygen is working, please be patient..."));
<      local result = IO.Execute(_T("doxygen ") + sCfgBaseFile);
---
>      Log(_("doxygen is working, please be patient..."));
>      local result = IO.Execute(_T("doxygen ") + _T("\"") + sCfgBaseFile + _T("\""));
358c358
<               Log(_T(" Contents of  doxygen logfile:"));
---
>               Log(_(" Contents of  doxygen logfile:"));
368c368
<         sMsg = _T("Success. You'll find your documents in folder:");
---
>         sMsg = _("Success. You'll find your documents in folder:");
379c379
<         sMsg = _T("Failed. Make sure the doxygen program is installed and somewhere in the path...");
---
>         sMsg = _("Failed. Make sure the doxygen program is installed and somewhere in the path...");
407c407
<         ShowMessage(_T("won't work due to GetDependenciesForProject(oPrj)..."));
---
>         ShowMessage(_("won't work due to GetDependenciesForProject(oPrj)..."));


--- End code ---

I hope this will help.

Gd_on

jomeggs:
Hi gd_on,

thank's for your yet detailed description, this is quite helpful. I'll try to solve the outstanding problems next week and I'll apply your patch. As I see, the rights proplem is already solved, so you tried to override admins files, bad guy :lol:.

Regarding your dot.exe problem I could deliver a zipped copy of my dot/doxygen installation if you like. But, it's a 17 MB file, tell me where to send it if you whish.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version