Sandcastle - December CTP(-.-)
Sandcastle - December CTPがリリースされています。
今回のCTPでは、新しく追加されたApplyVsDocModel.xslを従来のAddOverloads.xslの代わりに使用するといい。また環境変数 DXROOT(Sandcastleインストール先パス)が追加されている。
以下にDecember CTP用のNAntのビルドスクリプトを書いておく。
... <!-- SandCastle構成 --> <!-- ディレクトリ --> <property name="sandcastle.dir" value="${programfiles.dir}\Sandcastle" /> <!-- 実行ファイル --> <property name="sandcastle.mrefbuilder.exe" value="${sandcastle.dir}\productiontools\mrefbuilder.exe" /> <property name="sandcastle.buildassembler.exe" value="${sandcastle.dir}\productiontools\buildassembler.exe" /> <property name="sandcastle.xsltransform.exe" value="${sandcastle.dir}\productiontools\xsltransform.exe" /> <!-- 変換用XSLファイル --> <property name="sandcastle.applyvsdocmodel.xsl" value="${sandcastle.dir}\ProductionTransforms\ApplyVSDocModel.xsl" /> <property name="sandcastle.addguidfilenames.xsl" value="${sandcastle.dir}\ProductionTransforms\AddGuidFilenames.xsl" /> <property name="sandcastle.reflectiontomanifest.xsl" value="${sandcastle.dir}\ProductionTransforms\ReflectionToManifest.xsl" /> <property name="sandcastle.reflectiontochmproject.xsl" value="${sandcastle.dir}\ProductionTransforms\ReflectionToChmProject.xsl" /> <property name="sandcastle.reflectiontochmcontents.xsl" value="${sandcastle.dir}\ProductionTransforms\ReflectionToChmContents.xsl" /> <property name="sandcastle.reflectiontochmindex.xsl" value="${sandcastle.dir}\ProductionTransforms\ReflectionToChmIndex.xsl" /> <!-- ヘルプコンパイラ --> <property name="hhc.exe" overwrite="false" value="${programfiles.dir}\HTML Help Workshop\hhc.exe" /> ... <!-- SDKドキュメントの生成 --> <target name="sdkdoc" depends="build" description="Builds SDK documentation"> <property name="sandcastle.workingdir" value="${build.dir}/doc/sdk" /> <property name="sandcastle.output.dir" value="${sandcastle.workingdir}/Output" /> <property name="sandcastle.comments.dir" value="${sandcastle.workingdir}/comments" /> <mkdir dir="${sandcastle.workingdir}" if="${not directory::exists(sandcastle.workingdir)}" /> <mkdir dir="${sandcastle.output.dir}" if="${not directory::exists(sandcastle.output.dir)}" /> <mkdir dir="${sandcastle.comments.dir}" if="${not directory::exists(sandcastle.comments.dir)}" /> <!-- XMLコメントファイルのコピー --> <copy todir="${sandcastle.comments.dir}"> <fileset basedir="${build.dir}/bin"> <include name="${project::get-name()}.Core.xml" /> </fileset> </copy> <!-- コンフィグレーションファイルをコピーして参照を書き換え --> <copy file="${sandcastle.dir}/Presentation/vs2005/Configuration/Sandcastle.config" tofile="${sandcastle.workingdir}/Sandcastle.config <filterchain> <replacestring from=""%DXROOT%\" to=""${sandcastle.dir}\" /> <replacestring from=""comments.xml" to=""comments\*.xml" /> </filterchain> </copy> <!-- MRefBuilderを実行 --> <exec program="${sandcastle.mrefbuilder.exe}" workingdir="${sandcastle.workingdir}"> <arg value="${build.dir}\bin\${project::get-name()}.Core.dll" /> <arg value="/out:reflection.org.xml" /> </exec> <!-- reflection.xmlの作成 --> <exec program="${sandcastle.xsltransform.exe}" workingdir="${sandcastle.workingdir}"> <arg value="/xsl:"${sandcastle.applyvsdocmodel.xsl}"" /> <arg value="reflection.org.xml" /> <arg value="/xsl:"${sandcastle.addguidfilenames.xsl}"" /> <arg value="/out:reflection.xml" /> </exec> <!-- manifest.xmlの作成 --> <exec program="${sandcastle.xsltransform.exe}" workingdir="${sandcastle.workingdir}"> <arg value="/xsl:"${sandcastle.reflectiontomanifest.xsl}"" /> <arg value="reflection.xml" /> <arg value="/out:manifest.xml" /> </exec> <!-- 出力の準備 --> <mkdir dir="${sandcastle.output.dir}" /> <mkdir dir="${sandcastle.output.dir}/html" /> <copy todir="${sandcastle.output.dir}"> <fileset basedir="${sandcastle.dir}/Presentation/vs2005"> <include name="icons/*" /> <include name="scripts/*" /> <include name="styles/*" /> </fileset> </copy> <!-- BuildAssemblerの実行 --> <exec program="${sandcastle.buildassembler.exe}" workingdir="${sandcastle.workingdir}" > <arg value="manifest.xml" /> <arg value="/config:Sandcastle.config" /> </exec> <!-- HTMLヘルププロジェクトの作成--> <exec program="${sandcastle.xsltransform.exe}" workingdir="${sandcastle.workingdir}"> <arg value="/xsl:"${sandcastle.reflectiontochmproject.xsl}"" /> <arg value="reflection.xml" /> <arg value="/out:"${sandcastle.output.dir}\test.hhp"" /> </exec> <exec program="${sandcastle.xsltransform.exe}" workingdir="${sandcastle.workingdir}" > <arg value="/xsl:"${sandcastle.reflectiontochmcontents.xsl}"" /> <arg value="reflection.xml" /> <arg value="/arg:html=Output\html" /> <arg value="/out:"${sandcastle.output.dir}\test.hhc"" /> </exec> <exec program="${sandcastle.xsltransform.exe}" workingdir="${sandcastle.workingdir}" > <arg value="/xsl:"${sandcastle.reflectiontochmindex.xsl}"" /> <arg value="reflection.xml" /> <arg value="/out:"${sandcastle.output.dir}\test.hhk"" /> </exec> <!-- chmファイルの生成 --> <exec program="${hhc.exe}" commandline="test.hhp" workingdir="${sandcastle.output.dir}" failonerror="false"/> <copy file="${sandcastle.output.dir}/test.chm" tofile="${sandcastle.workingdir}/${project::get-name()}-SDK.chm" /> <delete> <fileset basedir="${sandcastle.workingdir}"> <include name="**/*" /> <exclude name="${project::get-name()}-SDK.chm" /> </fileset> </delete> </target> ...