-
Notifications
You must be signed in to change notification settings - Fork 0
/
lux.targets
117 lines (102 loc) · 4.27 KB
/
lux.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
<?xml version="1.0" encoding="utf-8"?>
<!--
<copyright file="lux.targets" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="3.5">
<UsingTask TaskName="GenerateTestConsumer" AssemblyFile="$(LuxTasksPath)" />
<UsingTask TaskName="Nit" AssemblyFile="$(LuxTasksPath)" />
<PropertyGroup>
<BuildTestPackageDependsOn>Compile;_ScanForUnitTests;_GenerateTestConsumer;Link</BuildTestPackageDependsOn>
<TestDependsOn>$(BuildTestPackageDependsOn)</TestDependsOn>
</PropertyGroup>
<ItemGroup>
<GeneratedTestConsumer Include="$(OutputName)_test.wxs" />
</ItemGroup>
<Target
Name="_ScanForUnitTests">
<!--
So the Link target can do proper up-to-date checking, we need to give it the right list of
.wixobj inputs, which we get by scanning for unit tests and not generating a test consumer.
-->
<GenerateTestConsumer
InputFiles="@(CompileObjOutput);@(WixObject);@(WixLibProjects);@(_ResolvedWixLibraryPaths)"
Extensions="@(_ResolvedWixExtensionPaths)">
<Output TaskParameter="InputFragments" ItemName="FilesThatAreFragments" />
</GenerateTestConsumer>
<ItemGroup>
<CompileObjOutput
Remove="@(CompileObjOutput)" />
<CompileObjOutput
Include="
@(GeneratedTestConsumer -> '$(IntermediateOutputPath)%(Filename)$(IntermediateExt)');
@(FilesThatAreFragments);
" />
</ItemGroup>
<PropertyGroup>
<TargetName>$(OutputName)_test</TargetName>
<SuppressIces>ICE71;$(SuppressIces)</SuppressIces>
<SuppressValidation>true</SuppressValidation>
</PropertyGroup>
</Target>
<Target
Name="_GenerateTestConsumer"
Inputs="@(Compile);
@(Content);
@(_ResolvedWixExtensionPaths);
@(_ResolvedProjectReferencePaths);
$(MSBuildAllProjects)"
Outputs="@(GeneratedTestConsumer -> '$(IntermediateOutputPath)%(Filename)$(IntermediateExt)')">
<GenerateTestConsumer
InputFiles="@(CompileObjOutput);@(WixObject);@(WixLibProjects);@(_ResolvedWixLibraryPaths)"
Extensions="@(_ResolvedWixExtensionPaths)"
OutputFile="@(GeneratedTestConsumer)">
<Output TaskParameter="InputFragments" ItemName="FilesThatAreFragments" />
</GenerateTestConsumer>
<Candle
SourceFiles="@(GeneratedTestConsumer)"
AdditionalOptions="$(CompilerAdditionalOptions)"
DefineConstants="$(DefineConstants);$(SolutionDefineConstants);$(ProjectDefineConstants);$(ProjectReferenceDefineConstants)"
ExtensionDirectory="$(WixExtDir)"
Extensions="@(_ResolvedWixExtensionPaths)"
FipsCompliant="$(FipsCompliant)"
IncludeSearchPaths="$(IncludeSearchPaths)"
InstallerPlatform="$(InstallerPlatform)"
NoLogo="$(CompilerNoLogo)"
OutputFile="$(IntermediateOutputPath)"
Pedantic="$(Pedantic)"
ReferencePaths="$(ReferencePaths)"
RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
ShowSourceTrace="$(ShowSourceTrace)"
SuppressAllWarnings="$(CompilerSuppressAllWarnings)"
SuppressSchemaValidation="$(CompilerSuppressSchemaValidation)"
SuppressSpecificWarnings="$(CompilerSuppressSpecificWarnings)"
ToolPath="$(WixToolPath)"
TreatWarningsAsErrors="$(CompilerTreatWarningsAsErrors)"
TreatSpecificWarningsAsErrors="$(CompilerTreatSpecificWarningsAsErrors)"
VerboseOutput="$(CompilerVerboseOutput)" />
</Target>
<Target
Name="BuildTestPackage"
Inputs="@(CompileObjOutput);
@(WixObject);
@(_ResolvedProjectReferencePaths);
@(_ResolvedWixLibraryPaths);
@(_ResolvedWixExtensionPaths);
$(MSBuildAllProjects)"
Outputs="$(TargetPath)"
DependsOnTargets="$(BuildTestPackageDependsOn)" />
<Target
Name="Test"
DependsOnTargets="$(BuildTestPackageDependsOn)">
<Nit
TestPackages="$(TargetPath)"
ToolPath="$(WixToolPath)" />
</Target>
</Project>