diff options
Diffstat (limited to 'src')
14 files changed, 185 insertions, 206 deletions
diff --git a/src/api/wix/WixToolset.Extensibility/Data/ILayoutContext.cs b/src/api/wix/WixToolset.Extensibility/Data/ILayoutContext.cs index b11b4d13..981ed38e 100644 --- a/src/api/wix/WixToolset.Extensibility/Data/ILayoutContext.cs +++ b/src/api/wix/WixToolset.Extensibility/Data/ILayoutContext.cs | |||
| @@ -32,24 +32,14 @@ namespace WixToolset.Extensibility.Data | |||
| 32 | IReadOnlyCollection<IFileTransfer> FileTransfers { get; set; } | 32 | IReadOnlyCollection<IFileTransfer> FileTransfers { get; set; } |
| 33 | 33 | ||
| 34 | /// <summary> | 34 | /// <summary> |
| 35 | /// File to capture list of content files. | ||
| 36 | /// </summary> | ||
| 37 | string ContentsFile { get; set; } | ||
| 38 | |||
| 39 | /// <summary> | ||
| 40 | /// File to capture list of output files. | ||
| 41 | /// </summary> | ||
| 42 | string OutputsFile { get; set; } | ||
| 43 | |||
| 44 | /// <summary> | ||
| 45 | /// Intermediate folder. | 35 | /// Intermediate folder. |
| 46 | /// </summary> | 36 | /// </summary> |
| 47 | string IntermediateFolder { get; set; } | 37 | string IntermediateFolder { get; set; } |
| 48 | 38 | ||
| 49 | /// <summary> | 39 | /// <summary> |
| 50 | /// List of built output files. | 40 | /// File to capture list of content, built output and copied output files. |
| 51 | /// </summary> | 41 | /// </summary> |
| 52 | string BuiltOutputsFile { get; set; } | 42 | string TrackingFile { get; set; } |
| 53 | 43 | ||
| 54 | /// <summary> | 44 | /// <summary> |
| 55 | /// Reset ACLs on file transfers. | 45 | /// Reset ACLs on file transfers. |
diff --git a/src/api/wix/WixToolset.Extensibility/Data/TrackedFileType.cs b/src/api/wix/WixToolset.Extensibility/Data/TrackedFileType.cs index e7f53842..904a990f 100644 --- a/src/api/wix/WixToolset.Extensibility/Data/TrackedFileType.cs +++ b/src/api/wix/WixToolset.Extensibility/Data/TrackedFileType.cs | |||
| @@ -25,9 +25,15 @@ namespace WixToolset.Extensibility.Data | |||
| 25 | Intermediate, | 25 | Intermediate, |
| 26 | 26 | ||
| 27 | /// <summary> | 27 | /// <summary> |
| 28 | /// Final output (like a .msi, .cab or .wixpdb). | 28 | /// Output created by the build process itself (like a .msi, .cab or .wixpdb). |
| 29 | /// These are the whole point of the build process. | 29 | /// These files can be recreated in the final output location by building again. |
| 30 | /// </summary> | 30 | /// </summary> |
| 31 | Final, | 31 | BuiltOutput, |
| 32 | |||
| 33 | /// <summary> | ||
| 34 | /// Output copied by the build process (like external files in an .msi). | ||
| 35 | /// These files are not created by the build process but are copied to the final output location. | ||
| 36 | /// </summary> | ||
| 37 | CopiedOutput, | ||
| 32 | } | 38 | } |
| 33 | } | 39 | } |
diff --git a/src/wix/WixToolset.BuildTasks/ReadTracking.cs b/src/wix/WixToolset.BuildTasks/ReadTracking.cs new file mode 100644 index 00000000..1ce039f6 --- /dev/null +++ b/src/wix/WixToolset.BuildTasks/ReadTracking.cs | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.BuildTasks | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Collections.Generic; | ||
| 7 | using System.Linq; | ||
| 8 | using Microsoft.Build.Framework; | ||
| 9 | using Microsoft.Build.Utilities; | ||
| 10 | |||
| 11 | /// <summary> | ||
| 12 | /// Read the contents of the tracking file produced by the build command. | ||
| 13 | /// </summary> | ||
| 14 | public class ReadTracking : Task | ||
| 15 | { | ||
| 16 | private const string TrackedTypeMetadataName = "TrackedType"; | ||
| 17 | private static readonly char[] TrackedLineTypePathSeparator = new[] { '\t' }; | ||
| 18 | |||
| 19 | /// <summary> | ||
| 20 | /// The path to the tracking file. | ||
| 21 | /// </summary> | ||
| 22 | [Required] | ||
| 23 | public ITaskItem File { get; set; } | ||
| 24 | |||
| 25 | /// <summary> | ||
| 26 | /// All tracked files. | ||
| 27 | /// </summary> | ||
| 28 | [Output] | ||
| 29 | public ITaskItem[] All { get; private set; } | ||
| 30 | |||
| 31 | /// <summary> | ||
| 32 | /// The tracked built outputs. | ||
| 33 | /// </summary> | ||
| 34 | [Output] | ||
| 35 | public ITaskItem[] BuiltOutputs { get; private set; } | ||
| 36 | |||
| 37 | /// <summary> | ||
| 38 | /// The tracked copied outputs. | ||
| 39 | /// </summary> | ||
| 40 | [Output] | ||
| 41 | public ITaskItem[] CopiedOutputs { get; private set; } | ||
| 42 | |||
| 43 | /// <summary> | ||
| 44 | /// The tracked inputs. | ||
| 45 | /// </summary> | ||
| 46 | [Output] | ||
| 47 | public ITaskItem[] Inputs { get; private set; } | ||
| 48 | |||
| 49 | /// <summary> | ||
| 50 | /// All tracked outputs. | ||
| 51 | /// </summary> | ||
| 52 | [Output] | ||
| 53 | public ITaskItem[] Outputs { get; private set; } | ||
| 54 | |||
| 55 | /// <summary> | ||
| 56 | /// Gets a complete list of external cabs referenced by the given installer database file. | ||
| 57 | /// </summary> | ||
| 58 | /// <returns>True upon completion of the task execution.</returns> | ||
| 59 | public override bool Execute() | ||
| 60 | { | ||
| 61 | var all = new List<ITaskItem>(); | ||
| 62 | var path = this.File.ItemSpec; | ||
| 63 | |||
| 64 | if (System.IO.File.Exists(path)) | ||
| 65 | { | ||
| 66 | var lines = System.IO.File.ReadAllLines(path); | ||
| 67 | |||
| 68 | foreach (var line in lines) | ||
| 69 | { | ||
| 70 | var split = line.Split(TrackedLineTypePathSeparator, 2, StringSplitOptions.RemoveEmptyEntries); | ||
| 71 | |||
| 72 | if (split.Length == 2) | ||
| 73 | { | ||
| 74 | all.Add(new TaskItem(split[1], new Dictionary<string, string>() { [TrackedTypeMetadataName] = split[0] })); | ||
| 75 | } | ||
| 76 | else | ||
| 77 | { | ||
| 78 | this.Log.LogError($"Failed to parse tracked line: {line}"); | ||
| 79 | } | ||
| 80 | } | ||
| 81 | } | ||
| 82 | |||
| 83 | this.All = all.ToArray(); | ||
| 84 | this.BuiltOutputs = all.Where(t => FilterByTrackedType(t, "BuiltOutput")).ToArray(); | ||
| 85 | this.CopiedOutputs = all.Where(t => FilterByTrackedType(t, "CopiedOutput")).ToArray(); | ||
| 86 | this.Inputs = all.Where(t => FilterByTrackedType(t, "Input")).ToArray(); | ||
| 87 | this.Outputs = all.Where(t => FilterByTrackedType(t, "BuiltOutput") || FilterByTrackedType(t, "CopiedOutput")).ToArray(); | ||
| 88 | |||
| 89 | return true; | ||
| 90 | } | ||
| 91 | |||
| 92 | private static bool FilterByTrackedType(ITaskItem item, string type) | ||
| 93 | { | ||
| 94 | return item.GetMetadata(TrackedTypeMetadataName).Equals(type, StringComparison.OrdinalIgnoreCase); | ||
| 95 | } | ||
| 96 | } | ||
| 97 | } | ||
diff --git a/src/wix/WixToolset.BuildTasks/WixBuild.cs b/src/wix/WixToolset.BuildTasks/WixBuild.cs index dbff7e81..3d4617f6 100644 --- a/src/wix/WixToolset.BuildTasks/WixBuild.cs +++ b/src/wix/WixToolset.BuildTasks/WixBuild.cs | |||
| @@ -52,11 +52,7 @@ namespace WixToolset.BuildTasks | |||
| 52 | 52 | ||
| 53 | public bool BindFiles { get; set; } | 53 | public bool BindFiles { get; set; } |
| 54 | 54 | ||
| 55 | public ITaskItem BindContentsFile { get; set; } | 55 | public ITaskItem BindTrackingFile { get; set; } |
| 56 | |||
| 57 | public ITaskItem BindOutputsFile { get; set; } | ||
| 58 | |||
| 59 | public ITaskItem BindBuiltOutputsFile { get; set; } | ||
| 60 | 56 | ||
| 61 | public string CabinetCachePath { get; set; } | 57 | public string CabinetCachePath { get; set; } |
| 62 | 58 | ||
| @@ -96,9 +92,7 @@ namespace WixToolset.BuildTasks | |||
| 96 | commandLineBuilder.AppendSwitchIfNotNull("-usf ", this.UnreferencedSymbolsFile); | 92 | commandLineBuilder.AppendSwitchIfNotNull("-usf ", this.UnreferencedSymbolsFile); |
| 97 | commandLineBuilder.AppendSwitchIfNotNull("-cc ", this.CabinetCachePath); | 93 | commandLineBuilder.AppendSwitchIfNotNull("-cc ", this.CabinetCachePath); |
| 98 | commandLineBuilder.AppendSwitchIfNotNull("-intermediatefolder ", this.IntermediateDirectory); | 94 | commandLineBuilder.AppendSwitchIfNotNull("-intermediatefolder ", this.IntermediateDirectory); |
| 99 | commandLineBuilder.AppendSwitchIfNotNull("-contentsfile ", this.BindContentsFile); | 95 | commandLineBuilder.AppendSwitchIfNotNull("-trackingfile ", this.BindTrackingFile); |
| 100 | commandLineBuilder.AppendSwitchIfNotNull("-outputsfile ", this.BindOutputsFile); | ||
| 101 | commandLineBuilder.AppendSwitchIfNotNull("-builtoutputsfile ", this.BindBuiltOutputsFile); | ||
| 102 | commandLineBuilder.AppendSwitchIfNotNull("-defaultcompressionlevel ", this.DefaultCompressionLevel); | 96 | commandLineBuilder.AppendSwitchIfNotNull("-defaultcompressionlevel ", this.DefaultCompressionLevel); |
| 103 | 97 | ||
| 104 | base.BuildCommandLine(commandLineBuilder); | 98 | base.BuildCommandLine(commandLineBuilder); |
diff --git a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs index cd00232a..7b74ce5e 100644 --- a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs | |||
| @@ -483,7 +483,7 @@ namespace WixToolset.Core.Burn | |||
| 483 | command.Execute(); | 483 | command.Execute(); |
| 484 | 484 | ||
| 485 | fileTransfers.Add(command.Transfer); | 485 | fileTransfers.Add(command.Transfer); |
| 486 | trackedFiles.Add(this.BackendHelper.TrackFile(this.OutputPath, TrackedFileType.Final)); | 486 | trackedFiles.Add(this.BackendHelper.TrackFile(this.OutputPath, TrackedFileType.BuiltOutput)); |
| 487 | } | 487 | } |
| 488 | 488 | ||
| 489 | #if TODO // does this need to come back, or do they only need to be in TrackedFiles? | 489 | #if TODO // does this need to come back, or do they only need to be in TrackedFiles? |
| @@ -504,7 +504,7 @@ namespace WixToolset.Core.Burn | |||
| 504 | } | 504 | } |
| 505 | else | 505 | else |
| 506 | { | 506 | { |
| 507 | var trackPdb = this.BackendHelper.TrackFile(this.OutputPdbPath, TrackedFileType.Final); | 507 | var trackPdb = this.BackendHelper.TrackFile(this.OutputPdbPath, TrackedFileType.BuiltOutput); |
| 508 | trackedFiles.Add(trackPdb); | 508 | trackedFiles.Add(trackPdb); |
| 509 | 509 | ||
| 510 | wixout = WixOutput.Create(trackPdb.Path); | 510 | wixout = WixOutput.Create(trackPdb.Path); |
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs index 9f36cd78..f2a8b9c6 100644 --- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs +++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs | |||
| @@ -478,7 +478,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 478 | { | 478 | { |
| 479 | this.Messaging.Write(VerboseMessages.GeneratingDatabase()); | 479 | this.Messaging.Write(VerboseMessages.GeneratingDatabase()); |
| 480 | 480 | ||
| 481 | var trackMsi = this.WindowsInstallerBackendHelper.TrackFile(this.OutputPath, TrackedFileType.Final); | 481 | var trackMsi = this.WindowsInstallerBackendHelper.TrackFile(this.OutputPath, TrackedFileType.BuiltOutput); |
| 482 | trackedFiles.Add(trackMsi); | 482 | trackedFiles.Add(trackMsi); |
| 483 | 483 | ||
| 484 | var command = new GenerateDatabaseCommand(this.Messaging, this.WindowsInstallerBackendHelper, this.FileSystemManager, data, trackMsi.Path, tableDefinitions, this.IntermediateFolder, keepAddedColumns: false, this.SuppressAddingValidationRows, useSubdirectory: false); | 484 | var command = new GenerateDatabaseCommand(this.Messaging, this.WindowsInstallerBackendHelper, this.FileSystemManager, data, trackMsi.Path, tableDefinitions, this.IntermediateFolder, keepAddedColumns: false, this.SuppressAddingValidationRows, useSubdirectory: false); |
| @@ -595,7 +595,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 595 | } | 595 | } |
| 596 | else | 596 | else |
| 597 | { | 597 | { |
| 598 | var trackPdb = this.WindowsInstallerBackendHelper.TrackFile(this.OutputPdbPath, TrackedFileType.Final); | 598 | var trackPdb = this.WindowsInstallerBackendHelper.TrackFile(this.OutputPdbPath, TrackedFileType.BuiltOutput); |
| 599 | trackedFiles.Add(trackPdb); | 599 | trackedFiles.Add(trackPdb); |
| 600 | 600 | ||
| 601 | wixout = WixOutput.Create(trackPdb.Path); | 601 | wixout = WixOutput.Create(trackPdb.Path); |
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs index 83a4949e..4ac248cd 100644 --- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs +++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs | |||
| @@ -225,7 +225,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 225 | } | 225 | } |
| 226 | else | 226 | else |
| 227 | { | 227 | { |
| 228 | var trackDestination = this.BackendHelper.TrackFile(Path.Combine(cabinetDir, mediaSymbol.Cabinet), TrackedFileType.Final, mediaSymbol.SourceLineNumbers); | 228 | var trackDestination = this.BackendHelper.TrackFile(Path.Combine(cabinetDir, mediaSymbol.Cabinet), TrackedFileType.BuiltOutput, mediaSymbol.SourceLineNumbers); |
| 229 | this.trackedFiles.Add(trackDestination); | 229 | this.trackedFiles.Add(trackDestination); |
| 230 | 230 | ||
| 231 | var transfer = this.BackendHelper.CreateFileTransfer(resolvedCabinet.Path, trackDestination.Path, resolvedCabinet.BuildOption == CabinetBuildOption.BuildAndMove, mediaSymbol.SourceLineNumbers); | 231 | var transfer = this.BackendHelper.CreateFileTransfer(resolvedCabinet.Path, trackDestination.Path, resolvedCabinet.BuildOption == CabinetBuildOption.BuildAndMove, mediaSymbol.SourceLineNumbers); |
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs index 039ba495..9aad3537 100644 --- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs +++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs | |||
| @@ -109,7 +109,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 109 | // because if the source and destination of the transfer is the same, we | 109 | // because if the source and destination of the transfer is the same, we |
| 110 | // don't want to clean the file because we'd be deleting the original | 110 | // don't want to clean the file because we'd be deleting the original |
| 111 | // (and that would be bad). | 111 | // (and that would be bad). |
| 112 | var tracked = this.BackendHelper.TrackFile(transfer.Destination, TrackedFileType.Final, facade.SourceLineNumber); | 112 | var tracked = this.BackendHelper.TrackFile(transfer.Destination, TrackedFileType.BuiltOutput, facade.SourceLineNumber); |
| 113 | tracked.Clean = !transfer.Redundant; | 113 | tracked.Clean = !transfer.Redundant; |
| 114 | 114 | ||
| 115 | trackedFiles.Add(tracked); | 115 | trackedFiles.Add(tracked); |
diff --git a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs index 5f618b81..47b7afa8 100644 --- a/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs +++ b/src/wix/WixToolset.Core/CommandLine/BuildCommand.cs | |||
| @@ -52,11 +52,7 @@ namespace WixToolset.Core.CommandLine | |||
| 52 | 52 | ||
| 53 | private CompressionLevel? DefaultCompressionLevel { get; set; } | 53 | private CompressionLevel? DefaultCompressionLevel { get; set; } |
| 54 | 54 | ||
| 55 | private string ContentsFile { get; set; } | 55 | private string TrackingFile { get; set; } |
| 56 | |||
| 57 | private string OutputsFile { get; set; } | ||
| 58 | |||
| 59 | private string BuiltOutputsFile { get; set; } | ||
| 60 | 56 | ||
| 61 | public Task<int> ExecuteAsync(CancellationToken cancellationToken) | 57 | public Task<int> ExecuteAsync(CancellationToken cancellationToken) |
| 62 | { | 58 | { |
| @@ -78,11 +74,7 @@ namespace WixToolset.Core.CommandLine | |||
| 78 | 74 | ||
| 79 | this.Platform = this.commandLine.Platform; | 75 | this.Platform = this.commandLine.Platform; |
| 80 | 76 | ||
| 81 | this.ContentsFile = this.commandLine.ContentsFile; | 77 | this.TrackingFile = this.commandLine.TrackingFile; |
| 82 | |||
| 83 | this.OutputsFile = this.commandLine.OutputsFile; | ||
| 84 | |||
| 85 | this.BuiltOutputsFile = this.commandLine.BuiltOutputsFile; | ||
| 86 | 78 | ||
| 87 | this.DefaultCompressionLevel = this.commandLine.DefaultCompressionLevel; | 79 | this.DefaultCompressionLevel = this.commandLine.DefaultCompressionLevel; |
| 88 | 80 | ||
| @@ -371,9 +363,7 @@ namespace WixToolset.Core.CommandLine | |||
| 371 | context.TrackedFiles = bindResult.TrackedFiles; | 363 | context.TrackedFiles = bindResult.TrackedFiles; |
| 372 | context.FileTransfers = bindResult.FileTransfers; | 364 | context.FileTransfers = bindResult.FileTransfers; |
| 373 | context.IntermediateFolder = intermediateFolder; | 365 | context.IntermediateFolder = intermediateFolder; |
| 374 | context.ContentsFile = this.ContentsFile; | 366 | context.TrackingFile = this.TrackingFile; |
| 375 | context.OutputsFile = this.OutputsFile; | ||
| 376 | context.BuiltOutputsFile = this.BuiltOutputsFile; | ||
| 377 | context.ResetAcls = this.commandLine.ResetAcls; | 367 | context.ResetAcls = this.commandLine.ResetAcls; |
| 378 | context.CancellationToken = cancellationToken; | 368 | context.CancellationToken = cancellationToken; |
| 379 | 369 | ||
| @@ -537,11 +527,7 @@ namespace WixToolset.Core.CommandLine | |||
| 537 | 527 | ||
| 538 | public CompressionLevel? DefaultCompressionLevel { get; private set; } | 528 | public CompressionLevel? DefaultCompressionLevel { get; private set; } |
| 539 | 529 | ||
| 540 | public string ContentsFile { get; private set; } | 530 | public string TrackingFile { get; private set; } |
| 541 | |||
| 542 | public string OutputsFile { get; private set; } | ||
| 543 | |||
| 544 | public string BuiltOutputsFile { get; private set; } | ||
| 545 | 531 | ||
| 546 | public List<string> Ices { get; } = new List<string>(); | 532 | public List<string> Ices { get; } = new List<string>(); |
| 547 | 533 | ||
| @@ -610,16 +596,8 @@ namespace WixToolset.Core.CommandLine | |||
| 610 | parser.GetNextArgumentOrError(arg, this.Cultures); | 596 | parser.GetNextArgumentOrError(arg, this.Cultures); |
| 611 | return true; | 597 | return true; |
| 612 | 598 | ||
| 613 | case "contentsfile": | 599 | case "trackingfile": |
| 614 | this.ContentsFile = parser.GetNextArgumentAsFilePathOrError(arg); | 600 | this.TrackingFile = parser.GetNextArgumentAsFilePathOrError(arg); |
| 615 | return true; | ||
| 616 | |||
| 617 | case "outputsfile": | ||
| 618 | this.OutputsFile = parser.GetNextArgumentAsFilePathOrError(arg); | ||
| 619 | return true; | ||
| 620 | |||
| 621 | case "builtoutputsfile": | ||
| 622 | this.BuiltOutputsFile = parser.GetNextArgumentAsFilePathOrError(arg); | ||
| 623 | return true; | 601 | return true; |
| 624 | 602 | ||
| 625 | case "d": | 603 | case "d": |
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/TrackedFile.cs b/src/wix/WixToolset.Core/ExtensibilityServices/TrackedFile.cs index 028cddbf..570fb029 100644 --- a/src/wix/WixToolset.Core/ExtensibilityServices/TrackedFile.cs +++ b/src/wix/WixToolset.Core/ExtensibilityServices/TrackedFile.cs | |||
| @@ -12,7 +12,7 @@ namespace WixToolset.Core.ExtensibilityServices | |||
| 12 | this.Path = path; | 12 | this.Path = path; |
| 13 | this.Type = type; | 13 | this.Type = type; |
| 14 | this.SourceLineNumbers = sourceLineNumbers; | 14 | this.SourceLineNumbers = sourceLineNumbers; |
| 15 | this.Clean = (type == TrackedFileType.Intermediate || type == TrackedFileType.Final); | 15 | this.Clean = (type == TrackedFileType.Intermediate || type == TrackedFileType.BuiltOutput || type == TrackedFileType.CopiedOutput); |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | public bool Clean { get; set; } | 18 | public bool Clean { get; set; } |
diff --git a/src/wix/WixToolset.Core/LayoutContext.cs b/src/wix/WixToolset.Core/LayoutContext.cs index 4b8c7b99..3def3006 100644 --- a/src/wix/WixToolset.Core/LayoutContext.cs +++ b/src/wix/WixToolset.Core/LayoutContext.cs | |||
| @@ -27,11 +27,7 @@ namespace WixToolset.Core | |||
| 27 | 27 | ||
| 28 | public string IntermediateFolder { get; set; } | 28 | public string IntermediateFolder { get; set; } |
| 29 | 29 | ||
| 30 | public string ContentsFile { get; set; } | 30 | public string TrackingFile { get; set; } |
| 31 | |||
| 32 | public string OutputsFile { get; set; } | ||
| 33 | |||
| 34 | public string BuiltOutputsFile { get; set; } | ||
| 35 | 31 | ||
| 36 | public bool ResetAcls { get; set; } | 32 | public bool ResetAcls { get; set; } |
| 37 | 33 | ||
diff --git a/src/wix/WixToolset.Core/LayoutCreator.cs b/src/wix/WixToolset.Core/LayoutCreator.cs index 0c5aaf63..7a143680 100644 --- a/src/wix/WixToolset.Core/LayoutCreator.cs +++ b/src/wix/WixToolset.Core/LayoutCreator.cs | |||
| @@ -16,6 +16,8 @@ namespace WixToolset.Core | |||
| 16 | /// </summary> | 16 | /// </summary> |
| 17 | internal class LayoutCreator : ILayoutCreator | 17 | internal class LayoutCreator : ILayoutCreator |
| 18 | { | 18 | { |
| 19 | private const string TrackedLineTypePathSeparator = "\t"; | ||
| 20 | |||
| 19 | internal LayoutCreator(IServiceProvider serviceProvider) | 21 | internal LayoutCreator(IServiceProvider serviceProvider) |
| 20 | { | 22 | { |
| 21 | this.Messaging = serviceProvider.GetService<IMessaging>(); | 23 | this.Messaging = serviceProvider.GetService<IMessaging>(); |
| @@ -51,22 +53,9 @@ namespace WixToolset.Core | |||
| 51 | } | 53 | } |
| 52 | finally | 54 | finally |
| 53 | { | 55 | { |
| 54 | if (context.TrackedFiles != null) | 56 | if (context.TrackedFiles != null && !String.IsNullOrEmpty(context.TrackingFile)) |
| 55 | { | 57 | { |
| 56 | if (!String.IsNullOrEmpty(context.ContentsFile)) | 58 | this.CreateTrackingFile(context.TrackingFile, context.TrackedFiles); |
| 57 | { | ||
| 58 | this.CreateContentsFile(context.ContentsFile, context.TrackedFiles); | ||
| 59 | } | ||
| 60 | |||
| 61 | if (!String.IsNullOrEmpty(context.OutputsFile)) | ||
| 62 | { | ||
| 63 | this.CreateOutputsFile(context.OutputsFile, context.TrackedFiles); | ||
| 64 | } | ||
| 65 | |||
| 66 | if (!String.IsNullOrEmpty(context.BuiltOutputsFile)) | ||
| 67 | { | ||
| 68 | this.CreateBuiltOutputsFile(context.BuiltOutputsFile, context.TrackedFiles); | ||
| 69 | } | ||
| 70 | } | 59 | } |
| 71 | } | 60 | } |
| 72 | 61 | ||
| @@ -78,72 +67,15 @@ namespace WixToolset.Core | |||
| 78 | } | 67 | } |
| 79 | 68 | ||
| 80 | /// <summary> | 69 | /// <summary> |
| 81 | /// Writes the paths to the content files to a text file. | 70 | /// Writes the paths of the track files to a text file. |
| 82 | /// </summary> | ||
| 83 | /// <param name="path">Path to write file.</param> | ||
| 84 | /// <param name="trackedFiles">Collection of paths to content files that will be written to file.</param> | ||
| 85 | private void CreateContentsFile(string path, IEnumerable<ITrackedFile> trackedFiles) | ||
| 86 | { | ||
| 87 | var uniqueInputFilePaths = new SortedSet<string>(trackedFiles.Where(t => t.Type == TrackedFileType.Input).Select(t => t.Path), StringComparer.OrdinalIgnoreCase); | ||
| 88 | |||
| 89 | if (!uniqueInputFilePaths.Any()) | ||
| 90 | { | ||
| 91 | return; | ||
| 92 | } | ||
| 93 | |||
| 94 | var directory = Path.GetDirectoryName(path); | ||
| 95 | Directory.CreateDirectory(directory); | ||
| 96 | |||
| 97 | using (var contents = new StreamWriter(path, false)) | ||
| 98 | { | ||
| 99 | foreach (var inputPath in uniqueInputFilePaths) | ||
| 100 | { | ||
| 101 | contents.WriteLine(inputPath); | ||
| 102 | } | ||
| 103 | } | ||
| 104 | } | ||
| 105 | |||
| 106 | /// <summary> | ||
| 107 | /// Writes the paths to the output files to a text file. | ||
| 108 | /// </summary> | ||
| 109 | /// <param name="path">Path to write file.</param> | ||
| 110 | /// <param name="trackedFiles">Collection of files that were transferred to the output directory.</param> | ||
| 111 | private void CreateOutputsFile(string path, IEnumerable<ITrackedFile> trackedFiles) | ||
| 112 | { | ||
| 113 | var uniqueOutputPaths = new SortedSet<string>(trackedFiles.Where(t => t.Clean).Select(t => t.Path), StringComparer.OrdinalIgnoreCase); | ||
| 114 | |||
| 115 | if (!uniqueOutputPaths.Any()) | ||
| 116 | { | ||
| 117 | return; | ||
| 118 | } | ||
| 119 | |||
| 120 | var directory = Path.GetDirectoryName(path); | ||
| 121 | Directory.CreateDirectory(directory); | ||
| 122 | |||
| 123 | using (var outputs = new StreamWriter(path, false)) | ||
| 124 | { | ||
| 125 | //// Don't list files where the source is the same as the destination since | ||
| 126 | //// that might be the only place the file exists. The outputs file is often | ||
| 127 | //// used to delete stuff and losing the original source would be bad. | ||
| 128 | //var uniqueOutputPaths = new SortedSet<string>(fileTransfers.Where(ft => !ft.Redundant).Select(ft => ft.Destination), StringComparer.OrdinalIgnoreCase); | ||
| 129 | |||
| 130 | foreach (var outputPath in uniqueOutputPaths) | ||
| 131 | { | ||
| 132 | outputs.WriteLine(outputPath); | ||
| 133 | } | ||
| 134 | } | ||
| 135 | } | ||
| 136 | |||
| 137 | /// <summary> | ||
| 138 | /// Writes the paths to the built output files to a text file. | ||
| 139 | /// </summary> | 71 | /// </summary> |
| 140 | /// <param name="path">Path to write file.</param> | 72 | /// <param name="path">Path to write file.</param> |
| 141 | /// <param name="trackedFiles">Collection of files that were transferred to the output directory.</param> | 73 | /// <param name="trackedFiles">Collection of files that were tracked.</param> |
| 142 | private void CreateBuiltOutputsFile(string path, IEnumerable<ITrackedFile> trackedFiles) | 74 | private void CreateTrackingFile(string path, IEnumerable<ITrackedFile> trackedFiles) |
| 143 | { | 75 | { |
| 144 | var uniqueBuiltPaths = new SortedSet<string>(trackedFiles.Where(t => t.Type == TrackedFileType.Final).Select(t => t.Path), StringComparer.OrdinalIgnoreCase); | 76 | var uniqueTrackingLines = new SortedSet<string>(trackedFiles.Where(t => t.Type != TrackedFileType.Temporary).Select(TrackedFileLine), StringComparer.OrdinalIgnoreCase); |
| 145 | 77 | ||
| 146 | if (!uniqueBuiltPaths.Any()) | 78 | if (!uniqueTrackingLines.Any()) |
| 147 | { | 79 | { |
| 148 | return; | 80 | return; |
| 149 | } | 81 | } |
| @@ -151,11 +83,11 @@ namespace WixToolset.Core | |||
| 151 | var directory = Path.GetDirectoryName(path); | 83 | var directory = Path.GetDirectoryName(path); |
| 152 | Directory.CreateDirectory(directory); | 84 | Directory.CreateDirectory(directory); |
| 153 | 85 | ||
| 154 | using (var outputs = new StreamWriter(path, false)) | 86 | using (var stream = new StreamWriter(path, false)) |
| 155 | { | 87 | { |
| 156 | foreach (var builtPath in uniqueBuiltPaths) | 88 | foreach (var trackingLine in uniqueTrackingLines) |
| 157 | { | 89 | { |
| 158 | outputs.WriteLine(builtPath); | 90 | stream.WriteLine(trackingLine); |
| 159 | } | 91 | } |
| 160 | } | 92 | } |
| 161 | } | 93 | } |
| @@ -219,5 +151,10 @@ namespace WixToolset.Core | |||
| 219 | } | 151 | } |
| 220 | } | 152 | } |
| 221 | } | 153 | } |
| 154 | |||
| 155 | private static string TrackedFileLine(ITrackedFile trackedFile) | ||
| 156 | { | ||
| 157 | return trackedFile.Type + TrackedLineTypePathSeparator + trackedFile.Path; | ||
| 158 | } | ||
| 222 | } | 159 | } |
| 223 | } | 160 | } |
diff --git a/src/wix/WixToolset.Sdk/tools/wix.targets b/src/wix/WixToolset.Sdk/tools/wix.targets index 7497a9f8..0029e217 100644 --- a/src/wix/WixToolset.Sdk/tools/wix.targets +++ b/src/wix/WixToolset.Sdk/tools/wix.targets | |||
| @@ -112,18 +112,20 @@ | |||
| 112 | <PropertyGroup> | 112 | <PropertyGroup> |
| 113 | <!-- Default pdb output path to the intermediate output directory --> | 113 | <!-- Default pdb output path to the intermediate output directory --> |
| 114 | <PdbOutputDir Condition=" '$(PdbOutputDir)'=='' ">$(TargetDir)</PdbOutputDir> | 114 | <PdbOutputDir Condition=" '$(PdbOutputDir)'=='' ">$(TargetDir)</PdbOutputDir> |
| 115 | <PdbOutputDir Condition=" !HasTrailingSlash('$(PdbOutputDir)') ">$(PdbOutputDir)\</PdbOutputDir> | 115 | <TargetPdbDir Condition=" '$(PdbOutputDir)'!='' ">$([MSBuild]::NormalizeDirectory($(MSBuildProjectDirectory), $(PdbOutputDir)))</TargetPdbDir> |
| 116 | |||
| 117 | <!-- Example, C:\MyProjects\MyProject\bin\debug\ --> | ||
| 118 | <TargetPdbDir Condition=" '$(PdbOutputDir)'!='' ">$([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(PdbOutputDir)`))`))</TargetPdbDir> | ||
| 119 | |||
| 120 | <!-- Example, MySetup.wixpdb" --> | ||
| 121 | <TargetPdbFileName Condition=" '$(TargetPdbFileName)' == '' ">$(TargetName).wixpdb</TargetPdbFileName> | 116 | <TargetPdbFileName Condition=" '$(TargetPdbFileName)' == '' ">$(TargetName).wixpdb</TargetPdbFileName> |
| 122 | |||
| 123 | <!-- Example, C:\MyProjects\MyProject\bin\debug\MyPackage.wixpdb --> | ||
| 124 | <TargetPdbPath Condition=" '$(TargetPdbPath)' == '' ">$(TargetPdbDir)$(TargetPdbFileName)</TargetPdbPath> | 117 | <TargetPdbPath Condition=" '$(TargetPdbPath)' == '' ">$(TargetPdbDir)$(TargetPdbFileName)</TargetPdbPath> |
| 125 | </PropertyGroup> | 118 | </PropertyGroup> |
| 126 | 119 | ||
| 120 | <PropertyGroup> | ||
| 121 | <WixExtDir Condition=" '$(WixExtDir)' == ''">$(WixBinDir)</WixExtDir> | ||
| 122 | </PropertyGroup> | ||
| 123 | |||
| 124 | <PropertyGroup> | ||
| 125 | <BindTrackingFilePrefix Condition=" '$(BindTrackingFilePrefix)' == '' ">$(MSBuildProjectFile).BindTracking</BindTrackingFilePrefix> | ||
| 126 | <BindTrackingFileExtension Condition=" '$(BindTrackingFileExtension)' == '' ">.txt</BindTrackingFileExtension> | ||
| 127 | </PropertyGroup> | ||
| 128 | |||
| 127 | <!-- | 129 | <!-- |
| 128 | *********************************************************************************************** | 130 | *********************************************************************************************** |
| 129 | *********************************************************************************************** | 131 | *********************************************************************************************** |
| @@ -154,24 +156,14 @@ | |||
| 154 | <UsingTask TaskName="WixAssignCulture" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" /> | 156 | <UsingTask TaskName="WixAssignCulture" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" /> |
| 155 | <UsingTask TaskName="WixAssignCulture" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" /> | 157 | <UsingTask TaskName="WixAssignCulture" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" /> |
| 156 | 158 | ||
| 159 | <UsingTask TaskName="ReadTracking" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" /> | ||
| 160 | <UsingTask TaskName="ReadTracking" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" /> | ||
| 161 | <UsingTask TaskName="ReadTracking" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" /> | ||
| 162 | |||
| 157 | <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" /> | 163 | <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" /> |
| 158 | <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" /> | 164 | <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" /> |
| 159 | <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" /> | 165 | <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" /> |
| 160 | 166 | ||
| 161 | <PropertyGroup> | ||
| 162 | <BindContentsFile Condition=" '$(BindContentsFile)' == '' ">$(MSBuildProjectFile).BindContentsFileList.txt</BindContentsFile> | ||
| 163 | <BindOutputsFile Condition=" '$(BindOutputsFile)' == '' ">$(MSBuildProjectFile).BindOutputsFileList.txt</BindOutputsFile> | ||
| 164 | <BindBuiltOutputsFile Condition=" '$(BindBuiltOutputsFile)' == '' ">$(MSBuildProjectFile).BindBuiltOutputsFileList.txt</BindBuiltOutputsFile> | ||
| 165 | </PropertyGroup> | ||
| 166 | |||
| 167 | <PropertyGroup> | ||
| 168 | <CabinetCachePath Condition=" '$(CabinetCachePath)'=='' and '$(ReuseCabinetCache)'=='true' ">$(IntermediateOutputPath)cabcache\</CabinetCachePath> | ||
| 169 | </PropertyGroup> | ||
| 170 | |||
| 171 | <PropertyGroup> | ||
| 172 | <WixExtDir Condition=" '$(WixExtDir)' == ''">$(WixBinDir)</WixExtDir> | ||
| 173 | </PropertyGroup> | ||
| 174 | |||
| 175 | <!-- | 167 | <!-- |
| 176 | *********************************************************************************************** | 168 | *********************************************************************************************** |
| 177 | *********************************************************************************************** | 169 | *********************************************************************************************** |
| @@ -552,6 +544,9 @@ | |||
| 552 | <PropertyGroup> | 544 | <PropertyGroup> |
| 553 | <TargetPath>@(_CulturedTargetPath)</TargetPath> | 545 | <TargetPath>@(_CulturedTargetPath)</TargetPath> |
| 554 | <TargetPdbPath>@(_CulturedTargetPdbPath)</TargetPdbPath> | 546 | <TargetPdbPath>@(_CulturedTargetPdbPath)</TargetPdbPath> |
| 547 | |||
| 548 | <!-- Update bind tracking filename prefix so cultures appended to the filename will be separated by a "-" --> | ||
| 549 | <BindTrackingFilePrefix>$(BindTrackingFilePrefix)-</BindTrackingFilePrefix> | ||
| 555 | </PropertyGroup> | 550 | </PropertyGroup> |
| 556 | </Target> | 551 | </Target> |
| 557 | 552 | ||
| @@ -615,18 +610,17 @@ | |||
| 615 | Inputs="@(Compile); | 610 | Inputs="@(Compile); |
| 616 | @(Content); | 611 | @(Content); |
| 617 | @(_WixLocalizationFile); | 612 | @(_WixLocalizationFile); |
| 618 | @(WixObject); | ||
| 619 | @(_WixReferencedProjectOutputs); | 613 | @(_WixReferencedProjectOutputs); |
| 620 | @(_ResolvedWixLibraryPaths); | 614 | @(_ResolvedWixLibraryPaths); |
| 621 | @(_ResolvedWixExtensionPaths); | 615 | @(_ResolvedWixExtensionPaths); |
| 622 | @(_BindInputs)" | 616 | @(_BindInputs)" |
| 623 | Outputs="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile);@(_BindBuiltOutputs)" | 617 | Outputs="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension);@(_BindBuiltOutputs)" |
| 624 | DependsOnTargets="$(CoreCompileDependsOn)" | 618 | DependsOnTargets="$(CoreCompileDependsOn)" |
| 625 | Condition=" '@(Compile)' != '' "> | 619 | Condition=" '@(Compile)' != '' "> |
| 626 | 620 | ||
| 627 | <PropertyGroup> | 621 | <PropertyGroup> |
| 628 | <OutputFile>$([System.IO.Path]::GetFullPath($(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetFileName)))</OutputFile> | 622 | <CabinetCachePath Condition=" '$(CabinetCachePath)'=='' and '$(ReuseCabinetCache)'=='true' ">$(IntermediateOutputPath)cabcache\</CabinetCachePath> |
| 629 | <PdbOutputFile>$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetPdbFileName)</PdbOutputFile> | 623 | <_WixBuildCabinetCachePath Condition=" '$(CabinetCachePath)'!='' ">$([MSBuild]::NormalizeDirectory($(CabinetCachePath), %(CultureGroup.OutputFolder)))</_WixBuildCabinetCachePath> |
| 630 | </PropertyGroup> | 624 | </PropertyGroup> |
| 631 | 625 | ||
| 632 | <WixBuild | 626 | <WixBuild |
| @@ -641,9 +635,9 @@ | |||
| 641 | 635 | ||
| 642 | IntermediateDirectory="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)" | 636 | IntermediateDirectory="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)" |
| 643 | 637 | ||
| 644 | OutputFile="$(OutputFile)" | 638 | OutputFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetFileName)" |
| 645 | OutputType="$(OutputType)" | 639 | OutputType="$(OutputType)" |
| 646 | PdbFile="$(PdbOutputFile)" | 640 | PdbFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetPdbFileName)" |
| 647 | PdbType="$(WixPdbType)" | 641 | PdbType="$(WixPdbType)" |
| 648 | 642 | ||
| 649 | AdditionalOptions="$(CompilerAdditionalOptions) $(LinkerAdditionalOptions)" | 643 | AdditionalOptions="$(CompilerAdditionalOptions) $(LinkerAdditionalOptions)" |
| @@ -659,11 +653,9 @@ | |||
| 659 | 653 | ||
| 660 | BindInputPaths="@(LinkerBindInputPaths)" | 654 | BindInputPaths="@(LinkerBindInputPaths)" |
| 661 | BindFiles="$(LinkerBindFiles)" | 655 | BindFiles="$(LinkerBindFiles)" |
| 662 | BindContentsFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)" | 656 | BindTrackingFile="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)" |
| 663 | BindOutputsFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)" | ||
| 664 | BindBuiltOutputsFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)" | ||
| 665 | 657 | ||
| 666 | CabinetCachePath="$(CabinetCachePath)" | 658 | CabinetCachePath="$(_WixBuildCabinetCachePath)" |
| 667 | CabinetCreationThreadCount="$(CabinetCreationThreadCount)" | 659 | CabinetCreationThreadCount="$(CabinetCreationThreadCount)" |
| 668 | DefaultCompressionLevel="$(DefaultCompressionLevel)" | 660 | DefaultCompressionLevel="$(DefaultCompressionLevel)" |
| 669 | 661 | ||
| @@ -754,16 +746,10 @@ | |||
| 754 | <Target | 746 | <Target |
| 755 | Name="ReadPreviousBindInputsAndBuiltOutputs"> | 747 | Name="ReadPreviousBindInputsAndBuiltOutputs"> |
| 756 | 748 | ||
| 757 | <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)"> | 749 | <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)"> |
| 758 | <Output TaskParameter="Lines" ItemName="_BindInputs" /> | 750 | <Output TaskParameter="Inputs" ItemName="_BindInputs" /> |
| 759 | </ReadLinesFromFile> | 751 | <Output TaskParameter="BuiltOutputs" ItemName="_BindBuiltOutputs" /> |
| 760 | 752 | </ReadTracking> | |
| 761 | <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)"> | ||
| 762 | <Output TaskParameter="Lines" ItemName="_BindBuiltOutputs" /> | ||
| 763 | </ReadLinesFromFile> | ||
| 764 | |||
| 765 | <Message Importance="low" Text="Previous bind inputs: @(_BindInputs)" /> | ||
| 766 | <Message Importance="low" Text="Previous bind outputs: @(_BindBuiltOutputs)" /> | ||
| 767 | </Target> | 753 | </Target> |
| 768 | 754 | ||
| 769 | <!-- | 755 | <!-- |
| @@ -789,17 +775,13 @@ | |||
| 789 | Name="UpdateFileWritesWithBindInformation" | 775 | Name="UpdateFileWritesWithBindInformation" |
| 790 | AfterTargets="CoreCompile"> | 776 | AfterTargets="CoreCompile"> |
| 791 | 777 | ||
| 792 | <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)"> | 778 | <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)"> |
| 793 | <Output TaskParameter="Lines" ItemName="FileWrites"/> | 779 | <Output TaskParameter="Outputs" ItemName="FileWrites" /> |
| 794 | </ReadLinesFromFile> | 780 | </ReadTracking> |
| 795 | 781 | ||
| 796 | <ItemGroup> | 782 | <ItemGroup> |
| 797 | <FileWrites Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)" Condition=" Exists('$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)') " /> | 783 | <FileWrites Include="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)" Condition=" Exists('$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)') " /> |
| 798 | <FileWrites Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)" Condition=" Exists('$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)') " /> | ||
| 799 | <FileWrites Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)" Condition=" Exists('$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)') " /> | ||
| 800 | </ItemGroup> | 784 | </ItemGroup> |
| 801 | |||
| 802 | <Message Importance="low" Text="Build files after link: @(FileWrites)" /> | ||
| 803 | </Target> | 785 | </Target> |
| 804 | 786 | ||
| 805 | <!-- | 787 | <!-- |
| @@ -862,10 +844,10 @@ | |||
| 862 | 844 | ||
| 863 | <!-- Don't add BuiltProjectOutputGroupKeyOutput - to avoid duplicates, we only want to get the updated list of TargetPaths from the TargetPath property below --> | 845 | <!-- Don't add BuiltProjectOutputGroupKeyOutput - to avoid duplicates, we only want to get the updated list of TargetPaths from the TargetPath property below --> |
| 864 | 846 | ||
| 865 | <!-- Try to read the outputs from the bind outputs text file since that's the output list straight from compiler. --> | 847 | <!-- Try to read the outputs from the bind tracking text file since that's the output list straight from compiler. --> |
| 866 | <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)"> | 848 | <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)"> |
| 867 | <Output TaskParameter="Lines" ItemName="_BuiltProjectOutputGroupOutputIntermediate"/> | 849 | <Output TaskParameter="Outputs" ItemName="_BuiltProjectOutputGroupOutputIntermediate" /> |
| 868 | </ReadLinesFromFile> | 850 | </ReadTracking> |
| 869 | 851 | ||
| 870 | <!-- If we didn't get anything from the bind outputs text file, default to the target path. --> | 852 | <!-- If we didn't get anything from the bind outputs text file, default to the target path. --> |
| 871 | <ItemGroup Condition=" '@(_BuiltProjectOutputGroupOutputIntermediate)'=='' "> | 853 | <ItemGroup Condition=" '@(_BuiltProjectOutputGroupOutputIntermediate)'=='' "> |
| @@ -930,17 +912,17 @@ | |||
| 930 | <PropertyGroup> | 912 | <PropertyGroup> |
| 931 | <CopyBuildOutputToOutputDirectory Condition="'$(CopyBuildOutputToOutputDirectory)'==''">true</CopyBuildOutputToOutputDirectory> | 913 | <CopyBuildOutputToOutputDirectory Condition="'$(CopyBuildOutputToOutputDirectory)'==''">true</CopyBuildOutputToOutputDirectory> |
| 932 | <CopyOutputSymbolsToOutputDirectory Condition="'$(CopyOutputSymbolsToOutputDirectory)'==''">true</CopyOutputSymbolsToOutputDirectory> | 914 | <CopyOutputSymbolsToOutputDirectory Condition="'$(CopyOutputSymbolsToOutputDirectory)'==''">true</CopyOutputSymbolsToOutputDirectory> |
| 933 | <FullIntermediateOutputPath>$([System.IO.Path]::GetFullPath($(IntermediateOutputPath)))</FullIntermediateOutputPath> | 915 | <FullIntermediateOutputPath>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath)))</FullIntermediateOutputPath> |
| 934 | </PropertyGroup> | 916 | </PropertyGroup> |
| 935 | 917 | ||
| 936 | <!-- Copy the bound files. --> | 918 | <!-- Copy the bound output files. --> |
| 937 | <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)"> | 919 | <ReadTracking File="$(IntermediateOutputPath)$(BindTrackingFilePrefix)%(CultureGroup.Identity)$(BindTrackingFileExtension)"> |
| 938 | <Output TaskParameter="Lines" ItemName="_FullPathToCopy"/> | 920 | <Output TaskParameter="Outputs" ItemName="_FullPathToCopy" /> |
| 939 | </ReadLinesFromFile> | 921 | </ReadTracking> |
| 940 | 922 | ||
| 941 | <ItemGroup> | 923 | <ItemGroup> |
| 942 | <_FullPathToCopy Include="$(OutputFile)" Condition=" '@(_FullPathToCopy)'=='' " /> | 924 | <_FullPathToCopy Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetFileName)" Condition=" '@(_FullPathToCopy)'=='' " /> |
| 943 | <_RelativePath Include="$([MSBuild]::MakeRelative($(FullIntermediateOutputPath), %(_FullPathToCopy.Identity)))" /> | 925 | <_RelativePath Include="$([MSBuild]::MakeRelative($(FullIntermediateOutputPath), %(_FullPathToCopy.FullPath)))" /> |
| 944 | </ItemGroup> | 926 | </ItemGroup> |
| 945 | 927 | ||
| 946 | <Copy | 928 | <Copy |
diff --git a/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj b/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj index 8f40efee..6111a184 100644 --- a/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj +++ b/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj | |||
| @@ -19,8 +19,7 @@ | |||
| 19 | </ItemGroup> | 19 | </ItemGroup> |
| 20 | 20 | ||
| 21 | <ItemGroup> | 21 | <ItemGroup> |
| 22 | <!-- <PackageReference Include="WixBuildTools.TestSupport" /> --> | 22 | <PackageReference Include="WixBuildTools.TestSupport" /> |
| 23 | <ProjectReference Include="..\..\..\internal\WixBuildTools.TestSupport\WixBuildTools.TestSupport.csproj" /> | ||
| 24 | </ItemGroup> | 23 | </ItemGroup> |
| 25 | 24 | ||
| 26 | <ItemGroup> | 25 | <ItemGroup> |
