-
Notifications
You must be signed in to change notification settings - Fork 0
/
wix200x.targets
3091 lines (2590 loc) · 139 KB
/
wix200x.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!-- 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. -->
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="Build"
InitialTargets="_CheckRequiredProperties;
_SetDefaultPathValues">
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Extension Points
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!-- Allow a user-customized targets files to be used as part of the build. -->
<PropertyGroup>
<UserTargetsPath>$(MSBuildProjectFullPath).user</UserTargetsPath>
</PropertyGroup>
<Import Project="$(UserTargetsPath)" Condition="Exists('$(UserTargetsPath)')" />
<Import Project="$(CustomBeforeWixTargets)" Condition=" '$(CustomBeforeWixTargets)' != '' and Exists('$(CustomBeforeWixTargets)')" />
<!-- These properties can be overridden to support non-default installations. -->
<PropertyGroup>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTasksPath Condition=" '$(WixTasksPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\..\WiX Toolset v3.11\bin\WixTasks.dll</WixTasksPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTasksPath Condition=" '$(WixTasksPath)' == '' ">$(MSBuildExtensionsPath)\..\WiX Toolset v3.11\bin\WixTasks.dll</WixTasksPath>
<LuxTargetsPath Condition=" '$(LuxTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Lux.targets</LuxTargetsPath>
<LuxTasksPath Condition=" '$(LuxTasksPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\..\WiX Toolset v3.11\bin\LuxTasks.dll</LuxTasksPath>
<LuxTargetsPath Condition=" '$(LuxTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Lux.targets</LuxTargetsPath>
<LuxTasksPath Condition=" '$(LuxTasksPath)' == '' ">$(MSBuildExtensionsPath)\..\WiX Toolset v3.11\bin\LuxTasks.dll</LuxTasksPath>
</PropertyGroup>
<!-- This makes the project files a dependency of all targets so that things rebuild if they change -->
<PropertyGroup>
<MSBuildAllProjects Condition="Exists('$(MSBuildProjectFullPath)')">$(MSBuildAllProjects);$(MSBuildProjectFullPath)</MSBuildAllProjects>
<MSBuildAllProjects Condition="Exists('$(WixTargetsPath)')">$(MSBuildAllProjects);$(WixTargetsPath)</MSBuildAllProjects>
<MSBuildAllProjects Condition="Exists('$(LuxTargetsPath)')">$(MSBuildAllProjects);$(LuxTargetsPath)</MSBuildAllProjects>
<MSBuildAllProjects Condition="Exists('$(UserTargetsPath)')">$(MSBuildAllProjects);$(UserTargetsPath)</MSBuildAllProjects>
<MSBuildAllProjects Condition="Exists('$(CustomBeforeWixTargets)')">$(MSBuildAllProjects);$(CustomBeforeWixTargets)</MSBuildAllProjects>
<MSBuildAllProjects Condition="Exists('$(CustomAfterWixTargets)')">$(MSBuildAllProjects);$(CustomAfterWixTargets)</MSBuildAllProjects>
</PropertyGroup>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Property Declarations
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!-- These tasks can be used as general-purpose build tasks. -->
<UsingTask TaskName="Candle" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="Insignia" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="Lit" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="Light" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="Torch" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="ReadRegistry" AssemblyFile="$(WixTasksPath)" />
<!-- These tasks are extensions for harvesting WiX source code from other sources. -->
<UsingTask TaskName="HeatFile" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="HeatDirectory" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="HeatProject" AssemblyFile="$(WixTasksPath)" />
<!-- These tasks are specific to the build process defined in this file, and are not considered general-purpose build tasks. -->
<UsingTask TaskName="AssignProjectConfiguration" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(MSBuildToolsVersion)' == '' or '$(MSBuildToolsVersion)' == '2.0' " />
<UsingTask TaskName="AssignTargetPath" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(MSBuildToolsVersion)' == '' or '$(MSBuildToolsVersion)' == '2.0' " />
<UsingTask TaskName="ResolveNonMSBuildProjectOutput" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(MSBuildToolsVersion)' == '' or '$(MSBuildToolsVersion)' == '2.0' " />
<UsingTask TaskName="ResolveVCProjectOutput" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(MSBuildToolsVersion)' == '' or '$(MSBuildToolsVersion)' == '2.0' " />
<UsingTask TaskName="AssignProjectConfiguration" AssemblyName="Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(MSBuildToolsVersion)' == '3.5' " />
<UsingTask TaskName="AssignTargetPath" AssemblyName="Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(MSBuildToolsVersion)' == '3.5' " />
<UsingTask TaskName="ResolveNonMSBuildProjectOutput" AssemblyName="Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(MSBuildToolsVersion)' == '3.5' " />
<UsingTask TaskName="ResolveVCProjectOutput" AssemblyName="Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition=" '$(MSBuildToolsVersion)' == '3.5' " />
<UsingTask TaskName="CreateItemAvoidingInference" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="CreateProjectReferenceDefineConstants" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="WixAssignCulture" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="ResolveWixReferences" AssemblyFile="$(WixTasksPath)"/>
<UsingTask TaskName="ReplaceString" AssemblyFile="$(WixTasksPath)"/>
<UsingTask TaskName="GetCabList" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="GetLooseFileList" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="RefreshGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
<UsingTask TaskName="RefreshBundleGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
<UsingTask TaskName="GenerateCompileWithObjectPath" AssemblyFile="$(WixTasksPath)"/>
<!-- WiX tools are 32bit EXEs, so run them out-of-proc when MSBuild is not 32bit. -->
<PropertyGroup>
<RunWixToolsOutOfProc Condition=" '$(PROCESSOR_ARCHITECTURE)'!='x86' ">true</RunWixToolsOutOfProc>
</PropertyGroup>
<!--
Several properties must be set in the main project file, before using this .targets file.
However, if the properties are not set, we pick some defaults.
-->
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)'=='' ">AnyCPU</Platform>
<OutputPath Condition=" '$(OutputPath)' == '' ">bin\$(Configuration)\</OutputPath>
<!-- Ensure any OutputPath has a trailing slash, so it can be concatenated -->
<OutputPath Condition=" '$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)') ">$(OutputPath)\</OutputPath>
<_OriginalOutputType>$(OutputType)</_OriginalOutputType>
<OutputType Condition=" '$(OutputType)' == '' ">Package</OutputType>
<BuildProjectReferences Condition="'$(BuildProjectReferences)' == ''">true</BuildProjectReferences>
</PropertyGroup>
<!-- Properties for the intermediate object output -->
<PropertyGroup>
<BaseIntermediateOutputPath Condition=" '$(BaseIntermediateOutputPath)' == '' ">obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)') ">$(IntermediateOutputPath)\</IntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(IntermediateOutputPath)' == '' and '$(Platform)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(IntermediateOutputPath)' == '' and '$(Platform)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Platform)\$(Configuration)\</IntermediateOutputPath>
<IntermediateExt Condition=" '$(IntermediateExt)' == '' ">.wixobj</IntermediateExt>
<CabinetCachePath Condition=" '$(CabinetCachePath)'=='' and '$(ReuseCabinetCache)'=='true' ">$(IntermediateOutputPath)cabcache\</CabinetCachePath>
<CleanFile Condition=" '$(CleanFile)' == '' ">$(MSBuildProjectFile).FileList.txt</CleanFile>
<BindContentsFilePrefix Condition=" '$(BindContentsFilePrefix)' == '' ">$(MSBuildProjectFile).BindContentsFileList</BindContentsFilePrefix>
<BindContentsFileExtension Condition=" '$(BindContentsFileExtension)' == '' ">.txt</BindContentsFileExtension>
<BindOutputsFilePrefix Condition=" '$(BindOutputsFilePrefix)' == '' ">$(MSBuildProjectFile).BindOutputsFileList</BindOutputsFilePrefix>
<BindOutputsFileExtension Condition=" '$(BindOutputsFileExtension)' == '' ">.txt</BindOutputsFileExtension>
<BindBuiltOutputsFilePrefix Condition=" '$(BindBuiltOutputsFilePrefix)' == '' ">$(MSBuildProjectFile).BindBuiltOutputsFileList</BindBuiltOutputsFilePrefix>
<BindBuiltOutputsFileExtension Condition=" '$(BindBuiltOutputsFileExtension)' == '' ">.txt</BindBuiltOutputsFileExtension>
<SignedFile Condition=" '$(SignedFile)' == '' ">$(MSBuildProjectFile).Signed.txt</SignedFile>
</PropertyGroup>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
IDE Macro Property Declarations
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!--
IDE Macros available from both integrated builds and from command line builds.
The following properties are 'macros' that are available via IDE for pre and post build steps.
All of them should be added to WixBuildMacroCollection to ensure that they are shown in the UI.
-->
<PropertyGroup>
<TargetExt Condition=" '$(OutputType)' == 'Package' ">.msi</TargetExt>
<TargetExt Condition=" '$(OutputType)' == 'Module' ">.msm</TargetExt>
<TargetExt Condition=" '$(OutputType)' == 'PatchCreation' ">.pcp</TargetExt>
<TargetExt Condition=" '$(OutputType)' == 'Library' ">.wixlib</TargetExt>
<TargetExt Condition=" '$(OutputType)' == 'Bundle' ">.exe</TargetExt>
</PropertyGroup>
<PropertyGroup>
<!-- Example, bin\Debug\ -->
<OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir>
<!-- Ensure OutDir has a trailing slash, so it can be concatenated -->
<OutDir Condition=" '$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)') ">$(OutDir)\</OutDir>
<!-- Default pdb output path to the output directory -->
<PdbOutputPath Condition=" '$(PdbOutputPath)'=='' ">$(OutDir)</PdbOutputPath>
<PdbOutputPath Condition=" '$(PdbOutputPath)' != '' and !HasTrailingSlash('$(PdbOutputPath)') ">$(PdbOutputPath)\</PdbOutputPath>
<!-- Example, MySetup -->
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
<!-- Example, MySetup.wixproj -->
<ProjectFileName Condition=" '$(ProjectFileName)' == '' ">$(MSBuildProjectFile)</ProjectFileName>
<!-- Example, .wixproj -->
<ProjectExt Condition=" '$(ProjectExt)' == '' ">$(MSBuildProjectExtension)</ProjectExt>
<!-- Example, c:\MyProjects\MySetup\ -->
<ProjectDir Condition=" '$(ProjectDir)' == '' ">$(MSBuildProjectDirectory)\</ProjectDir>
<!-- Example, c:\MyProjects\MySetup\MySetup.msi -->
<ProjectPath Condition=" '$(ProjectPath)' == '' ">$(ProjectDir)$(ProjectFileName)</ProjectPath>
<!-- Example, .wixpdb -->
<TargetPdbExt Condition=" '$(TargetPdbExt)' == '' ">.wixpdb</TargetPdbExt>
<!-- Example, MySetup -->
<TargetName Condition=" '$(TargetName)' == '' ">$(OutputName)</TargetName>
<!-- Example, MySetup.msi -->
<TargetFileName Condition=" '$(TargetFileName)' == '' ">$(TargetName)$(TargetExt)</TargetFileName>
<!-- Example, MySetup.wixpdb" -->
<TargetPdbName Condition=" '$(TargetPdbName)' == '' ">$(TargetName)$(TargetPdbExt)</TargetPdbName>
<!-- Example, Debug -->
<ConfigurationName Condition=" '$(ConfigurationName)' == '' ">$(Configuration)</ConfigurationName>
<!-- Example, AnyCPU -->
<PlatformName Condition=" '$(PlatformName)' == '' ">$(Platform)</PlatformName>
</PropertyGroup>
<ItemGroup>
<!-- Create the output path as an item so that we can use %(FullPath) on it. -->
<_OutputPathItem Include="$(OutDir)" />
<_IntermediateOutputPathItem Include="$(IntermediateOutputPath)" />
<_PdbOutputPathItem Include="$(PdbOutputPath)" />
</ItemGroup>
<PropertyGroup>
<!-- Example, c:\MyProjects\MySetup\bin\debug\ -->
<!--
Condition intentionally omitted on this one, because it causes problems
when we pick up the value of an environment variable named TargetDir
-->
<TargetDir>@(_OutputPathItem->'%(FullPath)')</TargetDir>
<TargetPdbDir>@(_PdbOutputPathItem->'%(FullPath)')</TargetPdbDir>
<!-- Example, C:\MyProjects\MySetup\bin\debug\MySetup.msi -->
<TargetPath Condition=" '$(TargetPath)' == '' ">@(_OutputPathItem->'%(FullPath)$(TargetFileName)')</TargetPath>
<TargetPdbPath Condition=" '$(TargetPdbPath)' == '' ">@(_PdbOutputPathItem->'%(FullPath)$(TargetPdbName)')</TargetPdbPath>
</PropertyGroup>
<!--
Set the SignTargetPath item directly when output is a Bundle. The AssignCultures target
sets SignTargetPath item for other output types based on the cultures provided.
-->
<ItemGroup>
<SignTargetPath Include="$(TargetPath)" Condition=" '$(OutputType)' == 'Bundle' AND '$(SignOutput)' == 'true' AND '$(SuppressLayout)' != 'true' " />
</ItemGroup>
<!--
IDE Macros available only from integrated builds. The following properties are 'macros' that are
available via IDE for pre and post build steps. However, they are not defined when directly
building a project from the command line, only when building a solution.
-->
<PropertyGroup>
<DevEnvDir Condition=" '$(DevEnvDir)' == '' ">*Undefined if not building from within Visual Studio*</DevEnvDir>
<!-- Example, MySolution -->
<SolutionName Condition=" '$(SolutionName)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionName>
<!-- Example, MySolution.sln -->
<SolutionFileName Condition=" '$(SolutionFileName)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionFileName>
<!-- Example, C:\MySolutions\MySolution\MySolution.sln -->
<SolutionPath Condition=" '$(SolutionPath)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionPath>
<!-- Example, C:\MySolutions\MySolution\ -->
<SolutionDir Condition=" '$(SolutionDir)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionDir>
<!-- Example, .sln -->
<SolutionExt Condition=" '$(SolutionExt)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionExt>
</PropertyGroup>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Default Harvester, Compiler, Linker, and Librarian Property Declarations
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!-- If WixExtension was passed in via the command line, then convert it to an ItemGroup -->
<ItemGroup>
<WixExtension Include="$(WixExtension)" Condition=" '$(WixExtension)' != '' " />
</ItemGroup>
<!-- Default Harvester properties-->
<PropertyGroup>
<HarvestNoLogo Condition=" '$(HarvestNoLogo)' == '' ">$(NoLogo)</HarvestNoLogo>
<HarvestSuppressAllWarnings Condition=" '$(HarvestSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</HarvestSuppressAllWarnings>
<HarvestSuppressSpecificWarnings Condition=" '$(HarvestSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</HarvestSuppressSpecificWarnings>
<HarvestTreatWarningsAsErrors Condition=" '$(HarvestTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</HarvestTreatWarningsAsErrors>
<HarvestTreatSpecificWarningsAsErrors Condition=" '$(HarvestTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</HarvestTreatSpecificWarningsAsErrors>
<HarvestVerboseOutput Condition=" '$(HarvestVerboseOutput)' == '' ">$(VerboseOutput)</HarvestVerboseOutput>
<HarvestAutogenerateGuids Condition=" '$(HarvestAutogenerateGuids)' == '' ">true</HarvestAutogenerateGuids>
<HarvestGenerateGuidsNow Condition=" '$(HarvestGenerateGuidsNow)' == '' ">false</HarvestGenerateGuidsNow>
<HarvestSuppressFragments Condition=" '$(HarvestSuppressFragments)' == '' ">true</HarvestSuppressFragments>
<HarvestSuppressUniqueIds Condition=" '$(HarvestSuppressUniqueIds)' == '' ">false</HarvestSuppressUniqueIds>
</PropertyGroup>
<!-- Default HarvestProjects properties -->
<PropertyGroup>
<!-- Project harvesting is defaulted to off until it works more consistently. -->
<EnableProjectHarvesting Condition=" '$(EnableProjectHarvesting)'=='' ">false</EnableProjectHarvesting>
<HarvestProjectsNoLogo Condition=" '$(HarvestProjectsNoLogo)' == '' ">$(HarvestNoLogo)</HarvestProjectsNoLogo>
<HarvestProjectsSuppressAllWarnings Condition=" '$(HarvestProjectsSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestProjectsSuppressAllWarnings>
<HarvestProjectsSuppressSpecificWarnings Condition=" '$(HarvestProjectsSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestProjectsSuppressSpecificWarnings>
<HarvestProjectsTreatWarningsAsErrors Condition=" '$(HarvestProjectsTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestProjectsTreatWarningsAsErrors>
<HarvestProjectsTreatSpecificWarningsAsErrors Condition=" '$(HarvestProjectsTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestProjectsTreatSpecificWarningsAsErrors>
<HarvestProjectsVerboseOutput Condition=" '$(HarvestProjectsVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestProjectsVerboseOutput>
<HarvestProjectsAutogenerateGuids Condition=" '$(HarvestProjectsAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestProjectsAutogenerateGuids>
<HarvestProjectsGenerateGuidsNow Condition=" '$(HarvestProjectsGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestProjectsGenerateGuidsNow>
<HarvestProjectsSuppressFragments Condition=" '$(HarvestProjectsSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestProjectsSuppressFragments>
<HarvestProjectsSuppressUniqueIds Condition=" '$(HarvestProjectsSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestProjectsSuppressUniqueIds>
<HarvestProjectsTransforms Condition=" '$(HarvestProjectsTransforms)' == '' ">$(HarvestTransforms)</HarvestProjectsTransforms>
<HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' != 'Bundle' ">$(IntermediateOutputPath)Product.Generated.wxs</HarvestProjectsGeneratedFile>
<HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' == 'Bundle' ">$(IntermediateOutputPath)Bundle.Generated.wxs</HarvestProjectsGeneratedFile>
</PropertyGroup>
<!-- Default HarvestDirectory properties -->
<PropertyGroup>
<HarvestDirectoryNoLogo Condition=" '$(HarvestDirectoryNoLogo)' == '' ">$(HarvestNoLogo)</HarvestDirectoryNoLogo>
<HarvestDirectorySuppressAllWarnings Condition=" '$(HarvestDirectorySuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestDirectorySuppressAllWarnings>
<HarvestDirectorySuppressSpecificWarnings Condition=" '$(HarvestDirectorySuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestDirectorySuppressSpecificWarnings>
<HarvestDirectoryTreatWarningsAsErrors Condition=" '$(HarvestDirectoryTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestDirectoryTreatWarningsAsErrors>
<HarvestDirectoryTreatSpecificWarningsAsErrors Condition=" '$(HarvestDirectoryTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestDirectoryTreatSpecificWarningsAsErrors>
<HarvestDirectoryVerboseOutput Condition=" '$(HarvestDirectoryVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestDirectoryVerboseOutput>
<HarvestDirectoryAutogenerateGuids Condition=" '$(HarvestDirectoryAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestDirectoryAutogenerateGuids>
<HarvestDirectoryGenerateGuidsNow Condition=" '$(HarvestDirectoryGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestDirectoryGenerateGuidsNow>
<HarvestDirectorySuppressFragments Condition=" '$(HarvestDirectorySuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestDirectorySuppressFragments>
<HarvestDirectorySuppressUniqueIds Condition=" '$(HarvestDirectorySuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestDirectorySuppressUniqueIds>
<HarvestDirectoryTransforms Condition=" '$(HarvestDirectoryTransforms)' == '' ">$(HarvestTransforms)</HarvestDirectoryTransforms>
</PropertyGroup>
<!-- Default HarvestFile properties -->
<PropertyGroup>
<HarvestFileNoLogo Condition=" '$(HarvestFileNoLogo)' == '' ">$(HarvestNoLogo)</HarvestFileNoLogo>
<HarvestFileSuppressAllWarnings Condition=" '$(HarvestFileSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestFileSuppressAllWarnings>
<HarvestFileSuppressSpecificWarnings Condition=" '$(HarvestFileSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestFileSuppressSpecificWarnings>
<HarvestFileTreatWarningsAsErrors Condition=" '$(HarvestFileTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestFileTreatWarningsAsErrors>
<HarvestFileTreatSpecificWarningsAsErrors Condition=" '$(HarvestFileTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestFileTreatSpecificWarningsAsErrors>
<HarvestFileVerboseOutput Condition=" '$(HarvestFileVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestFileVerboseOutput>
<HarvestFileAutogenerateGuids Condition=" '$(HarvestFileAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestFileAutogenerateGuids>
<HarvestFileGenerateGuidsNow Condition=" '$(HarvestFileGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestFileGenerateGuidsNow>
<HarvestFileSuppressFragments Condition=" '$(HarvestFileSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestFileSuppressFragments>
<HarvestFileSuppressUniqueIds Condition=" '$(HarvestFileSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestFileSuppressUniqueIds>
<HarvestFileTransforms Condition=" '$(HarvestFileTransforms)' == '' ">$(HarvestTransforms)</HarvestFileTransforms>
</PropertyGroup>
<!-- Defaut Compiler properties. -->
<PropertyGroup>
<CompilerNoLogo Condition=" '$(CompilerNoLogo)' == '' ">$(NoLogo)</CompilerNoLogo>
<CompilerSuppressAllWarnings Condition=" '$(CompilerSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</CompilerSuppressAllWarnings>
<CompilerSuppressSpecificWarnings Condition=" '$(CompilerSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</CompilerSuppressSpecificWarnings>
<CompilerSuppressSchemaValidation Condition=" '$(CompilerSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</CompilerSuppressSchemaValidation>
<CompilerTreatWarningsAsErrors Condition=" '$(CompilerTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</CompilerTreatWarningsAsErrors>
<CompilerTreatSpecificWarningsAsErrors Condition=" '$(CompilerTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</CompilerTreatSpecificWarningsAsErrors>
<CompilerVerboseOutput Condition=" '$(CompilerVerboseOutput)' == '' ">$(VerboseOutput)</CompilerVerboseOutput>
<InstallerPlatform Condition=" '$(InstallerPlatform)' == '' and '$(Platform)' != 'AnyCPU' and '$(Platform)' != 'Any CPU' ">$(Platform)</InstallerPlatform>
</PropertyGroup>
<!-- Default Lib properties. -->
<PropertyGroup>
<LibNoLogo Condition=" '$(LibNoLogo)' == '' ">$(NoLogo)</LibNoLogo>
<LibBindFiles Condition=" '$(LibBindFiles)' == '' ">$(BindFiles)</LibBindFiles>
<LibPedantic Condition=" '$(LibPedantic)' == '' ">$(Pedantic)</LibPedantic>
<LibSuppressAllWarnings Condition=" '$(LibSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</LibSuppressAllWarnings>
<LibSuppressSpecificWarnings Condition=" '$(LibSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</LibSuppressSpecificWarnings>
<LibSuppressSchemaValidation Condition=" '$(LibSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</LibSuppressSchemaValidation>
<LibSuppressIntermediateFileVersionMatching Condition=" '$(LibSuppressIntermediateFileVersionMatching)' == '' ">$(SuppressIntermediateFileVersionMatching)</LibSuppressIntermediateFileVersionMatching>
<LibTreatWarningsAsErrors Condition=" '$(LibTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</LibTreatWarningsAsErrors>
<LibTreatSpecificWarningsAsErrors Condition=" '$(LibTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</LibTreatSpecificWarningsAsErrors>
<LibVerboseOutput Condition=" '$(LibVerboseOutput)' == '' ">$(VerboseOutput)</LibVerboseOutput>
</PropertyGroup>
<!-- Default Linker properties. -->
<PropertyGroup>
<LinkerNoLogo Condition=" '$(LinkerNoLogo)' == '' ">$(NoLogo)</LinkerNoLogo>
<LinkerBindFiles Condition=" '$(LinkerBindFiles)' == '' ">$(BindFiles)</LinkerBindFiles>
<LinkerPedantic Condition=" '$(LinkerPedantic)' == '' ">$(Pedantic)</LinkerPedantic>
<LinkerSuppressAllWarnings Condition=" '$(LinkerSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</LinkerSuppressAllWarnings>
<LinkerSuppressSpecificWarnings Condition=" '$(LinkerSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</LinkerSuppressSpecificWarnings>
<LinkerSuppressSchemaValidation Condition=" '$(LinkerSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</LinkerSuppressSchemaValidation>
<LinkerSuppressIntermediateFileVersionMatching Condition=" '$(LinkerSuppressIntermediateFileVersionMatching)' == '' ">$(SuppressIntermediateFileVersionMatching)</LinkerSuppressIntermediateFileVersionMatching>
<LinkerTreatWarningsAsErrors Condition=" '$(LinkerTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</LinkerTreatWarningsAsErrors>
<LinkerTreatSpecificWarningsAsErrors Condition=" '$(LinkerTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</LinkerTreatSpecificWarningsAsErrors>
<LinkerVerboseOutput Condition=" '$(LinkerVerboseOutput)' == '' ">$(VerboseOutput)</LinkerVerboseOutput>
</PropertyGroup>
<!-- If BindInputPaths (or LinkerBindInputPaths) was passed in via the command line, then convert it to an ItemGroup -->
<ItemGroup>
<BindInputPaths Include="$(BindInputPaths)" Condition=" '$(BindInputPaths)' != '' " />
<LinkerBindInputPaths Include="$(LinkerBindInputPaths)" Condition=" '$(LinkerBindInputPaths)' != '' " />
</ItemGroup>
<!-- Default Lit and Light "properties" -->
<ItemGroup>
<LinkerBindInputPaths Condition=" '@(LinkerBindInputPaths)' == '' " Include="@(BindInputPaths)" />
<LinkerBindInputPaths Condition=" '@(LinkerBindInputPaths)' == '' " Include="$(LinkerBaseInputPaths)" />
<LinkerBindInputPaths Condition=" '@(LinkerBindInputPaths)' == '' " Include="$(BaseInputPaths)" />
</ItemGroup>
<!-- Default Inscribe properties. -->
<PropertyGroup>
<InscribeNoLogo Condition=" '$(InscribeNoLogo)' == '' ">$(NoLogo)</InscribeNoLogo>
<InscribeSuppressAllWarnings Condition=" '$(InscribeSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</InscribeSuppressAllWarnings>
<InscribeSuppressSpecificWarnings Condition=" '$(InscribeSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</InscribeSuppressSpecificWarnings>
<InscribeTreatWarningsAsErrors Condition=" '$(InscribeTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</InscribeTreatWarningsAsErrors>
<InscribeTreatSpecificWarningsAsErrors Condition=" '$(InscribeTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</InscribeTreatSpecificWarningsAsErrors>
<InscribeVerboseOutput Condition=" '$(InscribeVerboseOutput)' == '' ">$(VerboseOutput)</InscribeVerboseOutput>
</PropertyGroup>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Initial Targets
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!--
==================================================================================================
_CheckRequiredProperties
Checks properties that must be set in the main project file or on the command line before
using this .TARGETS file.
[IN]
$(OutputName) - The name of the MSI/MSM/wixlib to build (without the extension)
$(OutputType) - Possible values are 'package', 'PatchCreation', 'module', 'library', 'bundle'
==================================================================================================
-->
<PropertyGroup>
<_PleaseSetThisInProjectFile>Please set this in the project file before the <Import> of the wix.targets file.</_PleaseSetThisInProjectFile>
<_OutputTypeDescription>The OutputType defines whether a Windows Installer package (.msi), PatchCreation (.pcp), merge module (.msm), wix library (.wixlib), or self-extracting executable (.exe) is being built. $(_PleaseSetThisInProjectFile) Possible values are 'Package', 'Module', 'Library', and 'Bundle'.</_OutputTypeDescription>
</PropertyGroup>
<Target Name="_CheckRequiredProperties">
<Error
Code="WIXTARGETS100"
Condition=" '$(OutputName)' == '' "
Text="The OutputName property is not set in project "$(MSBuildProjectFile)". The OutputName defines the name of the output without a file extension. $(_PleaseSetThisInProjectFile)" />
<Warning
Code="WIXTARGETS101"
Condition=" '$(_OriginalOutputType)' == '' "
Text="The OutputType property is not set in project "$(MSBuildProjectFile)". Defaulting to 'Package'. $(_OutputTypeDescription)" />
<Error
Code="WIXTARGETS102"
Condition=" '$(OutputType)' != 'Package' and '$(OutputType)' != 'PatchCreation' and '$(OutputType)' != 'Module' and '$(OutputType)' != 'Library' and '$(OutputType)' != 'Bundle' "
Text="The OutputType property '$(OutputType)' is not valid in project "$(MSBuildProjectFile)". $(_OutputTypeDescription)" />
<!-- Although we try to ensure a trailing slash, it's possible to circumvent this if the property is set on the command line -->
<Error
Code="WIXTARGETS103"
Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')"
Text="The OutDir property must end with a trailing slash." />
<Message
Condition=" '$(BaseInputPaths)' != '' "
Text="Deprecated: Use BindInputPaths instead of BaseInputPaths." />
<Message
Condition=" '$(LinkerBaseInputPaths)' != '' "
Text="Deprecated: Use LinkerBindInputPaths instead of LinkerBaseInputPaths." />
</Target>
<!--
==================================================================================================
_SetDefaultPathValues
Gets the default values of some paths from the registry.
[OUT]
$(WixExtDir) - Default Wix Extension Directory
$(WixToolPath) - Default Wix Tool install folder
==================================================================================================
-->
<PropertyGroup>
<WixInstallRegKey>SOFTWARE\Microsoft\Windows Installer XML\3.11</WixInstallRegKey>
<WixInstallRegKeyWow64>SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML\3.11</WixInstallRegKeyWow64>
</PropertyGroup>
<Target
Name="_SetDefaultPathValues">
<ReadRegistry
Hive="LocalMachine"
Key="$(WixInstallRegKey)"
Name="InstallRoot"
FailIfMissing="false"
Condition=" '$(WixExtDir)' == '' ">
<Output TaskParameter="Value" PropertyName="WixExtDir" />
</ReadRegistry>
<ReadRegistry
Hive="LocalMachine"
Key="$(WixInstallRegKey)"
Name="InstallRoot"
FailIfMissing="false"
Condition=" '$(WixToolPath)' == '' ">
<Output TaskParameter="Value" PropertyName="WixToolPath" />
</ReadRegistry>
<ReadRegistry
Hive="LocalMachine"
Key="$(WixInstallRegKeyWow64)"
Name="InstallRoot"
FailIfMissing="false"
Condition=" '$(WixExtDir)' == '' ">
<Output TaskParameter="Value" PropertyName="WixExtDir" />
</ReadRegistry>
<ReadRegistry
Hive="LocalMachine"
Key="$(WixInstallRegKeyWow64)"
Name="InstallRoot"
FailIfMissing="false"
Condition=" '$(WixToolPath)' == '' ">
<Output TaskParameter="Value" PropertyName="WixToolPath" />
</ReadRegistry>
<CreateProperty Value="$(WixToolPath)" Condition=" '$(WixExtDir)' == '' ">
<Output TaskParameter="Value" PropertyName="WixExtDir" />
</CreateProperty>
</Target>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Build Targets
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!--
==================================================================================================
Build
The main build entry point.
==================================================================================================
-->
<PropertyGroup>
<BuildDependsOn>
BeforeBuild;
CoreBuild;
AfterBuild
</BuildDependsOn>
</PropertyGroup>
<Target
Name="Build"
DependsOnTargets="$(BuildDependsOn)"
Outputs="$(TargetPath)">
</Target>
<!--
==================================================================================================
BeforeBuild
Redefine this target in your project in order to run tasks just before Build.
==================================================================================================
-->
<Target Name="BeforeBuild" />
<!--
==================================================================================================
AfterBuild
Redefine this target in your project in order to run tasks just after Build.
==================================================================================================
-->
<Target Name="AfterBuild" />
<!--
==================================================================================================
CoreBuild
The core build step calls each of the build targets.
==================================================================================================
-->
<PropertyGroup>
<CoreBuildDependsOn>
BuildOnlySettings;
PrepareForBuild;
PreBuildEvent;
ResolveReferences;
AddCompilerDefineConstants;
CompileAndLink;
Signing;
GetTargetPath;
IncrementalClean;
PostBuildEvent
</CoreBuildDependsOn>
</PropertyGroup>
<Target
Name="CoreBuild"
DependsOnTargets="$(CoreBuildDependsOn)">
<OnError
ExecuteTargets="_TimeStampAfterCompileAndLink;PostBuildEvent"
Condition=" '$(RunPostBuildEvent)' == 'Always' or '$(RunPostBuildEvent)' == 'OnOutputUpdated' " />
<OnError ExecuteTargets="_CleanRecordFileWrites" />
</Target>
<!--
==================================================================================================
Rebuild
Delete all intermediate and final build outputs, and then build the project from scratch.
==================================================================================================
-->
<PropertyGroup>
<RebuildDependsOn>
BeforeRebuild;
Clean;
$(MSBuildProjectDefaultTargets);
AfterRebuild;
</RebuildDependsOn>
<RebuildDependsOn Condition=" '$(MSBuildProjectDefaultTargets)' == 'Rebuild' ">
BeforeRebuild;
Clean;
Build;
AfterRebuild;
</RebuildDependsOn>
</PropertyGroup>
<Target
Name="Rebuild"
DependsOnTargets="$(RebuildDependsOn)"
Outputs="$(TargetPath)" />
<!--
==================================================================================================
BeforeRebuild
Redefine this target in your project in order to run tasks just before Rebuild.
==================================================================================================
-->
<Target Name="BeforeRebuild" />
<!--
==================================================================================================
AfterRebuild
Redefine this target in your project in order to run tasks just after Rebuild.
==================================================================================================
-->
<Target Name="AfterRebuild" />
<!--
==================================================================================================
BuildOnlySettings
This target is called only when doing a real build. It is not called during project load.
==================================================================================================
-->
<PropertyGroup>
<BuildingProject>false</BuildingProject>
</PropertyGroup>
<Target Name="BuildOnlySettings">
<CreateProperty Value="true">
<Output TaskParameter="Value" PropertyName="BuildingProject" />
</CreateProperty>
</Target>
<!--
==================================================================================================
PrepareForBuild
Prepare the prerequisites for building.
==================================================================================================
-->
<PropertyGroup>
<PrepareForBuildDependsOn></PrepareForBuildDependsOn>
</PropertyGroup>
<Target
Name="PrepareForBuild" DependsOnTargets="$(PrepareForBuildDependsOn)">
<!--
These CreateProperty calls are required because TargetDir and TargetPath are defined
to contain an item list. We want that item list to be expanded so that it can be used
as a regular property value and not as an item-list-with-transform.
-->
<CreateProperty Value="$(TargetDir)">
<Output TaskParameter="Value" PropertyName="TargetDir" />
</CreateProperty>
<CreateProperty Value="$(TargetPath)">
<Output TaskParameter="Value" PropertyName="TargetPath" />
</CreateProperty>
<CreateProperty Value="$(TargetPdbDir)">
<Output TaskParameter="Value" PropertyName="TargetPdbDir" />
</CreateProperty>
<!-- Create the directories for intermediate and final build products. -->
<MakeDir Directories="$(IntermediateOutputPath);$(OutDir)" />
</Target>
<!--
==================================================================================================
ResolveWixExtensionReferences
Resolves WiX extension references to full paths. Any properties you use
to resolve paths to extensions must be defined before importing this
file or the extensions will be automatically resolved to $(WixExtDir).
[IN]
@(WixExtension) - WixExtension item group
[OUT]
@(_ResolvedWixExtensionPaths) - Item group with full paths to extensions
==================================================================================================
-->
<PropertyGroup>
<ResolveWixExtensionReferencesDependsOn>
PrepareForBuild
</ResolveWixExtensionReferencesDependsOn>
</PropertyGroup>
<Target
Name="ResolveWixExtensionReferences"
DependsOnTargets="$(ResolveWixExtensionReferencesDependsOn)"
Condition=" '@(WixExtension)' != ''">
<!--
The WixExtensionSearchPaths property is set to find assemblies in the following order:
(1) $(ReferencePaths) - the reference paths property, which comes from the .USER file.
(2) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
(3) Treat the reference's Include as if it were a real file name.
(4) Path specified by the WixExtDir property.
-->
<CreateProperty Condition=" '$(WixExtensionSearchPaths)' == '' " Value="
$(ReferencePaths);
{HintPathFromItem};
{RawFileName};
$(WixExtDir)
">
<Output TaskParameter="Value" PropertyName="WixExtensionSearchPaths" />
</CreateProperty>
<ResolveWixReferences
WixReferences="@(WixExtension)"
SearchPaths="$(WixExtensionSearchPaths)"
SearchFilenameExtensions=".dll">
<Output TaskParameter="ResolvedWixReferences" ItemName="_AllResolvedWixExtensionPaths" />
</ResolveWixReferences>
<!-- Remove duplicate extension items that would cause build errors -->
<RemoveDuplicates Inputs="@(_AllResolvedWixExtensionPaths)">
<Output TaskParameter="Filtered" ItemName="_ResolvedWixExtensionPaths" />
</RemoveDuplicates>
</Target>
<!--
==================================================================================================
PreBuildEvent
Run the pre-build event if there is one.
==================================================================================================
-->
<PropertyGroup>
<PreBuildEventDependsOn>GetTargetPath</PreBuildEventDependsOn>
</PropertyGroup>
<Target
Name="PreBuildEvent"
DependsOnTargets="$(PreBuildEventDependsOn)"
Condition=" '$(PreBuildEvent)' != '' ">
<ReplaceString
Text="$(PreBuildEvent)"
OldValue="!(TargetPath)"
NewValue="$(TargetPath)">
<Output TaskParameter="Text" PropertyName="ExpandedPreBuildEvent" />
</ReplaceString>
<ReplaceString
Text="$(ExpandedPreBuildEvent)"
OldValue="!(TargetPdbPath)"
NewValue="$(TargetPdbPath)">
<Output TaskParameter="Text" PropertyName="ExpandedPreBuildEvent" />
</ReplaceString>
<Exec WorkingDirectory="$(OutDir)" Command="$(ExpandedPreBuildEvent)" />
</Target>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Resolve References Targets
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!--
==================================================================================================
ResolveReferences
==================================================================================================
-->
<PropertyGroup>
<ResolveReferencesDependsOn>
BeforeResolveReferences;
SplitProjectReferencesByType;
ResolveProjectReferences;
ResolveVCProjectReferences;
ResolveWixLibraryReferences;
ResolveWixExtensionReferences;
AfterResolveReferences
</ResolveReferencesDependsOn>
</PropertyGroup>
<Target
Name="ResolveReferences"
DependsOnTargets="$(ResolveReferencesDependsOn)" />
<!--
==================================================================================================
BeforeResolveReferences
Redefine this target in your project in order to run tasks just before ResolveReferences.
==================================================================================================
-->
<Target Name="BeforeResolveReferences" />
<!--
==================================================================================================
AfterResolveReferences
Redefine this target in your project in order to run tasks just after ResolveReferences.
==================================================================================================
-->
<Target Name="AfterResolveReferences" />
<!--
==================================================================================================
SplitProjectReferencesByType
Split project references into two lists: VC project references and all others (handled by the
MSBuild engine)
[IN]
@(ProjectReference) - the list of all project references
[OUT]
@(VCProjectReference) - the list of VC (managed VC++ to be exact) project references
@(NonVCProjectReference) - the list of non-VC project references (MSBuild and potentially VSIP projects)
==================================================================================================
-->
<Target
Name="SplitProjectReferencesByType"
Condition=" '@(ProjectReference)' != '' ">
<!-- Assign a project configuration to each project reference if we're building a solution file. -->
<AssignProjectConfiguration
ProjectReferences="@(ProjectReference)"
SolutionConfigurationContents="$(CurrentSolutionConfigurationContents)"
Condition=" '$(BuildingSolutionFile)' == 'true' ">
<Output TaskParameter="AssignedProjects" ItemName="_ProjectReferenceWithConfiguration" />
</AssignProjectConfiguration>
<!--
Otherwise (regular command line build or building inside the IDE) just copy the references
as we don't need their configurations.
-->
<CreateItem Include="@(ProjectReference)" Condition=" '$(BuildingSolutionFile)' != 'true' ">
<Output TaskParameter="Include" ItemName="_ProjectReferenceWithConfiguration" />
</CreateItem>
<!-- Copy all VC project references to the VCProjectReference item list (using the VC project extension) -->
<CreateItem
Include="@(_ProjectReferenceWithConfiguration)"
Condition=" '%(Extension)' == '.vcproj' "
AdditionalMetadata="MSBuildSourceProjectFileFullPath=%(FullPath)">
<Output TaskParameter="Include" ItemName="VCProjectReference" />
</CreateItem>
<!-- Copy the rest of the project references to the NonVCProjectReference item list -->
<CreateItem
Include="@(_ProjectReferenceWithConfiguration)"
Condition=" '%(Extension)' != '.vcproj' "
AdditionalMetadata="MSBuildSourceProjectFileFullPath=%(FullPath)">
<Output TaskParameter="Include" ItemName="NonVCProjectReference" />
</CreateItem>
</Target>
<!--
==================================================================================================
_SplitProjectReferencesByFileExistence
Split referenced projects into two lists: those that exist on disk and those that don't.
[IN]
@(NonVCProjectReference) - the list of non-VC project references (MSBuild and potentially VSIP projects)
[OUT]
@(_MSBuildProjectReferenceExistent) - the list of non-VC project references that exist on disk
@(_MSBuildProjectReferenceNonexistent) - the list of non-VC project references that don't exist on disk
==================================================================================================
-->
<Target
Name="_SplitProjectReferencesByFileExistence"
DependsOnTargets="SplitProjectReferencesByType"
Condition=" '@(NonVCProjectReference)' != '' ">
<!--
Use this task for matching projects with pre-resolved project outputs set by the IDE if building
inside the IDE. The IDE only includes non-MSBuild projects in the output list. We'll use MSBuild
to resolve MSBuild projects. This task will resolve VSIP (3rd party) project references and
create a new item list with only project references to projects in the MSBuild format.
-->
<ResolveNonMSBuildProjectOutput
ProjectReferences="@(NonVCProjectReference)"
PreresolvedProjectOutputs="$(VSIDEResolvedNonMSBuildProjectOutputs)"
Condition=" '$(BuildingInsideVisualStudio)' == 'true' ">
<Output TaskParameter="ResolvedOutputPaths" ItemName="_ResolvedProjectReferencePaths" />
<Output TaskParameter="UnresolvedProjectReferences" ItemName="_MSBuildProjectReference" />
</ResolveNonMSBuildProjectOutput>
<!--
If building from the command line, simply copy the NonVCProjectReference item list to
_MSBuildProjectReference, since we have to assume all non-VC projects are in the MSBuild format.
We have no way of building VSIP (3rd party) projects from the command line.
-->
<CreateItem Include="@(NonVCProjectReference)" Condition=" '$(BuildingInsideVisualStudio)' != 'true' ">
<Output TaskParameter="Include" ItemName="_MSBuildProjectReference" />
</CreateItem>
<!-- Break the project list into two lists: those that exist on disk and those that don't. -->
<CreateItem Include="@(_MSBuildProjectReference)" Condition="Exists('%(Identity)')">
<Output TaskParameter="Include" ItemName="_MSBuildProjectReferenceExistent" />
</CreateItem>
<CreateItem Include="@(_MSBuildProjectReference)" Condition="!Exists('%(Identity)')">
<Output TaskParameter="Include" ItemName="_MSBuildProjectReferenceNonexistent" />
</CreateItem>
</Target>
<!--
================================================================================================
ResolveProjectReferences
Builds all of the referenced projects to get their outputs.
[IN]
@(NonVCProjectReference) - The list of non-VC project references.
[OUT]
@(_ResolvedProjectReferencePaths) - Paths to referenced projects.
@(WixLibProjects) - Paths to any .wixlibs that were built by referenced projects.
================================================================================================
-->
<Target
Name="ResolveProjectReferences"
DependsOnTargets="_SplitProjectReferencesByFileExistence"
Condition=" '@(NonVCProjectReference)' != '' ">
<!-- Issue a warning for each non-existent project. -->
<Warning
Text="The referenced project '%(_MSBuildProjectReferenceNonexistent.Identity)' does not exist."
Condition=" '@(_MSBuildProjectReferenceNonexistent)' != '' " />
<!--
When building this project from the IDE or when building a .sln from the command line or
when only building .wixlib project references, gather the referenced build outputs. The
code that builds the .sln will already have built the project, so there's no need to do
it again here and when building only .wixlib project references we'll use the results to
determine which projects to build.
The ContinueOnError setting is here so that, during project load, as much information as
possible will be passed to the compilers.
-->
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="%(_MSBuildProjectReferenceExistent.Targets);GetTargetPath"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration);%(_MSBuildProjectReferenceExistent.SetPlatform)"
Condition="('$(BuildingSolutionFile)' == 'true' or '$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '@(_MSBuildProjectReferenceExistent)' != '' "
ContinueOnError="!$(BuildingProject)">
<Output TaskParameter="TargetOutputs" ItemName="_GatheredProjectReferencePaths" />
</MSBuild>
<!--
Determine which project references should be built. Note: we will not build any project references
if building in the IDE or building a .sln file because those build project references directly.
If BuildProjectReferences is 'true' (the default) then take all MSBuild project references that exist
on disk and add them to the list of things to build. This is the easy case.
-->
<CreateItem
Include="@(_MSBuildProjectReferenceExistent)"
Condition=" '$(BuildProjectReferences)' == 'true' and ('$(BuildingSolutionFile)' != 'true' and '$(BuildingInsideVisualStudio)' != 'true') ">
<Output TaskParameter="Include" ItemName="_ProjectReferencesToBuild" />
</CreateItem>
<!--
If BuildProjectReferences is 'wixlib' then build only the MSBuild project references that exist and
create a .wixlib file. That requires us to first filter the gathered project references down to only
those that build .wixlibs.
Note that this functionality is broken in MSBuild v3.5 due to MSBuildSourceProjectFile metadata
being relative paths in v3.5 (versus full paths in v4.0).
-->
<CreateItem
Include="@(_GatheredProjectReferencePaths)"
Condition=" '$(BuildProjectReferences)' == 'wixlib' and '%(Extension)' == '.wixlib' and ('$(BuildingSolutionFile)' != 'true' and '$(BuildingInsideVisualStudio)' != 'true') ">