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