Difference between revisions of "Regenerating documentation"
Line 3: | Line 3: | ||
In order to regenerate documentation you'll have to: | In order to regenerate documentation you'll have to: | ||
#[http://www.naturaldocs.org/download.html Install NaturalDocs] | #[http://www.naturaldocs.org/download.html Install NaturalDocs] | ||
− | #Copy horde's css file (api.css) from <Horde's SDK folder>/Horde3D/Docs/html/css to <NaturalDocs folder>/Styles | + | #Copy horde's css file (api.css) from <Horde's SDK folder>/Horde3D/Docs/html/css to <NaturalDocs folder>/Styles. On Windows it is likely in C:\Program Files (x86)\NaturalDocs. On Linux it is likely in /usr/share/perl5/naturaldocs. |
#Use the following command to generate docs: | #Use the following command to generate docs: | ||
<code>naturaldocs -i <full path to Horde SDK folder>\Horde3D\Bindings\C++ -o FramedHTML <OutputPath> -p <ProjectPath> -s api</code>. | <code>naturaldocs -i <full path to Horde SDK folder>\Horde3D\Bindings\C++ -o FramedHTML <OutputPath> -p <ProjectPath> -s api</code>. | ||
Line 12: | Line 12: | ||
Therefore, the reference to the css file should be changed in the generated docs from <code>../styles/main.css</code> to <code>css/api.css</code>. | Therefore, the reference to the css file should be changed in the generated docs from <code>../styles/main.css</code> to <code>css/api.css</code>. | ||
After that generated doc file should be renamed to _api.html and copied to <Horde's SDK folder>/Horde3D/Docs/html. | After that generated doc file should be renamed to _api.html and copied to <Horde's SDK folder>/Horde3D/Docs/html. | ||
− | |||
− | |||
Automated script for Windows is available. Powershell 2.0 is required. | Automated script for Windows is available. Powershell 2.0 is required. | ||
In order to run the script open (first time only) powershell with administrator rights and type <code>Set-ExecutionPolicy RemoteSigned</code> or <code>Set-ExecutionPolicy Unrestricted</code>. | In order to run the script open (first time only) powershell with administrator rights and type <code>Set-ExecutionPolicy RemoteSigned</code> or <code>Set-ExecutionPolicy Unrestricted</code>. | ||
Open the script with your favorite text editor and change the paths at the top. Run the script. | Open the script with your favorite text editor and change the paths at the top. Run the script. | ||
− | [ | + | |
+ | Automated script for Linux is also available. | ||
+ | Do not forget to make script executable with <code>chmod +x Horde_generate_docs_linux.sh</code> | ||
+ | |||
+ | Check this forum thread to download scripts: [http://www.horde3d.org/forums/viewtopic.php?f=6&t=2305 link] |
Revision as of 11:23, 6 July 2017
Horde3D uses NaturalDocs as documentation generator.
In order to regenerate documentation you'll have to:
- Install NaturalDocs
- Copy horde's css file (api.css) from <Horde's SDK folder>/Horde3D/Docs/html/css to <NaturalDocs folder>/Styles. On Windows it is likely in C:\Program Files (x86)\NaturalDocs. On Linux it is likely in /usr/share/perl5/naturaldocs.
- Use the following command to generate docs:
naturaldocs -i <full path to Horde SDK folder>\Horde3D\Bindings\C++ -o FramedHTML <OutputPath> -p <ProjectPath> -s api
.
OutputPath and ProjectPath should also be full paths, like C:/GeneratedDocs
.
NaturalDocs cannot change the name of the css file that is included with generated documentation, so it is always named main.css and resides in <ProjectPath>/styles. Therefore, the reference to the css file should be changed in the generated docs from ../styles/main.css
to css/api.css
. After that generated doc file should be renamed to _api.html and copied to <Horde's SDK folder>/Horde3D/Docs/html.
Automated script for Windows is available. Powershell 2.0 is required. In order to run the script open (first time only) powershell with administrator rights and type Set-ExecutionPolicy RemoteSigned
or Set-ExecutionPolicy Unrestricted
. Open the script with your favorite text editor and change the paths at the top. Run the script.
Automated script for Linux is also available. Do not forget to make script executable with chmod +x Horde_generate_docs_linux.sh
Check this forum thread to download scripts: link