Author Topic: Doxygen script plugin  (Read 47732 times)

Offline jomeggs

  • Multiple posting newcomer
  • *
  • Posts: 92
Re: Doxygen script plugin
« Reply #30 on: July 07, 2009, 07:48:24 pm »
I am new to Doxygen so I copied and pasted into MyClass.hpp (the first lines):
...
Any idea what might cause this?

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.
« Last Edit: July 08, 2009, 09:03:39 pm by jomeggs »

Offline gd_on

  • Regular
  • ***
  • Posts: 468
Re: Doxygen script plugin
« Reply #31 on: July 08, 2009, 04:24:05 pm »
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
« Last Edit: July 08, 2009, 05:55:21 pm by gd_on »
Windows 10 or 7, svn C::B (last version or almost!), WxWidgets 3.1.2, Compilers 8.1.0, 32 bits (sjlj, posix : gcc and gfortran installed in C:\MinGW32) or 64 bits by Compilers 8.1.0 (seh, posix : in C:\MinGW64).

Offline jomeggs

  • Multiple posting newcomer
  • *
  • Posts: 92
Re: Doxygen script plugin
« Reply #32 on: July 08, 2009, 09:01:47 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...

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.

Offline gd_on

  • Regular
  • ***
  • Posts: 468
Re: Doxygen script plugin
« Reply #33 on: July 09, 2009, 12:55:00 pm »
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: [Select]
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)..."));


I hope this will help.

Gd_on
« Last Edit: July 09, 2009, 01:19:13 pm by gd_on »
Windows 10 or 7, svn C::B (last version or almost!), WxWidgets 3.1.2, Compilers 8.1.0, 32 bits (sjlj, posix : gcc and gfortran installed in C:\MinGW32) or 64 bits by Compilers 8.1.0 (seh, posix : in C:\MinGW64).

Offline jomeggs

  • Multiple posting newcomer
  • *
  • Posts: 92
Re: Doxygen script plugin
« Reply #34 on: July 10, 2009, 10:57:35 pm »
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.

Offline gd_on

  • Regular
  • ***
  • Posts: 468
Re: Doxygen script plugin
« Reply #35 on: July 11, 2009, 04:24:57 pm »
Hi jommegs,
thanks for your proposition  :). But, I think it's not useful because I have found on www.graphviz.org, in their bug list, that the dot.exe has problems in the last release (2.24 and also in the beta 2.25). So I downloaded a previous version directly from their whole list in http://www.graphviz.org/pub/graphviz/stable/windows/ and I chose version 2.22.2. Here dot.exe seems to works  :) but there are problems after for one of my projets  :( because some files seem to be not generated (some .map files), but may be it's a doxygen work, I don't know. On other projects, map file are created and I obtain nice dependency graphs inside the result chm or html files.
I have also downloaded the last doxygen version so 1.59. Which are your versions numbers ? because I suppose they work well for you.
Concerning your script, I suggest you change the messages at line 379, because you have already tested if doxygen was installed at line 157, so if it does not work here, it's not because doxygen is not installed, but something got wrong in it's execution. May be something like : doxygen has met a problem in it's execution. Output files are not properly created...

Finally, of course a simple work around to the blank character problem is : don't use blank characters in the name of your cbp project. But,.... those blanks have been introduced in file names with windows 95, so at least 15 years ago, and some softwares have still problems with that  :x. (or if you prefer .... :lol:)

Have a nice week ...

gd_on
« Last Edit: July 11, 2009, 06:50:36 pm by gd_on »
Windows 10 or 7, svn C::B (last version or almost!), WxWidgets 3.1.2, Compilers 8.1.0, 32 bits (sjlj, posix : gcc and gfortran installed in C:\MinGW32) or 64 bits by Compilers 8.1.0 (seh, posix : in C:\MinGW64).

ndelectro

  • Guest
Re: Doxygen script plugin deleted by admin
« Reply #36 on: July 15, 2009, 08:56:24 am »
:(  I'm too late!!!  Where can I get a copy of this plugin/script?

Don't worry, its back! :lol: It took a time to find it, but finally: Have a look at my first post

@MortonMacFly:
I'll follow your advice, but currently I'm a bit short of time...

Hello jomeggs,

unfortunately I don't find the attached file in in you first post. Is is possible that the file is deleted again?

Where can I get the plugin. I am very interested to use it.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5226
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Doxygen script plugin deleted by admin
« Reply #37 on: July 15, 2009, 09:05:03 am »
:(  I'm too late!!!  Where can I get a copy of this plugin/script?

Don't worry, its back! :lol: It took a time to find it, but finally: Have a look at my first post

@MortonMacFly:
I'll follow your advice, but currently I'm a bit short of time...

Hello jomeggs,

unfortunately I don't find the attached file in in you first post. Is is possible that the file is deleted again?

Where can I get the plugin. I am very interested to use it.

But it's there in the first post of this thread.

the attachment address is:

http://forums.codeblocks.org/index.php?action=dlattach;topic=8213.0;attach=3481
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ndelectro

  • Guest
Re: Doxygen script plugin
« Reply #38 on: July 15, 2009, 09:38:05 am »
thank you, ollydbg

now I see it to.
I tested it under Ubuntu 8.04 and it works great!!!



Offline jomeggs

  • Multiple posting newcomer
  • *
  • Posts: 92
Re: Doxygen script plugin deleted by admin
« Reply #39 on: July 15, 2009, 09:14:54 pm »
But it's there in the first post of this thread....

Thanks for your help! :lol: :lol: :lol:

I'm thinking about to create a real doxygen-plugin with config options and so on.But before I heave my backside off my beloved sofa, I need to know if that is worth the pain... What are you guys thinking about?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5226
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Doxygen script plugin deleted by admin
« Reply #40 on: July 18, 2009, 02:01:38 pm »
But it's there in the first post of this thread....

Thanks for your help! :lol: :lol: :lol:

I'm thinking about to create a real doxygen-plugin with config options and so on.But before I heave my backside off my beloved sofa, I need to know if that is worth the pain... What are you guys thinking about?
Hi, nice idea!
I personally prefer a config option dialog than manually entering script. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

swarmanizer

  • Guest
Re: Doxygen script plugin
« Reply #41 on: September 02, 2009, 01:32:26 pm »
works fine in ubuntu 9.04 and C::B 8.02
thankx for sharing!

swarmanizer

  • Guest
Re: Doxygen script plugin deleted by admin
« Reply #42 on: September 02, 2009, 01:34:23 pm »
:(  I'm too late!!!  Where can I get a copy of this plugin/script?

Don't worry, its back! :lol: It took a time to find it, but finally: Have a look at my first post

@MortonMacFly:
I'll follow your advice, but currently I'm a bit short of time...

Hello jomeggs,

unfortunately I don't find the attached file in in you first post. Is is possible that the file is deleted again?

Where can I get the plugin. I am very interested to use it.

But it's there in the first post of this thread.

the attachment address is:

http://forums.codeblocks.org/index.php?action=dlattach;topic=8213.0;attach=3481

You must be registered to see the file... just went to the same thing...

Offline ajaywazir

  • Single posting newcomer
  • *
  • Posts: 6
Re: Doxygen script plugin
« Reply #43 on: September 03, 2009, 07:14:55 am »
Is there a user manual somewhere?
We want to customise output of Doxygen, either by provided the .doxyfile or generating is withinC::B

Ajay

Offline jomeggs

  • Multiple posting newcomer
  • *
  • Posts: 92
Re: Doxygen script plugin
« Reply #44 on: September 03, 2009, 11:46:52 am »
Is there a user manual somewhere?

Please have a look into the scriptfile header. Further information about doxygen you'll find at http://www.doxygen.org