FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to set up the document generator

 
Post new topic   Reply to topic     Forum Index -> Visual D
View previous topic :: View next topic  
Author Message
ParticlePeter



Joined: 19 Nov 2011
Posts: 49
Location: Germany

PostPosted: Wed May 23, 2012 10:48 am    Post subject: How to set up the document generator Reply with quote

Hi,

I have problems with document generation and wonder what I'm doing wrong.
I enabled "Generate document", specified a Documentation File ( Doc.html ) and a Documentation Dir. The Doc file is generated, but only with the comments of the last module in my source folder. I see no way how to specify other modules.

My next approach was using candydoc. I followed the candydoc instructions, specified the candy.ddoc file in VisualD, but again there is no way to specify modules.ddoc. In any case, the output is not different to the output without candydoc, so I guess this setup is wrong as well.

One question to setup strategy. In my project I use a library which I wrote myself. This library is not compiled but just few .d files without any visualD project file. While coding on the project I parallely extend this library including ddoc comments. When I compile the project I would like to get documentation generated only for the library files. The library modules are not in the solution directory of my project, but in a different location. How would I set this up ?

I am asking as I found this Tag in the ddoc file: <!-- Generated by Ddoc from src\Test.d -->
while src\Test.d is relative to my solution and project file.
_________________
Cheers, searching for the Pivot of my Soul, PP
Back to top
View user's profile Send private message
ParticlePeter



Joined: 19 Nov 2011
Posts: 49
Location: Germany

PostPosted: Wed May 23, 2012 11:10 am    Post subject: Reply with quote

Hi,

I found some answers myself, few seconds after sending my questions ( Forum is awesome ! Smile ) and throwing an eye on VisualD Project Settings documentation.

If no "Documentation file" is specified, all modules generate ddoc files. Then, what is the purpose of this field ?

Candydoc works, when specifying modules.ddoc ( as mentioned in the VisualD project settigs, silly me ) instead of candy.ddoc.

But still, I have an issue with modules.ddoc. I would like to get documentation for only few modules, but in the build process modules.ddoc gets overwritten with all project modules. This includes other libraries like Derelict. How can this behavior be changed ?
_________________
Cheers, searching for the Pivot of my Soul, PP
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Thu May 24, 2012 9:45 am    Post subject: Reply with quote

The "documentation file" option just mirrors the dmd option, I'm also not sure it makes sense. It could be useful in single file compilation to specify some file name different from the module name.

Visual D always recreates the specified modules.ddoc, if you want to handcraft it, you should not specify it in the options. You can still add it to the project together with candy.ddoc and it will end up on the command line.
Back to top
View user's profile Send private message
ParticlePeter



Joined: 19 Nov 2011
Posts: 49
Location: Germany

PostPosted: Thu May 24, 2012 3:45 pm    Post subject: Reply with quote

Hi Sagitario,

thanks for your replay but I'm still messing something up. Docs for all my modules are generated, but I think that candydoc is not being used, as the docs look far from the candydoc screenshots.

I have this folder structure:

solution dir
--solution file
--source dir
--doc dir
----candydoc
------img dir
------candy.ddoc
------modules.ddoc ( handcrafted )
------( .js and .css files )

In the VisualD Project Settings just enable "Generate documentation" and enter doc in the "Documentation Dir" Text field.
This creates Docs for all source files, including those at other locations then solution dir -- source dir, without "candy".

I also tried to copy the contents of candydoc into my doc dir, but also, no success. Any idea what I'm doing wrong ?
_________________
Cheers, searching for the Pivot of my Soul, PP
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Fri May 25, 2012 12:18 pm    Post subject: Reply with quote

Your setup looks good to me and it seems to work with handcrafted modules.ddoc aswell. It builds html pages for all modules, but the candydoc package view only shows the files in modules.ddoc.

One thing I was trying first and failed was when not putting the candydoc files into its sub folder, but the folder with the html files. Your directory list seems fine, though.

To figure out what could be wrong, check relative paths inside the generated html files whether they reference the existing images and .js-files.

Rainer
Back to top
View user's profile Send private message
ParticlePeter



Joined: 19 Nov 2011
Posts: 49
Location: Germany

PostPosted: Sat May 26, 2012 10:01 am    Post subject: Reply with quote

Those images and .js files are not referenced at all in the resulting help files. I created a minimal project with one file, main function, ddoc comment. The resulting html file is also include. Could I ask you kindly to take a look into it ?
http://dl.dropbox.com/u/8028844/Tutorial-01.zip

Thanks
_________________
Cheers, searching for the Pivot of my Soul, PP
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Wed May 30, 2012 2:13 pm    Post subject: Reply with quote

Sorry for the late reply.

You just forgot to add candy.ddoc to the project.
Back to top
View user's profile Send private message
ParticlePeter



Joined: 19 Nov 2011
Posts: 49
Location: Germany

PostPosted: Tue Jun 05, 2012 3:24 am    Post subject: Reply with quote

Hi,

thanks that you replied at all, I felt already that I went to far with my request Smile.
Sorry, but still having trouble. I assume with adding candy.ddoc to the project you mean to treat it as any usual .d source file, right ?
But this results in an compiler error: Error: Error reading file 'candy.ddoc'


_________________
Cheers, searching for the Pivot of my Soul, PP
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Tue Jun 05, 2012 1:21 pm    Post subject: Reply with quote

I just tried it with the project in Tutorial-01.zip, and it turns out that candy.ddoc in that folder is corrupted. You have overwritten it with the content that was supposed to be written to modules.ddoc.
Your screenshot looks ok though, so I guess it display another copy of candy.ddoc?

Rainer
Back to top
View user's profile Send private message
ParticlePeter



Joined: 19 Nov 2011
Posts: 49
Location: Germany

PostPosted: Wed Jun 06, 2012 1:43 am    Post subject: Reply with quote

Hi,

I also noticed that candy.ddoc was corrupted, when I added it to the project.
Now its replaced it with the original file ( including the screenshot ), but its still not working.
Is this the right way to set it up ?
_________________
Cheers, searching for the Pivot of my Soul, PP
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Wed Jun 06, 2012 11:51 am    Post subject: Reply with quote

Here is the Tutorial example with my minor changes and the generated main.html. Maybe you can diff the project to see where the relevant change are: http://www.dsource.org/projects/visuald/browser/patches/Tutorial-01_doc.zip
Back to top
View user's profile Send private message
ParticlePeter



Joined: 19 Nov 2011
Posts: 49
Location: Germany

PostPosted: Wed Jun 06, 2012 5:46 pm    Post subject: Reply with quote

Thank you very much, I will dive into it.
_________________
Cheers, searching for the Pivot of my Soul, PP
Back to top
View user's profile Send private message
ParticlePeter



Joined: 19 Nov 2011
Posts: 49
Location: Germany

PostPosted: Wed Jun 06, 2012 6:45 pm    Post subject: Reply with quote

Hi,

yes, now it works, but I have no clue why. I just deleted the build temp files, and rebuild the project.
Anyway, thanks a lot for all your help and patience.
_________________
Cheers, searching for the Pivot of my Soul, PP
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Visual D All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group