SN-DBS Build for CafeSDK2.12.12
In case you are working on a different toolset you will need to make changes to the following files:
1) SCE.Cpp.Cafe.stub.targets
2) XSLTs\rules.xsl
3) XSLTs\target.xsl
------------------------------------------------------
Editing rules.xsl
------------------------------------------------------
The "rules.xsl" file is responsible for fetching the CL.XML or Compiler-x_x_y_y.XML or whatnot then modifying it by
inserting custom property inside and storing it in a path that is accessible to SNDBS Ext. Then the SNDBS VS extension
makes sure that the C/C++ property page is fetched from this modified file not the one specified in the VS target file.
[NOTE] For WiiU VS uses a specific compiler-xx_yy.xml because "UseDefaultPropertyPageSchemas" is defined to be false in
the platform target file unlike win32 and durango.
You can make sure which of the Compiler-x_x_y_y.XML is being used by your project by determining first which of the
Compiler-x_x_y_y.targets is being used, which is covered in the section below "Editing target.xsl".
Based on the above facts edit the following param and the outputFile:
<xsl:param name="sourceFile">%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Cafe\Targets\*\Compiler-1_1_0_0.xml</xsl:param>
Make sure "<xsl:template match="props:Rule[@Name='CL']">"" Name='CL' matches the root "name" attribute in the .xml file.
------------------------------------------------------
Editing target.xsl
------------------------------------------------------
Distributed Compilation on Wiiu might not work if you are using a different Cafe toolset than what is specified. Check the "target.xsl" for the XML Attribute "sourceFile"
<xsl:param name="sourceFile">%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\Cafe\Targets\Compiler\Compiler-1_1_0_0.targets</xsl:param>
You might be using a different toolset for Cafe instead of "Compiler-1_1_0_0.targets". If this is the case Modify then "sourceFile" attribute with appropriate one.
To determine the "Compiler-x_x_y_y.targets" being used follow the steps:
a: Make sure SN-DBS support for cafe is not installed.
b: Increase MSBuild verbosity to maximum. Tools->[Projects and Solutions]->[Build and Run]
c: Perform compilation.
d: Search for "Cafe\Targets\Compiler\" or ".targets", you'll find something like:
1>Target "ClCompile" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\
Platforms\Cafe\Targets\Compiler\Compiler-x_x_y_y.targets" from project "XXXX" (target "_ClCompile" depends on it):
e: Modify the "target.xsl" accordingly.
For WiiU "UseDefaultPropertyPageSchemas" is defined to be false in the platform target file, so the custom CL.xml or Compiler-x_x_y_y.XML will not be loaded causing VisualStudio to not show the "distributable" property in the C/C++ general properties. So following element is never considered as the condition fails, it exists in the target.xsl file.
<ItemGroup Condition="'$(UseDefaultPropertyPageSchemas)' != 'false'" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyPageSchema Condition="'$(ConfigurationType)' != 'Utility'" Include="$(SCE_ROOT_DIR)\Common\SN-DBS VC Extensions\2010\Rules\Cafe\$(LangID)\Compiler-1_1_0_0.xml;" />
</ItemGroup>
On Cafe and X360 I had to remove Condition="'$(UseDefaultPropertyPageSchemas)' != 'false'" for the CL.xml to be loaded.
Also edit the following field to match the appropriate .xml file
<PropertyPageSchema Condition="'$(ConfigurationType)' != 'Utility'"
Include="$(SCE_ROOT_DIR)\Common\SN-DBS VC Extensions\2012\Rules\Cafe\$(LangID)\Compiler2012-1_1_0_0.xml;" />
------------------------------------------------------
Editing SCE.Cpp.Cafe.stub.targets
------------------------------------------------------
Finally you'll need to edit the following statement to match your platformToolset:
<Import Project="SCE\SCE.Cpp.Cafe.targets" Condition="'$(PlatformToolset)' == 'CafeSDK2.12.12'"/>
Condition="'$(PlatformToolset)' == 'CafeSDK2.12.12'" this condition can be removed but its useful to catch
errors that might happen due to configuration problems.