diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-04-19 17:32:32 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-04-19 23:23:39 -0500 |
| commit | 62b32cd6f21292c73dae8d5cfcd3a1cb13a1fd7d (patch) | |
| tree | 428818dcb1ab7f1f79b236db7c67e82a6ea0774d /src | |
| parent | 1a898496aae8189efb966abd9445e6200fdea0b7 (diff) | |
| download | wix-62b32cd6f21292c73dae8d5cfcd3a1cb13a1fd7d.tar.gz wix-62b32cd6f21292c73dae8d5cfcd3a1cb13a1fd7d.tar.bz2 wix-62b32cd6f21292c73dae8d5cfcd3a1cb13a1fd7d.zip | |
Replace OnResolveSource with OnCacheAcquireResolving.
Update balretry to have a separate type for container vs payload.
#3640
Diffstat (limited to 'src')
22 files changed, 444 insertions, 291 deletions
diff --git a/src/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/WixToolset.Mba.Core/BootstrapperApplication.cs index b6c0dd0d..79cbfa86 100644 --- a/src/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
| @@ -146,7 +146,7 @@ namespace WixToolset.Mba.Core | |||
| 146 | public event EventHandler<CacheAcquireProgressEventArgs> CacheAcquireProgress; | 146 | public event EventHandler<CacheAcquireProgressEventArgs> CacheAcquireProgress; |
| 147 | 147 | ||
| 148 | /// <inheritdoc/> | 148 | /// <inheritdoc/> |
| 149 | public event EventHandler<ResolveSourceEventArgs> ResolveSource; | 149 | public event EventHandler<CacheAcquireResolvingEventArgs> CacheAcquireResolving; |
| 150 | 150 | ||
| 151 | /// <inheritdoc/> | 151 | /// <inheritdoc/> |
| 152 | public event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete; | 152 | public event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete; |
| @@ -736,12 +736,12 @@ namespace WixToolset.Mba.Core | |||
| 736 | } | 736 | } |
| 737 | 737 | ||
| 738 | /// <summary> | 738 | /// <summary> |
| 739 | /// Called by the engine, raises the <see cref="ResolveSource"/> event. | 739 | /// Called by the engine, raises the <see cref="CacheAcquireResolving"/> event. |
| 740 | /// </summary> | 740 | /// </summary> |
| 741 | /// <param name="args">Additional arguments for this event.</param> | 741 | /// <param name="args">Additional arguments for this event.</param> |
| 742 | protected virtual void OnResolveSource(ResolveSourceEventArgs args) | 742 | protected virtual void OnCacheAcquireResolving(CacheAcquireResolvingEventArgs args) |
| 743 | { | 743 | { |
| 744 | EventHandler<ResolveSourceEventArgs> handler = this.ResolveSource; | 744 | EventHandler<CacheAcquireResolvingEventArgs> handler = this.CacheAcquireResolving; |
| 745 | if (null != handler) | 745 | if (null != handler) |
| 746 | { | 746 | { |
| 747 | handler(this, args); | 747 | handler(this, args); |
| @@ -1126,9 +1126,9 @@ namespace WixToolset.Mba.Core | |||
| 1126 | return args.HResult; | 1126 | return args.HResult; |
| 1127 | } | 1127 | } |
| 1128 | 1128 | ||
| 1129 | int IBootstrapperApplication.OnDetectBegin(bool fInstalled, int cPackages, ref bool fCancel) | 1129 | int IBootstrapperApplication.OnDetectBegin(bool fCached, bool fInstalled, int cPackages, ref bool fCancel) |
| 1130 | { | 1130 | { |
| 1131 | DetectBeginEventArgs args = new DetectBeginEventArgs(fInstalled, cPackages, fCancel); | 1131 | DetectBeginEventArgs args = new DetectBeginEventArgs(fCached, fInstalled, cPackages, fCancel); |
| 1132 | this.OnDetectBegin(args); | 1132 | this.OnDetectBegin(args); |
| 1133 | 1133 | ||
| 1134 | fCancel = args.Cancel; | 1134 | fCancel = args.Cancel; |
| @@ -1400,11 +1400,12 @@ namespace WixToolset.Mba.Core | |||
| 1400 | return args.HResult; | 1400 | return args.HResult; |
| 1401 | } | 1401 | } |
| 1402 | 1402 | ||
| 1403 | int IBootstrapperApplication.OnCacheAcquireBegin(string wzPackageOrContainerId, string wzPayloadId, CacheOperation operation, string wzSource, ref bool fCancel) | 1403 | int IBootstrapperApplication.OnCacheAcquireBegin(string wzPackageOrContainerId, string wzPayloadId, string wzSource, string wzDownloadUrl, string wzPayloadContainerId, CacheOperation recommendation, ref CacheOperation action, ref bool fCancel) |
| 1404 | { | 1404 | { |
| 1405 | CacheAcquireBeginEventArgs args = new CacheAcquireBeginEventArgs(wzPackageOrContainerId, wzPayloadId, operation, wzSource, fCancel); | 1405 | CacheAcquireBeginEventArgs args = new CacheAcquireBeginEventArgs(wzPackageOrContainerId, wzPayloadId, wzSource, wzDownloadUrl, wzPayloadContainerId, recommendation, action, fCancel); |
| 1406 | this.OnCacheAcquireBegin(args); | 1406 | this.OnCacheAcquireBegin(args); |
| 1407 | 1407 | ||
| 1408 | action = args.Action; | ||
| 1408 | fCancel = args.Cancel; | 1409 | fCancel = args.Cancel; |
| 1409 | return args.HResult; | 1410 | return args.HResult; |
| 1410 | } | 1411 | } |
| @@ -1418,11 +1419,12 @@ namespace WixToolset.Mba.Core | |||
| 1418 | return args.HResult; | 1419 | return args.HResult; |
| 1419 | } | 1420 | } |
| 1420 | 1421 | ||
| 1421 | int IBootstrapperApplication.OnResolveSource(string wzPackageOrContainerId, string wzPayloadId, string wzLocalSource, string wzDownloadSource, BOOTSTRAPPER_RESOLVESOURCE_ACTION recommendation, ref BOOTSTRAPPER_RESOLVESOURCE_ACTION action, ref bool fCancel) | 1422 | int IBootstrapperApplication.OnCacheAcquireResolving(string wzPackageOrContainerId, string wzPayloadId, string[] searchPaths, int cSearchPaths, bool fFoundLocal, int dwRecommendedSearchPath, string wzDownloadUrl, string wzPayloadContainerId, CacheResolveOperation recommendation, ref int dwChosenSearchPath, ref CacheResolveOperation action, ref bool fCancel) |
| 1422 | { | 1423 | { |
| 1423 | ResolveSourceEventArgs args = new ResolveSourceEventArgs(wzPackageOrContainerId, wzPayloadId, wzLocalSource, wzDownloadSource, action, recommendation, fCancel); | 1424 | CacheAcquireResolvingEventArgs args = new CacheAcquireResolvingEventArgs(wzPackageOrContainerId, wzPayloadId, searchPaths, fFoundLocal, dwRecommendedSearchPath, wzDownloadUrl, wzPayloadContainerId, recommendation, dwChosenSearchPath, action, fCancel); |
| 1424 | this.OnResolveSource(args); | 1425 | this.OnCacheAcquireResolving(args); |
| 1425 | 1426 | ||
| 1427 | dwChosenSearchPath = args.ChosenSearchPath; | ||
| 1426 | action = args.Action; | 1428 | action = args.Action; |
| 1427 | fCancel = args.Cancel; | 1429 | fCancel = args.Cancel; |
| 1428 | return args.HResult; | 1430 | return args.HResult; |
diff --git a/src/WixToolset.Mba.Core/EventArgs.cs b/src/WixToolset.Mba.Core/EventArgs.cs index 7e7cbd11..ee89b583 100644 --- a/src/WixToolset.Mba.Core/EventArgs.cs +++ b/src/WixToolset.Mba.Core/EventArgs.cs | |||
| @@ -123,6 +123,31 @@ namespace WixToolset.Mba.Core | |||
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | /// <summary> | 125 | /// <summary> |
| 126 | /// Base class for cancellable action BA <see cref="EventArgs"/> classes. | ||
| 127 | /// </summary> | ||
| 128 | [Serializable] | ||
| 129 | public abstract class CancellableActionEventArgs<T> : CancellableHResultEventArgs | ||
| 130 | { | ||
| 131 | /// <summary /> | ||
| 132 | public CancellableActionEventArgs(bool cancelRecommendation, T recommendation, T action) | ||
| 133 | : base(cancelRecommendation) | ||
| 134 | { | ||
| 135 | this.Recommendation = recommendation; | ||
| 136 | this.Action = action; | ||
| 137 | } | ||
| 138 | |||
| 139 | /// <summary> | ||
| 140 | /// Gets the recommended action from the engine. | ||
| 141 | /// </summary> | ||
| 142 | public T Recommendation { get; private set; } | ||
| 143 | |||
| 144 | /// <summary> | ||
| 145 | /// Gets or sets the action to be performed. This is passed back to the engine. | ||
| 146 | /// </summary> | ||
| 147 | public T Action { get; set; } | ||
| 148 | } | ||
| 149 | |||
| 150 | /// <summary> | ||
| 126 | /// Additional arguments used when startup has begun. | 151 | /// Additional arguments used when startup has begun. |
| 127 | /// </summary> | 152 | /// </summary> |
| 128 | [Serializable] | 153 | [Serializable] |
| @@ -196,25 +221,26 @@ namespace WixToolset.Mba.Core | |||
| 196 | } | 221 | } |
| 197 | 222 | ||
| 198 | /// <summary> | 223 | /// <summary> |
| 199 | /// Additional arguments used when the overall detection phase has begun. | 224 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectBegin"/> |
| 200 | /// </summary> | 225 | /// </summary> |
| 201 | [Serializable] | 226 | [Serializable] |
| 202 | public class DetectBeginEventArgs : CancellableHResultEventArgs | 227 | public class DetectBeginEventArgs : CancellableHResultEventArgs |
| 203 | { | 228 | { |
| 204 | /// <summary> | 229 | /// <summary /> |
| 205 | /// Creates a new instance of the <see cref="DetectBeginEventArgs"/> class. | 230 | public DetectBeginEventArgs(bool cached, bool installed, int packageCount, bool cancelRecommendation) |
| 206 | /// </summary> | ||
| 207 | /// <param name="installed">Specifies whether the bundle is installed.</param> | ||
| 208 | /// <param name="packageCount">The number of packages to detect.</param> | ||
| 209 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 210 | public DetectBeginEventArgs(bool installed, int packageCount, bool cancelRecommendation) | ||
| 211 | : base(cancelRecommendation) | 231 | : base(cancelRecommendation) |
| 212 | { | 232 | { |
| 233 | this.Cached = cached; | ||
| 213 | this.Installed = installed; | 234 | this.Installed = installed; |
| 214 | this.PackageCount = packageCount; | 235 | this.PackageCount = packageCount; |
| 215 | } | 236 | } |
| 216 | 237 | ||
| 217 | /// <summary> | 238 | /// <summary> |
| 239 | /// Gets whether the bundle is cached. | ||
| 240 | /// </summary> | ||
| 241 | public bool Cached { get; private set; } | ||
| 242 | |||
| 243 | /// <summary> | ||
| 218 | /// Gets whether the bundle is installed. | 244 | /// Gets whether the bundle is installed. |
| 219 | /// </summary> | 245 | /// </summary> |
| 220 | public bool Installed { get; private set; } | 246 | public bool Installed { get; private set; } |
| @@ -290,6 +316,7 @@ namespace WixToolset.Mba.Core | |||
| 290 | : base(cancelRecommendation) | 316 | : base(cancelRecommendation) |
| 291 | { | 317 | { |
| 292 | this.UpdateLocation = updateLocation; | 318 | this.UpdateLocation = updateLocation; |
| 319 | this.Skip = skipRecommendation; | ||
| 293 | } | 320 | } |
| 294 | 321 | ||
| 295 | /// <summary> | 322 | /// <summary> |
| @@ -1242,6 +1269,8 @@ namespace WixToolset.Mba.Core | |||
| 1242 | /// <param name="forceKeepRegistration"></param> | 1269 | /// <param name="forceKeepRegistration"></param> |
| 1243 | public UnregisterBeginEventArgs(bool keepRegistration, bool forceKeepRegistration) | 1270 | public UnregisterBeginEventArgs(bool keepRegistration, bool forceKeepRegistration) |
| 1244 | { | 1271 | { |
| 1272 | this.KeepRegistration = keepRegistration; | ||
| 1273 | this.ForceKeepRegistration = forceKeepRegistration; | ||
| 1245 | } | 1274 | } |
| 1246 | 1275 | ||
| 1247 | /// <summary> | 1276 | /// <summary> |
| @@ -1288,21 +1317,20 @@ namespace WixToolset.Mba.Core | |||
| 1288 | } | 1317 | } |
| 1289 | 1318 | ||
| 1290 | /// <summary> | 1319 | /// <summary> |
| 1291 | /// Additional arguments used when the engine begins to acquire containers or payloads. | 1320 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheAcquireBegin"/>. |
| 1292 | /// </summary> | 1321 | /// </summary> |
| 1293 | [Serializable] | 1322 | [Serializable] |
| 1294 | public class CacheAcquireBeginEventArgs : CancellableHResultEventArgs | 1323 | public class CacheAcquireBeginEventArgs : CancellableActionEventArgs<CacheOperation> |
| 1295 | { | 1324 | { |
| 1296 | /// <summary> | 1325 | /// <summary /> |
| 1297 | /// Creates a new instance of the <see cref="CacheAcquireBeginEventArgs"/> class. | 1326 | public CacheAcquireBeginEventArgs(string packageOrContainerId, string payloadId, string source, string downloadUrl, string payloadContainerId, CacheOperation recommendation, CacheOperation action, bool cancelRecommendation) |
| 1298 | /// </summary> | 1327 | : base(cancelRecommendation, recommendation, action) |
| 1299 | public CacheAcquireBeginEventArgs(string packageOrContainerId, string payloadId, CacheOperation operation, string source, bool cancelRecommendation) | ||
| 1300 | : base(cancelRecommendation) | ||
| 1301 | { | 1328 | { |
| 1302 | this.PackageOrContainerId = packageOrContainerId; | 1329 | this.PackageOrContainerId = packageOrContainerId; |
| 1303 | this.PayloadId = payloadId; | 1330 | this.PayloadId = payloadId; |
| 1304 | this.Operation = operation; | ||
| 1305 | this.Source = source; | 1331 | this.Source = source; |
| 1332 | this.DownloadUrl = downloadUrl; | ||
| 1333 | this.PayloadContainerId = payloadContainerId; | ||
| 1306 | } | 1334 | } |
| 1307 | 1335 | ||
| 1308 | /// <summary> | 1336 | /// <summary> |
| @@ -1316,25 +1344,28 @@ namespace WixToolset.Mba.Core | |||
| 1316 | public string PayloadId { get; private set; } | 1344 | public string PayloadId { get; private set; } |
| 1317 | 1345 | ||
| 1318 | /// <summary> | 1346 | /// <summary> |
| 1319 | /// Gets the cache acquire operation. | 1347 | /// Gets the source of the container or payload. |
| 1320 | /// </summary> | 1348 | /// </summary> |
| 1321 | public CacheOperation Operation { get; private set; } | 1349 | public string Source { get; private set; } |
| 1322 | 1350 | ||
| 1323 | /// <summary> | 1351 | /// <summary> |
| 1324 | /// Gets the source of the container or payload. | 1352 | /// Gets the optional URL to download container or payload. |
| 1325 | /// </summary> | 1353 | /// </summary> |
| 1326 | public string Source { get; private set; } | 1354 | public string DownloadUrl { get; private set; } |
| 1355 | |||
| 1356 | /// <summary> | ||
| 1357 | /// Gets the optional identity of the container that contains the payload being acquired. | ||
| 1358 | /// </summary> | ||
| 1359 | public string PayloadContainerId { get; private set; } | ||
| 1327 | } | 1360 | } |
| 1328 | 1361 | ||
| 1329 | /// <summary> | 1362 | /// <summary> |
| 1330 | /// Additional arguments used when the engine acquires some part of a container or payload. | 1363 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheAcquireProgress"/>. |
| 1331 | /// </summary> | 1364 | /// </summary> |
| 1332 | [Serializable] | 1365 | [Serializable] |
| 1333 | public class CacheAcquireProgressEventArgs : CancellableHResultEventArgs | 1366 | public class CacheAcquireProgressEventArgs : CancellableHResultEventArgs |
| 1334 | { | 1367 | { |
| 1335 | /// <summary> | 1368 | /// <summary /> |
| 1336 | /// Creates a new instance of the <see cref="CacheAcquireBeginEventArgs"/> class. | ||
| 1337 | /// </summary> | ||
| 1338 | public CacheAcquireProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) | 1369 | public CacheAcquireProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) |
| 1339 | : base(cancelRecommendation) | 1370 | : base(cancelRecommendation) |
| 1340 | { | 1371 | { |
| @@ -1372,14 +1403,12 @@ namespace WixToolset.Mba.Core | |||
| 1372 | } | 1403 | } |
| 1373 | 1404 | ||
| 1374 | /// <summary> | 1405 | /// <summary> |
| 1375 | /// Additional arguments used when the engine completes the acquisition of a container or payload. | 1406 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheAcquireComplete"/>. |
| 1376 | /// </summary> | 1407 | /// </summary> |
| 1377 | [Serializable] | 1408 | [Serializable] |
| 1378 | public class CacheAcquireCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION> | 1409 | public class CacheAcquireCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION> |
| 1379 | { | 1410 | { |
| 1380 | /// <summary> | 1411 | /// <summary /> |
| 1381 | /// Creates a new instance of the <see cref="CacheAcquireCompleteEventArgs"/> class. | ||
| 1382 | /// </summary> | ||
| 1383 | public CacheAcquireCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action) | 1412 | public CacheAcquireCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action) |
| 1384 | : base(hrStatus, recommendation, action) | 1413 | : base(hrStatus, recommendation, action) |
| 1385 | { | 1414 | { |
| @@ -1729,62 +1758,64 @@ namespace WixToolset.Mba.Core | |||
| 1729 | } | 1758 | } |
| 1730 | 1759 | ||
| 1731 | /// <summary> | 1760 | /// <summary> |
| 1732 | /// Additional arguments used by the engine to allow the BA to change the source | 1761 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheAcquireResolving"/>. |
| 1733 | /// using <see cref="Engine.SetLocalSource"/> or <see cref="Engine.SetDownloadSource"/>. | ||
| 1734 | /// </summary> | 1762 | /// </summary> |
| 1735 | [Serializable] | 1763 | [Serializable] |
| 1736 | public class ResolveSourceEventArgs : CancellableHResultEventArgs | 1764 | public class CacheAcquireResolvingEventArgs : CancellableActionEventArgs<CacheResolveOperation> |
| 1737 | { | 1765 | { |
| 1738 | /// <summary> | 1766 | /// <summary /> |
| 1739 | /// Creates a new instance of the <see cref="ResolveSourceEventArgs"/> class. | 1767 | public CacheAcquireResolvingEventArgs(string packageOrContainerId, string payloadId, string[] searchPaths, bool foundLocal, int recommendedSearchPath, string downloadUrl, string payloadContainerId, CacheResolveOperation recommendation, int chosenSearchPath, CacheResolveOperation action, bool cancel) |
| 1740 | /// </summary> | 1768 | : base(cancel, recommendation, action) |
| 1741 | /// <param name="packageOrContainerId">The identity of the package or container that requires source.</param> | ||
| 1742 | /// <param name="payloadId">The identity of the payload that requires source.</param> | ||
| 1743 | /// <param name="localSource">The current path used for source resolution.</param> | ||
| 1744 | /// <param name="downloadSource">Optional URL to download container or payload.</param> | ||
| 1745 | /// <param name="recommendation">The recommended action from the engine.</param> | ||
| 1746 | /// <param name="action">The action to perform.</param> | ||
| 1747 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1748 | public ResolveSourceEventArgs(string packageOrContainerId, string payloadId, string localSource, string downloadSource, BOOTSTRAPPER_RESOLVESOURCE_ACTION recommendation, BOOTSTRAPPER_RESOLVESOURCE_ACTION action, bool cancelRecommendation) | ||
| 1749 | : base(cancelRecommendation) | ||
| 1750 | { | 1769 | { |
| 1751 | this.PackageOrContainerId = packageOrContainerId; | 1770 | this.PackageOrContainerId = packageOrContainerId; |
| 1752 | this.PayloadId = payloadId; | 1771 | this.PayloadId = payloadId; |
| 1753 | this.LocalSource = localSource; | 1772 | this.SearchPaths = searchPaths; |
| 1754 | this.DownloadSource = downloadSource; | 1773 | this.FoundLocal = foundLocal; |
| 1755 | this.Recommendation = recommendation; | 1774 | this.RecommendedSearchPath = recommendedSearchPath; |
| 1756 | this.Action = action; | 1775 | this.DownloadUrl = downloadUrl; |
| 1776 | this.PayloadContainerId = payloadContainerId; | ||
| 1777 | this.ChosenSearchPath = chosenSearchPath; | ||
| 1757 | } | 1778 | } |
| 1758 | 1779 | ||
| 1759 | /// <summary> | 1780 | /// <summary> |
| 1760 | /// Gets the identity of the package or container that requires source. | 1781 | /// Gets the identity of the package or container that is being acquired. |
| 1761 | /// </summary> | 1782 | /// </summary> |
| 1762 | public string PackageOrContainerId { get; private set; } | 1783 | public string PackageOrContainerId { get; private set; } |
| 1763 | 1784 | ||
| 1764 | /// <summary> | 1785 | /// <summary> |
| 1765 | /// Gets the identity of the payload that requires source. | 1786 | /// Gets the identity of the payload that is being acquired. |
| 1766 | /// </summary> | 1787 | /// </summary> |
| 1767 | public string PayloadId { get; private set; } | 1788 | public string PayloadId { get; private set; } |
| 1768 | 1789 | ||
| 1769 | /// <summary> | 1790 | /// <summary> |
| 1770 | /// Gets the current path used for source resolution. | 1791 | /// Gets the search paths used for source resolution. |
| 1771 | /// </summary> | 1792 | /// </summary> |
| 1772 | public string LocalSource { get; private set; } | 1793 | public string[] SearchPaths { get; private set; } |
| 1794 | |||
| 1795 | /// <summary> | ||
| 1796 | /// Gets whether <see cref="RecommendedSearchPath"/> indicates that a file was found at that search path. | ||
| 1797 | /// </summary> | ||
| 1798 | public bool FoundLocal { get; private set; } | ||
| 1799 | |||
| 1800 | /// <summary> | ||
| 1801 | /// When <see cref="FoundLocal"/> is true, the index to <see cref="SearchPaths"/> for the recommended local file. | ||
| 1802 | /// </summary> | ||
| 1803 | public int RecommendedSearchPath { get; private set; } | ||
| 1773 | 1804 | ||
| 1774 | /// <summary> | 1805 | /// <summary> |
| 1775 | /// Gets the optional URL to download container or payload. | 1806 | /// Gets the optional URL to download container or payload. |
| 1776 | /// </summary> | 1807 | /// </summary> |
| 1777 | public string DownloadSource { get; private set; } | 1808 | public string DownloadUrl { get; private set; } |
| 1778 | 1809 | ||
| 1779 | /// <summary> | 1810 | /// <summary> |
| 1780 | /// Gets the recommended action from the engine. | 1811 | /// Gets the optional identity of the container that contains the payload being acquired. |
| 1781 | /// </summary> | 1812 | /// </summary> |
| 1782 | public BOOTSTRAPPER_RESOLVESOURCE_ACTION Recommendation { get; private set; } | 1813 | public string PayloadContainerId { get; private set; } |
| 1783 | 1814 | ||
| 1784 | /// <summary> | 1815 | /// <summary> |
| 1785 | /// Gets or sets the action to perform. | 1816 | /// Gets or sets the index to <see cref="SearchPaths"/> to use when <see cref="CancellableActionEventArgs{T}.Action"/> is set to <see cref="CacheOperation.Copy"/>. |
| 1786 | /// </summary> | 1817 | /// </summary> |
| 1787 | public BOOTSTRAPPER_RESOLVESOURCE_ACTION Action { get; set; } | 1818 | public int ChosenSearchPath { get; set; } |
| 1788 | } | 1819 | } |
| 1789 | 1820 | ||
| 1790 | /// <summary> | 1821 | /// <summary> |
diff --git a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs index 14cb8fd5..88c65674 100644 --- a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs | |||
| @@ -44,13 +44,10 @@ namespace WixToolset.Mba.Core | |||
| 44 | /// <summary> | 44 | /// <summary> |
| 45 | /// See <see cref="IDefaultBootstrapperApplication.DetectBegin"/>. | 45 | /// See <see cref="IDefaultBootstrapperApplication.DetectBegin"/>. |
| 46 | /// </summary> | 46 | /// </summary> |
| 47 | /// <param name="fInstalled"></param> | ||
| 48 | /// <param name="cPackages"></param> | ||
| 49 | /// <param name="fCancel"></param> | ||
| 50 | /// <returns></returns> | ||
| 51 | [PreserveSig] | 47 | [PreserveSig] |
| 52 | [return: MarshalAs(UnmanagedType.I4)] | 48 | [return: MarshalAs(UnmanagedType.I4)] |
| 53 | int OnDetectBegin( | 49 | int OnDetectBegin( |
| 50 | [MarshalAs(UnmanagedType.Bool)] bool fCached, | ||
| 54 | [MarshalAs(UnmanagedType.Bool)] bool fInstalled, | 51 | [MarshalAs(UnmanagedType.Bool)] bool fInstalled, |
| 55 | [MarshalAs(UnmanagedType.U4)] int cPackages, | 52 | [MarshalAs(UnmanagedType.U4)] int cPackages, |
| 56 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | 53 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel |
| @@ -540,32 +537,22 @@ namespace WixToolset.Mba.Core | |||
| 540 | /// <summary> | 537 | /// <summary> |
| 541 | /// See <see cref="IDefaultBootstrapperApplication.CacheAcquireBegin"/>. | 538 | /// See <see cref="IDefaultBootstrapperApplication.CacheAcquireBegin"/>. |
| 542 | /// </summary> | 539 | /// </summary> |
| 543 | /// <param name="wzPackageOrContainerId"></param> | ||
| 544 | /// <param name="wzPayloadId"></param> | ||
| 545 | /// <param name="operation"></param> | ||
| 546 | /// <param name="wzSource"></param> | ||
| 547 | /// <param name="fCancel"></param> | ||
| 548 | /// <returns></returns> | ||
| 549 | [PreserveSig] | 540 | [PreserveSig] |
| 550 | [return: MarshalAs(UnmanagedType.I4)] | 541 | [return: MarshalAs(UnmanagedType.I4)] |
| 551 | int OnCacheAcquireBegin( | 542 | int OnCacheAcquireBegin( |
| 552 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, | 543 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, |
| 553 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | 544 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, |
| 554 | [MarshalAs(UnmanagedType.U4)] CacheOperation operation, | ||
| 555 | [MarshalAs(UnmanagedType.LPWStr)] string wzSource, | 545 | [MarshalAs(UnmanagedType.LPWStr)] string wzSource, |
| 546 | [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadUrl, | ||
| 547 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadContainerId, | ||
| 548 | [MarshalAs(UnmanagedType.U4)] CacheOperation recommendation, | ||
| 549 | [MarshalAs(UnmanagedType.I4)] ref CacheOperation action, | ||
| 556 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | 550 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel |
| 557 | ); | 551 | ); |
| 558 | 552 | ||
| 559 | /// <summary> | 553 | /// <summary> |
| 560 | /// See <see cref="IDefaultBootstrapperApplication.CacheAcquireProgress"/>. | 554 | /// See <see cref="IDefaultBootstrapperApplication.CacheAcquireProgress"/>. |
| 561 | /// </summary> | 555 | /// </summary> |
| 562 | /// <param name="wzPackageOrContainerId"></param> | ||
| 563 | /// <param name="wzPayloadId"></param> | ||
| 564 | /// <param name="dw64Progress"></param> | ||
| 565 | /// <param name="dw64Total"></param> | ||
| 566 | /// <param name="dwOverallPercentage"></param> | ||
| 567 | /// <param name="fCancel"></param> | ||
| 568 | /// <returns></returns> | ||
| 569 | [PreserveSig] | 556 | [PreserveSig] |
| 570 | [return: MarshalAs(UnmanagedType.I4)] | 557 | [return: MarshalAs(UnmanagedType.I4)] |
| 571 | int OnCacheAcquireProgress( | 558 | int OnCacheAcquireProgress( |
| @@ -578,37 +565,28 @@ namespace WixToolset.Mba.Core | |||
| 578 | ); | 565 | ); |
| 579 | 566 | ||
| 580 | /// <summary> | 567 | /// <summary> |
| 581 | /// See <see cref="IDefaultBootstrapperApplication.ResolveSource"/>. | 568 | /// See <see cref="IDefaultBootstrapperApplication.CacheAcquireResolving"/>. |
| 582 | /// </summary> | 569 | /// </summary> |
| 583 | /// <param name="wzPackageOrContainerId"></param> | ||
| 584 | /// <param name="wzPayloadId"></param> | ||
| 585 | /// <param name="wzLocalSource"></param> | ||
| 586 | /// <param name="wzDownloadSource"></param> | ||
| 587 | /// <param name="recommendation"></param> | ||
| 588 | /// <param name="action"></param> | ||
| 589 | /// <param name="fCancel"></param> | ||
| 590 | /// <returns></returns> | ||
| 591 | [PreserveSig] | 570 | [PreserveSig] |
| 592 | [return: MarshalAs(UnmanagedType.I4)] | 571 | [return: MarshalAs(UnmanagedType.I4)] |
| 593 | int OnResolveSource( | 572 | int OnCacheAcquireResolving( |
| 594 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, | 573 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, |
| 595 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | 574 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, |
| 596 | [MarshalAs(UnmanagedType.LPWStr)] string wzLocalSource, | 575 | [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3, ArraySubType = UnmanagedType.LPWStr), In] string[] searchPaths, |
| 597 | [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadSource, | 576 | [MarshalAs(UnmanagedType.U4)] int cSearchPaths, |
| 598 | BOOTSTRAPPER_RESOLVESOURCE_ACTION recommendation, | 577 | [MarshalAs(UnmanagedType.Bool)] bool fFoundLocal, |
| 599 | ref BOOTSTRAPPER_RESOLVESOURCE_ACTION action, | 578 | [MarshalAs(UnmanagedType.U4)] int dwRecommendedSearchPath, |
| 579 | [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadUrl, | ||
| 580 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadContainerId, | ||
| 581 | [MarshalAs(UnmanagedType.I4)] CacheResolveOperation recommendation, | ||
| 582 | [MarshalAs(UnmanagedType.U4)] ref int dwChosenSearchPath, | ||
| 583 | [MarshalAs(UnmanagedType.I4)] ref CacheResolveOperation action, | ||
| 600 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | 584 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel |
| 601 | ); | 585 | ); |
| 602 | 586 | ||
| 603 | /// <summary> | 587 | /// <summary> |
| 604 | /// See <see cref="IDefaultBootstrapperApplication.CacheAcquireComplete"/>. | 588 | /// See <see cref="IDefaultBootstrapperApplication.CacheAcquireComplete"/>. |
| 605 | /// </summary> | 589 | /// </summary> |
| 606 | /// <param name="wzPackageOrContainerId"></param> | ||
| 607 | /// <param name="wzPayloadId"></param> | ||
| 608 | /// <param name="hrStatus"></param> | ||
| 609 | /// <param name="recommendation"></param> | ||
| 610 | /// <param name="pAction"></param> | ||
| 611 | /// <returns></returns> | ||
| 612 | [PreserveSig] | 590 | [PreserveSig] |
| 613 | [return: MarshalAs(UnmanagedType.I4)] | 591 | [return: MarshalAs(UnmanagedType.I4)] |
| 614 | int OnCacheAcquireComplete( | 592 | int OnCacheAcquireComplete( |
| @@ -1419,19 +1397,55 @@ namespace WixToolset.Mba.Core | |||
| 1419 | public enum CacheOperation | 1397 | public enum CacheOperation |
| 1420 | { | 1398 | { |
| 1421 | /// <summary> | 1399 | /// <summary> |
| 1422 | /// Container or payload is being copied. | 1400 | /// There is no source available. |
| 1401 | /// </summary> | ||
| 1402 | None, | ||
| 1403 | |||
| 1404 | /// <summary> | ||
| 1405 | /// Copy the payload or container from the chosen local source. | ||
| 1423 | /// </summary> | 1406 | /// </summary> |
| 1424 | Copy, | 1407 | Copy, |
| 1425 | 1408 | ||
| 1426 | /// <summary> | 1409 | /// <summary> |
| 1427 | /// Container or payload is being downloaded. | 1410 | /// Download the payload or container using the download URL. |
| 1428 | /// </summary> | 1411 | /// </summary> |
| 1429 | Download, | 1412 | Download, |
| 1430 | 1413 | ||
| 1431 | /// <summary> | 1414 | /// <summary> |
| 1432 | /// Container or payload is being extracted. | 1415 | /// Extract the payload from the container. |
| 1416 | /// </summary> | ||
| 1417 | Extract, | ||
| 1418 | } | ||
| 1419 | |||
| 1420 | /// <summary> | ||
| 1421 | /// The source to be used to acquire a container or payload. | ||
| 1422 | /// </summary> | ||
| 1423 | public enum CacheResolveOperation | ||
| 1424 | { | ||
| 1425 | /// <summary> | ||
| 1426 | /// There is no source available. | ||
| 1427 | /// </summary> | ||
| 1428 | None, | ||
| 1429 | |||
| 1430 | /// <summary> | ||
| 1431 | /// Copy the payload or container from the chosen local source. | ||
| 1433 | /// </summary> | 1432 | /// </summary> |
| 1434 | Extract | 1433 | Local, |
| 1434 | |||
| 1435 | /// <summary> | ||
| 1436 | /// Download the payload or container from the download URL. | ||
| 1437 | /// </summary> | ||
| 1438 | Download, | ||
| 1439 | |||
| 1440 | /// <summary> | ||
| 1441 | /// Extract the payload from the container. | ||
| 1442 | /// </summary> | ||
| 1443 | Container, | ||
| 1444 | |||
| 1445 | /// <summary> | ||
| 1446 | /// Look again for the payload or container locally. | ||
| 1447 | /// </summary> | ||
| 1448 | Retry, | ||
| 1435 | } | 1449 | } |
| 1436 | 1450 | ||
| 1437 | /// <summary> | 1451 | /// <summary> |
| @@ -1637,7 +1651,7 @@ namespace WixToolset.Mba.Core | |||
| 1637 | } | 1651 | } |
| 1638 | 1652 | ||
| 1639 | /// <summary> | 1653 | /// <summary> |
| 1640 | /// The available actions for <see cref="IDefaultBootstrapperApplication.ResolveSource"/>. | 1654 | /// The available actions for <see cref="IDefaultBootstrapperApplication.CacheAcquireResolving"/>. |
| 1641 | /// </summary> | 1655 | /// </summary> |
| 1642 | public enum BOOTSTRAPPER_RESOLVESOURCE_ACTION | 1656 | public enum BOOTSTRAPPER_RESOLVESOURCE_ACTION |
| 1643 | { | 1657 | { |
diff --git a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs index 269d4955..03f94d37 100644 --- a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs | |||
| @@ -30,12 +30,16 @@ namespace WixToolset.Mba.Core | |||
| 30 | event EventHandler<BeginMsiTransactionCompleteEventArgs> BeginMsiTransactionComplete; | 30 | event EventHandler<BeginMsiTransactionCompleteEventArgs> BeginMsiTransactionComplete; |
| 31 | 31 | ||
| 32 | /// <summary> | 32 | /// <summary> |
| 33 | /// Fired when the engine has begun acquiring the installation sources. | 33 | /// Fired when the engine has begun acquiring the payload or container. |
| 34 | /// The BA can change the source using <see cref="IEngine.SetLocalSource(string, string, string)"/> | ||
| 35 | /// or <see cref="IEngine.SetDownloadSource(string, string, string, string, string)"/>. | ||
| 34 | /// </summary> | 36 | /// </summary> |
| 35 | event EventHandler<CacheAcquireBeginEventArgs> CacheAcquireBegin; | 37 | event EventHandler<CacheAcquireBeginEventArgs> CacheAcquireBegin; |
| 36 | 38 | ||
| 37 | /// <summary> | 39 | /// <summary> |
| 38 | /// Fired when the engine has completed the acquisition of the installation sources. | 40 | /// Fired when the engine has completed the acquisition of the payload or container. |
| 41 | /// The BA can change the source using <see cref="IEngine.SetLocalSource(string, string, string)"/> | ||
| 42 | /// or <see cref="IEngine.SetDownloadSource(string, string, string, string, string)"/>. | ||
| 39 | /// </summary> | 43 | /// </summary> |
| 40 | event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete; | 44 | event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete; |
| 41 | 45 | ||
| @@ -45,6 +49,11 @@ namespace WixToolset.Mba.Core | |||
| 45 | event EventHandler<CacheAcquireProgressEventArgs> CacheAcquireProgress; | 49 | event EventHandler<CacheAcquireProgressEventArgs> CacheAcquireProgress; |
| 46 | 50 | ||
| 47 | /// <summary> | 51 | /// <summary> |
| 52 | /// Fired by the engine to allow the BA to override the acquisition action. | ||
| 53 | /// </summary> | ||
| 54 | event EventHandler<CacheAcquireResolvingEventArgs> CacheAcquireResolving; | ||
| 55 | |||
| 56 | /// <summary> | ||
| 48 | /// Fired when the engine has begun caching the installation sources. | 57 | /// Fired when the engine has begun caching the installation sources. |
| 49 | /// </summary> | 58 | /// </summary> |
| 50 | event EventHandler<CacheBeginEventArgs> CacheBegin; | 59 | event EventHandler<CacheBeginEventArgs> CacheBegin; |
| @@ -285,12 +294,6 @@ namespace WixToolset.Mba.Core | |||
| 285 | event EventHandler<RegisterCompleteEventArgs> RegisterComplete; | 294 | event EventHandler<RegisterCompleteEventArgs> RegisterComplete; |
| 286 | 295 | ||
| 287 | /// <summary> | 296 | /// <summary> |
| 288 | /// Fired by the engine to allow the BA to change the source | ||
| 289 | /// using <see cref="IEngine.SetLocalSource(string, string, string)"/> or <see cref="IEngine.SetDownloadSource(string, string, string, string, string)"/>. | ||
| 290 | /// </summary> | ||
| 291 | event EventHandler<ResolveSourceEventArgs> ResolveSource; | ||
| 292 | |||
| 293 | /// <summary> | ||
| 294 | /// Fired when the engine is about to rollback an MSI transaction. | 297 | /// Fired when the engine is about to rollback an MSI transaction. |
| 295 | /// </summary> | 298 | /// </summary> |
| 296 | event EventHandler<RollbackMsiTransactionBeginEventArgs> RollbackMsiTransactionBegin; | 299 | event EventHandler<RollbackMsiTransactionBeginEventArgs> RollbackMsiTransactionBegin; |
diff --git a/src/balutil/balretry.cpp b/src/balutil/balretry.cpp index d95d86b2..9d8abd6d 100644 --- a/src/balutil/balretry.cpp +++ b/src/balutil/balretry.cpp | |||
| @@ -2,23 +2,33 @@ | |||
| 2 | 2 | ||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | typedef enum BALRETRY_TYPE | ||
| 6 | { | ||
| 7 | BALRETRY_TYPE_CACHE_CONTAINER, | ||
| 8 | BALRETRY_TYPE_CACHE_PAYLOAD, | ||
| 9 | BALRETRY_TYPE_EXECUTE, | ||
| 10 | } BALRETRY_TYPE; | ||
| 11 | |||
| 5 | struct BALRETRY_INFO | 12 | struct BALRETRY_INFO |
| 6 | { | 13 | { |
| 7 | LPWSTR sczId; // package or container id. | 14 | LPWSTR sczId; |
| 8 | LPWSTR sczPayloadId; // optional payload id. | ||
| 9 | DWORD cRetries; | 15 | DWORD cRetries; |
| 10 | DWORD dwLastError; | 16 | DWORD dwLastError; |
| 11 | }; | 17 | }; |
| 12 | 18 | ||
| 13 | static DWORD vdwMaxRetries = 0; | 19 | static DWORD vdwMaxRetries = 0; |
| 14 | static DWORD vdwTimeout = 0; | 20 | static DWORD vdwTimeout = 0; |
| 15 | static BALRETRY_INFO vrgRetryInfo[2]; | 21 | static BALRETRY_INFO vrgRetryInfo[3]; |
| 16 | 22 | ||
| 17 | // prototypes | 23 | // prototypes |
| 18 | static BOOL IsActiveRetryEntry( | 24 | static BOOL IsActiveRetryEntry( |
| 19 | __in BALRETRY_TYPE type, | 25 | __in BALRETRY_TYPE type, |
| 20 | __in_z LPCWSTR wzPackageId, | 26 | __in_z LPCWSTR sczId |
| 21 | __in_z_opt LPCWSTR wzPayloadId | 27 | ); |
| 28 | |||
| 29 | static HRESULT StartActiveRetryEntry( | ||
| 30 | __in BALRETRY_TYPE type, | ||
| 31 | __in_z LPCWSTR sczId | ||
| 22 | ); | 32 | ); |
| 23 | 33 | ||
| 24 | 34 | ||
| @@ -39,7 +49,6 @@ DAPI_(void) BalRetryUninitialize() | |||
| 39 | for (DWORD i = 0; i < countof(vrgRetryInfo); ++i) | 49 | for (DWORD i = 0; i < countof(vrgRetryInfo); ++i) |
| 40 | { | 50 | { |
| 41 | ReleaseStr(vrgRetryInfo[i].sczId); | 51 | ReleaseStr(vrgRetryInfo[i].sczId); |
| 42 | ReleaseStr(vrgRetryInfo[i].sczPayloadId); | ||
| 43 | memset(vrgRetryInfo + i, 0, sizeof(BALRETRY_INFO)); | 52 | memset(vrgRetryInfo + i, 0, sizeof(BALRETRY_INFO)); |
| 44 | } | 53 | } |
| 45 | 54 | ||
| @@ -48,34 +57,32 @@ DAPI_(void) BalRetryUninitialize() | |||
| 48 | } | 57 | } |
| 49 | 58 | ||
| 50 | 59 | ||
| 51 | DAPI_(void) BalRetryStartPackage( | 60 | DAPI_(void) BalRetryStartContainerOrPayload( |
| 52 | __in BALRETRY_TYPE type, | 61 | __in_z_opt LPCWSTR wzContainerOrPackageId, |
| 53 | __in_z_opt LPCWSTR wzPackageId, | ||
| 54 | __in_z_opt LPCWSTR wzPayloadId | 62 | __in_z_opt LPCWSTR wzPayloadId |
| 55 | ) | 63 | ) |
| 56 | { | 64 | { |
| 57 | if (!wzPackageId || !*wzPackageId) | 65 | if (!wzContainerOrPackageId && !wzPayloadId) |
| 58 | { | 66 | { |
| 59 | ReleaseNullStr(vrgRetryInfo[type].sczId); | 67 | ReleaseNullStr(vrgRetryInfo[BALRETRY_TYPE_CACHE_CONTAINER].sczId); |
| 60 | ReleaseNullStr(vrgRetryInfo[type].sczPayloadId); | 68 | ReleaseNullStr(vrgRetryInfo[BALRETRY_TYPE_CACHE_PAYLOAD].sczId); |
| 61 | } | 69 | } |
| 62 | else if (IsActiveRetryEntry(type, wzPackageId, wzPayloadId)) | 70 | else if (wzPayloadId) |
| 63 | { | 71 | { |
| 64 | ++vrgRetryInfo[type].cRetries; | 72 | StartActiveRetryEntry(BALRETRY_TYPE_CACHE_PAYLOAD, wzPayloadId); |
| 65 | ::Sleep(vdwTimeout); | ||
| 66 | } | 73 | } |
| 67 | else | 74 | else |
| 68 | { | 75 | { |
| 69 | StrAllocString(&vrgRetryInfo[type].sczId, wzPackageId, 0); | 76 | StartActiveRetryEntry(BALRETRY_TYPE_CACHE_CONTAINER, wzContainerOrPackageId); |
| 70 | if (wzPayloadId) | ||
| 71 | { | ||
| 72 | StrAllocString(&vrgRetryInfo[type].sczPayloadId, wzPayloadId, 0); | ||
| 73 | } | ||
| 74 | |||
| 75 | vrgRetryInfo[type].cRetries = 0; | ||
| 76 | } | 77 | } |
| 78 | } | ||
| 77 | 79 | ||
| 78 | vrgRetryInfo[type].dwLastError = ERROR_SUCCESS; | 80 | |
| 81 | DAPI_(void) BalRetryStartPackage( | ||
| 82 | __in_z LPCWSTR wzPackageId | ||
| 83 | ) | ||
| 84 | { | ||
| 85 | StartActiveRetryEntry(BALRETRY_TYPE_EXECUTE, wzPackageId); | ||
| 79 | } | 86 | } |
| 80 | 87 | ||
| 81 | 88 | ||
| @@ -84,87 +91,112 @@ DAPI_(void) BalRetryErrorOccurred( | |||
| 84 | __in DWORD dwError | 91 | __in DWORD dwError |
| 85 | ) | 92 | ) |
| 86 | { | 93 | { |
| 87 | if (IsActiveRetryEntry(BALRETRY_TYPE_CACHE, wzPackageId, NULL)) | 94 | if (IsActiveRetryEntry(BALRETRY_TYPE_EXECUTE, wzPackageId)) |
| 88 | { | 95 | { |
| 89 | vrgRetryInfo[BALRETRY_TYPE_CACHE].dwLastError = dwError; | 96 | vrgRetryInfo[BALRETRY_TYPE_EXECUTE].dwLastError = dwError; |
| 90 | } | 97 | } |
| 91 | else if (IsActiveRetryEntry(BALRETRY_TYPE_EXECUTE, wzPackageId, NULL)) | 98 | } |
| 99 | |||
| 100 | |||
| 101 | DAPI_(HRESULT) BalRetryEndContainerOrPayload( | ||
| 102 | __in_z_opt LPCWSTR wzContainerOrPackageId, | ||
| 103 | __in_z_opt LPCWSTR wzPayloadId, | ||
| 104 | __in HRESULT hrError, | ||
| 105 | __inout BOOL* pfRetry | ||
| 106 | ) | ||
| 107 | { | ||
| 108 | HRESULT hr = S_OK; | ||
| 109 | BALRETRY_TYPE type = BALRETRY_TYPE_CACHE_PAYLOAD; | ||
| 110 | LPCWSTR wzId = NULL; | ||
| 111 | |||
| 112 | if (!wzContainerOrPackageId && !wzPayloadId) | ||
| 92 | { | 113 | { |
| 93 | vrgRetryInfo[BALRETRY_TYPE_EXECUTE].dwLastError = dwError; | 114 | ReleaseNullStr(vrgRetryInfo[BALRETRY_TYPE_CACHE_CONTAINER].sczId); |
| 115 | ReleaseNullStr(vrgRetryInfo[BALRETRY_TYPE_CACHE_PAYLOAD].sczId); | ||
| 116 | ExitFunction(); | ||
| 117 | } | ||
| 118 | else if (wzPayloadId) | ||
| 119 | { | ||
| 120 | type = BALRETRY_TYPE_CACHE_PAYLOAD; | ||
| 121 | wzId = wzPayloadId; | ||
| 122 | } | ||
| 123 | else | ||
| 124 | { | ||
| 125 | type = BALRETRY_TYPE_CACHE_CONTAINER; | ||
| 126 | wzId = wzContainerOrPackageId; | ||
| 94 | } | 127 | } |
| 128 | |||
| 129 | if (FAILED(hrError) && vrgRetryInfo[type].cRetries < vdwMaxRetries && IsActiveRetryEntry(type, wzId)) | ||
| 130 | { | ||
| 131 | // Retry on all errors except the following. | ||
| 132 | if (HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT) != hrError && | ||
| 133 | BG_E_NETWORK_DISCONNECTED != hrError && | ||
| 134 | HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) != hrError && | ||
| 135 | HRESULT_FROM_WIN32(ERROR_INTERNET_NAME_NOT_RESOLVED) != hrError) | ||
| 136 | { | ||
| 137 | *pfRetry = TRUE; | ||
| 138 | } | ||
| 139 | } | ||
| 140 | |||
| 141 | LExit: | ||
| 142 | return hr; | ||
| 95 | } | 143 | } |
| 96 | 144 | ||
| 97 | 145 | ||
| 98 | DAPI_(HRESULT) BalRetryEndPackage( | 146 | DAPI_(HRESULT) BalRetryEndPackage( |
| 99 | __in BALRETRY_TYPE type, | 147 | __in_z LPCWSTR wzPackageId, |
| 100 | __in_z_opt LPCWSTR wzPackageId, | ||
| 101 | __in_z_opt LPCWSTR wzPayloadId, | ||
| 102 | __in HRESULT hrError, | 148 | __in HRESULT hrError, |
| 103 | __inout BOOL* pfRetry | 149 | __inout BOOL* pfRetry |
| 104 | ) | 150 | ) |
| 105 | { | 151 | { |
| 106 | HRESULT hr = S_OK; | 152 | HRESULT hr = S_OK; |
| 153 | BALRETRY_TYPE type = BALRETRY_TYPE_EXECUTE; | ||
| 107 | 154 | ||
| 108 | if (!wzPackageId || !*wzPackageId) | 155 | if (!wzPackageId || !*wzPackageId) |
| 109 | { | 156 | { |
| 110 | ReleaseNullStr(vrgRetryInfo[type].sczId); | 157 | ReleaseNullStr(vrgRetryInfo[type].sczId); |
| 111 | ReleaseNullStr(vrgRetryInfo[type].sczPayloadId); | ||
| 112 | } | 158 | } |
| 113 | else if (FAILED(hrError) && vrgRetryInfo[type].cRetries < vdwMaxRetries && IsActiveRetryEntry(type, wzPackageId, wzPayloadId)) | 159 | else if (FAILED(hrError) && vrgRetryInfo[type].cRetries < vdwMaxRetries && IsActiveRetryEntry(type, wzPackageId)) |
| 114 | { | 160 | { |
| 115 | if (BALRETRY_TYPE_CACHE == type) | 161 | // If the service is out of whack, just try again. |
| 162 | if (HRESULT_FROM_WIN32(ERROR_INSTALL_SERVICE_FAILURE) == hrError) | ||
| 116 | { | 163 | { |
| 117 | // Retry on all errors except the following. | 164 | *pfRetry = TRUE; |
| 118 | if (HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT) != hrError && | ||
| 119 | BG_E_NETWORK_DISCONNECTED != hrError && | ||
| 120 | HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) != hrError && | ||
| 121 | HRESULT_FROM_WIN32(ERROR_INTERNET_NAME_NOT_RESOLVED) != hrError) | ||
| 122 | { | ||
| 123 | *pfRetry = TRUE; | ||
| 124 | } | ||
| 125 | } | 165 | } |
| 126 | else if (BALRETRY_TYPE_EXECUTE == type) | 166 | else if (HRESULT_FROM_WIN32(ERROR_INSTALL_FAILURE) == hrError) |
| 127 | { | 167 | { |
| 128 | // If the service is out of whack, just try again. | 168 | DWORD dwError = vrgRetryInfo[type].dwLastError; |
| 129 | if (HRESULT_FROM_WIN32(ERROR_INSTALL_SERVICE_FAILURE) == hrError) | 169 | |
| 130 | { | 170 | // If we failed with one of these specific error codes, then retry since |
| 131 | *pfRetry = TRUE; | 171 | // we've seen these have a high success of succeeding on retry. |
| 132 | } | 172 | if (1303 == dwError || |
| 133 | else if (HRESULT_FROM_WIN32(ERROR_INSTALL_FAILURE) == hrError) | 173 | 1304 == dwError || |
| 134 | { | 174 | 1306 == dwError || |
| 135 | DWORD dwError = vrgRetryInfo[type].dwLastError; | 175 | 1307 == dwError || |
| 136 | 176 | 1309 == dwError || | |
| 137 | // If we failed with one of these specific error codes, then retry since | 177 | 1310 == dwError || |
| 138 | // we've seen these have a high success of succeeding on retry. | 178 | 1311 == dwError || |
| 139 | if (1303 == dwError || | 179 | 1312 == dwError || |
| 140 | 1304 == dwError || | 180 | 1316 == dwError || |
| 141 | 1306 == dwError || | 181 | 1317 == dwError || |
| 142 | 1307 == dwError || | 182 | 1321 == dwError || |
| 143 | 1309 == dwError || | 183 | 1335 == dwError || |
| 144 | 1310 == dwError || | 184 | 1402 == dwError || |
| 145 | 1311 == dwError || | 185 | 1406 == dwError || |
| 146 | 1312 == dwError || | 186 | 1606 == dwError || |
| 147 | 1316 == dwError || | 187 | 1706 == dwError || |
| 148 | 1317 == dwError || | 188 | 1719 == dwError || |
| 149 | 1321 == dwError || | 189 | 1723 == dwError || |
| 150 | 1335 == dwError || | 190 | 1923 == dwError || |
| 151 | 1402 == dwError || | 191 | 1931 == dwError) |
| 152 | 1406 == dwError || | ||
| 153 | 1606 == dwError || | ||
| 154 | 1706 == dwError || | ||
| 155 | 1719 == dwError || | ||
| 156 | 1723 == dwError || | ||
| 157 | 1923 == dwError || | ||
| 158 | 1931 == dwError) | ||
| 159 | { | ||
| 160 | *pfRetry = TRUE; | ||
| 161 | } | ||
| 162 | } | ||
| 163 | else if (HRESULT_FROM_WIN32(ERROR_INSTALL_ALREADY_RUNNING) == hrError) | ||
| 164 | { | 192 | { |
| 165 | *pfRetry = TRUE; | 193 | *pfRetry = TRUE; |
| 166 | } | 194 | } |
| 167 | } | 195 | } |
| 196 | else if (HRESULT_FROM_WIN32(ERROR_INSTALL_ALREADY_RUNNING) == hrError) | ||
| 197 | { | ||
| 198 | *pfRetry = TRUE; | ||
| 199 | } | ||
| 168 | } | 200 | } |
| 169 | 201 | ||
| 170 | return hr; | 202 | return hr; |
| @@ -175,17 +207,40 @@ DAPI_(HRESULT) BalRetryEndPackage( | |||
| 175 | 207 | ||
| 176 | static BOOL IsActiveRetryEntry( | 208 | static BOOL IsActiveRetryEntry( |
| 177 | __in BALRETRY_TYPE type, | 209 | __in BALRETRY_TYPE type, |
| 178 | __in_z LPCWSTR wzPackageId, | 210 | __in_z LPCWSTR sczId |
| 179 | __in_z_opt LPCWSTR wzPayloadId | ||
| 180 | ) | 211 | ) |
| 181 | { | 212 | { |
| 182 | BOOL fActive = FALSE; | 213 | BOOL fActive = FALSE; |
| 183 | 214 | ||
| 184 | fActive = vrgRetryInfo[type].sczId && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, vrgRetryInfo[type].sczId, -1); | 215 | fActive = vrgRetryInfo[type].sczId && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, sczId, -1, vrgRetryInfo[type].sczId, -1); |
| 185 | if (fActive && wzPayloadId) // if a payload id was provided ensure it matches. | 216 | |
| 217 | return fActive; | ||
| 218 | } | ||
| 219 | |||
| 220 | static HRESULT StartActiveRetryEntry( | ||
| 221 | __in BALRETRY_TYPE type, | ||
| 222 | __in_z LPCWSTR sczId | ||
| 223 | ) | ||
| 224 | { | ||
| 225 | HRESULT hr = S_OK; | ||
| 226 | |||
| 227 | if (!sczId || !*sczId) | ||
| 186 | { | 228 | { |
| 187 | fActive = vrgRetryInfo[type].sczPayloadId && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPayloadId, -1, vrgRetryInfo[type].sczPayloadId, -1); | 229 | ReleaseNullStr(vrgRetryInfo[type].sczId); |
| 188 | } | 230 | } |
| 231 | else if (IsActiveRetryEntry(type, sczId)) | ||
| 232 | { | ||
| 233 | ++vrgRetryInfo[type].cRetries; | ||
| 234 | ::Sleep(vdwTimeout); | ||
| 235 | } | ||
| 236 | else | ||
| 237 | { | ||
| 238 | hr = StrAllocString(&vrgRetryInfo[type].sczId, sczId, 0); | ||
| 189 | 239 | ||
| 190 | return fActive; | 240 | vrgRetryInfo[type].cRetries = 0; |
| 241 | } | ||
| 242 | |||
| 243 | vrgRetryInfo[type].dwLastError = ERROR_SUCCESS; | ||
| 244 | |||
| 245 | return hr; | ||
| 191 | } | 246 | } |
diff --git a/src/balutil/balutil.vcxproj b/src/balutil/balutil.vcxproj index 6d31f9ba..a47e994f 100644 --- a/src/balutil/balutil.vcxproj +++ b/src/balutil/balutil.vcxproj | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | <!-- 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 | <!-- 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. --> |
| 3 | 3 | ||
| 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" /> |
| 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" /> | 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" /> |
| 7 | 7 | ||
| 8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
| 9 | <ProjectConfiguration Include="Debug|ARM64"> | 9 | <ProjectConfiguration Include="Debug|ARM64"> |
| @@ -98,8 +98,8 @@ | |||
| 98 | <PropertyGroup> | 98 | <PropertyGroup> |
| 99 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 99 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
| 100 | </PropertyGroup> | 100 | </PropertyGroup> |
| 101 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" /> | 101 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" /> |
| 102 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> | 102 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> |
| 103 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props'))" /> | 103 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props'))" /> |
| 104 | </Target> | 104 | </Target> |
| 105 | </Project> \ No newline at end of file | 105 | </Project> \ No newline at end of file |
diff --git a/src/balutil/inc/BAFunctions.h b/src/balutil/inc/BAFunctions.h index 66852efa..07f7a750 100644 --- a/src/balutil/inc/BAFunctions.h +++ b/src/balutil/inc/BAFunctions.h | |||
| @@ -42,7 +42,7 @@ enum BA_FUNCTIONS_MESSAGE | |||
| 42 | BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN, | 42 | BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN, |
| 43 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN, | 43 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN, |
| 44 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS, | 44 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREPROGRESS = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS, |
| 45 | BA_FUNCTIONS_MESSAGE_ONRESOLVESOURCE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONRESOLVESOURCE, | 45 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRERESOLVING = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRERESOLVING, |
| 46 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE, | 46 | BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRECOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE, |
| 47 | BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN, | 47 | BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN, |
| 48 | BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE, | 48 | BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE, |
diff --git a/src/balutil/inc/BalBaseBAFunctions.h b/src/balutil/inc/BalBaseBAFunctions.h index 0164269c..ca727f49 100644 --- a/src/balutil/inc/BalBaseBAFunctions.h +++ b/src/balutil/inc/BalBaseBAFunctions.h | |||
| @@ -90,6 +90,7 @@ public: // IBootstrapperApplication | |||
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | virtual STDMETHODIMP OnDetectBegin( | 92 | virtual STDMETHODIMP OnDetectBegin( |
| 93 | __in BOOL /*fCached*/, | ||
| 93 | __in BOOL /*fInstalled*/, | 94 | __in BOOL /*fInstalled*/, |
| 94 | __in DWORD /*cPackages*/, | 95 | __in DWORD /*cPackages*/, |
| 95 | __inout BOOL* /*pfCancel*/ | 96 | __inout BOOL* /*pfCancel*/ |
| @@ -385,8 +386,11 @@ public: // IBootstrapperApplication | |||
| 385 | virtual STDMETHODIMP OnCacheAcquireBegin( | 386 | virtual STDMETHODIMP OnCacheAcquireBegin( |
| 386 | __in_z LPCWSTR /*wzPackageOrContainerId*/, | 387 | __in_z LPCWSTR /*wzPackageOrContainerId*/, |
| 387 | __in_z_opt LPCWSTR /*wzPayloadId*/, | 388 | __in_z_opt LPCWSTR /*wzPayloadId*/, |
| 388 | __in BOOTSTRAPPER_CACHE_OPERATION /*operation*/, | ||
| 389 | __in_z LPCWSTR /*wzSource*/, | 389 | __in_z LPCWSTR /*wzSource*/, |
| 390 | __in_z_opt LPCWSTR /*wzDownloadUrl*/, | ||
| 391 | __in_z_opt LPCWSTR /*wzPayloadContainerId*/, | ||
| 392 | __in BOOTSTRAPPER_CACHE_OPERATION /*recommendation*/, | ||
| 393 | __inout BOOTSTRAPPER_CACHE_OPERATION* /*pAction*/, | ||
| 390 | __inout BOOL* /*pfCancel*/ | 394 | __inout BOOL* /*pfCancel*/ |
| 391 | ) | 395 | ) |
| 392 | { | 396 | { |
| @@ -405,13 +409,18 @@ public: // IBootstrapperApplication | |||
| 405 | return S_OK; | 409 | return S_OK; |
| 406 | } | 410 | } |
| 407 | 411 | ||
| 408 | virtual STDMETHODIMP OnResolveSource( | 412 | virtual STDMETHODIMP OnCacheAcquireResolving( |
| 409 | __in_z LPCWSTR /*wzPackageOrContainerId*/, | 413 | __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, |
| 410 | __in_z_opt LPCWSTR /*wzPayloadId*/, | 414 | __in_z_opt LPCWSTR /*wzPayloadId*/, |
| 411 | __in_z LPCWSTR /*wzLocalSource*/, | 415 | __in_z LPCWSTR* /*rgSearchPaths*/, |
| 412 | __in_z_opt LPCWSTR /*wzDownloadSource*/, | 416 | __in DWORD /*cSearchPaths*/, |
| 413 | __in BOOTSTRAPPER_RESOLVESOURCE_ACTION /*recommendation*/, | 417 | __in BOOL /*fFoundLocal*/, |
| 414 | __inout BOOTSTRAPPER_RESOLVESOURCE_ACTION* /*pAction*/, | 418 | __in DWORD /*dwRecommendedSearchPath*/, |
| 419 | __in_z_opt LPCWSTR /*wzDownloadUrl*/, | ||
| 420 | __in_z_opt LPCWSTR /*wzPayloadContainerId*/, | ||
| 421 | __in BOOTSTRAPPER_CACHE_RESOLVE_OPERATION /*recommendation*/, | ||
| 422 | __inout DWORD* /*pdwChosenSearchPath*/, | ||
| 423 | __inout BOOTSTRAPPER_CACHE_RESOLVE_OPERATION* /*pAction*/, | ||
| 415 | __inout BOOL* /*pfCancel*/ | 424 | __inout BOOL* /*pfCancel*/ |
| 416 | ) | 425 | ) |
| 417 | { | 426 | { |
diff --git a/src/balutil/inc/BalBaseBAFunctionsProc.h b/src/balutil/inc/BalBaseBAFunctionsProc.h index e1de800a..7e89fe83 100644 --- a/src/balutil/inc/BalBaseBAFunctionsProc.h +++ b/src/balutil/inc/BalBaseBAFunctionsProc.h | |||
| @@ -77,7 +77,7 @@ static HRESULT WINAPI BalBaseBAFunctionsProc( | |||
| 77 | case BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGEBEGIN: | 77 | case BA_FUNCTIONS_MESSAGE_ONCACHEPACKAGEBEGIN: |
| 78 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREBEGIN: | 78 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREBEGIN: |
| 79 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREPROGRESS: | 79 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIREPROGRESS: |
| 80 | case BA_FUNCTIONS_MESSAGE_ONRESOLVESOURCE: | 80 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRERESOLVING: |
| 81 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRECOMPLETE: | 81 | case BA_FUNCTIONS_MESSAGE_ONCACHEACQUIRECOMPLETE: |
| 82 | case BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYBEGIN: | 82 | case BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYBEGIN: |
| 83 | case BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYCOMPLETE: | 83 | case BA_FUNCTIONS_MESSAGE_ONCACHEVERIFYCOMPLETE: |
diff --git a/src/balutil/inc/BalBaseBootstrapperApplication.h b/src/balutil/inc/BalBaseBootstrapperApplication.h index c9211e0f..3d3e4ffa 100644 --- a/src/balutil/inc/BalBaseBootstrapperApplication.h +++ b/src/balutil/inc/BalBaseBootstrapperApplication.h | |||
| @@ -87,6 +87,7 @@ public: // IBootstrapperApplication | |||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | virtual STDMETHODIMP OnDetectBegin( | 89 | virtual STDMETHODIMP OnDetectBegin( |
| 90 | __in BOOL /*fCached*/, | ||
| 90 | __in BOOL /*fInstalled*/, | 91 | __in BOOL /*fInstalled*/, |
| 91 | __in DWORD /*cPackages*/, | 92 | __in DWORD /*cPackages*/, |
| 92 | __inout BOOL* pfCancel | 93 | __inout BOOL* pfCancel |
| @@ -442,14 +443,17 @@ public: // IBootstrapperApplication | |||
| 442 | } | 443 | } |
| 443 | 444 | ||
| 444 | virtual STDMETHODIMP OnCacheAcquireBegin( | 445 | virtual STDMETHODIMP OnCacheAcquireBegin( |
| 445 | __in_z LPCWSTR wzPackageOrContainerId, | 446 | __in_z_opt LPCWSTR wzPackageOrContainerId, |
| 446 | __in_z_opt LPCWSTR wzPayloadId, | 447 | __in_z_opt LPCWSTR wzPayloadId, |
| 447 | __in BOOTSTRAPPER_CACHE_OPERATION /*operation*/, | ||
| 448 | __in_z LPCWSTR /*wzSource*/, | 448 | __in_z LPCWSTR /*wzSource*/, |
| 449 | __in_z_opt LPCWSTR /*wzDownloadUrl*/, | ||
| 450 | __in_z_opt LPCWSTR /*wzPayloadContainerId*/, | ||
| 451 | __in BOOTSTRAPPER_CACHE_OPERATION /*recommendation*/, | ||
| 452 | __inout BOOTSTRAPPER_CACHE_OPERATION* /*pAction*/, | ||
| 449 | __inout BOOL* pfCancel | 453 | __inout BOOL* pfCancel |
| 450 | ) | 454 | ) |
| 451 | { | 455 | { |
| 452 | BalRetryStartPackage(BALRETRY_TYPE_CACHE, wzPackageOrContainerId, wzPayloadId); | 456 | BalRetryStartContainerOrPayload(wzPackageOrContainerId, wzPayloadId); |
| 453 | *pfCancel |= CheckCanceled(); | 457 | *pfCancel |= CheckCanceled(); |
| 454 | return S_OK; | 458 | return S_OK; |
| 455 | } | 459 | } |
| @@ -488,13 +492,18 @@ public: // IBootstrapperApplication | |||
| 488 | return hr; | 492 | return hr; |
| 489 | } | 493 | } |
| 490 | 494 | ||
| 491 | virtual STDMETHODIMP OnResolveSource( | 495 | virtual STDMETHODIMP OnCacheAcquireResolving( |
| 492 | __in_z LPCWSTR /*wzPackageOrContainerId*/, | 496 | __in_z_opt LPCWSTR /*wzPackageOrContainerId*/, |
| 493 | __in_z_opt LPCWSTR /*wzPayloadId*/, | 497 | __in_z_opt LPCWSTR /*wzPayloadId*/, |
| 494 | __in_z LPCWSTR /*wzLocalSource*/, | 498 | __in_z LPCWSTR* /*rgSearchPaths*/, |
| 495 | __in_z_opt LPCWSTR /*wzDownloadSource*/, | 499 | __in DWORD /*cSearchPaths*/, |
| 496 | __in BOOTSTRAPPER_RESOLVESOURCE_ACTION /*recommendation*/, | 500 | __in BOOL /*fFoundLocal*/, |
| 497 | __inout BOOTSTRAPPER_RESOLVESOURCE_ACTION* /*pAction*/, | 501 | __in DWORD /*dwRecommendedSearchPath*/, |
| 502 | __in_z_opt LPCWSTR /*wzDownloadUrl*/, | ||
| 503 | __in_z_opt LPCWSTR /*wzPayloadContainerId*/, | ||
| 504 | __in BOOTSTRAPPER_CACHE_RESOLVE_OPERATION /*recommendation*/, | ||
| 505 | __inout DWORD* /*pdwChosenSearchPath*/, | ||
| 506 | __inout BOOTSTRAPPER_CACHE_RESOLVE_OPERATION* /*pAction*/, | ||
| 498 | __inout BOOL* pfCancel | 507 | __inout BOOL* pfCancel |
| 499 | ) | 508 | ) |
| 500 | { | 509 | { |
| @@ -518,7 +527,7 @@ public: // IBootstrapperApplication | |||
| 518 | ExitFunction1(hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT)); | 527 | ExitFunction1(hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT)); |
| 519 | } | 528 | } |
| 520 | 529 | ||
| 521 | hr = BalRetryEndPackage(BALRETRY_TYPE_CACHE, wzPackageOrContainerId, wzPayloadId, hrStatus, &fRetry); | 530 | hr = BalRetryEndContainerOrPayload(wzPackageOrContainerId, wzPayloadId, hrStatus, &fRetry); |
| 522 | ExitOnFailure(hr, "BalRetryEndPackage for cache failed"); | 531 | ExitOnFailure(hr, "BalRetryEndPackage for cache failed"); |
| 523 | 532 | ||
| 524 | if (fRetry) | 533 | if (fRetry) |
| @@ -599,7 +608,7 @@ public: // IBootstrapperApplication | |||
| 599 | // Only track retry on execution (not rollback). | 608 | // Only track retry on execution (not rollback). |
| 600 | if (fExecute) | 609 | if (fExecute) |
| 601 | { | 610 | { |
| 602 | BalRetryStartPackage(BALRETRY_TYPE_EXECUTE, wzPackageId, NULL); | 611 | BalRetryStartPackage(wzPackageId); |
| 603 | } | 612 | } |
| 604 | 613 | ||
| 605 | m_fRollingBack = !fExecute; | 614 | m_fRollingBack = !fExecute; |
| @@ -700,7 +709,7 @@ public: // IBootstrapperApplication | |||
| 700 | ExitFunction1(hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT)); | 709 | ExitFunction1(hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT)); |
| 701 | } | 710 | } |
| 702 | 711 | ||
| 703 | hr = BalRetryEndPackage(BALRETRY_TYPE_EXECUTE, wzPackageId, NULL, hrStatus, &fRetry); | 712 | hr = BalRetryEndPackage(wzPackageId, hrStatus, &fRetry); |
| 704 | ExitOnFailure(hr, "BalRetryEndPackage for execute failed"); | 713 | ExitOnFailure(hr, "BalRetryEndPackage for execute failed"); |
| 705 | 714 | ||
| 706 | if (fRetry) | 715 | if (fRetry) |
| @@ -951,6 +960,9 @@ protected: | |||
| 951 | m_fApplying = FALSE; | 960 | m_fApplying = FALSE; |
| 952 | m_fRollingBack = FALSE; | 961 | m_fRollingBack = FALSE; |
| 953 | 962 | ||
| 963 | m_dwProgressPercentage = 0; | ||
| 964 | m_dwOverallProgressPercentage = 0; | ||
| 965 | |||
| 954 | BalRetryInitialize(dwRetryCount, dwRetryTimeout); | 966 | BalRetryInitialize(dwRetryCount, dwRetryTimeout); |
| 955 | } | 967 | } |
| 956 | 968 | ||
diff --git a/src/balutil/inc/BalBaseBootstrapperApplicationProc.h b/src/balutil/inc/BalBaseBootstrapperApplicationProc.h index d8a6590b..42ffeb79 100644 --- a/src/balutil/inc/BalBaseBootstrapperApplicationProc.h +++ b/src/balutil/inc/BalBaseBootstrapperApplicationProc.h | |||
| @@ -15,7 +15,7 @@ static HRESULT BalBaseBAProcOnDetectBegin( | |||
| 15 | __inout BA_ONDETECTBEGIN_RESULTS* pResults | 15 | __inout BA_ONDETECTBEGIN_RESULTS* pResults |
| 16 | ) | 16 | ) |
| 17 | { | 17 | { |
| 18 | return pBA->OnDetectBegin(pArgs->fInstalled, pArgs->cPackages, &pResults->fCancel); | 18 | return pBA->OnDetectBegin(pArgs->fCached, pArgs->fInstalled, pArgs->cPackages, &pResults->fCancel); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | static HRESULT BalBaseBAProcOnDetectComplete( | 21 | static HRESULT BalBaseBAProcOnDetectComplete( |
| @@ -303,7 +303,7 @@ static HRESULT BalBaseBAProcOnCacheAcquireBegin( | |||
| 303 | __inout BA_ONCACHEACQUIREBEGIN_RESULTS* pResults | 303 | __inout BA_ONCACHEACQUIREBEGIN_RESULTS* pResults |
| 304 | ) | 304 | ) |
| 305 | { | 305 | { |
| 306 | return pBA->OnCacheAcquireBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->operation, pArgs->wzSource, &pResults->fCancel); | 306 | return pBA->OnCacheAcquireBegin(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->wzSource, pArgs->wzDownloadUrl, pArgs->wzPayloadContainerId, pArgs->recommendation, &pResults->action, &pResults->fCancel); |
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | static HRESULT BalBaseBAProcOnCacheAcquireProgress( | 309 | static HRESULT BalBaseBAProcOnCacheAcquireProgress( |
| @@ -315,13 +315,13 @@ static HRESULT BalBaseBAProcOnCacheAcquireProgress( | |||
| 315 | return pBA->OnCacheAcquireProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); | 315 | return pBA->OnCacheAcquireProgress(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->dw64Progress, pArgs->dw64Total, pArgs->dwOverallPercentage, &pResults->fCancel); |
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | static HRESULT BalBaseBAProcOnResolveSource( | 318 | static HRESULT BalBaseBAProcOnCacheAcquireResolving( |
| 319 | __in IBootstrapperApplication* pBA, | 319 | __in IBootstrapperApplication* pBA, |
| 320 | __in BA_ONRESOLVESOURCE_ARGS* pArgs, | 320 | __in BA_ONCACHEACQUIRERESOLVING_ARGS* pArgs, |
| 321 | __inout BA_ONRESOLVESOURCE_RESULTS* pResults | 321 | __inout BA_ONCACHEACQUIRERESOLVING_RESULTS* pResults |
| 322 | ) | 322 | ) |
| 323 | { | 323 | { |
| 324 | return pBA->OnResolveSource(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->wzLocalSource, pArgs->wzDownloadSource, pArgs->recommendation, &pResults->action, &pResults->fCancel); | 324 | return pBA->OnCacheAcquireResolving(pArgs->wzPackageOrContainerId, pArgs->wzPayloadId, pArgs->rgSearchPaths, pArgs->cSearchPaths, pArgs->fFoundLocal, pArgs->dwRecommendedSearchPath, pArgs->wzDownloadUrl, pArgs->wzPayloadContainerId, pArgs->recommendation, &pResults->dwChosenSearchPath, &pResults->action, &pResults->fCancel); |
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | static HRESULT BalBaseBAProcOnCacheAcquireComplete( | 327 | static HRESULT BalBaseBAProcOnCacheAcquireComplete( |
| @@ -713,8 +713,8 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc( | |||
| 713 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS: | 713 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS: |
| 714 | hr = BalBaseBAProcOnCacheAcquireProgress(pBA, reinterpret_cast<BA_ONCACHEACQUIREPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIREPROGRESS_RESULTS*>(pvResults)); | 714 | hr = BalBaseBAProcOnCacheAcquireProgress(pBA, reinterpret_cast<BA_ONCACHEACQUIREPROGRESS_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIREPROGRESS_RESULTS*>(pvResults)); |
| 715 | break; | 715 | break; |
| 716 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONRESOLVESOURCE: | 716 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRERESOLVING: |
| 717 | hr = BalBaseBAProcOnResolveSource(pBA, reinterpret_cast<BA_ONRESOLVESOURCE_ARGS*>(pvArgs), reinterpret_cast<BA_ONRESOLVESOURCE_RESULTS*>(pvResults)); | 717 | hr = BalBaseBAProcOnCacheAcquireResolving(pBA, reinterpret_cast<BA_ONCACHEACQUIRERESOLVING_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIRERESOLVING_RESULTS*>(pvResults)); |
| 718 | break; | 718 | break; |
| 719 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE: | 719 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE: |
| 720 | hr = BalBaseBAProcOnCacheAcquireComplete(pBA, reinterpret_cast<BA_ONCACHEACQUIRECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIRECOMPLETE_RESULTS*>(pvResults)); | 720 | hr = BalBaseBAProcOnCacheAcquireComplete(pBA, reinterpret_cast<BA_ONCACHEACQUIRECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONCACHEACQUIRECOMPLETE_RESULTS*>(pvResults)); |
diff --git a/src/balutil/inc/IBootstrapperApplication.h b/src/balutil/inc/IBootstrapperApplication.h index ed70d8fe..8fcdd318 100644 --- a/src/balutil/inc/IBootstrapperApplication.h +++ b/src/balutil/inc/IBootstrapperApplication.h | |||
| @@ -21,6 +21,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
| 21 | 21 | ||
| 22 | // OnDetectBegin - called when the engine begins detection. | 22 | // OnDetectBegin - called when the engine begins detection. |
| 23 | STDMETHOD(OnDetectBegin)( | 23 | STDMETHOD(OnDetectBegin)( |
| 24 | __in BOOL fCached, | ||
| 24 | __in BOOL fInstalled, | 25 | __in BOOL fInstalled, |
| 25 | __in DWORD cPackages, | 26 | __in DWORD cPackages, |
| 26 | __inout BOOL* pfCancel | 27 | __inout BOOL* pfCancel |
| @@ -279,14 +280,20 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
| 279 | __inout BOOL* pfCancel | 280 | __inout BOOL* pfCancel |
| 280 | ) = 0; | 281 | ) = 0; |
| 281 | 282 | ||
| 282 | // OnCacheAcquireBegin - called when the engine begins copying or | 283 | // OnCacheAcquireBegin - called when the engine begins acquiring a payload or container. |
| 283 | // downloading a payload to the working folder. | 284 | // |
| 285 | // Notes: | ||
| 286 | // It is expected the BA may call IBootstrapperEngine::SetLocalSource() or IBootstrapperEngine::SetDownloadSource() | ||
| 287 | // to update the source location before returning. | ||
| 284 | // | 288 | // |
| 285 | STDMETHOD(OnCacheAcquireBegin)( | 289 | STDMETHOD(OnCacheAcquireBegin)( |
| 286 | __in_z_opt LPCWSTR wzPackageOrContainerId, | 290 | __in_z_opt LPCWSTR wzPackageOrContainerId, |
| 287 | __in_z_opt LPCWSTR wzPayloadId, | 291 | __in_z_opt LPCWSTR wzPayloadId, |
| 288 | __in BOOTSTRAPPER_CACHE_OPERATION operation, | ||
| 289 | __in_z LPCWSTR wzSource, | 292 | __in_z LPCWSTR wzSource, |
| 293 | __in_z_opt LPCWSTR wzDownloadUrl, | ||
| 294 | __in_z_opt LPCWSTR wzPayloadContainerId, | ||
| 295 | __in BOOTSTRAPPER_CACHE_OPERATION recommendation, | ||
| 296 | __inout BOOTSTRAPPER_CACHE_OPERATION* pAction, | ||
| 290 | __inout BOOL* pfCancel | 297 | __inout BOOL* pfCancel |
| 291 | ) = 0; | 298 | ) = 0; |
| 292 | 299 | ||
| @@ -302,27 +309,38 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
| 302 | __inout BOOL* pfCancel | 309 | __inout BOOL* pfCancel |
| 303 | ) = 0; | 310 | ) = 0; |
| 304 | 311 | ||
| 305 | // OnResolveSource - called when a payload or container cannot be found locally. | 312 | // OnCacheAcquireResolving - called to allow the BA to override the acquisition action for the payload or container. |
| 306 | // | 313 | // |
| 307 | // Parameters: | 314 | // Parameters: |
| 315 | // wzPackageOrContainerId will be NULL when resolving a layout-only payload. | ||
| 308 | // wzPayloadId will be NULL when resolving a container. | 316 | // wzPayloadId will be NULL when resolving a container. |
| 309 | // wzDownloadSource will be NULL if the container or payload does not provide a DownloadURL. | 317 | // wzDownloadUrl will be NULL if the container or payload does not provide a DownloadURL. |
| 318 | // wzPayloadContainerId will not be NULL if acquiring a payload that is in a container. | ||
| 310 | // | 319 | // |
| 311 | // Notes: | 320 | // rgSearchPaths are the search paths used for source resolution. |
| 312 | // It is expected the BA may call IBootstrapperEngine::SetLocalSource() or IBootstrapperEngine::SetDownloadSource() | 321 | // fFoundLocal is TRUE when dwRecommendedSearchPath indicates that the file was found. |
| 313 | // to update the source location before returning BOOTSTRAPPER_RESOLVESOURCE_ACTION_RETRY or BOOTSTRAPPER_RESOLVESOURCE_ACTION_DOWNLOAD. | 322 | // dwRecommendedSearchPath is the index into rgSearchPaths for the recommended local file. |
| 314 | STDMETHOD(OnResolveSource)( | 323 | // |
| 315 | __in_z LPCWSTR wzPackageOrContainerId, | 324 | STDMETHOD(OnCacheAcquireResolving)( |
| 325 | __in_z_opt LPCWSTR wzPackageOrContainerId, | ||
| 316 | __in_z_opt LPCWSTR wzPayloadId, | 326 | __in_z_opt LPCWSTR wzPayloadId, |
| 317 | __in_z LPCWSTR wzLocalSource, | 327 | __in_z LPCWSTR* rgSearchPaths, |
| 318 | __in_z_opt LPCWSTR wzDownloadSource, | 328 | __in DWORD cSearchPaths, |
| 319 | __in BOOTSTRAPPER_RESOLVESOURCE_ACTION recommendation, | 329 | __in BOOL fFoundLocal, |
| 320 | __inout BOOTSTRAPPER_RESOLVESOURCE_ACTION* pAction, | 330 | __in DWORD dwRecommendedSearchPath, |
| 331 | __in_z_opt LPCWSTR wzDownloadUrl, | ||
| 332 | __in_z_opt LPCWSTR wzPayloadContainerId, | ||
| 333 | __in BOOTSTRAPPER_CACHE_RESOLVE_OPERATION recommendation, | ||
| 334 | __inout DWORD* pdwChosenSearchPath, | ||
| 335 | __inout BOOTSTRAPPER_CACHE_RESOLVE_OPERATION* pAction, | ||
| 321 | __inout BOOL* pfCancel | 336 | __inout BOOL* pfCancel |
| 322 | ) = 0; | 337 | ) = 0; |
| 323 | 338 | ||
| 324 | // OnCacheAcquireComplete - called after the engine copied or downloaded | 339 | // OnCacheAcquireComplete - called after the engine acquired the payload or container. |
| 325 | // a payload to the working folder. | 340 | // |
| 341 | // Notes: | ||
| 342 | // It is expected the BA may call IBootstrapperEngine::SetLocalSource() or IBootstrapperEngine::SetDownloadSource() | ||
| 343 | // to update the source location before returning BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_RETRY. | ||
| 326 | // | 344 | // |
| 327 | STDMETHOD(OnCacheAcquireComplete)( | 345 | STDMETHOD(OnCacheAcquireComplete)( |
| 328 | __in_z_opt LPCWSTR wzPackageOrContainerId, | 346 | __in_z_opt LPCWSTR wzPackageOrContainerId, |
diff --git a/src/balutil/inc/balretry.h b/src/balutil/inc/balretry.h index 040ab4ae..35282a7e 100644 --- a/src/balutil/inc/balretry.h +++ b/src/balutil/inc/balretry.h | |||
| @@ -6,12 +6,6 @@ | |||
| 6 | extern "C" { | 6 | extern "C" { |
| 7 | #endif | 7 | #endif |
| 8 | 8 | ||
| 9 | typedef enum BALRETRY_TYPE | ||
| 10 | { | ||
| 11 | BALRETRY_TYPE_CACHE, | ||
| 12 | BALRETRY_TYPE_EXECUTE, | ||
| 13 | } BALRETRY_TYPE; | ||
| 14 | |||
| 15 | /******************************************************************* | 9 | /******************************************************************* |
| 16 | BalRetryInitialize - initialize the retry count and timeout between | 10 | BalRetryInitialize - initialize the retry count and timeout between |
| 17 | retries (in milliseconds). | 11 | retries (in milliseconds). |
| @@ -33,9 +27,7 @@ DAPI_(void) BalRetryUninitialize(); | |||
| 33 | wait the specified timeout. | 27 | wait the specified timeout. |
| 34 | ********************************************************************/ | 28 | ********************************************************************/ |
| 35 | DAPI_(void) BalRetryStartPackage( | 29 | DAPI_(void) BalRetryStartPackage( |
| 36 | __in BALRETRY_TYPE type, | 30 | __in_z LPCWSTR wzPackageId |
| 37 | __in_z_opt LPCWSTR wzPackageId, | ||
| 38 | __in_z_opt LPCWSTR wzPayloadId | ||
| 39 | ); | 31 | ); |
| 40 | 32 | ||
| 41 | /******************************************************************* | 33 | /******************************************************************* |
| @@ -43,17 +35,34 @@ DAPI_(void) BalRetryStartPackage( | |||
| 43 | to consider. | 35 | to consider. |
| 44 | ********************************************************************/ | 36 | ********************************************************************/ |
| 45 | DAPI_(void) BalRetryErrorOccurred( | 37 | DAPI_(void) BalRetryErrorOccurred( |
| 46 | __in_z_opt LPCWSTR wzPackageId, | 38 | __in_z LPCWSTR wzPackageId, |
| 47 | __in DWORD dwError | 39 | __in DWORD dwError |
| 48 | ); | 40 | ); |
| 49 | 41 | ||
| 50 | /******************************************************************* | 42 | /******************************************************************* |
| 51 | BalRetryEndPackage - returns IDRETRY is a retry is recommended or | 43 | BalRetryEndPackage - returns TRUE if a retry is recommended. |
| 52 | IDNOACTION if a retry is not recommended. | ||
| 53 | ********************************************************************/ | 44 | ********************************************************************/ |
| 54 | DAPI_(HRESULT) BalRetryEndPackage( | 45 | DAPI_(HRESULT) BalRetryEndPackage( |
| 55 | __in BALRETRY_TYPE type, | 46 | __in_z LPCWSTR wzPackageId, |
| 56 | __in_z_opt LPCWSTR wzPackageId, | 47 | __in HRESULT hrError, |
| 48 | __inout BOOL* pfRetry | ||
| 49 | ); | ||
| 50 | |||
| 51 | /******************************************************************* | ||
| 52 | BalRetryStartContainerOrPayload - call when a container or payload | ||
| 53 | begins to be acquired. If the target is being retried, | ||
| 54 | the function will wait the specified timeout. | ||
| 55 | ********************************************************************/ | ||
| 56 | DAPI_(void) BalRetryStartContainerOrPayload( | ||
| 57 | __in_z_opt LPCWSTR wzContainerOrPackageId, | ||
| 58 | __in_z_opt LPCWSTR wzPayloadId | ||
| 59 | ); | ||
| 60 | |||
| 61 | /******************************************************************* | ||
| 62 | BalRetryEndContainerOrPayload - returns TRUE if a retry is recommended. | ||
| 63 | ********************************************************************/ | ||
| 64 | DAPI_(HRESULT) BalRetryEndContainerOrPayload( | ||
| 65 | __in_z_opt LPCWSTR wzContainerOrPackageId, | ||
| 57 | __in_z_opt LPCWSTR wzPayloadId, | 66 | __in_z_opt LPCWSTR wzPayloadId, |
| 58 | __in HRESULT hrError, | 67 | __in HRESULT hrError, |
| 59 | __inout BOOL* pfRetry | 68 | __inout BOOL* pfRetry |
diff --git a/src/balutil/packages.config b/src/balutil/packages.config index 0a0e5748..de70fed1 100644 --- a/src/balutil/packages.config +++ b/src/balutil/packages.config | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <packages> | 2 | <packages> |
| 3 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> |
| 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.110" targetFramework="native" /> | 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.132" targetFramework="native" /> |
| 5 | <package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" /> | 5 | <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" /> |
| 6 | </packages> \ No newline at end of file | 6 | </packages> \ No newline at end of file |
diff --git a/src/bextutil/bextutil.vcxproj b/src/bextutil/bextutil.vcxproj index 5007afb8..c8671f3b 100644 --- a/src/bextutil/bextutil.vcxproj +++ b/src/bextutil/bextutil.vcxproj | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | <!-- 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 | <!-- 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. --> |
| 3 | 3 | ||
| 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" /> |
| 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" /> | 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" /> |
| 7 | 7 | ||
| 8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
| 9 | <ProjectConfiguration Include="Debug|ARM64"> | 9 | <ProjectConfiguration Include="Debug|ARM64"> |
| @@ -87,8 +87,8 @@ | |||
| 87 | <PropertyGroup> | 87 | <PropertyGroup> |
| 88 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 88 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
| 89 | </PropertyGroup> | 89 | </PropertyGroup> |
| 90 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" /> | 90 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" /> |
| 91 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> | 91 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> |
| 92 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props'))" /> | 92 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props'))" /> |
| 93 | </Target> | 93 | </Target> |
| 94 | </Project> \ No newline at end of file | 94 | </Project> \ No newline at end of file |
diff --git a/src/bextutil/packages.config b/src/bextutil/packages.config index 0a0e5748..de70fed1 100644 --- a/src/bextutil/packages.config +++ b/src/bextutil/packages.config | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <packages> | 2 | <packages> |
| 3 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> |
| 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.110" targetFramework="native" /> | 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.132" targetFramework="native" /> |
| 5 | <package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" /> | 5 | <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" /> |
| 6 | </packages> \ No newline at end of file | 6 | </packages> \ No newline at end of file |
diff --git a/src/mbanative/mbanative.vcxproj b/src/mbanative/mbanative.vcxproj index 0f2e6ee0..729d5df2 100644 --- a/src/mbanative/mbanative.vcxproj +++ b/src/mbanative/mbanative.vcxproj | |||
| @@ -2,11 +2,11 @@ | |||
| 2 | <!-- 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 | <!-- 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. --> |
| 3 | 3 | ||
| 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" /> |
| 6 | <Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" /> | 6 | <Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" /> |
| 7 | <Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" /> | 7 | <Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" /> |
| 8 | <Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" /> | 8 | <Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" /> |
| 9 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" /> | 9 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" /> |
| 10 | 10 | ||
| 11 | <ItemGroup Label="ProjectConfigurations"> | 11 | <ItemGroup Label="ProjectConfigurations"> |
| 12 | <ProjectConfiguration Include="Debug|ARM64"> | 12 | <ProjectConfiguration Include="Debug|ARM64"> |
| @@ -96,7 +96,7 @@ | |||
| 96 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props'))" /> | 96 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props'))" /> |
| 97 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets'))" /> | 97 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets'))" /> |
| 98 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> | 98 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> |
| 99 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" /> | 99 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" /> |
| 100 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props'))" /> | 100 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props'))" /> |
| 101 | </Target> | 101 | </Target> |
| 102 | </Project> \ No newline at end of file | 102 | </Project> \ No newline at end of file |
diff --git a/src/mbanative/packages.config b/src/mbanative/packages.config index a6397667..b5ba712e 100644 --- a/src/mbanative/packages.config +++ b/src/mbanative/packages.config | |||
| @@ -4,6 +4,6 @@ | |||
| 4 | <package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" /> | 4 | <package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" /> |
| 5 | <package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" /> | 5 | <package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" /> |
| 6 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> | 6 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> |
| 7 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.110" targetFramework="native" /> | 7 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.132" targetFramework="native" /> |
| 8 | <package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" /> | 8 | <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" /> |
| 9 | </packages> \ No newline at end of file | 9 | </packages> \ No newline at end of file |
diff --git a/src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj b/src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj index 7fe93b60..95d7ed5f 100644 --- a/src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj +++ b/src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj | |||
| @@ -3,9 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 5 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 6 | <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props')" /> | 6 | <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" /> |
| 7 | <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" /> | 7 | <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" /> |
| 8 | <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" /> | 8 | <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" /> |
| 9 | <ItemGroup Label="ProjectConfigurations"> | 9 | <ItemGroup Label="ProjectConfigurations"> |
| 10 | <ProjectConfiguration Include="Debug|Win32"> | 10 | <ProjectConfiguration Include="Debug|Win32"> |
| 11 | <Configuration>Debug</Configuration> | 11 | <Configuration>Debug</Configuration> |
| @@ -69,7 +69,7 @@ | |||
| 69 | </PropertyGroup> | 69 | </PropertyGroup> |
| 70 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props'))" /> | 70 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props'))" /> |
| 71 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets'))" /> | 71 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets'))" /> |
| 72 | <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" /> | 72 | <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" /> |
| 73 | <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props'))" /> | 73 | <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props'))" /> |
| 74 | </Target> | 74 | </Target> |
| 75 | </Project> \ No newline at end of file | 75 | </Project> \ No newline at end of file |
diff --git a/src/test/BalUtilUnitTest/packages.config b/src/test/BalUtilUnitTest/packages.config index b8befee3..49b76211 100644 --- a/src/test/BalUtilUnitTest/packages.config +++ b/src/test/BalUtilUnitTest/packages.config | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | <packages> | 3 | <packages> |
| 4 | <package id="WixBuildTools.TestSupport" version="4.0.47" /> | 4 | <package id="WixBuildTools.TestSupport" version="4.0.47" /> |
| 5 | <package id="WixBuildTools.TestSupport.Native" version="4.0.47" /> | 5 | <package id="WixBuildTools.TestSupport.Native" version="4.0.47" /> |
| 6 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.110" targetFramework="native" /> | 6 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.132" targetFramework="native" /> |
| 7 | <package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" /> | 7 | <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" /> |
| 8 | <package id="xunit.abstractions" version="2.0.3" /> | 8 | <package id="xunit.abstractions" version="2.0.3" /> |
| 9 | <package id="xunit.assert" version="2.4.1" /> | 9 | <package id="xunit.assert" version="2.4.1" /> |
| 10 | <package id="xunit.core" version="2.4.1" /> | 10 | <package id="xunit.core" version="2.4.1" /> |
diff --git a/src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj b/src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj index ee676f28..886e3c2c 100644 --- a/src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj +++ b/src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj | |||
| @@ -3,9 +3,9 @@ | |||
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 5 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 6 | <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props')" /> | 6 | <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" /> |
| 7 | <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" /> | 7 | <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" /> |
| 8 | <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" /> | 8 | <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" /> |
| 9 | <ItemGroup Label="ProjectConfigurations"> | 9 | <ItemGroup Label="ProjectConfigurations"> |
| 10 | <ProjectConfiguration Include="Debug|Win32"> | 10 | <ProjectConfiguration Include="Debug|Win32"> |
| 11 | <Configuration>Debug</Configuration> | 11 | <Configuration>Debug</Configuration> |
| @@ -68,7 +68,7 @@ | |||
| 68 | </PropertyGroup> | 68 | </PropertyGroup> |
| 69 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props'))" /> | 69 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props'))" /> |
| 70 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets'))" /> | 70 | <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets'))" /> |
| 71 | <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" /> | 71 | <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.70\build\WixToolset.DUtil.props'))" /> |
| 72 | <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.110\build\WixToolset.BootstrapperCore.Native.props'))" /> | 72 | <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.132\build\WixToolset.BootstrapperCore.Native.props'))" /> |
| 73 | </Target> | 73 | </Target> |
| 74 | </Project> \ No newline at end of file | 74 | </Project> \ No newline at end of file |
diff --git a/src/test/BextUtilUnitTest/packages.config b/src/test/BextUtilUnitTest/packages.config index b8befee3..49b76211 100644 --- a/src/test/BextUtilUnitTest/packages.config +++ b/src/test/BextUtilUnitTest/packages.config | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | <packages> | 3 | <packages> |
| 4 | <package id="WixBuildTools.TestSupport" version="4.0.47" /> | 4 | <package id="WixBuildTools.TestSupport" version="4.0.47" /> |
| 5 | <package id="WixBuildTools.TestSupport.Native" version="4.0.47" /> | 5 | <package id="WixBuildTools.TestSupport.Native" version="4.0.47" /> |
| 6 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.110" targetFramework="native" /> | 6 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.132" targetFramework="native" /> |
| 7 | <package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" /> | 7 | <package id="WixToolset.DUtil" version="4.0.70" targetFramework="native" /> |
| 8 | <package id="xunit.abstractions" version="2.0.3" /> | 8 | <package id="xunit.abstractions" version="2.0.3" /> |
| 9 | <package id="xunit.assert" version="2.4.1" /> | 9 | <package id="xunit.assert" version="2.4.1" /> |
| 10 | <package id="xunit.core" version="2.4.1" /> | 10 | <package id="xunit.core" version="2.4.1" /> |
