diff options
author | Rob Mensching <rob@firegiant.com> | 2022-03-31 16:50:07 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-03-31 18:01:06 -0700 |
commit | 88b472e81aae5bcd68255469c5f54e9e35a41ec3 (patch) | |
tree | 0dcb158829f2ba89699cbe21c4c747d78944c964 /src/dtf/WixToolset.Dtf.CustomAction | |
parent | 47582b162368e8edf7a3b11c13b8e9dabc5f0a26 (diff) | |
download | wix-88b472e81aae5bcd68255469c5f54e9e35a41ec3.tar.gz wix-88b472e81aae5bcd68255469c5f54e9e35a41ec3.tar.bz2 wix-88b472e81aae5bcd68255469c5f54e9e35a41ec3.zip |
Support using response file for long command-lines in MakeSfxCA
Fixes wixtoolset/issues#4688
Diffstat (limited to 'src/dtf/WixToolset.Dtf.CustomAction')
-rw-r--r-- | src/dtf/WixToolset.Dtf.CustomAction/WixToolset.Dtf.CustomAction.targets | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/dtf/WixToolset.Dtf.CustomAction/WixToolset.Dtf.CustomAction.targets b/src/dtf/WixToolset.Dtf.CustomAction/WixToolset.Dtf.CustomAction.targets index 127bb29d..9d63f24c 100644 --- a/src/dtf/WixToolset.Dtf.CustomAction/WixToolset.Dtf.CustomAction.targets +++ b/src/dtf/WixToolset.Dtf.CustomAction/WixToolset.Dtf.CustomAction.targets | |||
@@ -29,7 +29,7 @@ | |||
29 | @(IntermediateAssembly) - Managed custom action assembly. | 29 | @(IntermediateAssembly) - Managed custom action assembly. |
30 | @(Content) - Project items of type Content will be included in the package. | 30 | @(Content) - Project items of type Content will be included in the package. |
31 | $(CustomActionContents) - Optional space-delimited list of additional files to include. | 31 | $(CustomActionContents) - Optional space-delimited list of additional files to include. |
32 | 32 | ||
33 | [OUT] | 33 | [OUT] |
34 | $(IntermediateOutputPath)$(TargetCAFileName) - Managed custom action package with unmanaged stub. | 34 | $(IntermediateOutputPath)$(TargetCAFileName) - Managed custom action package with unmanaged stub. |
35 | ================================================================================================== | 35 | ================================================================================================== |
@@ -44,7 +44,7 @@ | |||
44 | Condition=" '%(Extension)' == '.dll' or '%(Extension)' == '.exe' " /> | 44 | Condition=" '%(Extension)' == '.dll' or '%(Extension)' == '.exe' " /> |
45 | <CustomActionReferenceContents Include="@(ReferenceComWrappersToCopyLocal)" | 45 | <CustomActionReferenceContents Include="@(ReferenceComWrappersToCopyLocal)" |
46 | Condition=" '%(Extension)' == '.dll' or '%(Extension)' == '.exe' " /> | 46 | Condition=" '%(Extension)' == '.dll' or '%(Extension)' == '.exe' " /> |
47 | 47 | ||
48 | <!-- include PDBs for Debug only --> | 48 | <!-- include PDBs for Debug only --> |
49 | <CustomActionReferenceContents Include="@(IntermediateAssembly->'%(RootDir)%(Directory)%(Filename).pdb')" | 49 | <CustomActionReferenceContents Include="@(IntermediateAssembly->'%(RootDir)%(Directory)%(Filename).pdb')" |
50 | Condition=" Exists('%(RootDir)%(Directory)%(Filename).pdb') and '$(Configuration)' == 'Debug' " /> | 50 | Condition=" Exists('%(RootDir)%(Directory)%(Filename).pdb') and '$(Configuration)' == 'Debug' " /> |
@@ -60,17 +60,27 @@ | |||
60 | - Project items of type Content | 60 | - Project items of type Content |
61 | - Additional items in the CustomActionContents property | 61 | - Additional items in the CustomActionContents property |
62 | --> | 62 | --> |
63 | <ItemGroup> | ||
64 | <CustomActionContents Include="@(CustomActionReferenceContents);@(Content->'%(FullPath)');$(CustomActionContents)" /> | ||
65 | |||
66 | <IntermediateCAResponseFile TaskParameter="Value" PropertyName="IntermediateCAResponseFile" /> | ||
67 | <IntermediateCAAssembly Include="@(IntermediateAssembly->'%(FullPath)')" /> | ||
68 | <IntermediateCAPackage Include="@(IntermediateAssembly->'%(RootDir)%(Directory)$(TargetCAFileName)')" /> | ||
69 | </ItemGroup> | ||
70 | |||
71 | <!-- Use a response file to pass the potentially very long contents to MakeSfxCA.exe --> | ||
63 | <PropertyGroup> | 72 | <PropertyGroup> |
64 | <CustomActionContents>@(CustomActionReferenceContents);@(Content->'%(FullPath)');$(CustomActionContents)</CustomActionContents> | 73 | <IntermediateCAResponseFile>@(IntermediateCAPackage->'%(RootDir)%(Directory)%(Filename).rsp')</IntermediateCAResponseFile> |
65 | </PropertyGroup> | 74 | </PropertyGroup> |
66 | 75 | ||
76 | <WriteLinesToFile File="$(IntermediateCAResponseFile)" Lines="@(CustomActionContents->'"%(Identity)"')" Overwrite="true" /> | ||
77 | |||
67 | <ItemGroup> | 78 | <ItemGroup> |
68 | <IntermediateCAAssembly Include="@(IntermediateAssembly->'%(FullPath)')" /> | 79 | <FileWrites Include="$(IntermediateCAResponseFile)" /> |
69 | <IntermediateCAPackage Include="@(IntermediateAssembly->'%(RootDir)%(Directory)$(TargetCAFileName)')" /> | ||
70 | </ItemGroup> | 80 | </ItemGroup> |
71 | 81 | ||
72 | <!-- Run the MakeSfxCA.exe CA packaging tool. --> | 82 | <!-- Run the MakeSfxCA.exe CA packaging tool. --> |
73 | <Exec Command='"$(MakeSfxCA)" "@(IntermediateCAPackage)" "$(SfxCADll)" "@(IntermediateCAAssembly)" "$(CustomActionContents)"' | 83 | <Exec Command='"$(MakeSfxCA)" "@(IntermediateCAPackage)" "$(SfxCADll)" "@(IntermediateCAAssembly)" "@$(IntermediateCAResponseFile)"' |
74 | WorkingDirectory="$(ProjectDir)" /> | 84 | WorkingDirectory="$(ProjectDir)" /> |
75 | 85 | ||
76 | <!-- Add modules to be copied to output dir. --> | 86 | <!-- Add modules to be copied to output dir. --> |