From: Rob M. <ro...@us...> - 2007-09-21 07:58:43
|
Update of /cvsroot/wix/wix/src/votive/sdk_vs2008/tools/build In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19110/src/votive/sdk_vs2008/tools/build Added Files: microsoft.vssdk.build.tasks.dll microsoft.vssdk.targets Log Message: AaronSte: Creating separate Votive and Sconce DLLs for VS 2005 and VS 2008. Adding the VS 2008 SDK source code that is needed to build the VS 2008 Votive and Sconce dlls. HeathS: SFBUG:1789825 - CreationTimeUTC documents wrong format SFFEATURE:1768845 - Patch element should support MinorUpdateTargetRTM attribute SFFEATURE:1735295 - Patch build should add PATCHNEW* properties to patch transform Added support for ignorables to CompareUnit in WixUnit HeathS: SFBUG:1768842 - PatchProperty does not allow Company RobMen: Ensure RegistryKey element never ends up as KeyPath because MSI SDK says it isn't allowed. RobMen: Component guid generation. RobMen: SFBUG:1795309 - respect the rollback flag for the last SQL string like all the other strings. RobMen: SFBUG:1787888 - correctly handle certificates that are in Components that are conditioned out. RobMen: SFBUG:1675194 - loop through all server bindings when searching for a match. --- NEW FILE: microsoft.vssdk.targets --- <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <!-- ************************************************************************* Copyright (c) Microsoft Corporation. All rights reserved. This code is licensed under the Visual Studio SDK license terms. THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. ************************************************************************* --> <UsingTask TaskName="FindVsSDKInstallation" AssemblyFile="Microsoft.VsSDK.Build.Tasks.dll" /> <UsingTask TaskName="Ctc" AssemblyFile="Microsoft.VsSDK.Build.Tasks.dll" /> <UsingTask TaskName="CtoResourceMerger" AssemblyFile="Microsoft.VsSDK.Build.Tasks.dll" /> <UsingTask TaskName="DevEnvSetup" AssemblyFile="Microsoft.VsSDK.Build.Tasks.dll" /> <UsingTask TaskName="MPLex" AssemblyFile="Microsoft.VsSDK.Build.Tasks.dll" /> <UsingTask TaskName="RegPkg" AssemblyFile="Microsoft.VsSDK.Build.Tasks.dll" /> <UsingTask TaskName="VsTemplatePaths" AssemblyFile="Microsoft.VsSDK.Build.Tasks.dll" /> <UsingTask TaskName="ZipItems" AssemblyFile="Microsoft.VsSDK.Build.Tasks.dll" /> <UsingTask TaskName="VSCTCompiler" AssemblyFile="..\Bin\VSCT.exe" /> <!-- Set the general properties for this installation of the SDK --> <PropertyGroup> <VsSDKVersion>9.0</VsSDKVersion> <VSSDKTargetPlatformVersion>9.0</VSSDKTargetPlatformVersion> <VSSDKTargetPlatformRegRoot>Software\Microsoft\VisualStudio\$(VSSDKTargetPlatformVersion)</VSSDKTargetPlatformRegRoot> </PropertyGroup> <Target Name="FindSDKInstallation" Condition="'$(VsSDKInstall)'==''"> <!-- JRock: Commented out because this requires that the VS SDK is installed and we don't need this right now for Votive --> <!--FindVsSDKInstallation SDKVersion="$(VsSDKVersion)"> <Output TaskParameter="InstallationPath" PropertyName="VsSDKInstall" /> <Output TaskParameter="IncludesPath" PropertyName="VsSDKIncludes" /> <Output TaskParameter="ToolsPath" PropertyName="VsSDKToolsPath" /> </FindVsSDKInstallation--> </Target> <PropertyGroup> <TargetVSVersion Condition="'$(TargetVSVersion)' == ''">$(VSSDKTargetPlatformVersion)</TargetVSVersion> </PropertyGroup> <!-- ======================================================================================================= CTC Compilation ======================================================================================================= --> <ItemGroup> <!-- Define the standard include path for the CTC compiler. --> <CtcIncludePath Condition="'$(VsSDKIncludes)' != ''" Include="$(VsSDKIncludes);$(VsSDKIncludes)office10" > <InProject>false</InProject> </CtcIncludePath> </ItemGroup> <PropertyGroup> <CtcCompileDependsOn>$(CtcCompileDependsOn);FindSDKInstallation</CtcCompileDependsOn> </PropertyGroup> <Target Name="CtcCompile" Inputs="@(CtcFile)" Outputs="@(CtcFile->'$(IntermediateOutputPath)%(FileName).cto')" DependsOnTargets="$(CtcCompileDependsOn)" Condition="'$(BuildingProject)'!='false'"> <Ctc IncludeDirs="@(CtcIncludePath);$(VsSDKIncludes);$(VsSDKIncludes)\office10" Inputs="@(CtcFile)" Defines="$(CtcDefines)" OutputFile="@(CtcFile->'$(IntermediateOutputPath)%(FileName).cto')" ProductVersion="$(TargetVSVersion)" SDKVersion="$(VsSDKVersion)" > </Ctc> <!--Record the CTC compile CTO outputs.--> <CreateItem Include="@(CtcFile->'$(IntermediateOutputPath)%(FileName).cto')" Condition="Exists('@(CtcFile->'$(IntermediateOutputPath)%(FileName).cto')')"> <Output TaskParameter="Include" ItemName="FileWrites"/> </CreateItem> <!--Record the CTC compile CTSYM outputs.--> <CreateItem Include="@(CtcFile->'$(IntermediateOutputPath)%(FileName).ctsym')" Condition="Exists('@(CtcFile->'$(IntermediateOutputPath)%(FileName).ctsym')')"> <Output TaskParameter="Include" ItemName="FileWrites"/> </CreateItem> </Target> <!-- ======================================================================================================= VSCT Compilation ======================================================================================================= --> <Target Name="VSCTCompile" DependsOnTargets="$(VSCTCompileDependsOn)" Condition="'$(BuildingProject)' != 'false' And '@(VSCTCompile)' != ''"> <!--Create the list of include path to use for the VSCT compilation--> <!--As first add the user provided folders--> <CreateItem Include="@(VSCTIncludePath)" Condition="'@(VSCTIncludePath)' != ''"> <Output TaskParameter="Include" ItemName="_InternalVSCTIncludePath"/> </CreateItem> <!--Now add the internal folders--> <CreateItem Include="$(VsSDKIncludes)" Condition="'$(VsSDKIncludes)' != ''"> <Output TaskParameter="Include" ItemName="_InternalVSCTIncludePath"/> </CreateItem> <CreateItem Include="$(VsSDKIncludes)\office10" Condition="'$(VsSDKIncludes)' != ''"> <Output TaskParameter="Include" ItemName="_InternalVSCTIncludePath"/> </CreateItem> <VSCTCompiler AdditionalIncludeDirectories="@(_InternalVSCTIncludePath)" IntermediateDirectory="$(IntermediateOutputPath)" NoLogo="true" OutputFile="@(VSCTCompile->'%(FileName).cto')" Source="@(VSCTCompile)" Verbose="true" /> <!--Record the VSCT compile CTO outputs for the Clean task.--> <CreateItem Include="@(VSCTCompile->'$(IntermediateOutputPath)%(FileName).cto')" Condition="Exists('@(VSCTCompile->'$(IntermediateOutputPath)%(FileName).cto')')"> <Output TaskParameter="Include" ItemName="FileWrites"/> </CreateItem> </Target> <!-- ======================================================================================================= Merging CTO resource ======================================================================================================= --> <PropertyGroup> <!-- The result of the ctc compilation will be used by the resource generator, so this task must depend on the ctc one --> <PrepareResourcesDependsOn>$(PrepareResourcesDependsOn);MergeCtoResource</PrepareResourcesDependsOn> <MergeCtoResourceDependsOn>$(MergeCtoResourceDependsOn);GenerateListOfCTO;CtcCompile;VSCTCompile</MergeCtoResourceDependsOn> </PropertyGroup> <!-- There are two different ways to search for resources in the 2.0 version of MSBuild and newer versions. Here we try to find the toolset version in use and add the right target to the dependencies according with the version. --> <Choose> <When Condition="'$(MSBuildToolsVersion)' == '2.0' OR '$(MSBuildToolsVersion)' == ''"> <PropertyGroup> <MergeCtoResourceDependsOn>$(MergeCtoResourceDependsOn);GenerateResourceToMergeWithCTO_20</MergeCtoResourceDependsOn> </PropertyGroup> </When> <Otherwise> <PropertyGroup> <MergeCtoResourceDependsOn>$(MergeCtoResourceDependsOn);GenerateResourceToMergeWithCTO</MergeCtoResourceDependsOn> </PropertyGroup> </Otherwise> </Choose> <!-- Create the list of the .RESOURCES files to merge with the CTO data. --> <Target Name="GenerateResourceToMergeWithCTO_20" DependsOnTargets="ResGen"> <CreateItem Include="@(ManifestResourceWithCulture);@(ManifestResourceWithNoCulture)" Condition="'%(ManifestResourceWithCulture.MergeWithCTO)'=='true' Or '%(ManifestResourceWithNoCulture.MergeWithCTO)'=='true'"> <Output TaskParameter="Include" ItemName="_ResourcesToMergeWithCTO" /> </CreateItem> </Target> <Target Name="GenerateResourceToMergeWithCTO" DependsOnTargets="ResGen"> <CreateItem Include="%(EmbeddedResource.OutputResource)" Condition="'%(EmbeddedResource.MergeWithCTO)'=='true'"> <Output TaskParameter="Include" ItemName="_ResourcesToMergeWithCTO" /> </CreateItem> </Target> <!-- Create the list of the expected CTO files. --> <Target Name="GenerateListOfCTO"> <!--Add the CTO files from the list of CTC files.--> <CreateItem Include="@(CtcFile->'$(IntermediateOutputPath)%(FileName).cto')" Condition="'@(CtcFile)' != ''"> <Output TaskParameter="Include" ItemName="_GeneratedCTOFiles"/> </CreateItem> <!--Add the CTO files from the list of VSCT files.--> <CreateItem Include="@(VSCTCompile->'$(IntermediateOutputPath)%(FileName).cto')" Condition="'@(VSCTCompile)' != ''"> <Output TaskParameter="Include" ItemName="_GeneratedCTOFiles"/> </CreateItem> </Target> <Target Name="MergeCtoResource" Condition="('@(CtcFile)'!='' OR '@(VSCTCompile)' != '') AND '$(BuildingProject)'!='false'" DependsOnTargets="$(MergeCtoResourceDependsOn)"> <CtoResourceMerger DestinationResource="$(PackageResources)" CtoFile="@(_GeneratedCTOFiles)" ResourcesToMerge="@(_ResourcesToMergeWithCTO)" > <Output TaskParameter="GeneratedResource" ItemName="MergedCtoResource" /> </CtoResourceMerger> </Target> <ItemGroup> <ManifestResourceWithNoCulture Include="$(MergedCtoResource)" > <InProject>false</InProject> </ManifestResourceWithNoCulture> </ItemGroup> <!-- ======================================================================================================= Generate code from LEX files ======================================================================================================= --> <PropertyGroup> <!--Make sure that the lexer runs before the C# compiler--> <CoreCompileDependsOn>$(CoreCompileDependsOn);GenerateCodeFromLex</CoreCompileDependsOn> </PropertyGroup> <!-- TODO: When MPLex.exe will allow us to specify the name / path of the output file we should change this target to use custom output names and use @(MPLexCompile->'$(IntermediateOutputPath)%(FileName).cs') as default. --> <Target Name="GenerateCodeFromLex" Condition="'$(BuildingProject)'!='false'" Inputs="@(MPLexCompile);$(LexFrameFile)" Outputs="@(MPLexCompile->'$(IntermediateOutputPath)%(FileName).cs')" DependsOnTargets="$(GenerateCodeFromLexDependsOn)"> <MPLex InputFile="@(MPLexCompile)" OutputFile="@(MPLexCompile->'$(IntermediateOutputPath)%(FileName).cs')" CompressTables="$(CompressTables)" FrameFile="$(LexFrameFile)" SDKVersion="$(VsSDKVersion)"> <Output TaskParameter="OutputFile" ItemName="Compile" /> <Output TaskParameter="OutputFile" ItemName="FileWrites"/> </MPLex> </Target> <!-- ======================================================================================================= Generate parser code from Y files ======================================================================================================= --> <PropertyGroup> <GenerateParserCodeFromGrammarDependsOn>$(GenerateParserCodeFromGrammarDependsOn);FindSDKInstallation</GenerateParserCodeFromGrammarDependsOn> <CoreCompileDependsOn>$(CoreCompileDependsOn);GenerateParserCodeFromGrammar</CoreCompileDependsOn> </PropertyGroup> <Target Name="GenerateParserCodeFromGrammar" Condition="'$(BuildingProject)'!='false'" Inputs="@(MPPGCompile)" Outputs="@(MPPGCompile->'$(IntermediateOutputPath)%(FileName).cs')" DependsOnTargets="$(GenerateParserCodeFromGrammarDependsOn)"> <!--Check if there are .lex files in the project because in this case mppg should generate the base classes used by the code generated by MPLex--> <CreateProperty Value="-mplex" Condition="'@(MPLexCompile)' != ''"> <Output TaskParameter="ValueSetByTask" PropertyName="__GenerateForMPLex" /> </CreateProperty> <!--Run the command line tool that generates the cs files.--> <Exec Command=""$(VsSDKToolsPath)\MPPG.exe" $(__GenerateForMPLex) @(MPPGCompile) > @(MPPGCompile->'$(IntermediateOutputPath)%(FileName).cs')" /> <!--Add the generated files to the list of the files to compile.--> <CreateItem Include="@(MPPGCompile->'$(IntermediateOutputPath)%(FileName).cs')"> <Output TaskParameter="Include" ItemName="Compile" /> <Output TaskParameter="Include" ItemName="FileWrites"/> </CreateItem> </Target> <!-- ======================================================================================================= Registering Managed Packages ======================================================================================================= --> <PropertyGroup> <RegisterManagedPackageDependsOn>$(RegisterManagedPackageDependsOn);CoreBuild</RegisterManagedPackageDependsOn> </PropertyGroup> <!-- Find the registry root and version of RegPkg to use --> <PropertyGroup> <__InternalTargetRoot>$(TargetRegistryRoot)</__InternalTargetRoot> <__InternalTargetRoot Condition=" '$(__InternalTargetRoot)' == ''">$(VSSDKTargetPlatformRegRoot)Exp</__InternalTargetRoot> <__InternalUseMPF80>false</__InternalUseMPF80> <__InternalUseMPF80 Condition="'$(UseVS2005MPF)' == 'true'">true</__InternalUseMPF80> <RegisterWithRanu Condition="'$(RegisterWithRanu)' == ''">true</RegisterWithRanu> </PropertyGroup> <Target Name="RegisterManagedPackage" Condition="'$(RegisterOutputPackage)'=='true'" DependsOnTargets="$(RegisterManagedPackageDependsOn)"> <RegPkg ItemToRegister="$(TargetPath)" ProductVersion="$(TargetVSVersion)" StateFile="$(IntermediateOutputPath)\RegPkg.cache" RegistrationRoot="$(__InternalTargetRoot)" SDKVersion="$(VsSDKVersion)" Unregister="false" UseCodebase="$(RegisterWithCodebase)" UseRanu="$(RegisterWithRanu)" UseVS2005MPF="$(__InternalUseMPF80)" /> </Target> <!-- ======================================================================================================= Running DevEnv /Setup ======================================================================================================= --> <PropertyGroup> <BuildDependsOn>$(BuildDependsOn);SettingUpDevenv</BuildDependsOn> <SettingUpDevenvDependsOn>$(SettingUpDevenvDependsOn);RegisterManagedPackage</SettingUpDevenvDependsOn> <DevenvSetupStateFile>$(IntermediateOutputPath)DevEnvSetup.cache</DevenvSetupStateFile> </PropertyGroup> <Target Name="SettingUpDevenv" Inputs="@(_GeneratedCTOFiles);@(IntermediateZipItem);@(IntermediateZipProject)" Outputs="$(DevenvSetupStateFile)" Condition="'$(RegisterOutputPackage)'=='true'" DependsOnTargets="$(SettingUpDevenvDependsOn)"> <DevEnvSetup CTOFiles="@(_GeneratedCTOFiles)" TemplateFiles="@(IntermediateZipItem);@(IntermediateZipProject)" ProductVersion="$(TargetVSVersion)" RegistryRoot="$(__InternalTargetRoot)" StateFile="$(DevenvSetupStateFile)" UseRANU ="$(RegisterWithRanu)" /> </Target> <!-- ======================================================================================================= Creating Zip Files ======================================================================================================= --> <PropertyGroup> <PrepareForRunDependsOn> ZipFiles; $(PrepareForRunDependsOn) </PrepareForRunDependsOn> <ZipFilesDependsOn>VsTemplatePathsTarget</ZipFilesDependsOn> </PropertyGroup> <!--Make sure that the zip output is set--> <PropertyGroup> <ZipProjectOutput Condition="'$(ZipProjectOutput)' == ''">$(OutputPath)</ZipProjectOutput> <ZipItemOutput Condition="'$(ZipItemOutput)' == ''">$(OutputPath)</ZipItemOutput> <ZipIntermediatePath Condition="'$(ZipIntermediatePath)' == ''">$(IntermediateOutputPath)</ZipIntermediatePath> </PropertyGroup> <Target Name="ZipFiles" DependsOnTargets="$(ZipFilesDependsOn)" Condition="'@(ZipProject)_@(ZipItem)' != '_'"> <Message Text="Build_Status Zipping"/> <!-- There are 2 options for using this task: 1) specifying a rootpath on each item 2) using the directory of the item as the rootpath There are 2 destinations for zip files based on: 1) project templates 2) item templates So we have the task 4 times to deal with the different combinations Note: the name of the zip file will be based on the rootpath --> <!--Project using RootPath--> <ZipItems Condition="'%(ZipProject.RootPath)'!='' AND '@(ZipProject)' != ''" Files="@(ZipProject)" Action="New" OutputSubPath="%(ZipProject.OutputSubPath)" ProjectPath="$(MSBuildProjectDirectory)" RootPath="$(MSBuildProjectDirectory)\%(ZipProject.RootPath)" ZipDefaultLanguage="$(VsTemplateLanguage)" ZipLanguage="%(ZipProject.Language)" ZipName="%(ZipProject.RootPath)" TargetPath="$(ZipIntermediatePath)"> <Output TaskParameter="ZipFile" ItemName="IntermediateZipProject"/> </ZipItems> <!--Project using Directory--> <ZipItems Condition="'%(ZipProject.RootPath)'=='' AND '@(ZipProject)' != ''" Files="@(ZipProject)" Action="New" OutputSubPath="%(ZipProject.OutputSubPath)" ProjectPath="$(MSBuildProjectDirectory)" RootPath="%(ZipProject.RootDir)%(ZipProject.Directory)" ZipDefaultLanguage="$(VsTemplateLanguage)" ZipLanguage="%(ZipProject.Language)" ZipName="%(ZipProject.Directory)" TargetPath="$(ZipIntermediatePath)"> <Output TaskParameter="ZipFile" ItemName="IntermediateZipProject"/> </ZipItems> <!--Item using RootPath--> <ZipItems Condition="'%(ZipItem.RootPath)'!='' AND '@(ZipItem)' != ''" Files="@(ZipItem)" Action="New" OutputSubPath="%(ZipItem.OutputSubPath)" ProjectPath="$(MSBuildProjectDirectory)" RootPath="$(MSBuildProjectDirectory)\%(ZipItem.RootPath)" ZipDefaultLanguage="$(VsTemplateLanguage)" ZipLanguage="%(ZipItem.Language)" ZipName="%(ZipItem.RootPath)" TargetPath="$(ZipIntermediatePath)"> <Output TaskParameter="ZipFile" ItemName="IntermediateZipItem"/> </ZipItems> <!--Item using Directory--> <ZipItems Condition="'%(ZipItem.RootPath)'=='' AND '@(ZipItem)' != ''" Files="@(ZipItem)" Action="New" OutputSubPath="%(ZipItem.OutputSubPath)" ProjectPath="$(MSBuildProjectDirectory)" RootPath="%(ZipItem.RootDir)%(ZipItem.Directory)" ZipDefaultLanguage="$(VsTemplateLanguage)" ZipLanguage="%(ZipItem.Language)" ZipName="%(ZipItem.Directory)" TargetPath="$(ZipIntermediatePath)"> <Output TaskParameter="ZipFile" ItemName="IntermediateZipItem"/> </ZipItems> <!-- Copy the generated templates to the deployment folder. --> <Copy SourceFiles="@(IntermediateZipProject)" DestinationFiles="@(IntermediateZipProject->'$(ZipProjectOutput)\%(Language)\%(OutputSubPath)\%(FileName)%(Extension)')" Condition="'$(RegisterOutputPackage)'=='true'" /> <Copy SourceFiles="@(IntermediateZipItem)" DestinationFiles="@(IntermediateZipItem->'$(ZipItemOutput)\%(Language)\%(OutputSubPath)\%(FileName)%(Extension)')" Condition="'$(RegisterOutputPackage)'=='true'" /> </Target> <!--Provide support for setting type (BuildAction) to ZipProject/ZipItem from VS--> <ItemGroup> <AvailableItemName Include="ZipProject"/> <AvailableItemName Include="ZipItem"/> </ItemGroup> <!--Target to retrive deployment path for vstemplates zip files--> <Target Name="VsTemplatePathsTarget" Inputs="$(__InternalTargetRoot);$(VsTemplateLanguage)" Outputs="$(DevenvSetupStateFile)" Condition="'$(RegisterOutputPackage)'=='true'" DependsOnTargets="$(VsTemplatePathsTargetDependsOn)"> <VsTemplatePaths RegistryHive="$(__InternalTargetRoot)" UseRANU="$(RegisterWithRanu)"> <Output TaskParameter="ProjectTemplates" PropertyName="ZipProjectOutput"/> <Output TaskParameter="ItemTemplates" PropertyName="ZipItemOutput"/> </VsTemplatePaths> <!--Make sure those directories exist--> <MakeDir Directories="$(ZipProjectOutput);$(ZipItemOutput)"/> </Target> </Project> --- NEW FILE: microsoft.vssdk.build.tasks.dll --- (This appears to be a binary file; contents omitted.) |