Skip to content

Commit

Permalink
Added Sandcastle to the tools so docs can be generated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis@tillig-win8-vm committed Nov 16, 2012
1 parent 95f6f35 commit ea5896b
Show file tree
Hide file tree
Showing 1,084 changed files with 7,318,164 additions and 0 deletions.
37 changes: 37 additions & 0 deletions lib/Sandcastle/Data/BuildReflectionData.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@ECHO OFF
SETLOCAL

REM Comment this out to use the current environment variable value
SET DXROOT=%CD%\..\

ECHO *
ECHO * Building .NET Framework reflection data files using tools in %DXROOT%
ECHO *

CD %DXROOT%\Data

REM Use the command line overrides if specified

REM This isn't supported yet, MRefBuilder tends to not find dependencies or crash on different frameworks.
REM This will be addressed later if there is a need for it.

REM IF NOT '%1'=='' SET FrameworkPlatform=%1
REM IF NOT '%2'=='' SET FrameworkVersion=%2

"%WINDIR%\Microsoft.Net\Framework\v4.0.30319\msbuild.exe" "BuildReflectionData.proj"
IF ERRORLEVEL 1 GOTO BuildFailed

ECHO *
ECHO * The reflection data has been built successfully
ECHO *

GOTO Done

:BuildFailed

ECHO *
ECHO * Build failed!
ECHO *

:Done
ENDLOCAL
46 changes: 46 additions & 0 deletions lib/Sandcastle/Data/BuildReflectionData.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<Project DefaultTargets="Reflection" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">

<!-- Default project property values -->
<PropertyGroup>
<FrameworkPlatform Condition="'$(FrameworkPlatform)' == ''">.NETFramework</FrameworkPlatform>
<FrameworkVersion Condition="'$(FrameworkVersion)' == ''">4.0.30319</FrameworkVersion>
<ToolsRoot Condition="'$(ToolsRoot)' == ''">$(DXROOT)</ToolsRoot>
<ProductionTools>$(ToolsRoot)\ProductionTools</ProductionTools>
<ProductionTransforms>$(ToolsRoot)\ProductionTransforms</ProductionTransforms>
<TmpPath>.\Tmp</TmpPath>
<DestPath>.\$(FrameworkPlatform)_$(FrameworkVersion)</DestPath>
</PropertyGroup>

<Target Name="Reflection">
<!-- Remove the old folder -->
<RemoveDir Directories="$(TmpPath);$(DestPath)" />

<!-- Create the folders -->
<MakeDir Directories="$(TmpPath)" Condition="!Exists('$(TmpPath)')" />
<MakeDir Directories="$(DestPath)" Condition="!Exists('$(DestPath)')" />

<!-- Create a response file for MRefBuilder so that it can properly determine implementation details
by scanning all assemblies together in one pass. -->
<XslTransformation
XslInputPath="CreateResponseFile.xsl"
XmlInputPaths="..\ProductionTools\Frameworks.xml"
Parameters="&lt;Parameter Name='platform' Value='$(FrameworkPlatform)' /&gt;
&lt;Parameter Name='version' Value='$(FrameworkVersion)' /&gt;"
OutputPaths="MRefBuilder.rsp" />

<!-- Generate the reflection data file for the assemblies. Use the VS2005 doc model transform. It will work for all styles. -->
<Exec ContinueOnError="false" IgnoreExitCode="true"
Command="&quot;$(ProductionTools)\MRefBuilder.exe&quot; @MRefBuilder.rsp /out:&quot;$(TmpPath)\Reflection.org&quot;" />
<Exec ContinueOnError="true" IgnoreExitCode="true"
Command="&quot;$(ProductionTools)\XslTransform.exe&quot; /xsl:&quot;$(ProductionTransforms)\ApplyVSDocModel.xsl&quot; /xsl:&quot;$(ProductionTransforms)\AddGuidFilenames.xsl&quot; &quot;$(TmpPath)\Reflection.org&quot; /out:&quot;$(TmpPath)\Reflection.xml&quot; /arg:IncludeAllMembersTopic=true /arg:IncludeInheritedOverloadTopics=false" />

<!-- Segregate the reflection data by namespace -->
<Exec ContinueOnError="false" IgnoreExitCode="true"
Command="&quot;$(ProductionTools)\SegregateByNamespace.exe&quot; &quot;$(TmpPath)\Reflection.xml&quot; /out:&quot;$(DestPath)&quot;" />

<!-- Remove the temporary files and folders when done -->
<RemoveDir Directories="$(TmpPath)" />
<Delete Files="MRefBuilder.rsp" />

</Target>
</Project>
16 changes: 16 additions & 0 deletions lib/Sandcastle/Data/CreateResponseFile.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

<xsl:output method="xml" omit-xml-declaration="yes" encoding="iso-8859-1" />

<xsl:param name="platform" select="string('.NETFramework')" />
<xsl:param name="version" select="string('4.0.30319')" />

<xsl:template match="Frameworks">
<xsl:for-each select="//Framework[@Platform=$platform and @Version=$version]/AssemblyLocations/Location/AssemblyDetails">
<xsl:value-of select="concat(ancestor::Location/@Path, '\', @Filename)" />
<xsl:text>&#13;</xsl:text>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>
Loading

0 comments on commit ea5896b

Please sign in to comment.