diff options
Diffstat (limited to 'src/test/burn/WixToolset.WixBA/UpdateViewModel.cs')
-rw-r--r-- | src/test/burn/WixToolset.WixBA/UpdateViewModel.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/burn/WixToolset.WixBA/UpdateViewModel.cs b/src/test/burn/WixToolset.WixBA/UpdateViewModel.cs index dc98c858..2bb92d51 100644 --- a/src/test/burn/WixToolset.WixBA/UpdateViewModel.cs +++ b/src/test/burn/WixToolset.WixBA/UpdateViewModel.cs | |||
@@ -164,7 +164,7 @@ namespace WixToolset.WixBA | |||
164 | e.Skip = false; | 164 | e.Skip = false; |
165 | } | 165 | } |
166 | } | 166 | } |
167 | 167 | ||
168 | private void DetectUpdate(object sender, DetectUpdateEventArgs e) | 168 | private void DetectUpdate(object sender, DetectUpdateEventArgs e) |
169 | { | 169 | { |
170 | // The list of updates is sorted in descending version, so the first callback should be the largest update available. | 170 | // The list of updates is sorted in descending version, so the first callback should be the largest update available. |
@@ -174,7 +174,15 @@ namespace WixToolset.WixBA | |||
174 | WixBA.Model.Engine.Log(LogLevel.Verbose, String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, WixBA.Model.Version)); | 174 | WixBA.Model.Engine.Log(LogLevel.Verbose, String.Format("Potential update v{0} from '{1}'; current version: v{2}", e.Version, e.UpdateLocation, WixBA.Model.Version)); |
175 | if (WixBA.Model.Engine.CompareVersions(e.Version, WixBA.Model.Version) > 0) | 175 | if (WixBA.Model.Engine.CompareVersions(e.Version, WixBA.Model.Version) > 0) |
176 | { | 176 | { |
177 | WixBA.Model.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null); | 177 | var updatePackageId = Guid.NewGuid().ToString("N"); |
178 | |||
179 | WixBA.Model.Engine.SetUpdate(null, e.UpdateLocation, e.Size, UpdateHashType.None, null, updatePackageId); | ||
180 | |||
181 | if (!WixBA.Model.BAManifest.Bundle.Packages.ContainsKey(updatePackageId)) | ||
182 | { | ||
183 | WixBA.Model.BAManifest.Bundle.AddUpdateBundleAsPackage(updatePackageId); | ||
184 | } | ||
185 | |||
178 | this.UpdateVersion = String.Concat("v", e.Version.ToString()); | 186 | this.UpdateVersion = String.Concat("v", e.Version.ToString()); |
179 | string changesFormat = @"<body style='overflow: auto;'>{0}</body>"; | 187 | string changesFormat = @"<body style='overflow: auto;'>{0}</body>"; |
180 | this.UpdateChanges = String.Format(changesFormat, e.Content); | 188 | this.UpdateChanges = String.Format(changesFormat, e.Content); |