diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-04-11 16:11:28 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-04-11 16:32:45 -0700 |
| commit | 92c0a91d3fdd9a9df5d3feae611981ea170703f5 (patch) | |
| tree | 0632532390d5b040350bfcd844b0bda4f707ede7 /scripts/buildsystems/msbuild/vcpkg.targets | |
| parent | 1513062f0bfba77baf7efd51de6e9d865bee70b7 (diff) | |
| download | vcpkg-92c0a91d3fdd9a9df5d3feae611981ea170703f5.tar.gz vcpkg-92c0a91d3fdd9a9df5d3feae611981ea170703f5.zip | |
[vcpkg-msbuild] Fix line wrapping bug on Win7.
On Win7, calling powershell via MSBuild results in normal output lines being split based on the ConHost system-wide default line length settings.
The fix is to first write all the lines to a file, then load that file as into an MSBuild ItemGroup. This avoids all interaction with ConHost.
Diffstat (limited to 'scripts/buildsystems/msbuild/vcpkg.targets')
| -rw-r--r-- | scripts/buildsystems/msbuild/vcpkg.targets | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index 65eacd5c9..5c24d755a 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -62,18 +62,21 @@ <Target Name="AppLocalFromInstalled" AfterTargets="CopyFilesToOutputDirectory" BeforeTargets="CopyLocalFilesOutputGroup;RegisterOutput" Condition="'$(VcpkgEnabled)' == 'true'"> <WriteLinesToFile File="$(TLogLocation)$(ProjectName).write.1u.tlog" - Lines="^$(OutputPath)$(TargetName).$(OutputType);" Encoding="Unicode"/> + Lines="^$(TargetPath);$([System.IO.Path]::Combine($(ProjectDir),$(IntDir)))vcpkg.applocal.log" Encoding="Unicode"/> <Exec Condition="'$(VcpkgConfiguration)' == 'Debug'" - Command="powershell.exe -ExecutionPolicy Bypass -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(TargetPath)%22 %22$(VcpkgRoot)debug\bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22" - ConsoleToMSBuild="true" + Command="powershell.exe -ExecutionPolicy Bypass -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(TargetPath)%22 %22$(VcpkgRoot)debug\bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22 %22$(IntDir)vcpkg.applocal.log%22" StandardOutputImportance="Normal"> - <Output TaskParameter="ConsoleOutput" ItemName="ReferenceCopyLocalPaths" /> </Exec> <Exec Condition="'$(VcpkgConfiguration)' == 'Release'" - Command="powershell.exe -ExecutionPolicy Bypass -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(TargetPath)%22 %22$(VcpkgRoot)bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22" - ConsoleToMSBuild="true" + Command="powershell.exe -ExecutionPolicy Bypass -noprofile -File %22$(MSBuildThisFileDirectory)applocal.ps1%22 %22$(TargetPath)%22 %22$(VcpkgRoot)bin%22 %22$(TLogLocation)$(ProjectName).write.1u.tlog%22 %22$(IntDir)vcpkg.applocal.log%22" StandardOutputImportance="Normal"> - <Output TaskParameter="ConsoleOutput" ItemName="ReferenceCopyLocalPaths" /> </Exec> + <ReadLinesFromFile File="$(IntDir)vcpkg.applocal.log"> + <Output TaskParameter="Lines" ItemName="VcpkgAppLocalDLLs" /> + </ReadLinesFromFile> + <Message Text="@(VcpkgAppLocalDLLs,'%0A')" Importance="Normal" /> + <ItemGroup> + <ReferenceCopyLocalPaths Include="@(VcpkgAppLocalDLLs)" /> + </ItemGroup> </Target> </Project> |
