diff options
Diffstat (limited to 'src/WixToolset.BuildTasks/wix.ca.targets')
-rw-r--r-- | src/WixToolset.BuildTasks/wix.ca.targets | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/src/WixToolset.BuildTasks/wix.ca.targets b/src/WixToolset.BuildTasks/wix.ca.targets deleted file mode 100644 index 4578c2d8..00000000 --- a/src/WixToolset.BuildTasks/wix.ca.targets +++ /dev/null | |||
@@ -1,123 +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" ToolsVersion="4.0"> | ||
6 | |||
7 | <Import Project="$(CustomBeforeWixCATargets)" Condition=" '$(CustomBeforeWixCATargets)' != '' and Exists('$(CustomBeforeWixCATargets)')" /> | ||
8 | |||
9 | <PropertyGroup> | ||
10 | <WixCATargetsImported>true</WixCATargetsImported> | ||
11 | |||
12 | <TargetCAFileName Condition=" '$(TargetCAFileName)' == '' ">$(TargetName).CA$(TargetExt)</TargetCAFileName> | ||
13 | |||
14 | <WixSdkPath Condition=" '$(WixSdkPath)' == '' ">$(MSBuildThisFileDirectory)</WixSdkPath> | ||
15 | <WixSdkX86Path Condition=" '$(WixSdkX86Path)' == '' ">$(WixSdkPath)x86\</WixSdkX86Path> | ||
16 | <WixSdkX64Path Condition=" '$(WixSdkX64Path)' == '' ">$(WixSdkPath)x64\</WixSdkX64Path> | ||
17 | |||
18 | <MakeSfxCA Condition=" '$(MakeSfxCA)' == '' ">$(WixSdkPath)MakeSfxCA.exe</MakeSfxCA> | ||
19 | <SfxCADll Condition=" '$(SfxCADll)' == '' and '$(Platform)' == 'x64' ">$(WixSdkX64Path)SfxCA.dll</SfxCADll> | ||
20 | <SfxCADll Condition=" '$(SfxCADll)' == '' ">$(WixSdkX86Path)SfxCA.dll</SfxCADll> | ||
21 | </PropertyGroup> | ||
22 | |||
23 | <!-- | ||
24 | ================================================================================================== | ||
25 | PackCustomAction | ||
26 | |||
27 | Creates an MSI managed custom action package that includes the custom action assembly, | ||
28 | local assembly dependencies, and project content files. | ||
29 | |||
30 | [IN] | ||
31 | @(IntermediateAssembly) - Managed custom action assembly. | ||
32 | @(Content) - Project items of type Content will be included in the package. | ||
33 | $(CustomActionContents) - Optional space-delimited list of additional files to include. | ||
34 | |||
35 | [OUT] | ||
36 | $(IntermediateOutputPath)$(TargetCAFileName) - Managed custom action package with unmanaged stub. | ||
37 | ================================================================================================== | ||
38 | --> | ||
39 | <Target Name="PackCustomAction" | ||
40 | Inputs="@(IntermediateAssembly);@(Content);$(CustomActionContents)" | ||
41 | Outputs="$(IntermediateOutputPath)$(TargetCAFileName)"> | ||
42 | |||
43 | <!-- Find all referenced items marked CopyLocal, but exclude non-binary files. --> | ||
44 | <ItemGroup> | ||
45 | <CustomActionReferenceContents Include="@(ReferenceCopyLocalPaths)" | ||
46 | Condition=" '%(Extension)' == '.dll' or '%(Extension)' == '.exe' " /> | ||
47 | <CustomActionReferenceContents Include="@(ReferenceComWrappersToCopyLocal)" | ||
48 | Condition=" '%(Extension)' == '.dll' or '%(Extension)' == '.exe' " /> | ||
49 | |||
50 | <!-- include PDBs for Debug only --> | ||
51 | <CustomActionReferenceContents Include="@(IntermediateAssembly->'%(RootDir)%(Directory)%(Filename).pdb')" | ||
52 | Condition=" Exists('%(RootDir)%(Directory)%(Filename).pdb') and '$(Configuration)' == 'Debug' " /> | ||
53 | <CustomActionReferenceContents Include="@(ReferenceCopyLocalPaths)" | ||
54 | Condition=" '%(Extension)' == '.pdb' and '$(Configuration)' == 'Debug' " /> | ||
55 | <CustomActionReferenceContents Include="@(ReferenceComWrappersToCopyLocal)" | ||
56 | Condition=" '%(Extension)' == '.pdb' and '$(Configuration)' == 'Debug' " /> | ||
57 | </ItemGroup> | ||
58 | |||
59 | <!-- | ||
60 | Items to include in the CA package: | ||
61 | - Reference assemblies marked CopyLocal | ||
62 | - Project items of type Content | ||
63 | - Additional items in the CustomActionContents property | ||
64 | --> | ||
65 | <PropertyGroup> | ||
66 | <CustomActionContents>@(CustomActionReferenceContents);@(Content->'%(FullPath)');$(CustomActionContents)</CustomActionContents> | ||
67 | </PropertyGroup> | ||
68 | |||
69 | <ItemGroup> | ||
70 | <IntermediateCAAssembly Include="@(IntermediateAssembly->'%(FullPath)')" /> | ||
71 | <IntermediateCAPackage Include="@(IntermediateAssembly->'%(RootDir)%(Directory)$(TargetCAFileName)')" /> | ||
72 | </ItemGroup> | ||
73 | |||
74 | <!-- Run the MakeSfxCA.exe CA packaging tool. --> | ||
75 | <Exec Command='"$(MakeSfxCA)" "@(IntermediateCAPackage)" "$(SfxCADll)" "@(IntermediateCAAssembly)" "$(CustomActionContents)"' | ||
76 | WorkingDirectory="$(ProjectDir)" /> | ||
77 | |||
78 | <!-- Add modules to be copied to output dir. --> | ||
79 | <ItemGroup> | ||
80 | <AddModules Include="@(IntermediateCAPackage)" /> | ||
81 | </ItemGroup> | ||
82 | </Target> | ||
83 | |||
84 | <!-- | ||
85 | ================================================================================================== | ||
86 | CleanCustomAction | ||
87 | |||
88 | Cleans the .CA.dll binary created by the PackCustomAction target. | ||
89 | |||
90 | ================================================================================================== | ||
91 | --> | ||
92 | <Target Name="CleanCustomAction"> | ||
93 | <Delete Files="$(IntermediateOutputPath)$(TargetCAFileName)" | ||
94 | TreatErrorsAsWarnings="true" /> | ||
95 | </Target> | ||
96 | |||
97 | <!-- | ||
98 | ================================================================================================== | ||
99 | AfterCompile (redefinition) | ||
100 | |||
101 | Calls the PackCustomAction target after compiling. | ||
102 | Overrides the empty AfterCompile target from Microsoft.Common.targets. | ||
103 | |||
104 | ================================================================================================== | ||
105 | --> | ||
106 | <Target Name="AfterCompile" | ||
107 | DependsOnTargets="PackCustomAction" /> | ||
108 | |||
109 | <!-- | ||
110 | ================================================================================================== | ||
111 | BeforeClean (redefinition) | ||
112 | |||
113 | Calls the CleanCustomAction target before cleaning. | ||
114 | Overrides the empty AfterCompile target from Microsoft.Common.targets. | ||
115 | |||
116 | ================================================================================================== | ||
117 | --> | ||
118 | <Target Name="BeforeClean" | ||
119 | DependsOnTargets="CleanCustomAction" /> | ||
120 | |||
121 | <Import Project="$(CustomAfterWixCATargets)" Condition=" '$(CustomAfterWixCATargets)' != '' and Exists('$(CustomAfterWixCATargets)')" /> | ||
122 | |||
123 | </Project> | ||