Monday, July 31, 2006

Improved SandCastle BAT script

(Update: I've made a windows app to configure the paths and save the BAT script - click here)

Yesterday I posted my initial BAT script to automate the 11 steps to create a CHM using Microsoft's SandCastle CTP. Well there were a couple of limitations, so here is the updated BAT script: http://www.ixnay2infinity.com/ScrollingGrid/SandCastle-BAT-compile-updated20060731.zip

Contents of readme.txt:

Description: BAT file to create CHM file containing MSND-style class documentation for your assemblies using Microsoft Sandcastle CTP (July 29 2006)
Author: Ashley van Gerven (http://ixnay2infinity.blogspot.com)

1) Extract this zip file to a working directory (ANYWHERE!)
2) Modify line 3 to point to your assembly
3) Modify line 4 to point to your comments XML file
4) Modify line 18 and change "ScrollingGrid.chm" to the your CHM filename. You can also set the full destination path to the resulting CHM file.
5) Run the BAT script, and you should end up with your CHM file in the working directory or where you specified

NB - Requirements:
1) You installed Sandcastle to the default path: C:\Program Files\Sandcastle
2) You installed HTML Help 1.4 SDK to the default path: C:\Program Files\HTML Help Workshop
3) You have .NET framework 2.0 installed

This BAT has several improvements over my initial BAT script of yesterday which had the C:\test_sc path hard-coded and required replacing this string to the current path of the BAT. This is no longer required.

Note 2:
If you don't want the ouput folder (containing all the HTML files, Help project etc) to be deleted after compiling the CHM just prepend "REM" to the second-last "@rd..." line.