Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
180 lines (159 sloc) 12.8 KB
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Chm">
<PropertyGroup>
<Name>Moq</Name>
<TopicStyle>vs2005</TopicStyle>
<LanguageId>1033</LanguageId>
<BuildDir>Help</BuildDir>
<DllDir>$(BuildDir)\dll</DllDir>
<DependencyDir>$(DllDir)\dependency</DependencyDir>
<CommentsDir>$(BuildDir)\comments</CommentsDir>
<TopicStyleDir>$(BuildDir)\$(TopicStyle)</TopicStyleDir>
<OutputDir>$(TopicStyleDir)\output</OutputDir>
<ProductionTools>$(DxRoot)\ProductionTools</ProductionTools>
<ProductionTransforms>$(DxRoot)\ProductionTransforms</ProductionTransforms>
<GenericDir>$(DXROOT)\Examples\Generic</GenericDir>
<Internal>false</Internal>
</PropertyGroup>
<ItemGroup>
<Dlls Include="Source\bin\Release\Moq.dll" />
<Comments Include="Source\bin\Release\Moq.xml" />
</ItemGroup>
<!--chm/hxs compiliers are installed under '$(ProgramFiles) (x86)' folder on 64-bit machine. -->
<Choose>
<When Condition="Exists('$(ProgramFiles) (x86)')">
<PropertyGroup>
<ToolsPath>$(ProgramFiles(x86))</ToolsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<ToolsPath>$(ProgramFiles)</ToolsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<Target Name="CopySrcFiles" DependsOnTargets="CreateDirectories">
<Exec Command="copy &quot;%(Dlls.FullPath)&quot; &quot;$(DllDir)\%(Dlls.Filename)%(Dlls.Extension)&quot;" />
<Exec Command="copy &quot;%(Comments.FullPath)&quot; &quot;$(CommentsDir)\%(Comments.Filename)%(Comments.Extension)&quot;"
Condition="@(Comments)!=''"/>
<Exec Command="copy &quot;%(Dependents.FullPath)&quot; &quot;$(DependencyDir)\%(Dependents.Filename)%(Dependents.Extension)&quot;"
Condition="@(Dependents)!=''"/>
</Target>
<!--Creating Directories...-->
<Target Name="CreateDirectories" >
<!--Deleting Directories-->
<Message Text="Deleting Directories..." />
<RemoveDir Condition="Exists('$(TopicStyleDir)')" Directories="$(TopicStyleDir)" />
<RemoveDir Condition="Exists('$(DllDir)')" Directories="$(DllDir)" />
<RemoveDir Condition="Exists('$(CommentsDir)')" Directories="$(CommentsDir)" />
<Message Text="Creating Directories..." />
<MakeDir Directories="$(BuildDir)" Condition="!Exists('$(BuildDir)')" />
<MakeDir Directories="$(DllDir)" Condition="!Exists('$(DllDir)')" />
<MakeDir Directories="$(CommentsDir)" Condition="!Exists('$(CommentsDir)')" />
<MakeDir Directories="$(DependencyDir)" Condition="!Exists('$(DependencyDir)')" />
<MakeDir Directories="$(TopicStyleDir)" Condition="!Exists('$(TopicStyleDir)')" />
<MakeDir Directories="$(TopicStyleDir)\output" Condition="!Exists('$(TopicStyleDir)\output')" />
<MakeDir Directories="$(TopicStyleDir)\output\html" Condition="!Exists('$(TopicStyleDir)\output\html')" />
<MakeDir Directories="$(TopicStyleDir)\output\icons" Condition="!Exists('$(TopicStyleDir)\output\icons')" />
<!--<MakeDir Directories="$(TopicStyleDir)\output\media" Condition="!Exists('$(TopicStyleDir)\output\media')" />-->
<MakeDir Directories="$(TopicStyleDir)\output\scripts" Condition="!Exists('$(TopicStyleDir)\output\scripts')" />
<MakeDir Directories="$(TopicStyleDir)\output\styles" Condition="!Exists('$(TopicStyleDir)\output\styles')" />
</Target>
<!--Creating web Directories...-->
<Target Name="CreateWebDirs" Condition="$(WebBuild)=='true'" >
<Message Text="Creating web Directories..." />
<MakeDir Directories="$(TopicStyleDir)\output\TopicInfo" Condition="!Exists('$(TopicStyleDir)\output\TopicInfo')" />
<MakeDir Directories="$(TopicStyleDir)\website" Condition="!Exists('$(TopicStyleDir)\website')" />
<MakeDir Directories="$(TopicStyleDir)\website\api" Condition="!Exists('$(TopicStyleDir)\website\api')" />
<MakeDir Directories="$(TopicStyleDir)\website\icons" Condition="!Exists('$(TopicStyleDir)\website\icons')" />
<MakeDir Directories="$(TopicStyleDir)\website\styles" Condition="!Exists('$(TopicStyleDir)\website\styles')" />
</Target>
<!--Call MRefBuilder-->
<Target Name="Reflection" DependsOnTargets="CreateDirectories;CopySrcFiles">
<Exec Command='"$(ProductionTools)\MRefBuilder" &quot;$(DllDir)\*.dll&quot; &quot;$(DllDir)\*.exe&quot; /out:&quot;$(TopicStyleDir)\reflection.org&quot; /dep:&quot;$(DependencyDir)\*.dll&quot;,&quot;$(DependencyDir)\*.exe&quot;' Condition="$(Internal)=='false'" />
<Exec Command='"$(ProductionTools)\MRefBuilder" &quot;$(DllDir)\*.dll&quot; &quot;$(DllDir)\*.exe&quot; /out:&quot;$(TopicStyleDir)\reflection.org&quot; /dep:&quot;$(DependencyDir)\*.dll&quot;,&quot;$(DependencyDir)\*.exe&quot; /internal+' Condition="$(Internal)=='true'" />
<Exec Condition="'$(TopicStyle)' == 'prototype'" Command='"$(ProductionTools)\XslTransform.exe" /xsl:"$(ProductionTransforms)\ApplyPrototypeDocModel.xsl" /xsl:"$(ProductionTransforms)\AddGuidFilenames.xsl" "$(TopicStyleDir)\reflection.org" /out:"$(TopicStyleDir)\reflection.xml"' />
<Exec Condition="'$(TopicStyle)' == 'vs2005'" Command='"$(ProductionTools)\XslTransform.exe" /xsl:"$(ProductionTransforms)\ApplyVSDocModel.xsl" /xsl:"$(ProductionTransforms)\AddFriendlyFilenames.xsl" "$(TopicStyleDir)\reflection.org" /out:"$(TopicStyleDir)\reflection.xml" /arg:IncludeAllMembersTopic=true /arg:IncludeInheritedOverloadTopics=true' />
<Exec Condition="'$(TopicStyle)' == 'hana'" Command='"$(ProductionTools)\XslTransform.exe" /xsl:"$(ProductionTransforms)\ApplyVSDocModel.xsl" /xsl:"$(ProductionTransforms)\AddFriendlyFilenames.xsl" "$(TopicStyleDir)\reflection.org" /out:"$(TopicStyleDir)\reflection.xml" /arg:IncludeAllMembersTopic=false /arg:IncludeInheritedOverloadTopics=true' />
</Target>
<!--Copy icons,styles and scripts to output-->
<Target Name="CopyOutput" DependsOnTargets="Reflection">
<Message Text="Copy icons, styles and scripts to Output..." />
<Exec Command='copy "$(DXROOT)\Presentation\$(TopicStyle)\icons\*" "$(TopicStyleDir)\output\icons\"' />
<Exec Command='copy "$(DXROOT)\Presentation\$(TopicStyle)\scripts\*" "$(TopicStyleDir)\output\scripts\"' />
<Exec Command='copy "$(DXROOT)\Presentation\$(TopicStyle)\styles\*" "$(TopicStyleDir)\output\styles\"' />
</Target>
<Target Name="Manifest" DependsOnTargets="Reflection">
<Exec Command='"$(ProductionTools)\XslTransform" /xsl:"%DXROOT%\ProductionTransforms\ReflectionToManifest.xsl" reflection.xml /out:manifest.xml'
WorkingDirectory="$(TopicStyleDir)" />
</Target>
<!--Generate an intermediate Toc file that simulates the Whidbey TOC format-->
<Target Name="Toc" DependsOnTargets="Manifest;CopyOutput;CreateWebDirs">
<Message Text="Generate an intermediate Toc file that simulates the Whidbey TOC format...." />
<Exec Condition="$(TopicStyle) == 'prototype'" Command='"$(ProductionTools)\XslTransform" /xsl:"$(DXROOT)\ProductionTransforms\createPrototypetoc.xsl" "$(TopicStyleDir)\reflection.xml" /out:"$(TopicStyleDir)\toc.xml"' />
<Exec Condition="$(TopicStyle) != 'prototype'" Command='"$(ProductionTools)\XslTransform" /xsl:"$(DXROOT)\ProductionTransforms\createvstoc.xsl" "$(TopicStyleDir)\reflection.xml" /out:"$(TopicStyleDir)\toc.xml"' />
</Target>
<!--Call MRefBuilder-->
<Target Name="Html" DependsOnTargets="Toc">
<Message Text="Call BuildAssembler..." />
<Exec Command='set reflectionfile=$(TopicStyleDir)\reflection.xml&amp; set CommentsDir=$(CommentsDir)&amp; set OutputDir=$(TopicStyleDir)\output\html&amp; "$(ProductionTools)\BuildAssembler" /config:"$(GenericDir)\$(TopicStyle).config" "$(TopicStyleDir)\manifest.xml"' Condition="$(WebBuild)!='true' And $(MSHCBuild)!='true'" />
<Exec Command='set reflectionfile=$(TopicStyleDir)\reflection.xml&amp; set CommentsDir=$(CommentsDir)&amp; set OutputDir=$(TopicStyleDir)\output\html&amp; "$(ProductionTools)\BuildAssembler" /config:"$(GenericDir)\vs2005-web.config" "$(TopicStyleDir)\manifest.xml"' Condition="$(WebBuild)=='true'" />
<Exec Command='set tocfile=$(TopicStyleDir)\toc.xml&amp; set reflectionfile=$(TopicStyleDir)\reflection.xml&amp; set CommentsDir=$(CommentsDir)&amp; set OutputDir=$(TopicStyleDir)\output\html&amp; "$(ProductionTools)\BuildAssembler" /config:"$(GenericDir)\vs2005-mshc.config" "$(TopicStyleDir)\manifest.xml"' Condition="$(MSHCBuild)=='true'" />
</Target>
<!-- Generate CHM help project -->
<Target Name="Chm" DependsOnTargets="Html">
<!-- Creating chm directories -->
<MakeDir Directories="$(TopicStyleDir)\chm" Condition="!Exists('$(TopicStyleDir)\chm')" />
<MakeDir Directories="$(TopicStyleDir)\chm\html" Condition="!Exists('$(TopicStyleDir)\chm\html')" />
<MakeDir Directories="$(TopicStyleDir)\chm\icons" Condition="!Exists('$(TopicStyleDir)\chm\icons')" />
<MakeDir Directories="$(TopicStyleDir)\chm\scripts" Condition="!Exists('$(TopicStyleDir)\chm\scripts')" />
<MakeDir Directories="$(TopicStyleDir)\chm\styles" Condition="!Exists('$(TopicStyleDir)\chm\styles')" />
<!--<MakeDir Directories="$(TopicStyleDir)\chm\media" Condition="!Exists('$(TopicStyleDir)\chm\media')" />-->
<!-- Copy icons,styles and scripts from output to chm -->
<Exec Command='xcopy "$(TopicStyleDir)\output\icons\*" "$(TopicStyleDir)\chm\icons\" /y /r'/>
<!--<Exec Command='xcopy "$(TopicStyleDir)\output\media\*" "$(TopicStyleDir)\chm\media\" /y /r'/>-->
<Exec Command='xcopy "$(TopicStyleDir)\output\scripts\*" "$(TopicStyleDir)\chm\scripts\" /y /r'/>
<Exec Command='xcopy "$(TopicStyleDir)\output\styles\*" "$(TopicStyleDir)\chm\styles\" /y /r'/>
<Exec Command='"$(ProductionTools)\ChmBuilder.exe" /project:$(Name) /html:"$(TopicStyleDir)\Output\html" /lcid:$(LanguageId) /toc:"$(TopicStyleDir)\Toc.xml" /out:"$(TopicStyleDir)\Chm"' />
<Exec Command='"$(ProductionTools)\DBCSFix.exe" /d:"$(TopicStyleDir)\chm" /l:$(LanguageId)' />
<Exec Command='"$(ToolsPath)\HTML Help Workshop\hhc.exe" "$(TopicStyleDir)\chm\$(Name).hhp"' IgnoreExitCode="true" />
<!--<Exec Command='sbapplocale $(LanguageId) "$(ProgramFiles)\HTML Help Workshop\hhc.exe" "$(TopicStyleDir)\chm\$(Name).hhp"' IgnoreExitCode="true" />-->
</Target>
<!-- Generate HxS help project -->
<Target Name="Hxs" DependsOnTargets="Html">
<Message Text="Generate HxS help project...." />
<Exec Command='copy "$(DXROOT)\Presentation\shared\HxsTemplate\template.HxF" "$(TopicStyleDir)\output\$(Name).HxF"' />
<Exec Command='copy "$(DXROOT)\Presentation\shared\HxsTemplate\template_A.HxK" "$(TopicStyleDir)\output\$(Name)_A.Hxk"' />
<Exec Command='copy "$(DXROOT)\Presentation\shared\HxsTemplate\template_B.HxK" "$(TopicStyleDir)\output\$(Name)_B.Hxk"' />
<Exec Command='copy "$(DXROOT)\Presentation\shared\HxsTemplate\template_F.HxK" "$(TopicStyleDir)\output\$(Name)_F.Hxk"' />
<Exec Command='copy "$(DXROOT)\Presentation\shared\HxsTemplate\template_K.HxK" "$(TopicStyleDir)\output\$(Name)_K.Hxk"' />
<Exec Command='copy "$(DXROOT)\Presentation\shared\HxsTemplate\template_N.HxK" "$(TopicStyleDir)\output\$(Name)_N.Hxk"' />
<Exec Command='copy "$(DXROOT)\Presentation\shared\HxsTemplate\template_S.HxK" "$(TopicStyleDir)\output\$(Name)_S.Hxk"' />
<Exec Command='"$(ProductionTools)\XslTransform" /xsl:"$(DXROOT)\ProductionTransforms\CreateHxc.xsl" "$(TopicStyleDir)\toc.xml" /arg:fileNamePrefix=$(Name) /out:"$(TopicStyleDir)\Output\$(Name).HxC"' />
<Exec Command='"$(ProductionTools)\XslTransform" /xsl:"$(DXROOT)\ProductionTransforms\TocToHxSContents.xsl" "$(TopicStyleDir)\toc.xml" /out:"$(TopicStyleDir)\Output\$(Name).HxT"' />
<!--generate hxs -->
<Exec Command='"$(ToolsPath)\Microsoft Help 2.0 SDK\hxcomp.exe" -p "$(TopicStyleDir)\output\$(Name).hxc"' IgnoreExitCode="true" />
</Target>
<Target Name="CreateWebBuildProperty">
<CreateProperty Value="true">
<Output TaskParameter="Value" PropertyName="WebBuild" />
</CreateProperty>
</Target>
<!-- Generate web pages -->
<Target Name="Web" DependsOnTargets="CreateWebBuildProperty;Html" Condition="$(TopicStyle)=='vs2005'">
<Exec Command='"$(ProductionTools)\XslTransform.exe" /xsl:"$(ProductionTransforms)\Vs2005TocToDsToc.xsl" /arg:topicInfo="$(TopicStyleDir)\output\TopicInfo" /xsl:"$(ProductionTransforms)\DsTocToSitemap.xsl" "$(TopicStyleDir)\Toc.xml" /out:"$(TopicStyleDir)\website\api\web.sitemap"' />
<Exec Command='xcopy "$(TopicStyleDir)\output\icons\*" "$(TopicStyleDir)\website\icons\" /y /r'/>
<Exec Command='xcopy "$(TopicStyleDir)\output\styles\*" "$(TopicStyleDir)\website\styles\" /y /r'/>
<Exec Command='xcopy "$(DXROOT)\Presentation\vs2005\website\*" "$(TopicStyleDir)\website\" /y /r'/>
</Target>
<Target Name="CreateMSHCBuildProperty">
<CreateProperty
Value="true">
<Output
TaskParameter="Value"
PropertyName="MSHCBuild" />
</CreateProperty>
</Target>
<!-- Generate Microsoft Help System -->
<Target Name="MSHC" DependsOnTargets="CreateMSHCBuildProperty;Html" Condition="$(TopicStyle)=='vs2005'" />
</Project>