aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/CreateDeltaPatchesCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/CreateDeltaPatchesCommand.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/CreateDeltaPatchesCommand.cs44
1 files changed, 18 insertions, 26 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateDeltaPatchesCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateDeltaPatchesCommand.cs
index 42a69310..7c7b07cc 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateDeltaPatchesCommand.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateDeltaPatchesCommand.cs
@@ -1,6 +1,6 @@
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. 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 2
3namespace WixToolset.Core.WindowsInstaller.Databases 3namespace WixToolset.Core.WindowsInstaller.Bind
4{ 4{
5 using System; 5 using System;
6 using System.Collections.Generic; 6 using System.Collections.Generic;
@@ -9,49 +9,40 @@ namespace WixToolset.Core.WindowsInstaller.Databases
9 using WixToolset.Core.Bind; 9 using WixToolset.Core.Bind;
10 using WixToolset.Data; 10 using WixToolset.Data;
11 using WixToolset.Data.Rows; 11 using WixToolset.Data.Rows;
12 using WixToolset.Data.Tuples;
12 13
13 /// <summary> 14 /// <summary>
14 /// Creates delta patches and updates the appropriate rows to point to the newly generated patches. 15 /// Creates delta patches and updates the appropriate rows to point to the newly generated patches.
15 /// </summary> 16 /// </summary>
16 internal class CreateDeltaPatchesCommand 17 internal class CreateDeltaPatchesCommand
17 { 18 {
18 public IEnumerable<FileFacade> FileFacades { private get; set; } 19 public CreateDeltaPatchesCommand(List<FileFacade> fileFacades, string intermediateFolder, WixPatchIdTuple wixPatchId)
20 {
21 this.FileFacades = fileFacades;
22 this.IntermediateFolder = intermediateFolder;
23 this.WixPatchId = wixPatchId;
24 }
19 25
20 public Table WixPatchIdTable { private get; set; } 26 private IEnumerable<FileFacade> FileFacades { get; }
21 27
22 public string TempFilesLocation { private get; set; } 28 private WixPatchIdTuple WixPatchId { get; }
29
30 private string IntermediateFolder { get; }
23 31
24 public void Execute() 32 public void Execute()
25 { 33 {
26#if REVISIT_FOR_PATCHING 34 var optimizePatchSizeForLargeFiles = this.WixPatchId?.OptimizePatchSizeForLargeFiles ?? false;
27 bool optimizePatchSizeForLargeFiles = false; 35 var apiPatchingSymbolFlags = (PatchSymbolFlagsType)(this.WixPatchId?.ApiPatchingSymbolFlags ?? 0);
28 PatchSymbolFlagsType apiPatchingSymbolFlags = 0;
29
30 if (null != this.WixPatchIdTable)
31 {
32 Row row = this.WixPatchIdTable.Rows[0];
33 if (null != row)
34 {
35 if (null != row[2])
36 {
37 optimizePatchSizeForLargeFiles = (1 == Convert.ToUInt32(row[2], CultureInfo.InvariantCulture));
38 }
39
40 if (null != row[3])
41 {
42 apiPatchingSymbolFlags = (PatchSymbolFlagsType)Convert.ToUInt32(row[3], CultureInfo.InvariantCulture);
43 }
44 }
45 }
46 36
37#if REVISIT_FOR_PATCHING
47 foreach (FileFacade facade in this.FileFacades) 38 foreach (FileFacade facade in this.FileFacades)
48 { 39 {
49 if (RowOperation.Modify == facade.File.Operation && 40 if (RowOperation.Modify == facade.File.Operation &&
50 0 != (facade.WixFile.PatchAttributes & PatchAttributeType.IncludeWholeFile)) 41 0 != (facade.WixFile.PatchAttributes & PatchAttributeType.IncludeWholeFile))
51 { 42 {
52 string deltaBase = String.Concat("delta_", facade.File.File); 43 string deltaBase = String.Concat("delta_", facade.File.File);
53 string deltaFile = Path.Combine(this.TempFilesLocation, String.Concat(deltaBase, ".dpf")); 44 string deltaFile = Path.Combine(this.IntermediateFolder, String.Concat(deltaBase, ".dpf"));
54 string headerFile = Path.Combine(this.TempFilesLocation, String.Concat(deltaBase, ".phd")); 45 string headerFile = Path.Combine(this.IntermediateFolder, String.Concat(deltaBase, ".phd"));
55 46
56 bool retainRangeWarning = false; 47 bool retainRangeWarning = false;
57 48
@@ -84,6 +75,7 @@ namespace WixToolset.Core.WindowsInstaller.Databases
84 } 75 }
85 } 76 }
86#endif 77#endif
78
87 throw new NotImplementedException(); 79 throw new NotImplementedException();
88 } 80 }
89 } 81 }