| View previous topic :: View next topic |
| Author |
Message |
majkinetor
Joined: 24 May 2006 Posts: 3626 Location: Belgrade
|
Posted: Thu Jun 21, 2007 4:26 pm Post subject: Natural Docs Custom Installer (compiled) |
|
|
Natural Docs Custom Installer
This is custom installer for Natural Docs, that can be used for AHK script documentation. Wiith it you don't have to think about installing natural docs prerequisites.
Installation
All you have to do is to unpack archive to the directory of your choice and execute Install.exe. After that you are ready to use it.
Usage
The documentation is generated in the _doc folder after you execute mkdoc in it. It will be created for all ahk and ndoc files in that folder and its subfolders.
After installation start console in the folder with your AHK scriipts and type mkdoc. This will create documentation for all scripts in that folder.
If you type mkdoc s that will create single html files for each ahk script.
If you have images, put them in the root of the script, or in \images folder.
Download:
You should use compiled version generaly as it is standalone, doesn't require nor Perl nor AutoHotKey as you may want to use Natural Docs for non-AHK related documentation. Non-Compiled version is there for people who would like to tweak modules by their own needs.
Links:
_________________

Last edited by majkinetor on Fri Jul 11, 2008 5:20 pm; edited 26 times in total |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3626 Location: Belgrade
|
Posted: Wed Sep 05, 2007 3:09 pm Post subject: |
|
|
I found time to remove some unused Perl libraries.
Now, unpacked version is 7MB, packed 2MB. _________________
 |
|
| Back to top |
|
 |
kiropes
Joined: 21 Mar 2007 Posts: 19 Location: Italy
|
Posted: Mon Dec 17, 2007 11:58 am Post subject: help |
|
|
when I perform cmd mkdoc
I have this error:
| Code: | "perl" it is not recognized as command inside or external,
an executable program or a batch file.
|
I don't understand |
|
| Back to top |
|
 |
Andreone
Joined: 20 Jul 2007 Posts: 257 Location: Paris, France
|
Posted: Mon Dec 17, 2007 12:24 pm Post subject: Re: Natural Docs Custom Installer |
|
|
| majkinetor wrote: | Notes:
- The installer updates your machine environment variables PATH and PERL5LIB. If you have perl already installed this installation will not spoil it.
| So, you have to manually add to your PATH environment variable the directory where perl.exe is installed. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3626 Location: Belgrade
|
Posted: Mon Dec 17, 2007 4:04 pm Post subject: |
|
|
Yes.
If Perl is already detected in PATH, nothing is added. If you have perl reference in the PATH and you don't have perl, that means you probably uninstalled it once and didn't remove perl fromt the PATH.
Keep in mind to restart your frontend app when you finish installing. For instance, if you install custom installer from Total Commander, TC will still have old env vars after installation is finished, so you have to restart TC to so it refreshes env vars. This can be pretty long chain, if you have non Microsfot launchers like DesktopX (in this case, both DesktopX and TC have to be restarted...)
Anyway, the custom installer currently doesn't work. It seems I removed too many libraries to reduce its size. I will probably fix it today. _________________
 |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3626 Location: Belgrade
|
Posted: Mon Dec 17, 2007 5:38 pm Post subject: |
|
|
I fixed installer and now it works.
Also, there is a question now wether to add perl in PATH env var if it is found there, so that may fix initial problems with users that uninstalled Perl before using custom installer. _________________
 |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3626 Location: Belgrade
|
Posted: Tue Dec 18, 2007 3:55 pm Post subject: |
|
|
This is AHK script for merging NDoc HTML parts into the single html file (so no more MHT docs)
mkdocs.ahk
| Code: | root=_doc
fStyle=%root%\styles\main.css
FileRead, style, %fStyle%
loop, %root%\files\*.html
{
FileRead, file, *t %A_LoopFileFullPath%
StringReplace, file, file, <link rel="stylesheet" type="text/css" href="../styles/main.css">, <style>%style%</style>
file := RegExReplace(file, "s)\Q<td class=MenuSection valign=top><!--START_ND_MENU\E.+?\Q<!--END_ND_MENU--></td>\E")
StringReplace, fn, A_LoopFilename, -ahk
FileDelete, %fn%
FileAppend, %file%, %fn%
}
|
If you run this in scripts dir after running mkdoc, you will get single html file as documentation. You can also merge it with mkdoc.bat by adding at its end:
| Code: | if "%1" == "s" (
echo Merging html files ...
mkdocs.ahk
echo Done.
echo.
) |
Then instead mkdoc you can type mkdoc s to make documentation and merge files at the same time. You must put mkdocs.ahk at the same location as mkdoc.bat _________________
 |
|
| Back to top |
|
 |
Rabiator
Joined: 17 Apr 2005 Posts: 265 Location: Sauerland
|
Posted: Tue Jun 17, 2008 10:18 am Post subject: Re: Natural Docs Custom Installer |
|
|
I installed the actual version of the installer, following the instructions of your first posting.
Now I get the following message, and I can't figure out the reason:
| Code: | Unknown error
Compilation failed in require at C:\NaturalDocs\Perl\Lib/Cwd.pm line 643.
BEGIN failed--compilation aborted at C:\NaturalDocs\Perl\Lib/FindBin.pm line 281.
BEGIN failed--compilation aborted at C:\NaturalDocs\Perl\Lib/FindBin.pm line 281.
Compilation failed in require at NaturalDocs line 68.
BEGIN failed--compilation aborted at NaturalDocs line 68. |
Before installing it I removed all path entries referring to perl.
The former package worked fine. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3626 Location: Belgrade
|
Posted: Tue Jun 17, 2008 10:32 am Post subject: |
|
|
Ye, i screwed package a bit, didn't fix it yet. It seems I removed more libraries from Perl then NDoc uses it. It was a stupid thing to do anyway, just for those ppl who can't afor to have 40MB more wasted on perl...
Just download Perl and copy it in Ndoc\Perl folder to fix it.
Or wait for latest code with latest NDoc which is significantly upgraded and have support for images in help, superb Ajax search etc... I also added option to create single HTML file without ndoc project data by running "mkdoc s" (s as single html). _________________
 |
|
| Back to top |
|
 |
Rabiator
Joined: 17 Apr 2005 Posts: 265 Location: Sauerland
|
Posted: Tue Jun 17, 2008 8:18 pm Post subject: |
|
|
Thanks.
With Perl 5.10 (17 MB) and Natural Docs 1.4 it works like a charm!
I like the ability to include images as shown in your Common Dialogs documentation .
__________________________________________
Created with BBCodeWriter 7.0 - the one and only  |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3626 Location: Belgrade
|
Posted: Thu Jun 19, 2008 5:51 pm Post subject: |
|
|
I finally uploaded new version of custom installer. Its back to old good 12MB archive and now it can be used in directories with long names, you have "s" parameter to create single HTML and new Natural Docs that support images and Ajax search. Just put images in "\images" folder, or in root folder directly. To add them to code use "(see image.png)" Ndoc tag. _________________
 |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3626 Location: Belgrade
|
Posted: Fri Jul 11, 2008 3:08 pm Post subject: |
|
|
Entirely new version.
I managed to compile Natural Docs into exe. Now you don't need to have Perl on your machine, and size on the disk droped from 46MB to 3MB.
I also made special extension *.ndoc that you can use to create any kind of documentation this way. It works the same as *.ahk files but it is there so you don't confuse your arbitrary documentation with ahk scripts.
Also, AHK is not required any more. _________________
 |
|
| Back to top |
|
 |
|