aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Sdk/tools/wix.harvest.targets
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Sdk/tools/wix.harvest.targets')
-rw-r--r--src/WixToolset.Sdk/tools/wix.harvest.targets512
1 files changed, 512 insertions, 0 deletions
diff --git a/src/WixToolset.Sdk/tools/wix.harvest.targets b/src/WixToolset.Sdk/tools/wix.harvest.targets
new file mode 100644
index 00000000..dea44469
--- /dev/null
+++ b/src/WixToolset.Sdk/tools/wix.harvest.targets
@@ -0,0 +1,512 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 <!-- These properties can be overridden to support non-default installations. -->
7 <PropertyGroup>
8 <HeatToolDir Condition=" '$(HeatToolDir)' == '' ">$(WixToolDir)</HeatToolDir>
9 </PropertyGroup>
10
11 <!-- These tasks are extensions for harvesting WiX source code from other sources. -->
12 <UsingTask TaskName="HeatFile" AssemblyFile="$(WixTasksPath)" />
13 <UsingTask TaskName="HeatDirectory" AssemblyFile="$(WixTasksPath)" />
14 <UsingTask TaskName="HeatProject" AssemblyFile="$(WixTasksPath)" />
15
16 <UsingTask TaskName="RefreshGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
17 <UsingTask TaskName="RefreshBundleGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
18
19 <!-- Default Harvester properties-->
20 <PropertyGroup>
21 <HarvestNoLogo Condition=" '$(HarvestNoLogo)' == '' ">$(NoLogo)</HarvestNoLogo>
22 <HarvestSuppressAllWarnings Condition=" '$(HarvestSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</HarvestSuppressAllWarnings>
23 <HarvestSuppressSpecificWarnings Condition=" '$(HarvestSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</HarvestSuppressSpecificWarnings>
24 <HarvestTreatWarningsAsErrors Condition=" '$(HarvestTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</HarvestTreatWarningsAsErrors>
25 <HarvestTreatSpecificWarningsAsErrors Condition=" '$(HarvestTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</HarvestTreatSpecificWarningsAsErrors>
26 <HarvestVerboseOutput Condition=" '$(HarvestVerboseOutput)' == '' ">$(VerboseOutput)</HarvestVerboseOutput>
27 <HarvestAutogenerateGuids Condition=" '$(HarvestAutogenerateGuids)' == '' ">true</HarvestAutogenerateGuids>
28 <HarvestGenerateGuidsNow Condition=" '$(HarvestGenerateGuidsNow)' == '' ">false</HarvestGenerateGuidsNow>
29 <HarvestSuppressFragments Condition=" '$(HarvestSuppressFragments)' == '' ">true</HarvestSuppressFragments>
30 <HarvestSuppressUniqueIds Condition=" '$(HarvestSuppressUniqueIds)' == '' ">false</HarvestSuppressUniqueIds>
31 </PropertyGroup>
32
33 <!-- Default HarvestProjects properties -->
34 <PropertyGroup>
35 <!-- Project harvesting is defaulted to off until it works more consistently. -->
36 <EnableProjectHarvesting Condition=" '$(EnableProjectHarvesting)'=='' ">false</EnableProjectHarvesting>
37
38 <HarvestProjectsNoLogo Condition=" '$(HarvestProjectsNoLogo)' == '' ">$(HarvestNoLogo)</HarvestProjectsNoLogo>
39 <HarvestProjectsSuppressAllWarnings Condition=" '$(HarvestProjectsSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestProjectsSuppressAllWarnings>
40 <HarvestProjectsSuppressSpecificWarnings Condition=" '$(HarvestProjectsSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestProjectsSuppressSpecificWarnings>
41 <HarvestProjectsTreatWarningsAsErrors Condition=" '$(HarvestProjectsTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestProjectsTreatWarningsAsErrors>
42 <HarvestProjectsTreatSpecificWarningsAsErrors Condition=" '$(HarvestProjectsTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestProjectsTreatSpecificWarningsAsErrors>
43 <HarvestProjectsVerboseOutput Condition=" '$(HarvestProjectsVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestProjectsVerboseOutput>
44 <HarvestProjectsAutogenerateGuids Condition=" '$(HarvestProjectsAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestProjectsAutogenerateGuids>
45 <HarvestProjectsGenerateGuidsNow Condition=" '$(HarvestProjectsGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestProjectsGenerateGuidsNow>
46 <HarvestProjectsSuppressFragments Condition=" '$(HarvestProjectsSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestProjectsSuppressFragments>
47 <HarvestProjectsSuppressUniqueIds Condition=" '$(HarvestProjectsSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestProjectsSuppressUniqueIds>
48 <HarvestProjectsTransforms Condition=" '$(HarvestProjectsTransforms)' == '' ">$(HarvestTransforms)</HarvestProjectsTransforms>
49 <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' != 'Bundle' ">$(IntermediateOutputPath)Product.Generated.wxs</HarvestProjectsGeneratedFile>
50 <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' == 'Bundle' ">$(IntermediateOutputPath)Bundle.Generated.wxs</HarvestProjectsGeneratedFile>
51 </PropertyGroup>
52
53 <!-- Default HarvestDirectory properties -->
54 <PropertyGroup>
55 <HarvestDirectoryNoLogo Condition=" '$(HarvestDirectoryNoLogo)' == '' ">$(HarvestNoLogo)</HarvestDirectoryNoLogo>
56 <HarvestDirectorySuppressAllWarnings Condition=" '$(HarvestDirectorySuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestDirectorySuppressAllWarnings>
57 <HarvestDirectorySuppressSpecificWarnings Condition=" '$(HarvestDirectorySuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestDirectorySuppressSpecificWarnings>
58 <HarvestDirectoryTreatWarningsAsErrors Condition=" '$(HarvestDirectoryTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestDirectoryTreatWarningsAsErrors>
59 <HarvestDirectoryTreatSpecificWarningsAsErrors Condition=" '$(HarvestDirectoryTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestDirectoryTreatSpecificWarningsAsErrors>
60 <HarvestDirectoryVerboseOutput Condition=" '$(HarvestDirectoryVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestDirectoryVerboseOutput>
61 <HarvestDirectoryAutogenerateGuids Condition=" '$(HarvestDirectoryAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestDirectoryAutogenerateGuids>
62 <HarvestDirectoryGenerateGuidsNow Condition=" '$(HarvestDirectoryGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestDirectoryGenerateGuidsNow>
63 <HarvestDirectorySuppressFragments Condition=" '$(HarvestDirectorySuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestDirectorySuppressFragments>
64 <HarvestDirectorySuppressUniqueIds Condition=" '$(HarvestDirectorySuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestDirectorySuppressUniqueIds>
65 <HarvestDirectoryTransforms Condition=" '$(HarvestDirectoryTransforms)' == '' ">$(HarvestTransforms)</HarvestDirectoryTransforms>
66 </PropertyGroup>
67
68 <!-- Default HarvestFile properties -->
69 <PropertyGroup>
70 <HarvestFileNoLogo Condition=" '$(HarvestFileNoLogo)' == '' ">$(HarvestNoLogo)</HarvestFileNoLogo>
71 <HarvestFileSuppressAllWarnings Condition=" '$(HarvestFileSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestFileSuppressAllWarnings>
72 <HarvestFileSuppressSpecificWarnings Condition=" '$(HarvestFileSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestFileSuppressSpecificWarnings>
73 <HarvestFileTreatWarningsAsErrors Condition=" '$(HarvestFileTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestFileTreatWarningsAsErrors>
74 <HarvestFileTreatSpecificWarningsAsErrors Condition=" '$(HarvestFileTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestFileTreatSpecificWarningsAsErrors>
75 <HarvestFileVerboseOutput Condition=" '$(HarvestFileVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestFileVerboseOutput>
76 <HarvestFileAutogenerateGuids Condition=" '$(HarvestFileAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestFileAutogenerateGuids>
77 <HarvestFileGenerateGuidsNow Condition=" '$(HarvestFileGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestFileGenerateGuidsNow>
78 <HarvestFileSuppressFragments Condition=" '$(HarvestFileSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestFileSuppressFragments>
79 <HarvestFileSuppressUniqueIds Condition=" '$(HarvestFileSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestFileSuppressUniqueIds>
80 <HarvestFileTransforms Condition=" '$(HarvestFileTransforms)' == '' ">$(HarvestTransforms)</HarvestFileTransforms>
81 </PropertyGroup>
82
83 <!--
84 ==================================================================================================
85 Harvest
86 ==================================================================================================
87 -->
88 <PropertyGroup>
89 <HarvestDependsOn>
90 ConvertReferences;
91 ConvertBundleReferences;
92 HarvestProjects;
93 HarvestDirectory;
94 HarvestFile;
95 GenerateCode;
96 </HarvestDependsOn>
97 </PropertyGroup>
98 <Target
99 Name="Harvest"
100 DependsOnTargets="$(HarvestDependsOn)" />
101
102 <!--
103 ==================================================================================================
104 GenerateCode
105 ==================================================================================================
106 -->
107 <PropertyGroup>
108 <GenerateCodeDependsOn>
109 RefreshGeneratedFile;
110 RefreshBundleGeneratedFile
111 </GenerateCodeDependsOn>
112 </PropertyGroup>
113 <Target
114 Name="GenerateCode"
115 DependsOnTargets="$(GenerateCodeDependsOn)" />
116
117 <!--
118 ================================================================================================
119 ConvertReferences
120
121 Converts project references to HeatProject items to auto generate authoring.
122 ================================================================================================
123 -->
124 <Target
125 Name="ConvertReferences"
126 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module') ">
127
128 <ItemGroup>
129 <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' ">
130 <DirectoryIds>%(_MSBuildProjectReferenceExistent.RefTargetDir)</DirectoryIds>
131 <ProjectOutputGroups>Binaries;Symbols;Sources;Content;Satellites;Documents</ProjectOutputGroups>
132 <ProjectName>%(_MSBuildProjectReferenceExistent.Name)</ProjectName>
133 <HeatOutput>$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs</HeatOutput>
134 </_HeatProjectReference>
135 <HeatProject Include="@(_HeatProjectReference)" />
136 </ItemGroup>
137
138 <Error
139 Text="The following files are deprecated and should be removed from your project(s): @(Compile->'%(Identity)', ', ')"
140 Condition=" '%(Compile.GenerateComponentGroups)' != '' " />
141
142 <ItemGroup>
143 <!-- Unconditionally generate Compile items so they are always linked in. -->
144 <Compile Include="$(HarvestProjectsGeneratedFile)" />
145 <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" />
146 </ItemGroup>
147
148 </Target>
149
150 <!--
151 ================================================================================================
152 ConvertBundleReferences
153
154 Converts project references in Bundle projects to HeatProject items to auto generate authoring.
155 ================================================================================================
156 -->
157 <Target
158 Name="ConvertBundleReferences"
159 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Bundle') ">
160
161 <ItemGroup>
162 <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' ">
163 <ProjectOutputGroups>Binaries;Symbols;Sources;Content;Satellites;Documents</ProjectOutputGroups>
164 <GenerateType>payloadgroup</GenerateType>
165 <HeatOutput>$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs</HeatOutput>
166 </_HeatProjectReference>
167 <HeatProject Include="@(_HeatProjectReference)" />
168 </ItemGroup>
169
170 <Error
171 Text="The following files are deprecated and should be removed from your project(s): @(Compile->'%(Identity)', ', ')"
172 Condition=" '%(Compile.GenerateComponentGroups)' != '' " />
173
174 <ItemGroup>
175 <!-- Unconditionally generate Compile items so they are always linked in. -->
176 <Compile Include="$(HarvestProjectsGeneratedFile)" />
177 <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" />
178 </ItemGroup>
179
180 </Target>
181
182 <!--
183 ================================================================================================
184 CombineHarvestProjects
185
186 Combines HeatProject and HarvestProject items together and ensures each has HeatOutput metadata.
187 ================================================================================================
188 -->
189 <Target
190 Name="CombineHarvestProjects"
191 Condition=" '@(HeatProject)' != '' or '@(HarvestProject)' != '' ">
192
193 <!-- Add default HeatOutputs for those without one specified -->
194 <CreateItem Include="@(HeatProject)" Condition= " '%(HeatProject.HeatOutput)' == '' "
195 AdditionalMetadata="HeatOutput=$(IntermediateOutputPath)_%(HeatProject.Filename).wxs">
196 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
197 </CreateItem>
198 <CreateItem Include="@(HarvestProject)" Condition= " '%(HarvestProject.HeatOutput)' == '' "
199 AdditionalMetadata="HeatOutput=$(IntermediateOutputPath)_%(HarvestProject.Filename).wxs">
200 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
201 </CreateItem>
202
203
204 <CreateItem Include="@(HeatProject)" Condition= " '%(HeatProject.HeatOutput)' != '' ">
205 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
206 </CreateItem>
207 <CreateItem Include="@(HarvestProject)" Condition= " '%(HarvestProject.HeatOutput)' != '' ">
208 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
209 </CreateItem>
210
211 </Target>
212
213 <!--
214 ================================================================================================
215 HarvestProjects
216
217 Harvests outputs of other MSBuild projects files using the VS project extension to heat.exe.
218
219 [IN]
220 @(HarvestProject)
221 @(HeatProject)
222 - The list of projects to harvest. HeatProject is provided for backward compatibility.
223 You should use HarvestProject instead.
224
225 %(HarvestProject.Transforms)
226 %(HeatProject.Transforms)
227 - XSL transforms to apply to the harvested WiX.
228
229 %(HarvestProject.ProjectOutputGroups)
230 %(HeatProjects.ProjectOutputGroups)
231 - The project output groups to harvest
232
233 [OUT]
234 %(HeatOutput)
235 - The generated .wxs files which are added to the @(Compile) item list.
236 ================================================================================================
237 -->
238 <ItemDefinitionGroup>
239 <HeatProject>
240 <Transforms>$(HarvestProjectsTransforms)</Transforms>
241 <ProjectOutputGroups>$(HarvestProjectsProjectOutputGroups)</ProjectOutputGroups>
242 <DirectoryIds>$(HarvestProjectsDirectoryIds)</DirectoryIds>
243 </HeatProject>
244 <HarvestProject>
245 <Transforms>$(HarvestProjectsTransforms)</Transforms>
246 <ProjectOutputGroups>$(HarvestProjectsProjectOutputGroups)</ProjectOutputGroups>
247 <DirectoryIds>$(HarvestProjectsDirectoryIds)</DirectoryIds>
248 </HarvestProject>
249 </ItemDefinitionGroup>
250
251 <PropertyGroup>
252 <HarvestProjectsDependsOn>CombineHarvestProjects</HarvestProjectsDependsOn>
253 </PropertyGroup>
254 <Target Name="HarvestProjects"
255 DependsOnTargets="$(HarvestProjectsDependsOn)"
256 Inputs="@(_AllHeatProjects);%(_AllHeatProjects.Transforms);$(MSBuildAllProjects);$(ProjectPath)"
257 Outputs="@(_AllHeatProjects -> '%(HeatOutput)')"
258 Condition=" $(EnableProjectHarvesting) and ('@(HeatProject)' != '' or '@(HarvestProject)' != '') ">
259
260 <HeatProject
261 NoLogo="true"
262 SuppressAllWarnings="$(HarvestProjectsSuppressAllWarnings)"
263 SuppressSpecificWarnings="$(HarvestProjectsSuppressSpecificWarnings)"
264 TreatWarningsAsErrors="$(HarvestProjectsTreatWarningsAsErrors)"
265 TreatSpecificWarningsAsErrors="$(HarvestProjectsTreatSpecificWarningsAsErrors)"
266 VerboseOutput="$(HarvestProjectsVerboseOutput)"
267 AutogenerateGuids="$(HarvestProjectsAutogenerateGuids)"
268 GenerateGuidsNow="$(HarvestProjectsGenerateGuidsNow)"
269 OutputFile="%(_AllHeatProjects.HeatOutput)"
270 SuppressFragments="$(HarvestProjectsSuppressFragments)"
271 SuppressUniqueIds="$(HarvestProjectsSuppressUniqueIds)"
272 Transforms="%(_AllHeatProjects.Transforms)"
273 Project="%(_AllHeatProjects.FullPath)"
274 ProjectOutputGroups="%(_AllHeatProjects.ProjectOutputGroups)"
275 GenerateType="%(_AllHeatProjects.GenerateType)"
276 DirectoryIds="%(_AllHeatProjects.DirectoryIds)"
277 ProjectName="%(_AllHeatProjects.ProjectName)"
278 Configuration="%(_AllHeatProjects.Configuration)"
279 Platform="%(_AllHeatProjects.Platform)"
280 GenerateWixVariables="$(HarvestProjectsGenerateWixVariables)"
281 AdditionalOptions="$(HarvestProjectsAdditionalOptions)"
282 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
283 ToolExe="$(HeatToolExe)"
284 ToolPath="$(HeatToolDir)">
285
286 <Output TaskParameter="OutputFile" ItemName="Compile" />
287 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
288
289 </HeatProject>
290
291 </Target>
292
293 <!--
294 ================================================================================================
295 HarvestDirectory
296
297 Harvests directories using heat.exe.
298
299 [IN]
300 @(HarvestDirectory) - The list of directories to harvest.
301 %(HarvestDirectory.Transforms) - XSL transforms to apply to the harvested WiX.
302 %(HarvestDirectory.ComponentGroupName) - The name of the ComponentGroup to create.
303 %(HarvestDirectory.DirectoryRefId) - The ID of the directory to reference instead of TARGETDIR.
304 %(HarvestDirectory.KeepEmptyDirectories) - Whether to create Directory entries for empty directories.
305 %(HarvestDirectory.PreprocessorVariable) - Substitute SourceDir for another variable name (ex: var.Dir).
306 %(HarvestDirectory.SuppressCom) - Suppress COM elements.
307 %(HarvestDirectory.SuppressRootDirectory) - Suppress a Directory element for the root directory.
308 $(HarvestDirectory.SuppressRegistry) - Suppress registry harvesting.
309
310 [OUT]
311 $(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs
312 - The generated .wxs files which are added to the @(Compile) item list.
313 ================================================================================================
314 -->
315
316 <ItemDefinitionGroup>
317 <HarvestDirectory>
318 <Transforms>$(HarvestDirectoryTransforms)</Transforms>
319 <ComponentGroupName>$(HarvestDirectoryComponentGroupName)</ComponentGroupName>
320 <DirectoryRefId>$(HarvestDirectoryDirectoryRefId)</DirectoryRefId>
321 <KeepEmptyDirectories>$(HarvestDirectoryKeepEmptyDirectories)</KeepEmptyDirectories>
322 <PreprocessorVariable>$(HarvestDirectoryPreprocessorVariable)</PreprocessorVariable>
323 <SuppressCom>$(HarvestDirectorySuppressCom)</SuppressCom>
324 <SuppressRootDirectory>$(HarvestDirectorySuppressRootDirectory)</SuppressRootDirectory>
325 <SuppressRegistry>$(HarvestDirectorySuppressRegistry)</SuppressRegistry>
326 </HarvestDirectory>
327 </ItemDefinitionGroup>
328
329 <PropertyGroup>
330 <HarvestDirectoryDependsOn>
331 GetHarvestDirectoryContent
332 </HarvestDirectoryDependsOn>
333 </PropertyGroup>
334
335 <!-- Creates items to include content since wildcards will not work in Target/@Inputs. -->
336 <Target Name="GetHarvestDirectoryContent">
337 <CreateItem Include="@(HarvestDirectory->'%(FullPath)\**\*')">
338 <Output TaskParameter="Include" ItemName="_HarvestDirectoryContent" />
339 </CreateItem>
340 </Target>
341
342 <Target Name="HarvestDirectory"
343 DependsOnTargets="$(HarvestDirectoryDependsOn)"
344 Inputs="@(_HarvestDirectoryContent);%(HarvestDirectory.Transforms)"
345 Outputs="$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs"
346 Condition=" '@(HarvestDirectory)' != '' ">
347
348 <HeatDirectory
349 NoLogo="true"
350 SuppressAllWarnings="$(HarvestDirectorySuppressAllWarnings)"
351 SuppressSpecificWarnings="$(HarvestDirectorySuppressSpecificWarnings)"
352 TreatWarningsAsErrors="$(HarvestDirectoryTreatWarningsAsErrors)"
353 TreatSpecificWarningsAsErrors="$(HarvestDirectoryTreatSpecificWarningsAsErrors)"
354 VerboseOutput="$(HarvestDirectoryVerboseOutput)"
355 AutogenerateGuids="$(HarvestDirectoryAutogenerateGuids)"
356 GenerateGuidsNow="$(HarvestDirectoryGenerateGuidsNow)"
357 OutputFile="$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs"
358 SuppressFragments="$(HarvestDirectorySuppressFragments)"
359 SuppressUniqueIds="$(HarvestDirectorySuppressUniqueIds)"
360 Transforms="%(HarvestDirectory.Transforms)"
361 Directory="@(HarvestDirectory)"
362 ComponentGroupName="%(HarvestDirectory.ComponentGroupName)"
363 DirectoryRefId="%(HarvestDirectory.DirectoryRefId)"
364 KeepEmptyDirectories="%(HarvestDirectory.KeepEmptyDirectories)"
365 PreprocessorVariable="%(HarvestDirectory.PreprocessorVariable)"
366 SuppressCom="%(HarvestDirectory.SuppressCom)"
367 SuppressRootDirectory="%(HarvestDirectory.SuppressRootDirectory)"
368 SuppressRegistry="%(HarvestDirectory.SuppressRegistry)"
369 AdditionalOptions="$(HarvestDirectoryAdditionalOptions)"
370 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
371 ToolExe="$(HeatToolExe)"
372 ToolPath="$(HeatToolDir)">
373
374 <Output TaskParameter="OutputFile" ItemName="Compile" />
375 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
376
377 </HeatDirectory>
378
379 </Target>
380
381 <!--
382 ================================================================================================
383 HarvestFile
384
385 Harvests files of different types using heat.exe. This can harvest registry from
386 self-registering files, files with typelibs, and more.
387
388 [IN]
389 @(HarvestFile) - The list of files to harvest.
390 %(HarvestFile.Transforms) - XSL transforms to apply to the harvested WiX.
391 %(HarvestFile.ComponentGroupName) - The name of the ComponentGroup to create.
392 %(HarvestFile.DirectoryRefId) - The ID of the directory to reference instead of TARGETDIR.
393 %(HarvestFile.PreprocessorVariable) - Substitute SourceDir for another variable name (ex: var.Dir).
394 %(HarvestFile.SuppressCom) - Suppress COM elements.
395 %(HarvestFile.SuppressRootDirectory) - Suppress a Directory element for the root directory.
396 $(HarvestFile.SuppressRegistry) - Suppress registry harvesting.
397
398 [OUT]
399 $(IntermediateOutputPath)_%(HarvestFile.Filename)_file.wxs
400 - The generated .wxs files which are added to the @(Compile) item list.
401 ================================================================================================
402 -->
403
404 <ItemDefinitionGroup>
405 <HarvestFile>
406 <Transforms>$(HarvestFileTransforms)</Transforms>
407 <ComponentGroupName>$(HarvestFileComponentGroupName)</ComponentGroupName>
408 <DirectoryRefId>$(HarvestFileDirectoryRefId)</DirectoryRefId>
409 <PreprocessorVariable>$(HarvestFilePreprocessorVariable)</PreprocessorVariable>
410 <SuppressCom>$(HarvestFileSuppressCom)</SuppressCom>
411 <SuppressRegistry>$(HarvestFileSuppressRegistry)</SuppressRegistry>
412 <SuppressRootDirectory>$(HarvestFileSuppressRootDirectory)</SuppressRootDirectory>
413 </HarvestFile>
414 </ItemDefinitionGroup>
415
416 <PropertyGroup>
417 <HarvestFileDependsOn></HarvestFileDependsOn>
418 </PropertyGroup>
419 <Target Name="HarvestFile"
420 DependsOnTargets="$(HarvestFileDependsOn)"
421 Inputs="@(HarvestFile);%(HarvestFile.Transforms)"
422 Outputs="@(HarvestFile->'$(IntermediateOutputPath)_%(ComponentGroupName)_%(DirectoryRefId)_%(Filename)%(Extension)_file.wxs')"
423 Condition=" '@(HarvestFile)' != '' ">
424
425 <HeatFile
426 NoLogo="true"
427 SuppressAllWarnings="$(HarvestFileSuppressAllWarnings)"
428 SuppressSpecificWarnings="$(HarvestFileSuppressSpecificWarnings)"
429 TreatWarningsAsErrors="$(HarvestFileTreatWarningsAsErrors)"
430 TreatSpecificWarningsAsErrors="$(HarvestFileTreatSpecificWarningsAsErrors)"
431 VerboseOutput="$(HarvestFileVerboseOutput)"
432 AutogenerateGuids="$(HarvestFileAutogenerateGuids)"
433 GenerateGuidsNow="$(HarvestFileGenerateGuidsNow)"
434 OutputFile="$(IntermediateOutputPath)_%(HarvestFile.ComponentGroupName)_%(HarvestFile.DirectoryRefId)_%(HarvestFile.Filename)%(HarvestFile.Extension)_file.wxs"
435 SuppressFragments="$(HarvestFileSuppressFragments)"
436 SuppressUniqueIds="$(HarvestFileSuppressUniqueIds)"
437 Transforms="%(HarvestFile.Transforms)"
438 File="@(HarvestFile)"
439 ComponentGroupName="%(HarvestFile.ComponentGroupName)"
440 DirectoryRefId="%(HarvestFile.DirectoryRefId)"
441 PreprocessorVariable="%(HarvestFile.PreprocessorVariable)"
442 SuppressCom="%(HarvestFile.SuppressCom)"
443 SuppressRegistry="%(HarvestFile.SuppressRegistry)"
444 SuppressRootDirectory="%(HarvestFile.SuppressRootDirectory)"
445 AdditionalOptions="$(HarvestFileAdditionalOptions)"
446 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
447 ToolExe="$(HeatToolExe)"
448 ToolPath="$(HeatToolDir)">
449
450 <Output TaskParameter="OutputFile" ItemName="Compile" />
451 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
452
453 </HeatFile>
454
455 </Target>
456
457 <!--
458 ================================================================================================
459 RefreshGeneratedFile
460
461 Generates code based on metadata defined in project references.
462
463 [IN]
464 @(_MSBuildResolvedProjectReferencePaths) - The list of MSBuildable project references.
465
466 [OUT]
467 @(_GeneratedFiles) - The generated source file.
468 ================================================================================================
469 -->
470 <PropertyGroup>
471 <RefreshGeneratedFileDependsOn></RefreshGeneratedFileDependsOn>
472 </PropertyGroup>
473 <Target Name="RefreshGeneratedFile"
474 DependsOnTargets="$(RefreshGeneratedFileDependsOn)"
475 Inputs="@(_MSBuildResolvedProjectReferencePaths);@(Compile);$(ProjectPath)"
476 Outputs="@(_GeneratedFiles)"
477 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module') and '@(_GeneratedFiles)' != '' ">
478
479 <RefreshGeneratedFile
480 GeneratedFiles="@(_GeneratedFiles)"
481 ProjectReferencePaths="@(_MSBuildResolvedProjectReferencePaths)" />
482
483 </Target>
484
485 <!--
486 ================================================================================================
487 RefreshBundleGeneratedFile
488
489 Generates code for bundle projects based on metadata defined in project references.
490
491 [IN]
492 @(_MSBuildResolvedProjectReferencePaths) - The list of MSBuildable project references.
493
494 [OUT]
495 @(_GeneratedFiles) - The generated source file.
496 ================================================================================================
497 -->
498 <PropertyGroup>
499 <RefreshBundleGeneratedFileDependsOn></RefreshBundleGeneratedFileDependsOn>
500 </PropertyGroup>
501 <Target Name="RefreshBundleGeneratedFile"
502 DependsOnTargets="$(RefreshBundleGeneratedFileDependsOn)"
503 Inputs="@(_MSBuildResolvedProjectReferencePaths);@(Compile);$(ProjectPath)"
504 Outputs="@(_GeneratedFiles)"
505 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Bundle' and '@(_GeneratedFiles)' != '') ">
506
507 <RefreshBundleGeneratedFile
508 GeneratedFiles="@(_GeneratedFiles)"
509 ProjectReferencePaths="@(_MSBuildResolvedProjectReferencePaths)" />
510 </Target>
511
512</Project>