aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2019-10-07 11:18:13 -0700
committerRob Mensching <rob@firegiant.com>2019-10-07 11:59:14 -0700
commit860676fa5b40a1904478151e9b4934c004e7db63 (patch)
tree83fabd53f2a68dcf56bc8da66d88e115af3764b0 /src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
parent3b98dac62b47d590f3465985362d6e6fd100b1c0 (diff)
downloadwix-860676fa5b40a1904478151e9b4934c004e7db63.tar.gz
wix-860676fa5b40a1904478151e9b4934c004e7db63.tar.bz2
wix-860676fa5b40a1904478151e9b4934c004e7db63.zip
Implement Bundle build
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
index 61e82f68..64fb3e4d 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/ProcessUncompressedFilesCommand.cs
@@ -18,16 +18,19 @@ namespace WixToolset.Core.WindowsInstaller.Bind
18 /// </summary> 18 /// </summary>
19 internal class ProcessUncompressedFilesCommand 19 internal class ProcessUncompressedFilesCommand
20 { 20 {
21 public ProcessUncompressedFilesCommand(IntermediateSection section, IBackendHelper backendHelper) 21 public ProcessUncompressedFilesCommand(IntermediateSection section, IBackendHelper backendHelper, IPathResolver pathResolver)
22 { 22 {
23 this.Section = section; 23 this.Section = section;
24 this.BackendHelper = backendHelper; 24 this.BackendHelper = backendHelper;
25 this.PathResolver = pathResolver;
25 } 26 }
26 27
27 private IntermediateSection Section { get; } 28 private IntermediateSection Section { get; }
28 29
29 public IBackendHelper BackendHelper { get; } 30 public IBackendHelper BackendHelper { get; }
30 31
32 public IPathResolver PathResolver { get; }
33
31 public string DatabasePath { private get; set; } 34 public string DatabasePath { private get; set; }
32 35
33 public IEnumerable<FileFacade> FileFacades { private get; set; } 36 public IEnumerable<FileFacade> FileFacades { private get; set; }
@@ -50,7 +53,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
50 53
51 var trackedFiles = new List<ITrackedFile>(); 54 var trackedFiles = new List<ITrackedFile>();
52 55
53 var directories = new Dictionary<string, ResolvedDirectory>(); 56 var directories = new Dictionary<string, IResolvedDirectory>();
54 57
55 var mediaRows = this.Section.Tuples.OfType<MediaTuple>().ToDictionary(t => t.DiskId); 58 var mediaRows = this.Section.Tuples.OfType<MediaTuple>().ToDictionary(t => t.DiskId);
56 59
@@ -69,7 +72,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
69 72
70 string sourceName = Common.GetName(directoryRecord.GetString(3), true, this.LongNamesInImage); 73 string sourceName = Common.GetName(directoryRecord.GetString(3), true, this.LongNamesInImage);
71 74
72 directories.Add(directoryRecord.GetString(1), new ResolvedDirectory(directoryRecord.GetString(2), sourceName)); 75 var resolvedDirectory = this.BackendHelper.CreateResolvedDirectory(directoryRecord.GetString(2), sourceName);
76
77 directories.Add(directoryRecord.GetString(1), resolvedDirectory);
73 } 78 }
74 } 79 }
75 } 80 }
@@ -99,7 +104,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
99 throw new WixException(ErrorMessages.FileIdentifierNotFound(facade.File.SourceLineNumbers, facade.File.Id.Id)); 104 throw new WixException(ErrorMessages.FileIdentifierNotFound(facade.File.SourceLineNumbers, facade.File.Id.Id));
100 } 105 }
101 106
102 relativeFileLayoutPath = PathResolver.GetFileSourcePath(directories, fileRecord[1], fileRecord[2], this.Compressed, this.LongNamesInImage); 107 relativeFileLayoutPath = this.PathResolver.GetFileSourcePath(directories, fileRecord[1], fileRecord[2], this.Compressed, this.LongNamesInImage);
103 } 108 }
104 109
105 // finally put together the base media layout path and the relative file layout path 110 // finally put together the base media layout path and the relative file layout path