diff options
| author | Bob Arnson <bob@firegiant.com> | 2026-02-04 20:47:04 -0500 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2026-02-04 20:47:04 -0500 |
| commit | edccb203c421d2bd820062024088c6698424d9ee (patch) | |
| tree | 6b47c3eb5ca53bd9f79f3d032dc1a596d411bf38 | |
| parent | a3d3963f806117ce123d95e8b77e73e1c1545b25 (diff) | |
| download | wix-bob/ConfigurableScopeBundles.tar.gz wix-bob/ConfigurableScopeBundles.tar.bz2 wix-bob/ConfigurableScopeBundles.zip | |
Support dual-purpose packages in Burn.bob/ConfigurableScopeBundles
Fixes https://github.com/wixtoolset/issues/issues/8958
174 files changed, 3547 insertions, 649 deletions
diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperCommand.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperCommand.cs index 612e8ce9..795a40d4 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperCommand.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperCommand.cs | |||
| @@ -20,6 +20,7 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 20 | [MarshalAs(UnmanagedType.I4)] internal int cbSize; | 20 | [MarshalAs(UnmanagedType.I4)] internal int cbSize; |
| 21 | [MarshalAs(UnmanagedType.U4)] private readonly LaunchAction action; | 21 | [MarshalAs(UnmanagedType.U4)] private readonly LaunchAction action; |
| 22 | [MarshalAs(UnmanagedType.U4)] private readonly Display display; | 22 | [MarshalAs(UnmanagedType.U4)] private readonly Display display; |
| 23 | [MarshalAs(UnmanagedType.U4)] private readonly BundleScope scope; | ||
| 23 | private readonly IntPtr wzCommandLine; | 24 | private readonly IntPtr wzCommandLine; |
| 24 | [MarshalAs(UnmanagedType.I4)] private readonly int nCmdShow; | 25 | [MarshalAs(UnmanagedType.I4)] private readonly int nCmdShow; |
| 25 | [MarshalAs(UnmanagedType.U4)] private readonly ResumeType resume; | 26 | [MarshalAs(UnmanagedType.U4)] private readonly ResumeType resume; |
| @@ -39,6 +40,7 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 39 | return new BootstrapperCommand( | 40 | return new BootstrapperCommand( |
| 40 | this.action, | 41 | this.action, |
| 41 | this.display, | 42 | this.display, |
| 43 | this.scope, | ||
| 42 | Marshal.PtrToStringUni(this.wzCommandLine), | 44 | Marshal.PtrToStringUni(this.wzCommandLine), |
| 43 | this.nCmdShow, | 45 | this.nCmdShow, |
| 44 | this.resume, | 46 | this.resume, |
| @@ -62,6 +64,7 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 62 | public BootstrapperCommand( | 64 | public BootstrapperCommand( |
| 63 | LaunchAction action, | 65 | LaunchAction action, |
| 64 | Display display, | 66 | Display display, |
| 67 | BundleScope scope, | ||
| 65 | string commandLine, | 68 | string commandLine, |
| 66 | int cmdShow, | 69 | int cmdShow, |
| 67 | ResumeType resume, | 70 | ResumeType resume, |
| @@ -74,6 +77,7 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 74 | { | 77 | { |
| 75 | this.Action = action; | 78 | this.Action = action; |
| 76 | this.Display = display; | 79 | this.Display = display; |
| 80 | this.Scope = scope; | ||
| 77 | this.CommandLine = commandLine; | 81 | this.CommandLine = commandLine; |
| 78 | this.CmdShow = cmdShow; | 82 | this.CmdShow = cmdShow; |
| 79 | this.Resume = resume; | 83 | this.Resume = resume; |
| @@ -92,6 +96,9 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 92 | public Display Display { get; } | 96 | public Display Display { get; } |
| 93 | 97 | ||
| 94 | /// <inheritdoc/> | 98 | /// <inheritdoc/> |
| 99 | public BundleScope Scope { get; } | ||
| 100 | |||
| 101 | /// <inheritdoc/> | ||
| 95 | public string CommandLine { get; } | 102 | public string CommandLine { get; } |
| 96 | 103 | ||
| 97 | /// <inheritdoc/> | 104 | /// <inheritdoc/> |
diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs index 25413790..82978b7d 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs | |||
| @@ -12,7 +12,7 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 12 | /// </summary> | 12 | /// </summary> |
| 13 | public sealed class Engine : IEngine | 13 | public sealed class Engine : IEngine |
| 14 | { | 14 | { |
| 15 | private IBootstrapperEngine engine; | 15 | private readonly IBootstrapperEngine engine; |
| 16 | 16 | ||
| 17 | internal Engine(IBootstrapperEngine engine) | 17 | internal Engine(IBootstrapperEngine engine) |
| 18 | { | 18 | { |
| @@ -24,8 +24,7 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 24 | { | 24 | { |
| 25 | get | 25 | get |
| 26 | { | 26 | { |
| 27 | int count; | 27 | this.engine.GetPackageCount(out var count); |
| 28 | this.engine.GetPackageCount(out count); | ||
| 29 | 28 | ||
| 30 | return count; | 29 | return count; |
| 31 | } | 30 | } |
| @@ -110,8 +109,7 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 110 | /// <inheritdoc/> | 109 | /// <inheritdoc/> |
| 111 | public bool EvaluateCondition(string condition) | 110 | public bool EvaluateCondition(string condition) |
| 112 | { | 111 | { |
| 113 | bool value; | 112 | this.engine.EvaluateCondition(condition, out var value); |
| 114 | this.engine.EvaluateCondition(condition, out value); | ||
| 115 | 113 | ||
| 116 | return value; | 114 | return value; |
| 117 | } | 115 | } |
| @@ -247,9 +245,9 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 247 | } | 245 | } |
| 248 | 246 | ||
| 249 | /// <inheritdoc/> | 247 | /// <inheritdoc/> |
| 250 | public void Plan(LaunchAction action) | 248 | public void Plan(LaunchAction action, BundleScope plannedScope) |
| 251 | { | 249 | { |
| 252 | this.engine.Plan(action); | 250 | this.engine.Plan(action, plannedScope); |
| 253 | } | 251 | } |
| 254 | 252 | ||
| 255 | /// <inheritdoc/> | 253 | /// <inheritdoc/> |
| @@ -327,16 +325,16 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 327 | /// <inheritdoc/> | 325 | /// <inheritdoc/> |
| 328 | public int SendEmbeddedError(int errorCode, string message, int uiHint) | 326 | public int SendEmbeddedError(int errorCode, string message, int uiHint) |
| 329 | { | 327 | { |
| 330 | int result = 0; | 328 | this.engine.SendEmbeddedError(errorCode, message, uiHint, out var result); |
| 331 | this.engine.SendEmbeddedError(errorCode, message, uiHint, out result); | 329 | |
| 332 | return result; | 330 | return result; |
| 333 | } | 331 | } |
| 334 | 332 | ||
| 335 | /// <inheritdoc/> | 333 | /// <inheritdoc/> |
| 336 | public int SendEmbeddedProgress(int progressPercentage, int overallPercentage) | 334 | public int SendEmbeddedProgress(int progressPercentage, int overallPercentage) |
| 337 | { | 335 | { |
| 338 | int result = 0; | 336 | this.engine.SendEmbeddedProgress(progressPercentage, overallPercentage, out var result); |
| 339 | this.engine.SendEmbeddedProgress(progressPercentage, overallPercentage, out result); | 337 | |
| 340 | return result; | 338 | return result; |
| 341 | } | 339 | } |
| 342 | 340 | ||
diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperCommand.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperCommand.cs index a1f8bfe0..7a5a4cfd 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperCommand.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperCommand.cs | |||
| @@ -20,6 +20,11 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 20 | Display Display { get; } | 20 | Display Display { get; } |
| 21 | 21 | ||
| 22 | /// <summary> | 22 | /// <summary> |
| 23 | /// Gets the bundle scope if set at the command line. | ||
| 24 | /// </summary> | ||
| 25 | BundleScope Scope { get; } | ||
| 26 | |||
| 27 | /// <summary> | ||
| 23 | /// Gets the command line arguments. | 28 | /// Gets the command line arguments. |
| 24 | /// </summary> | 29 | /// </summary> |
| 25 | /// <returns> | 30 | /// <returns> |
diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs index 13702757..9df57cd3 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs | |||
| @@ -178,10 +178,11 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 178 | ); | 178 | ); |
| 179 | 179 | ||
| 180 | /// <summary> | 180 | /// <summary> |
| 181 | /// See <see cref="IEngine.Plan(LaunchAction)"/>. | 181 | /// See <see cref="IEngine.Plan(LaunchAction, BundleScope)"/>. |
| 182 | /// </summary> | 182 | /// </summary> |
| 183 | void Plan( | 183 | void Plan( |
| 184 | [MarshalAs(UnmanagedType.U4)] LaunchAction action | 184 | [MarshalAs(UnmanagedType.U4)] LaunchAction action, |
| 185 | [MarshalAs(UnmanagedType.U4)] BundleScope plannedScope | ||
| 185 | ); | 186 | ); |
| 186 | 187 | ||
| 187 | /// <summary> | 188 | /// <summary> |
| @@ -344,6 +345,28 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 344 | } | 345 | } |
| 345 | 346 | ||
| 346 | /// <summary> | 347 | /// <summary> |
| 348 | /// The scope of the bundle when the chain contains per-user-or-machine or per-machone-or-user packages. | ||
| 349 | /// </summary> | ||
| 350 | public enum BundleScope | ||
| 351 | { | ||
| 352 | /// <summary> | ||
| 353 | /// Let Burn choose the scope. Per-user-or-machine packages will be | ||
| 354 | /// planned as per-machine packages. | ||
| 355 | /// </summary> | ||
| 356 | Default, | ||
| 357 | |||
| 358 | /// <summary> | ||
| 359 | /// Set per-machine scope for per-user-or-machine packages. | ||
| 360 | /// </summary> | ||
| 361 | PerMachine, | ||
| 362 | |||
| 363 | /// <summary> | ||
| 364 | /// Set per-user scope for per-user-or-machine packages. | ||
| 365 | /// </summary> | ||
| 366 | PerUser, | ||
| 367 | } | ||
| 368 | |||
| 369 | /// <summary> | ||
| 347 | /// The message log level. | 370 | /// The message log level. |
| 348 | /// </summary> | 371 | /// </summary> |
| 349 | public enum LogLevel | 372 | public enum LogLevel |
diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs index 03ceed06..a763d741 100644 --- a/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs | |||
| @@ -139,7 +139,8 @@ namespace WixToolset.BootstrapperApplicationApi | |||
| 139 | /// Determine the installation sequencing and costing. | 139 | /// Determine the installation sequencing and costing. |
| 140 | /// </summary> | 140 | /// </summary> |
| 141 | /// <param name="action">The action to perform when planning.</param> | 141 | /// <param name="action">The action to perform when planning.</param> |
| 142 | void Plan(LaunchAction action); | 142 | /// <param name="plannedScope">The bundle scope for per-user-or-machine packages.</param> |
| 143 | void Plan(LaunchAction action, BundleScope plannedScope); | ||
| 143 | 144 | ||
| 144 | /// <summary> | 145 | /// <summary> |
| 145 | /// Set the update information for a bundle. | 146 | /// Set the update information for a bundle. |
diff --git a/src/api/burn/balutil/BalBootstrapperEngine.cpp b/src/api/burn/balutil/BalBootstrapperEngine.cpp index 61e7e31b..14aa5c25 100644 --- a/src/api/burn/balutil/BalBootstrapperEngine.cpp +++ b/src/api/burn/balutil/BalBootstrapperEngine.cpp | |||
| @@ -1188,7 +1188,8 @@ public: // IBootstrapperEngine | |||
| 1188 | } | 1188 | } |
| 1189 | 1189 | ||
| 1190 | virtual STDMETHODIMP Plan( | 1190 | virtual STDMETHODIMP Plan( |
| 1191 | __in BOOTSTRAPPER_ACTION action | 1191 | __in BOOTSTRAPPER_ACTION action, |
| 1192 | __in BOOTSTRAPPER_SCOPE plannedScope | ||
| 1192 | ) | 1193 | ) |
| 1193 | { | 1194 | { |
| 1194 | HRESULT hr = S_OK; | 1195 | HRESULT hr = S_OK; |
| @@ -1199,17 +1200,21 @@ public: // IBootstrapperEngine | |||
| 1199 | PIPE_RPC_RESULT rpc = { }; | 1200 | PIPE_RPC_RESULT rpc = { }; |
| 1200 | 1201 | ||
| 1201 | // Init send structs. | 1202 | // Init send structs. |
| 1202 | args.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; | 1203 | args.dwApiVersion = WIX_7_BOOTSTRAPPER_APPLICATION_API_VERSION; |
| 1203 | args.action = action; | 1204 | args.action = action; |
| 1205 | args.plannedScope = plannedScope; | ||
| 1204 | 1206 | ||
| 1205 | results.dwApiVersion = WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION; | 1207 | results.dwApiVersion = WIX_7_BOOTSTRAPPER_APPLICATION_API_VERSION; |
| 1206 | 1208 | ||
| 1207 | // Send args. | 1209 | // Send args. |
| 1208 | hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); | 1210 | hr = BuffWriteNumberToBuffer(&bufferArgs, args.dwApiVersion); |
| 1209 | ExitOnFailure(hr, "Failed to write API version of Plan args."); | 1211 | ExitOnFailure(hr, "Failed to write API version of Plan args."); |
| 1210 | 1212 | ||
| 1211 | hr = BuffWriteNumberToBuffer(&bufferArgs, static_cast<DWORD>(args.action)); | 1213 | hr = BuffWriteNumberToBuffer(&bufferArgs, static_cast<DWORD>(args.action)); |
| 1212 | ExitOnFailure(hr, "Failed to write parent window of Plan args."); | 1214 | ExitOnFailure(hr, "Failed to write action of Plan args."); |
| 1215 | |||
| 1216 | hr = BuffWriteNumberToBuffer(&bufferArgs, static_cast<DWORD>(args.plannedScope)); | ||
| 1217 | ExitOnFailure(hr, "Failed to write planned scope of Plan args."); | ||
| 1213 | 1218 | ||
| 1214 | // Send results. | 1219 | // Send results. |
| 1215 | hr = BuffWriteNumberToBuffer(&bufferResults, results.dwApiVersion); | 1220 | hr = BuffWriteNumberToBuffer(&bufferResults, results.dwApiVersion); |
diff --git a/src/api/burn/balutil/inc/BootstrapperApplicationBase.h b/src/api/burn/balutil/inc/BootstrapperApplicationBase.h index 80bfd361..41c151d9 100644 --- a/src/api/burn/balutil/inc/BootstrapperApplicationBase.h +++ b/src/api/burn/balutil/inc/BootstrapperApplicationBase.h | |||
| @@ -16,7 +16,7 @@ class CBootstrapperApplicationBase : public IBootstrapperApplication | |||
| 16 | public: // IUnknown | 16 | public: // IUnknown |
| 17 | virtual STDMETHODIMP QueryInterface( | 17 | virtual STDMETHODIMP QueryInterface( |
| 18 | __in REFIID riid, | 18 | __in REFIID riid, |
| 19 | __out LPVOID *ppvObject | 19 | __out LPVOID* ppvObject |
| 20 | ) | 20 | ) |
| 21 | { | 21 | { |
| 22 | if (!ppvObject) | 22 | if (!ppvObject) |
| @@ -478,12 +478,14 @@ public: // IBootstrapperApplication | |||
| 478 | __in DWORD dwCode, | 478 | __in DWORD dwCode, |
| 479 | __in_z LPCWSTR wzError, | 479 | __in_z LPCWSTR wzError, |
| 480 | __in DWORD dwUIHint, | 480 | __in DWORD dwUIHint, |
| 481 | __in DWORD /*cData*/, | 481 | __in DWORD cData, |
| 482 | __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, | 482 | __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, |
| 483 | __in int /*nRecommendation*/, | 483 | __in int /*nRecommendation*/, |
| 484 | __inout int* pResult | 484 | __inout int* pResult |
| 485 | ) | 485 | ) |
| 486 | { | 486 | { |
| 487 | UNREFERENCED_PARAMETER(cData); | ||
| 488 | |||
| 487 | BalRetryErrorOccurred(wzPackageId, dwCode); | 489 | BalRetryErrorOccurred(wzPackageId, dwCode); |
| 488 | 490 | ||
| 489 | if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_commandDisplay) | 491 | if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_commandDisplay) |
| @@ -781,12 +783,14 @@ public: // IBootstrapperApplication | |||
| 781 | __in INSTALLMESSAGE /*messageType*/, | 783 | __in INSTALLMESSAGE /*messageType*/, |
| 782 | __in DWORD /*dwUIHint*/, | 784 | __in DWORD /*dwUIHint*/, |
| 783 | __in_z LPCWSTR /*wzMessage*/, | 785 | __in_z LPCWSTR /*wzMessage*/, |
| 784 | __in DWORD /*cData*/, | 786 | __in DWORD cData, |
| 785 | __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, | 787 | __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/, |
| 786 | __in int /*nRecommendation*/, | 788 | __in int /*nRecommendation*/, |
| 787 | __inout int* pResult | 789 | __inout int* pResult |
| 788 | ) | 790 | ) |
| 789 | { | 791 | { |
| 792 | UNREFERENCED_PARAMETER(cData); | ||
| 793 | |||
| 790 | if (CheckCanceled()) | 794 | if (CheckCanceled()) |
| 791 | { | 795 | { |
| 792 | *pResult = IDCANCEL; | 796 | *pResult = IDCANCEL; |
| @@ -797,13 +801,15 @@ public: // IBootstrapperApplication | |||
| 797 | 801 | ||
| 798 | virtual STDMETHODIMP OnExecuteFilesInUse( | 802 | virtual STDMETHODIMP OnExecuteFilesInUse( |
| 799 | __in_z LPCWSTR /*wzPackageId*/, | 803 | __in_z LPCWSTR /*wzPackageId*/, |
| 800 | __in DWORD /*cFiles*/, | 804 | __in DWORD cFiles, |
| 801 | __in_ecount_z(cFiles) LPCWSTR* /*rgwzFiles*/, | 805 | __in_ecount_z(cFiles) LPCWSTR* /*rgwzFiles*/, |
| 802 | __in int /*nRecommendation*/, | 806 | __in int /*nRecommendation*/, |
| 803 | __in BOOTSTRAPPER_FILES_IN_USE_TYPE /*source*/, | 807 | __in BOOTSTRAPPER_FILES_IN_USE_TYPE /*source*/, |
| 804 | __inout int* pResult | 808 | __inout int* pResult |
| 805 | ) | 809 | ) |
| 806 | { | 810 | { |
| 811 | UNREFERENCED_PARAMETER(cFiles); | ||
| 812 | |||
| 807 | if (CheckCanceled()) | 813 | if (CheckCanceled()) |
| 808 | { | 814 | { |
| 809 | *pResult = IDCANCEL; | 815 | *pResult = IDCANCEL; |
diff --git a/src/api/burn/balutil/inc/IBootstrapperEngine.h b/src/api/burn/balutil/inc/IBootstrapperEngine.h index 57fc9be9..ad6e6042 100644 --- a/src/api/burn/balutil/inc/IBootstrapperEngine.h +++ b/src/api/burn/balutil/inc/IBootstrapperEngine.h | |||
| @@ -108,7 +108,8 @@ DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-8 | |||
| 108 | ) = 0; | 108 | ) = 0; |
| 109 | 109 | ||
| 110 | STDMETHOD(Plan)( | 110 | STDMETHOD(Plan)( |
| 111 | __in BOOTSTRAPPER_ACTION action | 111 | __in BOOTSTRAPPER_ACTION action, |
| 112 | __in BOOTSTRAPPER_SCOPE plannedScope | ||
| 112 | ) = 0; | 113 | ) = 0; |
| 113 | 114 | ||
| 114 | STDMETHOD(Elevate)( | 115 | STDMETHOD(Elevate)( |
diff --git a/src/api/burn/inc/BootstrapperApplicationTypes.h b/src/api/burn/inc/BootstrapperApplicationTypes.h index 2ece1b7b..b430e04a 100644 --- a/src/api/burn/inc/BootstrapperApplicationTypes.h +++ b/src/api/burn/inc/BootstrapperApplicationTypes.h | |||
| @@ -10,6 +10,7 @@ extern "C" { | |||
| 10 | const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_API_VERSION = L"burn.ba.apiver"; | 10 | const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_API_VERSION = L"burn.ba.apiver"; |
| 11 | const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_PIPE_NAME = L"burn.ba.pipe"; | 11 | const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_PIPE_NAME = L"burn.ba.pipe"; |
| 12 | const DWORD WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION = 5; | 12 | const DWORD WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION = 5; |
| 13 | const DWORD WIX_7_BOOTSTRAPPER_APPLICATION_API_VERSION = 7; | ||
| 13 | 14 | ||
| 14 | enum BOOTSTRAPPER_DISPLAY | 15 | enum BOOTSTRAPPER_DISPLAY |
| 15 | { | 16 | { |
| @@ -27,6 +28,15 @@ enum BOOTSTRAPPER_REGISTRATION_TYPE | |||
| 27 | BOOTSTRAPPER_REGISTRATION_TYPE_FULL, | 28 | BOOTSTRAPPER_REGISTRATION_TYPE_FULL, |
| 28 | }; | 29 | }; |
| 29 | 30 | ||
| 31 | enum BOOTSTRAPPER_PACKAGE_SCOPE | ||
| 32 | { | ||
| 33 | BOOTSTRAPPER_PACKAGE_SCOPE_INVALID, | ||
| 34 | BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE, | ||
| 35 | BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER, | ||
| 36 | BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE, | ||
| 37 | BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER, | ||
| 38 | }; | ||
| 39 | |||
| 30 | enum BOOTSTRAPPER_RESUME_TYPE | 40 | enum BOOTSTRAPPER_RESUME_TYPE |
| 31 | { | 41 | { |
| 32 | BOOTSTRAPPER_RESUME_TYPE_NONE, | 42 | BOOTSTRAPPER_RESUME_TYPE_NONE, |
| @@ -353,6 +363,7 @@ struct BOOTSTRAPPER_COMMAND | |||
| 353 | DWORD cbSize; | 363 | DWORD cbSize; |
| 354 | BOOTSTRAPPER_ACTION action; | 364 | BOOTSTRAPPER_ACTION action; |
| 355 | BOOTSTRAPPER_DISPLAY display; | 365 | BOOTSTRAPPER_DISPLAY display; |
| 366 | BOOTSTRAPPER_SCOPE commandLineScope; | ||
| 356 | 367 | ||
| 357 | LPWSTR wzCommandLine; | 368 | LPWSTR wzCommandLine; |
| 358 | INT32 nCmdShow; | 369 | INT32 nCmdShow; |
diff --git a/src/api/burn/inc/BootstrapperEngineTypes.h b/src/api/burn/inc/BootstrapperEngineTypes.h index f89238c0..6dced349 100644 --- a/src/api/burn/inc/BootstrapperEngineTypes.h +++ b/src/api/burn/inc/BootstrapperEngineTypes.h | |||
| @@ -30,6 +30,13 @@ enum BOOTSTRAPPER_ACTION | |||
| 30 | BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED, | 30 | BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED, |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | enum BOOTSTRAPPER_SCOPE | ||
| 34 | { | ||
| 35 | BOOTSTRAPPER_SCOPE_DEFAULT, | ||
| 36 | BOOTSTRAPPER_SCOPE_PER_MACHINE, | ||
| 37 | BOOTSTRAPPER_SCOPE_PER_USER, | ||
| 38 | }; | ||
| 39 | |||
| 33 | enum BOOTSTRAPPER_ACTION_STATE | 40 | enum BOOTSTRAPPER_ACTION_STATE |
| 34 | { | 41 | { |
| 35 | BOOTSTRAPPER_ACTION_STATE_NONE, | 42 | BOOTSTRAPPER_ACTION_STATE_NONE, |
| @@ -183,7 +190,7 @@ typedef struct _BAENGINE_ESCAPESTRING_RESULTS | |||
| 183 | { | 190 | { |
| 184 | DWORD dwApiVersion; | 191 | DWORD dwApiVersion; |
| 185 | LPWSTR wzOut; | 192 | LPWSTR wzOut; |
| 186 | // Should be initialized to the size of wzOut. | 193 | // Should be initialized to the count of wzOut. |
| 187 | DWORD cchOut; | 194 | DWORD cchOut; |
| 188 | } BAENGINE_ESCAPESTRING_RESULTS; | 195 | } BAENGINE_ESCAPESTRING_RESULTS; |
| 189 | 196 | ||
| @@ -306,6 +313,7 @@ typedef struct _BAENGINE_PLAN_ARGS | |||
| 306 | { | 313 | { |
| 307 | DWORD dwApiVersion; | 314 | DWORD dwApiVersion; |
| 308 | BOOTSTRAPPER_ACTION action; | 315 | BOOTSTRAPPER_ACTION action; |
| 316 | BOOTSTRAPPER_SCOPE plannedScope; | ||
| 309 | } BAENGINE_PLAN_ARGS; | 317 | } BAENGINE_PLAN_ARGS; |
| 310 | 318 | ||
| 311 | typedef struct _BAENGINE_PLAN_RESULTS | 319 | typedef struct _BAENGINE_PLAN_RESULTS |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs index 8c969e77..adec1d78 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs | |||
| @@ -18,6 +18,7 @@ namespace WixToolset.Data | |||
| 18 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.Version), IntermediateFieldType.String), | 18 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.Version), IntermediateFieldType.String), |
| 19 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.DisplayName), IntermediateFieldType.String), | 19 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.DisplayName), IntermediateFieldType.String), |
| 20 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.InstallSize), IntermediateFieldType.LargeNumber), | 20 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.InstallSize), IntermediateFieldType.LargeNumber), |
| 21 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.Scope), IntermediateFieldType.Number), | ||
| 21 | }, | 22 | }, |
| 22 | typeof(WixBundleHarvestedBundlePackageSymbol)); | 23 | typeof(WixBundleHarvestedBundlePackageSymbol)); |
| 23 | } | 24 | } |
| @@ -39,13 +40,13 @@ namespace WixToolset.Data.Symbols | |||
| 39 | Version, | 40 | Version, |
| 40 | DisplayName, | 41 | DisplayName, |
| 41 | InstallSize, | 42 | InstallSize, |
| 43 | Scope, | ||
| 42 | } | 44 | } |
| 43 | 45 | ||
| 44 | [Flags] | 46 | [Flags] |
| 45 | public enum WixBundleHarvestedBundlePackageAttributes | 47 | public enum WixBundleHarvestedBundlePackageAttributes |
| 46 | { | 48 | { |
| 47 | None = 0x0, | 49 | None = 0x0, |
| 48 | PerMachine = 0x1, | ||
| 49 | Win64 = 0x2, | 50 | Win64 = 0x2, |
| 50 | } | 51 | } |
| 51 | 52 | ||
| @@ -116,20 +117,10 @@ namespace WixToolset.Data.Symbols | |||
| 116 | set => this.Set((int)WixBundleHarvestedBundlePackageSymbolFields.InstallSize, value); | 117 | set => this.Set((int)WixBundleHarvestedBundlePackageSymbolFields.InstallSize, value); |
| 117 | } | 118 | } |
| 118 | 119 | ||
| 119 | public bool PerMachine | 120 | public WixBundleScopeType Scope |
| 120 | { | 121 | { |
| 121 | get { return this.Attributes.HasFlag(WixBundleHarvestedBundlePackageAttributes.PerMachine); } | 122 | get => Enum.TryParse((string)this.Fields[(int)WixBundleHarvestedBundlePackageSymbolFields.Scope], true, out WixBundleScopeType value) ? value : WixBundleScopeType.PerMachine; |
| 122 | set | 123 | set => this.Set((int)WixBundleHarvestedBundlePackageSymbolFields.Scope, (int)value); |
| 123 | { | ||
| 124 | if (value) | ||
| 125 | { | ||
| 126 | this.Attributes |= WixBundleHarvestedBundlePackageAttributes.PerMachine; | ||
| 127 | } | ||
| 128 | else | ||
| 129 | { | ||
| 130 | this.Attributes &= ~WixBundleHarvestedBundlePackageAttributes.PerMachine; | ||
| 131 | } | ||
| 132 | } | ||
| 133 | } | 124 | } |
| 134 | 125 | ||
| 135 | public bool Win64 | 126 | public bool Win64 |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedMsiPackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedMsiPackageSymbol.cs index 8a274720..02cbc4bc 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedMsiPackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedMsiPackageSymbol.cs | |||
| @@ -14,6 +14,7 @@ namespace WixToolset.Data | |||
| 14 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.ProductName), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.ProductName), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.ArpComments), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.ArpComments), IntermediateFieldType.String), |
| 16 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.AllUsers), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.AllUsers), IntermediateFieldType.String), |
| 17 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.MsiInstallPerUser), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.MsiFastInstall), IntermediateFieldType.String), | 18 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.MsiFastInstall), IntermediateFieldType.String), |
| 18 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.ArpSystemComponent), IntermediateFieldType.String), | 19 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.ArpSystemComponent), IntermediateFieldType.String), |
| 19 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.ProductCode), IntermediateFieldType.String), | 20 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedMsiPackageSymbolFields.ProductCode), IntermediateFieldType.String), |
| @@ -37,6 +38,7 @@ namespace WixToolset.Data.Symbols | |||
| 37 | ProductName, | 38 | ProductName, |
| 38 | ArpComments, | 39 | ArpComments, |
| 39 | AllUsers, | 40 | AllUsers, |
| 41 | MsiInstallPerUser, | ||
| 40 | MsiFastInstall, | 42 | MsiFastInstall, |
| 41 | ArpSystemComponent, | 43 | ArpSystemComponent, |
| 42 | ProductCode, | 44 | ProductCode, |
| @@ -91,6 +93,12 @@ namespace WixToolset.Data.Symbols | |||
| 91 | set => this.Set((int)WixBundleHarvestedMsiPackageSymbolFields.AllUsers, value); | 93 | set => this.Set((int)WixBundleHarvestedMsiPackageSymbolFields.AllUsers, value); |
| 92 | } | 94 | } |
| 93 | 95 | ||
| 96 | public string MsiInstallPerUser | ||
| 97 | { | ||
| 98 | get => this.Fields[(int)WixBundleHarvestedMsiPackageSymbolFields.MsiInstallPerUser].AsString(); | ||
| 99 | set => this.Set((int)WixBundleHarvestedMsiPackageSymbolFields.MsiInstallPerUser, value); | ||
| 100 | } | ||
| 101 | |||
| 94 | public string MsiFastInstall | 102 | public string MsiFastInstall |
| 95 | { | 103 | { |
| 96 | get => this.Fields[(int)WixBundleHarvestedMsiPackageSymbolFields.MsiFastInstall].AsString(); | 104 | get => this.Fields[(int)WixBundleHarvestedMsiPackageSymbolFields.MsiFastInstall].AsString(); |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs index 8d625664..e888856b 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs | |||
| @@ -17,7 +17,7 @@ namespace WixToolset.Data | |||
| 17 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.RepairCondition), IntermediateFieldType.String), | 17 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.RepairCondition), IntermediateFieldType.String), |
| 18 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Cache), IntermediateFieldType.String), | 18 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Cache), IntermediateFieldType.String), |
| 19 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.CacheId), IntermediateFieldType.String), | 19 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.CacheId), IntermediateFieldType.String), |
| 20 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.PerMachine), IntermediateFieldType.Bool), | 20 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Scope), IntermediateFieldType.Number), |
| 21 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.LogPathVariable), IntermediateFieldType.String), | 21 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.LogPathVariable), IntermediateFieldType.String), |
| 22 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.RollbackLogPathVariable), IntermediateFieldType.String), | 22 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.RollbackLogPathVariable), IntermediateFieldType.String), |
| 23 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Size), IntermediateFieldType.LargeNumber), | 23 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Size), IntermediateFieldType.LargeNumber), |
| @@ -46,7 +46,7 @@ namespace WixToolset.Data.Symbols | |||
| 46 | RepairCondition, | 46 | RepairCondition, |
| 47 | Cache, | 47 | Cache, |
| 48 | CacheId, | 48 | CacheId, |
| 49 | PerMachine, | 49 | Scope, |
| 50 | LogPathVariable, | 50 | LogPathVariable, |
| 51 | RollbackLogPathVariable, | 51 | RollbackLogPathVariable, |
| 52 | Size, | 52 | Size, |
| @@ -144,10 +144,32 @@ namespace WixToolset.Data.Symbols | |||
| 144 | set => this.Set((int)WixBundlePackageSymbolFields.CacheId, value); | 144 | set => this.Set((int)WixBundlePackageSymbolFields.CacheId, value); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | public bool? PerMachine | 147 | public WixBundleScopeType? Scope |
| 148 | { | 148 | { |
| 149 | get => (bool?)this.Fields[(int)WixBundlePackageSymbolFields.PerMachine]; | 149 | get => (WixBundleScopeType?)this.Fields[(int)WixBundlePackageSymbolFields.Scope].AsNullableNumber(); |
| 150 | set => this.Set((int)WixBundlePackageSymbolFields.PerMachine, value); | 150 | set => this.Set((int)WixBundlePackageSymbolFields.Scope, (int)value); |
| 151 | } | ||
| 152 | |||
| 153 | public string ScopeAsString | ||
| 154 | { | ||
| 155 | get | ||
| 156 | { | ||
| 157 | var value = (WixBundleScopeType?)this.Fields[(int)WixBundlePackageSymbolFields.Scope].AsNullableNumber(); | ||
| 158 | |||
| 159 | switch (value) | ||
| 160 | { | ||
| 161 | case WixBundleScopeType.PerMachine: | ||
| 162 | return "perMachine"; | ||
| 163 | case WixBundleScopeType.PerUser: | ||
| 164 | return "perUser"; | ||
| 165 | case WixBundleScopeType.PerUserOrMachine: | ||
| 166 | return "perUserOrMachine"; | ||
| 167 | case WixBundleScopeType.PerMachineOrUser: | ||
| 168 | return "perMachineOrUser"; | ||
| 169 | default: | ||
| 170 | return null; | ||
| 171 | } | ||
| 172 | } | ||
| 151 | } | 173 | } |
| 152 | 174 | ||
| 153 | public string LogPathVariable | 175 | public string LogPathVariable |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs index f16cdbb8..a06a8610 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs | |||
| @@ -16,6 +16,7 @@ namespace WixToolset.Data | |||
| 16 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.Name), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.Name), IntermediateFieldType.String), |
| 17 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.Manufacturer), IntermediateFieldType.String), | 17 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.Manufacturer), IntermediateFieldType.String), |
| 18 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.Attributes), IntermediateFieldType.Number), | 18 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.Attributes), IntermediateFieldType.Number), |
| 19 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.Scope), IntermediateFieldType.Number), | ||
| 19 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.AboutUrl), IntermediateFieldType.String), | 20 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.AboutUrl), IntermediateFieldType.String), |
| 20 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.HelpUrl), IntermediateFieldType.String), | 21 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.HelpUrl), IntermediateFieldType.String), |
| 21 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.HelpTelephone), IntermediateFieldType.String), | 22 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.HelpTelephone), IntermediateFieldType.String), |
| @@ -42,6 +43,7 @@ namespace WixToolset.Data | |||
| 42 | namespace WixToolset.Data.Symbols | 43 | namespace WixToolset.Data.Symbols |
| 43 | { | 44 | { |
| 44 | using System; | 45 | using System; |
| 46 | using System.Xml.Linq; | ||
| 45 | 47 | ||
| 46 | public enum WixBundleSymbolFields | 48 | public enum WixBundleSymbolFields |
| 47 | { | 49 | { |
| @@ -51,6 +53,7 @@ namespace WixToolset.Data.Symbols | |||
| 51 | Name, | 53 | Name, |
| 52 | Manufacturer, | 54 | Manufacturer, |
| 53 | Attributes, | 55 | Attributes, |
| 56 | Scope, | ||
| 54 | AboutUrl, | 57 | AboutUrl, |
| 55 | HelpUrl, | 58 | HelpUrl, |
| 56 | HelpTelephone, | 59 | HelpTelephone, |
| @@ -78,7 +81,6 @@ namespace WixToolset.Data.Symbols | |||
| 78 | { | 81 | { |
| 79 | None = 0x0, | 82 | None = 0x0, |
| 80 | DisableRemove = 0x1, | 83 | DisableRemove = 0x1, |
| 81 | PerMachine = 0x2, | ||
| 82 | } | 84 | } |
| 83 | 85 | ||
| 84 | public enum WixBundleModifyType | 86 | public enum WixBundleModifyType |
| @@ -88,6 +90,14 @@ namespace WixToolset.Data.Symbols | |||
| 88 | SingleChangeUninstallButton = 2, | 90 | SingleChangeUninstallButton = 2, |
| 89 | } | 91 | } |
| 90 | 92 | ||
| 93 | public enum WixBundleScopeType | ||
| 94 | { | ||
| 95 | PerMachine, | ||
| 96 | PerMachineOrUser, | ||
| 97 | PerUserOrMachine, | ||
| 98 | PerUser, | ||
| 99 | } | ||
| 100 | |||
| 91 | public class WixBundleSymbol : IntermediateSymbol | 101 | public class WixBundleSymbol : IntermediateSymbol |
| 92 | { | 102 | { |
| 93 | public WixBundleSymbol() : base(SymbolDefinitions.WixBundle, null, null) | 103 | public WixBundleSymbol() : base(SymbolDefinitions.WixBundle, null, null) |
| @@ -136,6 +146,34 @@ namespace WixToolset.Data.Symbols | |||
| 136 | set => this.Set((int)WixBundleSymbolFields.Attributes, (int)value); | 146 | set => this.Set((int)WixBundleSymbolFields.Attributes, (int)value); |
| 137 | } | 147 | } |
| 138 | 148 | ||
| 149 | public WixBundleScopeType Scope | ||
| 150 | { | ||
| 151 | get => (WixBundleScopeType)this.Fields[(int)WixBundleSymbolFields.Scope].AsNumber(); | ||
| 152 | set => this.Set((int)WixBundleSymbolFields.Scope, (int)value); | ||
| 153 | } | ||
| 154 | |||
| 155 | public string ScopeAsString | ||
| 156 | { | ||
| 157 | get | ||
| 158 | { | ||
| 159 | var value = (WixBundleScopeType)this.Fields[(int)WixBundleSymbolFields.Scope].AsNumber(); | ||
| 160 | |||
| 161 | switch (value) | ||
| 162 | { | ||
| 163 | case WixBundleScopeType.PerMachine: | ||
| 164 | return "perMachine"; | ||
| 165 | case WixBundleScopeType.PerUser: | ||
| 166 | return "perUser"; | ||
| 167 | case WixBundleScopeType.PerUserOrMachine: | ||
| 168 | return "perUserOrMachine"; | ||
| 169 | case WixBundleScopeType.PerMachineOrUser: | ||
| 170 | return "perMachineOrUser"; | ||
| 171 | default: | ||
| 172 | return null; | ||
| 173 | } | ||
| 174 | } | ||
| 175 | } | ||
| 176 | |||
| 139 | public string AboutUrl | 177 | public string AboutUrl |
| 140 | { | 178 | { |
| 141 | get => (string)this.Fields[(int)WixBundleSymbolFields.AboutUrl]; | 179 | get => (string)this.Fields[(int)WixBundleSymbolFields.AboutUrl]; |
| @@ -276,21 +314,5 @@ namespace WixToolset.Data.Symbols | |||
| 276 | } | 314 | } |
| 277 | } | 315 | } |
| 278 | } | 316 | } |
| 279 | |||
| 280 | public bool PerMachine | ||
| 281 | { | ||
| 282 | get { return this.Attributes.HasFlag(WixBundleAttributes.PerMachine); } | ||
| 283 | set | ||
| 284 | { | ||
| 285 | if (value) | ||
| 286 | { | ||
| 287 | this.Attributes |= WixBundleAttributes.PerMachine; | ||
| 288 | } | ||
| 289 | else | ||
| 290 | { | ||
| 291 | this.Attributes &= ~WixBundleAttributes.PerMachine; | ||
| 292 | } | ||
| 293 | } | ||
| 294 | } | ||
| 295 | } | 317 | } |
| 296 | } | 318 | } |
diff --git a/src/burn/engine/apply.cpp b/src/burn/engine/apply.cpp index e4e76a6c..68aded71 100644 --- a/src/burn/engine/apply.cpp +++ b/src/burn/engine/apply.cpp | |||
| @@ -632,7 +632,7 @@ extern "C" HRESULT ApplyCache( | |||
| 632 | { | 632 | { |
| 633 | hr = ElevationCachePreparePackage(hPipe, pPackage); | 633 | hr = ElevationCachePreparePackage(hPipe, pPackage); |
| 634 | } | 634 | } |
| 635 | LogExitOnFailure(hr, MSG_CACHE_PREPARE_PACKAGE_FAILED, "Cache prepare package failed: %ls", pPackage->sczId, NULL, NULL); | 635 | LogExitOnFailure(hr, MSG_CACHE_PREPARE_PACKAGE_FAILED, "Cache prepare package failed: %ls", pPackage->sczId); |
| 636 | } | 636 | } |
| 637 | 637 | ||
| 638 | hr = ApplyCachePackage(&cacheContext, pPackage); | 638 | hr = ApplyCachePackage(&cacheContext, pPackage); |
diff --git a/src/burn/engine/baengine.cpp b/src/burn/engine/baengine.cpp index d1704ad9..e48f71c0 100644 --- a/src/burn/engine/baengine.cpp +++ b/src/burn/engine/baengine.cpp | |||
| @@ -1134,12 +1134,15 @@ static HRESULT BAEnginePlan( | |||
| 1134 | hr = BuffReaderReadNumber(pReaderArgs, reinterpret_cast<DWORD*>(&args.action)); | 1134 | hr = BuffReaderReadNumber(pReaderArgs, reinterpret_cast<DWORD*>(&args.action)); |
| 1135 | ExitOnFailure(hr, "Failed to read plan action of BAEnginePlan args."); | 1135 | ExitOnFailure(hr, "Failed to read plan action of BAEnginePlan args."); |
| 1136 | 1136 | ||
| 1137 | hr = BuffReaderReadNumber(pReaderArgs, reinterpret_cast<DWORD*>(&args.plannedScope)); | ||
| 1138 | ExitOnFailure(hr, "Failed to read plan scope of BAEnginePlan args."); | ||
| 1139 | |||
| 1137 | // Read results. | 1140 | // Read results. |
| 1138 | hr = BuffReaderReadNumber(pReaderResults, &results.dwApiVersion); | 1141 | hr = BuffReaderReadNumber(pReaderResults, &results.dwApiVersion); |
| 1139 | ExitOnFailure(hr, "Failed to read API version of BAEnginePlan results."); | 1142 | ExitOnFailure(hr, "Failed to read API version of BAEnginePlan results."); |
| 1140 | 1143 | ||
| 1141 | // Execute. | 1144 | // Execute. |
| 1142 | hr = ExternalEnginePlan(pContext, args.action); | 1145 | hr = ExternalEnginePlan(pContext, args.action, args.plannedScope); |
| 1143 | ExitOnFailure(hr, "Failed to plan in the engine."); | 1146 | ExitOnFailure(hr, "Failed to plan in the engine."); |
| 1144 | 1147 | ||
| 1145 | // Pack result. | 1148 | // Pack result. |
diff --git a/src/burn/engine/baengine.h b/src/burn/engine/baengine.h index 97cfea9c..39e5ae0b 100644 --- a/src/burn/engine/baengine.h +++ b/src/burn/engine/baengine.h | |||
| @@ -31,6 +31,7 @@ typedef struct _BAENGINE_ACTION | |||
| 31 | struct | 31 | struct |
| 32 | { | 32 | { |
| 33 | BOOTSTRAPPER_ACTION action; | 33 | BOOTSTRAPPER_ACTION action; |
| 34 | BOOTSTRAPPER_SCOPE plannedScope; | ||
| 34 | } plan; | 35 | } plan; |
| 35 | struct | 36 | struct |
| 36 | { | 37 | { |
diff --git a/src/burn/engine/cache.cpp b/src/burn/engine/cache.cpp index c85a1be4..21bd42be 100644 --- a/src/burn/engine/cache.cpp +++ b/src/burn/engine/cache.cpp | |||
| @@ -36,8 +36,8 @@ static HRESULT SecurePerMachineCacheRoot( | |||
| 36 | static HRESULT CreateCompletedPath( | 36 | static HRESULT CreateCompletedPath( |
| 37 | __in BURN_CACHE* pCache, | 37 | __in BURN_CACHE* pCache, |
| 38 | __in BOOL fPerMachine, | 38 | __in BOOL fPerMachine, |
| 39 | __in LPCWSTR wzCacheId, | 39 | __in_z LPCWSTR wzId, |
| 40 | __in LPCWSTR wzFilePath, | 40 | __in_z_opt LPCWSTR wzFilePath, |
| 41 | __out_z LPWSTR* psczCachePath | 41 | __out_z LPWSTR* psczCachePath |
| 42 | ); | 42 | ); |
| 43 | static HRESULT CreateUnverifiedPath( | 43 | static HRESULT CreateUnverifiedPath( |
| @@ -1658,8 +1658,8 @@ LExit: | |||
| 1658 | static HRESULT CreateCompletedPath( | 1658 | static HRESULT CreateCompletedPath( |
| 1659 | __in BURN_CACHE* pCache, | 1659 | __in BURN_CACHE* pCache, |
| 1660 | __in BOOL fPerMachine, | 1660 | __in BOOL fPerMachine, |
| 1661 | __in LPCWSTR wzId, | 1661 | __in_z LPCWSTR wzId, |
| 1662 | __in LPCWSTR wzFilePath, | 1662 | __in_z_opt LPCWSTR wzFilePath, |
| 1663 | __out_z LPWSTR* psczCachePath | 1663 | __out_z LPWSTR* psczCachePath |
| 1664 | ) | 1664 | ) |
| 1665 | { | 1665 | { |
diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp index 2dfa4857..7937bd65 100644 --- a/src/burn/engine/core.cpp +++ b/src/burn/engine/core.cpp | |||
| @@ -379,7 +379,7 @@ extern "C" HRESULT CoreDetect( | |||
| 379 | pEngineState->registration.fEligibleForCleanup = FALSE; | 379 | pEngineState->registration.fEligibleForCleanup = FALSE; |
| 380 | } | 380 | } |
| 381 | 381 | ||
| 382 | LogId(REPORT_STANDARD, MSG_DETECTED_PACKAGE, pPackage->sczId, LoggingPackageStateToString(pPackage->currentState), LoggingBoolToString(pPackage->fCached), LoggingPackageRegistrationStateToString(pPackage->fCanAffectRegistration, pPackage->installRegistrationState), LoggingPackageRegistrationStateToString(pPackage->fCanAffectRegistration, pPackage->cacheRegistrationState)); | 382 | LogId(REPORT_STANDARD, MSG_DETECTED_PACKAGE, pPackage->sczId, LoggingPackageStateToString(pPackage->currentState), LoggingBoolToString(pPackage->fCached), LoggingPackageRegistrationStateToString(pPackage->fCanAffectRegistration, pPackage->installRegistrationState), LoggingPackageRegistrationStateToString(pPackage->fCanAffectRegistration, pPackage->cacheRegistrationState), LoggingPackageScopeToString(pPackage->scope)); |
| 383 | 383 | ||
| 384 | if (BURN_PACKAGE_TYPE_MSI == pPackage->type) | 384 | if (BURN_PACKAGE_TYPE_MSI == pPackage->type) |
| 385 | { | 385 | { |
| @@ -424,8 +424,9 @@ LExit: | |||
| 424 | 424 | ||
| 425 | extern "C" HRESULT CorePlan( | 425 | extern "C" HRESULT CorePlan( |
| 426 | __in BURN_ENGINE_STATE* pEngineState, | 426 | __in BURN_ENGINE_STATE* pEngineState, |
| 427 | __in BOOTSTRAPPER_ACTION action | 427 | __in BOOTSTRAPPER_ACTION action, |
| 428 | ) | 428 | __in BOOTSTRAPPER_SCOPE plannedScope |
| 429 | ) | ||
| 429 | { | 430 | { |
| 430 | HRESULT hr = S_OK; | 431 | HRESULT hr = S_OK; |
| 431 | BOOL fPlanBegan = FALSE; | 432 | BOOL fPlanBegan = FALSE; |
| @@ -433,7 +434,7 @@ extern "C" HRESULT CorePlan( | |||
| 433 | BURN_PACKAGE* pForwardCompatibleBundlePackage = NULL; | 434 | BURN_PACKAGE* pForwardCompatibleBundlePackage = NULL; |
| 434 | BOOL fContinuePlanning = TRUE; // assume we won't skip planning due to dependencies. | 435 | BOOL fContinuePlanning = TRUE; // assume we won't skip planning due to dependencies. |
| 435 | 436 | ||
| 436 | LogId(REPORT_STANDARD, MSG_PLAN_BEGIN, pEngineState->packages.cPackages, LoggingBurnActionToString(action)); | 437 | LogId(REPORT_STANDARD, MSG_PLAN_BEGIN, pEngineState->packages.cPackages, LoggingBurnActionToString(action), LoggingBundleScopeToString(plannedScope)); |
| 437 | 438 | ||
| 438 | fPlanBegan = TRUE; | 439 | fPlanBegan = TRUE; |
| 439 | hr = BACallbackOnPlanBegin(&pEngineState->userExperience, pEngineState->packages.cPackages); | 440 | hr = BACallbackOnPlanBegin(&pEngineState->userExperience, pEngineState->packages.cPackages); |
| @@ -452,12 +453,13 @@ extern "C" HRESULT CorePlan( | |||
| 452 | pEngineState->fPlanned = FALSE; | 453 | pEngineState->fPlanned = FALSE; |
| 453 | PlanReset(&pEngineState->plan, &pEngineState->variables, &pEngineState->containers, &pEngineState->packages, &pEngineState->layoutPayloads); | 454 | PlanReset(&pEngineState->plan, &pEngineState->variables, &pEngineState->containers, &pEngineState->packages, &pEngineState->layoutPayloads); |
| 454 | 455 | ||
| 455 | hr = PlanSetVariables(action, &pEngineState->variables); | 456 | hr = PlanSetVariables(action, pEngineState->registration.scope, pEngineState->plan.plannedScope, &pEngineState->variables); |
| 456 | ExitOnFailure(hr, "Failed to update action."); | 457 | ExitOnFailure(hr, "Failed to update plan variables."); |
| 457 | 458 | ||
| 458 | // Remember the overall action state in the plan since it shapes the changes | 459 | // Remember the overall action state in the plan since it shapes the changes |
| 459 | // we make everywhere. | 460 | // we make everywhere. |
| 460 | pEngineState->plan.action = action; | 461 | pEngineState->plan.action = action; |
| 462 | pEngineState->plan.plannedScope = plannedScope; | ||
| 461 | pEngineState->plan.pCache = &pEngineState->cache; | 463 | pEngineState->plan.pCache = &pEngineState->cache; |
| 462 | pEngineState->plan.pCommand = &pEngineState->command; | 464 | pEngineState->plan.pCommand = &pEngineState->command; |
| 463 | pEngineState->plan.pInternalCommand = &pEngineState->internalCommand; | 465 | pEngineState->plan.pInternalCommand = &pEngineState->internalCommand; |
| @@ -467,6 +469,17 @@ extern "C" HRESULT CorePlan( | |||
| 467 | pEngineState->plan.fDisableRollback = pEngineState->fDisableRollback || BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pEngineState->plan.action; | 469 | pEngineState->plan.fDisableRollback = pEngineState->fDisableRollback || BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pEngineState->plan.action; |
| 468 | pEngineState->plan.fPlanPackageCacheRollback = BOOTSTRAPPER_REGISTRATION_TYPE_NONE == pEngineState->registration.detectedRegistrationType; | 470 | pEngineState->plan.fPlanPackageCacheRollback = BOOTSTRAPPER_REGISTRATION_TYPE_NONE == pEngineState->registration.detectedRegistrationType; |
| 469 | 471 | ||
| 472 | hr = PlanPackagesAndBundleScope(pEngineState->packages.rgPackages, pEngineState->packages.cPackages, pEngineState->plan.plannedScope, pEngineState->registration.scope, pEngineState->command.commandLineScope, &pEngineState->plan.plannedScope, &pEngineState->registration.fPerMachine); | ||
| 473 | ExitOnFailure(hr, "Failed to determine packages and bundle scope."); | ||
| 474 | |||
| 475 | if (BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER == pEngineState->registration.scope || BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE == pEngineState->registration.scope) | ||
| 476 | { | ||
| 477 | LogId(REPORT_STANDARD, MSG_PLAN_CONFIGURED_SCOPE, LoggingInstallScopeToString(pEngineState->registration.fPerMachine)); | ||
| 478 | } | ||
| 479 | |||
| 480 | hr = RegistrationSetPaths(&pEngineState->registration, &pEngineState->cache); | ||
| 481 | ExitOnFailure(hr, "Failed to set registration paths."); | ||
| 482 | |||
| 470 | // Set resume commandline | 483 | // Set resume commandline |
| 471 | hr = PlanSetResumeCommand(&pEngineState->plan, &pEngineState->registration, &pEngineState->log); | 484 | hr = PlanSetResumeCommand(&pEngineState->plan, &pEngineState->registration, &pEngineState->log); |
| 472 | ExitOnFailure(hr, "Failed to set resume command"); | 485 | ExitOnFailure(hr, "Failed to set resume command"); |
| @@ -475,7 +488,7 @@ extern "C" HRESULT CorePlan( | |||
| 475 | ExitOnFailure(hr, "Failed to initialize the dependencies for the plan."); | 488 | ExitOnFailure(hr, "Failed to initialize the dependencies for the plan."); |
| 476 | 489 | ||
| 477 | hr = RegistrationPlanInitialize(&pEngineState->registration); | 490 | hr = RegistrationPlanInitialize(&pEngineState->registration); |
| 478 | ExitOnFailure(hr, "Failed to initialize registration for the plan."); | 491 | ExitOnFailure(hr, "Failed to initialize the plan for registration."); |
| 479 | 492 | ||
| 480 | if (BOOTSTRAPPER_ACTION_LAYOUT == action) | 493 | if (BOOTSTRAPPER_ACTION_LAYOUT == action) |
| 481 | { | 494 | { |
| @@ -556,6 +569,9 @@ extern "C" HRESULT CorePlan( | |||
| 556 | LogPackages(pUpgradeBundlePackage, pForwardCompatibleBundlePackage, &pEngineState->packages, &pEngineState->registration.relatedBundles, action); | 569 | LogPackages(pUpgradeBundlePackage, pForwardCompatibleBundlePackage, &pEngineState->packages, &pEngineState->registration.relatedBundles, action); |
| 557 | } | 570 | } |
| 558 | 571 | ||
| 572 | hr = PlanSetVariables(action, pEngineState->registration.scope, pEngineState->plan.plannedScope, &pEngineState->variables); | ||
| 573 | ExitOnFailure(hr, "Failed to update plan variables after planning."); | ||
| 574 | |||
| 559 | PlanDump(&pEngineState->plan); | 575 | PlanDump(&pEngineState->plan); |
| 560 | 576 | ||
| 561 | LExit: | 577 | LExit: |
| @@ -1331,7 +1347,7 @@ extern "C" void CoreCleanup( | |||
| 1331 | ExitFunction(); | 1347 | ExitFunction(); |
| 1332 | } | 1348 | } |
| 1333 | 1349 | ||
| 1334 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 1350 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1335 | ExitOnFailure(hr, "Plan during cleanup failed"); | 1351 | ExitOnFailure(hr, "Plan during cleanup failed"); |
| 1336 | 1352 | ||
| 1337 | hr = CoreApply(pEngineState, pEngineState->hMessageWindow); | 1353 | hr = CoreApply(pEngineState, pEngineState->hMessageWindow); |
| @@ -1470,6 +1486,14 @@ extern "C" HRESULT CoreParseCommandLine( | |||
| 1470 | { | 1486 | { |
| 1471 | pInternalCommand->fDisableSystemRestore = TRUE; | 1487 | pInternalCommand->fDisableSystemRestore = TRUE; |
| 1472 | } | 1488 | } |
| 1489 | else if (CSTR_EQUAL == ::CompareStringOrdinal(&argv[i][1], -1, L"peruser", -1, TRUE)) | ||
| 1490 | { | ||
| 1491 | pCommand->commandLineScope = BOOTSTRAPPER_SCOPE_PER_USER; | ||
| 1492 | } | ||
| 1493 | else if (CSTR_EQUAL == ::CompareStringOrdinal(&argv[i][1], -1, L"permachine", -1, TRUE)) | ||
| 1494 | { | ||
| 1495 | pCommand->commandLineScope = BOOTSTRAPPER_SCOPE_PER_MACHINE; | ||
| 1496 | } | ||
| 1473 | else if (CSTR_EQUAL == ::CompareStringOrdinal(&argv[i][1], -1, L"originalsource", -1, TRUE)) | 1497 | else if (CSTR_EQUAL == ::CompareStringOrdinal(&argv[i][1], -1, L"originalsource", -1, TRUE)) |
| 1474 | { | 1498 | { |
| 1475 | if (i + 1 >= argc) | 1499 | if (i + 1 >= argc) |
| @@ -2346,7 +2370,7 @@ static void LogPackages( | |||
| 2346 | LogRollbackBoundary(pPackage->pRollbackBoundaryBackward); | 2370 | LogRollbackBoundary(pPackage->pRollbackBoundaryBackward); |
| 2347 | } | 2371 | } |
| 2348 | 2372 | ||
| 2349 | LogId(REPORT_STANDARD, MSG_PLANNED_PACKAGE, pPackage->sczId, LoggingPackageStateToString(pPackage->currentState), LoggingRequestStateToString(pPackage->defaultRequested), LoggingRequestStateToString(pPackage->requested), LoggingActionStateToString(pPackage->execute), LoggingActionStateToString(pPackage->rollback), LoggingCacheTypeToString(pPackage->authoredCacheType), LoggingCacheTypeToString(pPackage->cacheType), LoggingPlannedCacheToString(pPackage), LoggingBoolToString(pPackage->fPlannedUncache), LoggingDependencyActionToString(pPackage->dependencyExecute), LoggingPackageRegistrationStateToString(pPackage->fCanAffectRegistration, pPackage->expectedInstallRegistrationState), LoggingPackageRegistrationStateToString(pPackage->fCanAffectRegistration, pPackage->expectedCacheRegistrationState)); | 2373 | LogId(REPORT_STANDARD, MSG_PLANNED_PACKAGE, pPackage->sczId, LoggingPackageStateToString(pPackage->currentState), LoggingRequestStateToString(pPackage->defaultRequested), LoggingRequestStateToString(pPackage->requested), LoggingActionStateToString(pPackage->execute), LoggingActionStateToString(pPackage->rollback), LoggingCacheTypeToString(pPackage->authoredCacheType), LoggingCacheTypeToString(pPackage->cacheType), LoggingPlannedCacheToString(pPackage), LoggingBoolToString(pPackage->fPlannedUncache), LoggingDependencyActionToString(pPackage->dependencyExecute), LoggingPackageRegistrationStateToString(pPackage->fCanAffectRegistration, pPackage->expectedInstallRegistrationState), LoggingPackageRegistrationStateToString(pPackage->fCanAffectRegistration, pPackage->expectedCacheRegistrationState), LoggingInstallScopeToString(pPackage->fPerMachine)); |
| 2350 | 2374 | ||
| 2351 | if (BURN_PACKAGE_TYPE_MSI == pPackage->type) | 2375 | if (BURN_PACKAGE_TYPE_MSI == pPackage->type) |
| 2352 | { | 2376 | { |
diff --git a/src/burn/engine/core.h b/src/burn/engine/core.h index cf615e35..75c0c941 100644 --- a/src/burn/engine/core.h +++ b/src/burn/engine/core.h | |||
| @@ -45,7 +45,9 @@ const LPCWSTR BURN_BUNDLE_EXECUTE_PACKAGE_ACTION = L"WixBundleExecutePackageActi | |||
| 45 | const LPCWSTR BURN_BUNDLE_FORCED_RESTART_PACKAGE = L"WixBundleForcedRestartPackage"; | 45 | const LPCWSTR BURN_BUNDLE_FORCED_RESTART_PACKAGE = L"WixBundleForcedRestartPackage"; |
| 46 | const LPCWSTR BURN_BUNDLE_INSTALLED = L"WixBundleInstalled"; | 46 | const LPCWSTR BURN_BUNDLE_INSTALLED = L"WixBundleInstalled"; |
| 47 | const LPCWSTR BURN_BUNDLE_ELEVATED = L"WixBundleElevated"; | 47 | const LPCWSTR BURN_BUNDLE_ELEVATED = L"WixBundleElevated"; |
| 48 | const LPCWSTR BURN_BUNDLE_PLANNED_SCOPE = L"WixBundlePlannedScope"; | ||
| 48 | const LPCWSTR BURN_BUNDLE_PROVIDER_KEY = L"WixBundleProviderKey"; | 49 | const LPCWSTR BURN_BUNDLE_PROVIDER_KEY = L"WixBundleProviderKey"; |
| 50 | const LPCWSTR BURN_BUNDLE_SCOPE = L"WixBundleScope"; | ||
| 49 | const LPCWSTR BURN_BUNDLE_SOURCE_PROCESS_PATH = L"WixBundleSourceProcessPath"; | 51 | const LPCWSTR BURN_BUNDLE_SOURCE_PROCESS_PATH = L"WixBundleSourceProcessPath"; |
| 50 | const LPCWSTR BURN_BUNDLE_SOURCE_PROCESS_FOLDER = L"WixBundleSourceProcessFolder"; | 52 | const LPCWSTR BURN_BUNDLE_SOURCE_PROCESS_FOLDER = L"WixBundleSourceProcessFolder"; |
| 51 | const LPCWSTR BURN_BUNDLE_TAG = L"WixBundleTag"; | 53 | const LPCWSTR BURN_BUNDLE_TAG = L"WixBundleTag"; |
| @@ -243,7 +245,8 @@ HRESULT CoreDetect( | |||
| 243 | ); | 245 | ); |
| 244 | HRESULT CorePlan( | 246 | HRESULT CorePlan( |
| 245 | __in BURN_ENGINE_STATE* pEngineState, | 247 | __in BURN_ENGINE_STATE* pEngineState, |
| 246 | __in BOOTSTRAPPER_ACTION action | 248 | __in BOOTSTRAPPER_ACTION action, |
| 249 | __in BOOTSTRAPPER_SCOPE scope | ||
| 247 | ); | 250 | ); |
| 248 | HRESULT CoreElevate( | 251 | HRESULT CoreElevate( |
| 249 | __in BURN_ENGINE_STATE* pEngineState, | 252 | __in BURN_ENGINE_STATE* pEngineState, |
diff --git a/src/burn/engine/dependency.cpp b/src/burn/engine/dependency.cpp index 94a8a1e4..7cd0db9f 100644 --- a/src/burn/engine/dependency.cpp +++ b/src/burn/engine/dependency.cpp | |||
| @@ -12,6 +12,7 @@ const LPCWSTR vcszIgnoreDependenciesDelim = L";"; | |||
| 12 | 12 | ||
| 13 | static HRESULT DetectPackageDependents( | 13 | static HRESULT DetectPackageDependents( |
| 14 | __in BURN_PACKAGE* pPackage, | 14 | __in BURN_PACKAGE* pPackage, |
| 15 | __in BOOL fPackagePerMachine, | ||
| 15 | __in const BURN_REGISTRATION* pRegistration | 16 | __in const BURN_REGISTRATION* pRegistration |
| 16 | ); | 17 | ); |
| 17 | 18 | ||
| @@ -249,7 +250,22 @@ extern "C" HRESULT DependencyDetectProviderKeyBundleCode( | |||
| 249 | { | 250 | { |
| 250 | HRESULT hr = S_OK; | 251 | HRESULT hr = S_OK; |
| 251 | 252 | ||
| 252 | hr = DepGetProviderInformation(pRegistration->hkRoot, pRegistration->sczProviderKey, &pRegistration->sczDetectedProviderKeyBundleCode, NULL, NULL); | 253 | // For configurable packages, check both scopes because until planning, |
| 254 | // we can't know their planned scope. | ||
| 255 | if (pRegistration->hkRoot) | ||
| 256 | { | ||
| 257 | hr = DepGetProviderInformation(pRegistration->hkRoot, pRegistration->sczProviderKey, &pRegistration->sczDetectedProviderKeyBundleCode, NULL, NULL); | ||
| 258 | } | ||
| 259 | else | ||
| 260 | { | ||
| 261 | hr = DepGetProviderInformation(HKEY_LOCAL_MACHINE, pRegistration->sczProviderKey, &pRegistration->sczDetectedProviderKeyBundleCode, NULL, NULL); | ||
| 262 | |||
| 263 | if (E_NOTFOUND == hr) | ||
| 264 | { | ||
| 265 | hr = DepGetProviderInformation(HKEY_CURRENT_USER, pRegistration->sczProviderKey, &pRegistration->sczDetectedProviderKeyBundleCode, NULL, NULL); | ||
| 266 | } | ||
| 267 | } | ||
| 268 | |||
| 253 | if (E_NOTFOUND == hr) | 269 | if (E_NOTFOUND == hr) |
| 254 | { | 270 | { |
| 255 | ReleaseNullStr(pRegistration->sczDetectedProviderKeyBundleCode); | 271 | ReleaseNullStr(pRegistration->sczDetectedProviderKeyBundleCode); |
| @@ -284,7 +300,21 @@ extern "C" HRESULT DependencyDetectBundle( | |||
| 284 | hr = DependencyDetectProviderKeyBundleCode(pRegistration); | 300 | hr = DependencyDetectProviderKeyBundleCode(pRegistration); |
| 285 | ExitOnFailure(hr, "Failed to detect provider key bundle code."); | 301 | ExitOnFailure(hr, "Failed to detect provider key bundle code."); |
| 286 | 302 | ||
| 287 | hr = DepCheckDependents(pRegistration->hkRoot, pRegistration->sczProviderKey, 0, NULL, &pRegistration->rgDependents, &pRegistration->cDependents); | 303 | // For configurable packages, check both scopes because until planning, |
| 304 | // we can't know their planned scope. | ||
| 305 | if (pRegistration->hkRoot) | ||
| 306 | { | ||
| 307 | hr = DepCheckDependents(pRegistration->hkRoot, pRegistration->sczProviderKey, 0, NULL, &pRegistration->rgDependents, &pRegistration->cDependents); | ||
| 308 | } | ||
| 309 | else | ||
| 310 | { | ||
| 311 | hr = DepCheckDependents(HKEY_LOCAL_MACHINE, pRegistration->sczProviderKey, 0, NULL, &pRegistration->rgDependents, &pRegistration->cDependents); | ||
| 312 | |||
| 313 | if (E_NOTFOUND == hr) | ||
| 314 | { | ||
| 315 | hr = DepCheckDependents(HKEY_CURRENT_USER, pRegistration->sczProviderKey, 0, NULL, &pRegistration->rgDependents, &pRegistration->cDependents); | ||
| 316 | } | ||
| 317 | } | ||
| 288 | ExitOnPathFailure(hr, fExists, "Failed dependents check on bundle."); | 318 | ExitOnPathFailure(hr, fExists, "Failed dependents check on bundle."); |
| 289 | 319 | ||
| 290 | if (pDependencies->fSelfDependent || pDependencies->fActiveParent) | 320 | if (pDependencies->fSelfDependent || pDependencies->fActiveParent) |
| @@ -292,13 +322,13 @@ extern "C" HRESULT DependencyDetectBundle( | |||
| 292 | for (DWORD i = 0; i < pRegistration->cDependents; ++i) | 322 | for (DWORD i = 0; i < pRegistration->cDependents; ++i) |
| 293 | { | 323 | { |
| 294 | DEPENDENCY* pDependent = pRegistration->rgDependents + i; | 324 | DEPENDENCY* pDependent = pRegistration->rgDependents + i; |
| 295 | 325 | ||
| 296 | if (pDependencies->fActiveParent && CSTR_EQUAL == ::CompareStringOrdinal(pDependencies->wzActiveParent, -1, pDependent->sczKey, -1, TRUE)) | 326 | if (pDependent && pDependencies->fActiveParent && CSTR_EQUAL == ::CompareStringOrdinal(pDependencies->wzActiveParent, -1, pDependent->sczKey, -1, TRUE)) |
| 297 | { | 327 | { |
| 298 | pRegistration->fParentRegisteredAsDependent = TRUE; | 328 | pRegistration->fParentRegisteredAsDependent = TRUE; |
| 299 | } | 329 | } |
| 300 | 330 | ||
| 301 | if (pDependencies->fSelfDependent && CSTR_EQUAL == ::CompareStringOrdinal(pDependencies->wzSelfDependent, -1, pDependent->sczKey, -1, TRUE)) | 331 | if (pDependent && pDependencies->fSelfDependent && CSTR_EQUAL == ::CompareStringOrdinal(pDependencies->wzSelfDependent, -1, pDependent->sczKey, -1, TRUE)) |
| 302 | { | 332 | { |
| 303 | pRegistration->fSelfRegisteredAsDependent = TRUE; | 333 | pRegistration->fSelfRegisteredAsDependent = TRUE; |
| 304 | } | 334 | } |
| @@ -316,11 +346,24 @@ extern "C" HRESULT DependencyDetectChainPackage( | |||
| 316 | { | 346 | { |
| 317 | HRESULT hr = S_OK; | 347 | HRESULT hr = S_OK; |
| 318 | 348 | ||
| 319 | hr = DetectPackageDependents(pPackage, pRegistration); | 349 | if (BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE == pPackage->scope || BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER == pPackage->scope) |
| 320 | ExitOnFailure(hr, "Failed to detect dependents for package '%ls'", pPackage->sczId); | 350 | { |
| 351 | // For configurable packages, check both scopes because until planning, | ||
| 352 | // we can't know their planned scope. | ||
| 353 | hr = DetectPackageDependents(pPackage, /*fPerMachine*/TRUE, pRegistration); | ||
| 354 | ExitOnFailure(hr, "Failed to detect per-machine dependents for configurable package '%ls'", pPackage->sczId); | ||
| 355 | |||
| 356 | hr = DetectPackageDependents(pPackage, /*fPerMachine*/FALSE, pRegistration); | ||
| 357 | ExitOnFailure(hr, "Failed to detect per-user dependents for configurable package '%ls'", pPackage->sczId); | ||
| 358 | } | ||
| 359 | else | ||
| 360 | { | ||
| 361 | hr = DetectPackageDependents(pPackage, pPackage->fPerMachine, pRegistration); | ||
| 362 | ExitOnFailure(hr, "Failed to detect dependents for %hs package '%ls'", LoggingInstallScopeToString(pPackage->fPerMachine), pPackage->sczId); | ||
| 363 | } | ||
| 321 | 364 | ||
| 322 | hr = DependencyDetectCompatibleEntry(pPackage, pRegistration); | 365 | hr = DependencyDetectCompatibleEntry(pPackage, pRegistration); |
| 323 | ExitOnFailure(hr, "Failed to detect compatible package for package '%ls'", pPackage->sczId); | 366 | ExitOnFailure(hr, "Failed to detect compatible package for %hs package '%ls'", LoggingInstallScopeToString(pPackage->fPerMachine), pPackage->sczId); |
| 324 | 367 | ||
| 325 | LExit: | 368 | LExit: |
| 326 | return hr; | 369 | return hr; |
| @@ -336,7 +379,7 @@ extern "C" HRESULT DependencyDetectRelatedBundle( | |||
| 336 | 379 | ||
| 337 | if (pRelatedBundle->fPlannable) | 380 | if (pRelatedBundle->fPlannable) |
| 338 | { | 381 | { |
| 339 | hr = DetectPackageDependents(pPackage, pRegistration); | 382 | hr = DetectPackageDependents(pPackage, pPackage->fPerMachine, pRegistration); |
| 340 | ExitOnFailure(hr, "Failed to detect dependents for related bundle '%ls'", pPackage->sczId); | 383 | ExitOnFailure(hr, "Failed to detect dependents for related bundle '%ls'", pPackage->sczId); |
| 341 | } | 384 | } |
| 342 | 385 | ||
| @@ -626,7 +669,7 @@ LExit: | |||
| 626 | } | 669 | } |
| 627 | 670 | ||
| 628 | extern "C" HRESULT DependencyPlanPackage( | 671 | extern "C" HRESULT DependencyPlanPackage( |
| 629 | __in_opt DWORD *pdwInsertSequence, | 672 | __in_opt DWORD* pdwInsertSequence, |
| 630 | __in const BURN_PACKAGE* pPackage, | 673 | __in const BURN_PACKAGE* pPackage, |
| 631 | __in BURN_PLAN* pPlan | 674 | __in BURN_PLAN* pPlan |
| 632 | ) | 675 | ) |
| @@ -946,18 +989,19 @@ LExit: | |||
| 946 | 989 | ||
| 947 | static HRESULT DetectPackageDependents( | 990 | static HRESULT DetectPackageDependents( |
| 948 | __in BURN_PACKAGE* pPackage, | 991 | __in BURN_PACKAGE* pPackage, |
| 992 | __in BOOL fPackagePerMachine, | ||
| 949 | __in const BURN_REGISTRATION* pRegistration | 993 | __in const BURN_REGISTRATION* pRegistration |
| 950 | ) | 994 | ) |
| 951 | { | 995 | { |
| 952 | HRESULT hr = S_OK; | 996 | HRESULT hr = S_OK; |
| 953 | HKEY hkHive = pPackage->fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | 997 | HKEY hkHive = fPackagePerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; |
| 954 | BOOL fCanIgnorePresence = pPackage->fCanAffectRegistration && 0 < pPackage->cDependencyProviders && | 998 | BOOL fCanIgnorePresence = pPackage->fCanAffectRegistration && 0 < pPackage->cDependencyProviders && |
| 955 | (BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pPackage->cacheRegistrationState || BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pPackage->installRegistrationState); | 999 | (BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pPackage->cacheRegistrationState || BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pPackage->installRegistrationState); |
| 956 | BOOL fBundleRegisteredAsDependent = FALSE; | 1000 | BOOL fBundleRegisteredAsDependent = FALSE; |
| 957 | 1001 | ||
| 958 | // There's currently no point in getting the dependents if the scope doesn't match, | 1002 | // There's currently no point in getting the dependents if the scope doesn't match, |
| 959 | // because they will just get ignored. | 1003 | // because they will just get ignored. |
| 960 | if (pRegistration->fPerMachine != pPackage->fPerMachine) | 1004 | if (pRegistration->fPerMachine != fPackagePerMachine) |
| 961 | { | 1005 | { |
| 962 | ExitFunction(); | 1006 | ExitFunction(); |
| 963 | } | 1007 | } |
| @@ -979,7 +1023,7 @@ static HRESULT DetectPackageDependents( | |||
| 979 | { | 1023 | { |
| 980 | DEPENDENCY* pDependent = pProvider->rgDependents + iDependent; | 1024 | DEPENDENCY* pDependent = pProvider->rgDependents + iDependent; |
| 981 | 1025 | ||
| 982 | if (CSTR_EQUAL == ::CompareStringOrdinal(pRegistration->sczCode, -1, pDependent->sczKey, -1, TRUE)) | 1026 | if (pDependent && CSTR_EQUAL == ::CompareStringOrdinal(pRegistration->sczCode, -1, pDependent->sczKey, -1, TRUE)) |
| 983 | { | 1027 | { |
| 984 | pProvider->fBundleRegisteredAsDependent = TRUE; | 1028 | pProvider->fBundleRegisteredAsDependent = TRUE; |
| 985 | fBundleRegisteredAsDependent = TRUE; | 1029 | fBundleRegisteredAsDependent = TRUE; |
| @@ -994,10 +1038,12 @@ static HRESULT DetectPackageDependents( | |||
| 994 | { | 1038 | { |
| 995 | pPackage->cacheRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_IGNORED; | 1039 | pPackage->cacheRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_IGNORED; |
| 996 | } | 1040 | } |
| 1041 | |||
| 997 | if (BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pPackage->installRegistrationState) | 1042 | if (BURN_PACKAGE_REGISTRATION_STATE_PRESENT == pPackage->installRegistrationState) |
| 998 | { | 1043 | { |
| 999 | pPackage->installRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_IGNORED; | 1044 | pPackage->installRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_IGNORED; |
| 1000 | } | 1045 | } |
| 1046 | |||
| 1001 | if (BURN_PACKAGE_TYPE_MSP == pPackage->type) | 1047 | if (BURN_PACKAGE_TYPE_MSP == pPackage->type) |
| 1002 | { | 1048 | { |
| 1003 | for (DWORD i = 0; i < pPackage->Msp.cTargetProductCodes; ++i) | 1049 | for (DWORD i = 0; i < pPackage->Msp.cTargetProductCodes; ++i) |
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp index ef87841f..711ce4af 100644 --- a/src/burn/engine/elevation.cpp +++ b/src/burn/engine/elevation.cpp | |||
| @@ -1191,7 +1191,6 @@ extern "C" HRESULT ElevationExecuteMsiPackage( | |||
| 1191 | hr = VariableSerialize(pVariables, FALSE, &pbData, &cbData); | 1191 | hr = VariableSerialize(pVariables, FALSE, &pbData, &cbData); |
| 1192 | ExitOnFailure(hr, "Failed to write variables."); | 1192 | ExitOnFailure(hr, "Failed to write variables."); |
| 1193 | 1193 | ||
| 1194 | |||
| 1195 | // send message | 1194 | // send message |
| 1196 | context.pfnMessageHandler = pfnMessageHandler; | 1195 | context.pfnMessageHandler = pfnMessageHandler; |
| 1197 | context.pvContext = pvContext; | 1196 | context.pvContext = pvContext; |
| @@ -2572,6 +2571,11 @@ static HRESULT OnSessionBegin( | |||
| 2572 | ExitOnFailure(hr, "Failed to read variables."); | 2571 | ExitOnFailure(hr, "Failed to read variables."); |
| 2573 | 2572 | ||
| 2574 | // Begin session in per-machine process. | 2573 | // Begin session in per-machine process. |
| 2574 | pRegistration->fPerMachine = TRUE; | ||
| 2575 | |||
| 2576 | hr = RegistrationSetPaths(pRegistration, pCache); | ||
| 2577 | ExitOnFailure(hr, "Failed to set elevated registration paths."); | ||
| 2578 | |||
| 2575 | hr = RegistrationSessionBegin(sczEngineWorkingPath, pRegistration, pCache, pVariables, dwRegistrationOperations, qwEstimatedSize, (BOOTSTRAPPER_REGISTRATION_TYPE)dwRegistrationType); | 2579 | hr = RegistrationSessionBegin(sczEngineWorkingPath, pRegistration, pCache, pVariables, dwRegistrationOperations, qwEstimatedSize, (BOOTSTRAPPER_REGISTRATION_TYPE)dwRegistrationType); |
| 2576 | ExitOnFailure(hr, "Failed to begin registration session."); | 2580 | ExitOnFailure(hr, "Failed to begin registration session."); |
| 2577 | 2581 | ||
| @@ -2657,6 +2661,8 @@ static HRESULT OnCachePreparePackage( | |||
| 2657 | { | 2661 | { |
| 2658 | hr = PackageFindById(pPackages, scz, &pPackage); | 2662 | hr = PackageFindById(pPackages, scz, &pPackage); |
| 2659 | ExitOnFailure(hr, "Failed to find package: %ls", scz); | 2663 | ExitOnFailure(hr, "Failed to find package: %ls", scz); |
| 2664 | |||
| 2665 | pPackage->fPerMachine = TRUE; | ||
| 2660 | } | 2666 | } |
| 2661 | else | 2667 | else |
| 2662 | { | 2668 | { |
| @@ -2698,6 +2704,8 @@ static HRESULT OnCacheCompletePayload( | |||
| 2698 | { | 2704 | { |
| 2699 | hr = PackageFindById(pPackages, scz, &pPackage); | 2705 | hr = PackageFindById(pPackages, scz, &pPackage); |
| 2700 | ExitOnFailure(hr, "Failed to find package: %ls", scz); | 2706 | ExitOnFailure(hr, "Failed to find package: %ls", scz); |
| 2707 | |||
| 2708 | pPackage->fPerMachine = TRUE; | ||
| 2701 | } | 2709 | } |
| 2702 | 2710 | ||
| 2703 | hr = BuffReadString(pbData, cbData, &iData, &scz); | 2711 | hr = BuffReadString(pbData, cbData, &iData, &scz); |
| @@ -2717,8 +2725,8 @@ static HRESULT OnCacheCompletePayload( | |||
| 2717 | 2725 | ||
| 2718 | if (pPackage && pPayload) // complete payload. | 2726 | if (pPackage && pPayload) // complete payload. |
| 2719 | { | 2727 | { |
| 2720 | hr = CacheCompletePayload(pCache, pPackage->fPerMachine, pPayload, pPackage->sczCacheId, sczUnverifiedPath, fMove, BurnCacheMessageHandler, ElevatedProgressRoutine, hPipe); | 2728 | hr = CacheCompletePayload(pCache, TRUE/*fPerMachine*/, pPayload, pPackage->sczCacheId, sczUnverifiedPath, fMove, BurnCacheMessageHandler, ElevatedProgressRoutine, hPipe); |
| 2721 | ExitOnFailure(hr, "Failed to cache payload: %ls", pPayload->sczKey); | 2729 | ExitOnFailure(hr, "Failed to cache per-machine payload: %ls", pPayload->sczKey); |
| 2722 | } | 2730 | } |
| 2723 | else | 2731 | else |
| 2724 | { | 2732 | { |
| @@ -2755,6 +2763,8 @@ static HRESULT OnCacheVerifyPayload( | |||
| 2755 | { | 2763 | { |
| 2756 | hr = PackageFindById(pPackages, scz, &pPackage); | 2764 | hr = PackageFindById(pPackages, scz, &pPackage); |
| 2757 | ExitOnFailure(hr, "Failed to find package: %ls", scz); | 2765 | ExitOnFailure(hr, "Failed to find package: %ls", scz); |
| 2766 | |||
| 2767 | pPackage->fPerMachine = TRUE; | ||
| 2758 | } | 2768 | } |
| 2759 | 2769 | ||
| 2760 | hr = BuffReadString(pbData, cbData, &iData, &scz); | 2770 | hr = BuffReadString(pbData, cbData, &iData, &scz); |
| @@ -2970,6 +2980,8 @@ static HRESULT OnExecuteBundlePackage( | |||
| 2970 | hr = PackageFindById(pPackages, sczPackage, &executeAction.bundlePackage.pPackage); | 2980 | hr = PackageFindById(pPackages, sczPackage, &executeAction.bundlePackage.pPackage); |
| 2971 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); | 2981 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); |
| 2972 | 2982 | ||
| 2983 | executeAction.bundlePackage.pPackage->fPerMachine = TRUE; | ||
| 2984 | |||
| 2973 | if (BURN_PACKAGE_TYPE_BUNDLE != executeAction.bundlePackage.pPackage->type) | 2985 | if (BURN_PACKAGE_TYPE_BUNDLE != executeAction.bundlePackage.pPackage->type) |
| 2974 | { | 2986 | { |
| 2975 | ExitWithRootFailure(hr, E_INVALIDARG, "Package is not a BUNDLE package: %ls", sczPackage); | 2987 | ExitWithRootFailure(hr, E_INVALIDARG, "Package is not a BUNDLE package: %ls", sczPackage); |
| @@ -3052,6 +3064,8 @@ static HRESULT OnExecuteExePackage( | |||
| 3052 | hr = PackageFindById(pPackages, sczPackage, &executeAction.exePackage.pPackage); | 3064 | hr = PackageFindById(pPackages, sczPackage, &executeAction.exePackage.pPackage); |
| 3053 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); | 3065 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); |
| 3054 | 3066 | ||
| 3067 | executeAction.exePackage.pPackage->fPerMachine = TRUE; | ||
| 3068 | |||
| 3055 | if (BURN_PACKAGE_TYPE_EXE != executeAction.exePackage.pPackage->type) | 3069 | if (BURN_PACKAGE_TYPE_EXE != executeAction.exePackage.pPackage->type) |
| 3056 | { | 3070 | { |
| 3057 | ExitWithRootFailure(hr, E_INVALIDARG, "Package is not an EXE package: %ls", sczPackage); | 3071 | ExitWithRootFailure(hr, E_INVALIDARG, "Package is not an EXE package: %ls", sczPackage); |
| @@ -3113,6 +3127,8 @@ static HRESULT OnExecuteMsiPackage( | |||
| 3113 | hr = PackageFindById(pPackages, sczPackage, &executeAction.msiPackage.pPackage); | 3127 | hr = PackageFindById(pPackages, sczPackage, &executeAction.msiPackage.pPackage); |
| 3114 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); | 3128 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); |
| 3115 | 3129 | ||
| 3130 | executeAction.msiPackage.pPackage->fPerMachine = TRUE; | ||
| 3131 | |||
| 3116 | hr = BuffReadPointer(pbData, cbData, &iData, (DWORD_PTR*)&hwndParent); | 3132 | hr = BuffReadPointer(pbData, cbData, &iData, (DWORD_PTR*)&hwndParent); |
| 3117 | ExitOnFailure(hr, "Failed to read parent hwnd."); | 3133 | ExitOnFailure(hr, "Failed to read parent hwnd."); |
| 3118 | 3134 | ||
| @@ -3205,6 +3221,8 @@ static HRESULT OnExecuteMspPackage( | |||
| 3205 | hr = PackageFindById(pPackages, sczPackage, &executeAction.mspTarget.pPackage); | 3221 | hr = PackageFindById(pPackages, sczPackage, &executeAction.mspTarget.pPackage); |
| 3206 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); | 3222 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); |
| 3207 | 3223 | ||
| 3224 | executeAction.mspTarget.pPackage->fPerMachine = TRUE; | ||
| 3225 | |||
| 3208 | hr = BuffReadPointer(pbData, cbData, &iData, (DWORD_PTR*)&hwndParent); | 3226 | hr = BuffReadPointer(pbData, cbData, &iData, (DWORD_PTR*)&hwndParent); |
| 3209 | ExitOnFailure(hr, "Failed to read parent hwnd."); | 3227 | ExitOnFailure(hr, "Failed to read parent hwnd."); |
| 3210 | 3228 | ||
| @@ -3246,6 +3264,8 @@ static HRESULT OnExecuteMspPackage( | |||
| 3246 | 3264 | ||
| 3247 | hr = PackageFindById(pPackages, sczPackage, &executeAction.mspTarget.rgOrderedPatches[i].pPackage); | 3265 | hr = PackageFindById(pPackages, sczPackage, &executeAction.mspTarget.rgOrderedPatches[i].pPackage); |
| 3248 | ExitOnFailure(hr, "Failed to find ordered patch package: %ls", sczPackage); | 3266 | ExitOnFailure(hr, "Failed to find ordered patch package: %ls", sczPackage); |
| 3267 | |||
| 3268 | executeAction.mspTarget.rgOrderedPatches[i].pPackage->fPerMachine = TRUE; | ||
| 3249 | } | 3269 | } |
| 3250 | } | 3270 | } |
| 3251 | 3271 | ||
| @@ -3310,6 +3330,8 @@ static HRESULT OnExecuteMsuPackage( | |||
| 3310 | hr = PackageFindById(pPackages, sczPackage, &executeAction.msuPackage.pPackage); | 3330 | hr = PackageFindById(pPackages, sczPackage, &executeAction.msuPackage.pPackage); |
| 3311 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); | 3331 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); |
| 3312 | 3332 | ||
| 3333 | executeAction.msuPackage.pPackage->fPerMachine = TRUE; | ||
| 3334 | |||
| 3313 | if (BURN_PACKAGE_TYPE_MSU != executeAction.msuPackage.pPackage->type) | 3335 | if (BURN_PACKAGE_TYPE_MSU != executeAction.msuPackage.pPackage->type) |
| 3314 | { | 3336 | { |
| 3315 | ExitWithRootFailure(hr, E_INVALIDARG, "Package is not an MSU package: %ls", sczPackage); | 3337 | ExitWithRootFailure(hr, E_INVALIDARG, "Package is not an MSU package: %ls", sczPackage); |
| @@ -3371,6 +3393,8 @@ static HRESULT OnUninstallMsiCompatiblePackage( | |||
| 3371 | hr = PackageFindById(pPackages, sczPackageId, &pPackage); | 3393 | hr = PackageFindById(pPackages, sczPackageId, &pPackage); |
| 3372 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackageId); | 3394 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackageId); |
| 3373 | 3395 | ||
| 3396 | pPackage->fPerMachine = TRUE; | ||
| 3397 | |||
| 3374 | executeAction.uninstallMsiCompatiblePackage.pParentPackage = pPackage; | 3398 | executeAction.uninstallMsiCompatiblePackage.pParentPackage = pPackage; |
| 3375 | pCompatiblePackage = &pPackage->compatiblePackage; | 3399 | pCompatiblePackage = &pPackage->compatiblePackage; |
| 3376 | 3400 | ||
| @@ -3424,6 +3448,8 @@ static HRESULT OnExecutePackageProviderAction( | |||
| 3424 | } | 3448 | } |
| 3425 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); | 3449 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); |
| 3426 | 3450 | ||
| 3451 | executeAction.packageProvider.pPackage->fPerMachine; | ||
| 3452 | |||
| 3427 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&fRollback); | 3453 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&fRollback); |
| 3428 | ExitOnFailure(hr, "Failed to read rollback flag."); | 3454 | ExitOnFailure(hr, "Failed to read rollback flag."); |
| 3429 | 3455 | ||
| @@ -3436,11 +3462,6 @@ static HRESULT OnExecutePackageProviderAction( | |||
| 3436 | ExitOnFailure(hr, "Failed to read provider action."); | 3462 | ExitOnFailure(hr, "Failed to read provider action."); |
| 3437 | } | 3463 | } |
| 3438 | 3464 | ||
| 3439 | if (!executeAction.packageProvider.pPackage->fPerMachine) | ||
| 3440 | { | ||
| 3441 | ExitWithRootFailure(hr, E_INVALIDARG, "ExecutePackageProviderAction called for per-user package."); | ||
| 3442 | } | ||
| 3443 | |||
| 3444 | // Execute the package provider action. | 3465 | // Execute the package provider action. |
| 3445 | hr = DependencyExecutePackageProviderAction(&executeAction, fRollback); | 3466 | hr = DependencyExecutePackageProviderAction(&executeAction, fRollback); |
| 3446 | ExitOnFailure(hr, "Failed to execute package provider action."); | 3467 | ExitOnFailure(hr, "Failed to execute package provider action."); |
| @@ -3479,6 +3500,8 @@ static HRESULT OnExecutePackageDependencyAction( | |||
| 3479 | } | 3500 | } |
| 3480 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); | 3501 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); |
| 3481 | 3502 | ||
| 3503 | executeAction.packageDependency.pPackage->fPerMachine = TRUE; | ||
| 3504 | |||
| 3482 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&fRollback); | 3505 | hr = BuffReadNumber(pbData, cbData, &iData, (DWORD*)&fRollback); |
| 3483 | ExitOnFailure(hr, "Failed to read rollback flag."); | 3506 | ExitOnFailure(hr, "Failed to read rollback flag."); |
| 3484 | 3507 | ||
| @@ -3784,6 +3807,8 @@ static HRESULT OnCleanCompatiblePackage( | |||
| 3784 | hr = PackageFindById(pPackages, sczPackageId, &pPackage); | 3807 | hr = PackageFindById(pPackages, sczPackageId, &pPackage); |
| 3785 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackageId); | 3808 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackageId); |
| 3786 | 3809 | ||
| 3810 | pPackage->fPerMachine = TRUE; | ||
| 3811 | |||
| 3787 | pCompatiblePackage = &pPackage->compatiblePackage; | 3812 | pCompatiblePackage = &pPackage->compatiblePackage; |
| 3788 | 3813 | ||
| 3789 | if (!pCompatiblePackage->fDetected || !pCompatiblePackage->compatibleEntry.sczId || !pCompatiblePackage->sczCacheId || !*pCompatiblePackage->sczCacheId) | 3814 | if (!pCompatiblePackage->fDetected || !pCompatiblePackage->compatibleEntry.sczId || !pCompatiblePackage->sczCacheId || !*pCompatiblePackage->sczCacheId) |
| @@ -3826,6 +3851,8 @@ static HRESULT OnCleanPackage( | |||
| 3826 | hr = PackageFindById(pPackages, sczPackage, &pPackage); | 3851 | hr = PackageFindById(pPackages, sczPackage, &pPackage); |
| 3827 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); | 3852 | ExitOnFailure(hr, "Failed to find package: %ls", sczPackage); |
| 3828 | 3853 | ||
| 3854 | pPackage->fPerMachine = TRUE; | ||
| 3855 | |||
| 3829 | // Remove the package from the cache. | 3856 | // Remove the package from the cache. |
| 3830 | hr = CacheRemovePackage(pCache, TRUE, pPackage->sczId, pPackage->sczCacheId); | 3857 | hr = CacheRemovePackage(pCache, TRUE, pPackage->sczId, pPackage->sczCacheId); |
| 3831 | ExitOnFailure(hr, "Failed to remove from cache package: %ls", pPackage->sczId); | 3858 | ExitOnFailure(hr, "Failed to remove from cache package: %ls", pPackage->sczId); |
diff --git a/src/burn/engine/engine.cpp b/src/burn/engine/engine.cpp index d432f732..8423da41 100644 --- a/src/burn/engine/engine.cpp +++ b/src/burn/engine/engine.cpp | |||
| @@ -16,11 +16,6 @@ static HRESULT InitializeEngineState( | |||
| 16 | static void UninitializeEngineState( | 16 | static void UninitializeEngineState( |
| 17 | __in BURN_ENGINE_STATE* pEngineState | 17 | __in BURN_ENGINE_STATE* pEngineState |
| 18 | ); | 18 | ); |
| 19 | #if 0 | ||
| 20 | static HRESULT RunUntrusted( | ||
| 21 | __in BURN_ENGINE_STATE* pEngineState | ||
| 22 | ); | ||
| 23 | #endif | ||
| 24 | static HRESULT RunNormal( | 19 | static HRESULT RunNormal( |
| 25 | __in HINSTANCE hInstance, | 20 | __in HINSTANCE hInstance, |
| 26 | __in BURN_ENGINE_STATE* pEngineState | 21 | __in BURN_ENGINE_STATE* pEngineState |
| @@ -812,7 +807,7 @@ static HRESULT ProcessMessage( | |||
| 812 | break; | 807 | break; |
| 813 | 808 | ||
| 814 | case WM_BURN_PLAN: | 809 | case WM_BURN_PLAN: |
| 815 | hr = CorePlan(pEngineState, pAction->plan.action); | 810 | hr = CorePlan(pEngineState, pAction->plan.action, pAction->plan.plannedScope); |
| 816 | break; | 811 | break; |
| 817 | 812 | ||
| 818 | case WM_BURN_ELEVATE: | 813 | case WM_BURN_ELEVATE: |
diff --git a/src/burn/engine/engine.mc b/src/burn/engine/engine.mc index 776f7832..8e2f1a2e 100644 --- a/src/burn/engine/engine.mc +++ b/src/burn/engine/engine.mc | |||
| @@ -271,7 +271,7 @@ MessageId=101 | |||
| 271 | Severity=Success | 271 | Severity=Success |
| 272 | SymbolicName=MSG_DETECTED_PACKAGE | 272 | SymbolicName=MSG_DETECTED_PACKAGE |
| 273 | Language=English | 273 | Language=English |
| 274 | Detected package: %1!ls!, state: %2!hs!, cached: %3!hs!, install registration state: %4!hs!, cache registration state: %5!hs! | 274 | Detected package: %1!ls!, state: %2!hs!, authored scope: %6!hs!, cached: %3!hs!, install registration state: %4!hs!, cache registration state: %5!hs! |
| 275 | . | 275 | . |
| 276 | 276 | ||
| 277 | MessageId=102 | 277 | MessageId=102 |
| @@ -404,14 +404,21 @@ MessageId=200 | |||
| 404 | Severity=Success | 404 | Severity=Success |
| 405 | SymbolicName=MSG_PLAN_BEGIN | 405 | SymbolicName=MSG_PLAN_BEGIN |
| 406 | Language=English | 406 | Language=English |
| 407 | Plan begin, %1!u! packages, action: %2!hs! | 407 | Plan begin, %1!u! packages, action: %2!hs!, planned scope: %3!hs! |
| 408 | . | ||
| 409 | |||
| 410 | MessageId=226 | ||
| 411 | Severity=Success | ||
| 412 | SymbolicName=MSG_PLAN_CONFIGURED_SCOPE | ||
| 413 | Language=English | ||
| 414 | Planned configurable scope: %1!hs! | ||
| 408 | . | 415 | . |
| 409 | 416 | ||
| 410 | MessageId=201 | 417 | MessageId=201 |
| 411 | Severity=Success | 418 | Severity=Success |
| 412 | SymbolicName=MSG_PLANNED_PACKAGE | 419 | SymbolicName=MSG_PLANNED_PACKAGE |
| 413 | Language=English | 420 | Language=English |
| 414 | Planned package: %1!ls!, state: %2!hs!, default requested: %3!hs!, ba requested: %4!hs!, execute: %5!hs!, rollback: %6!hs!, default cache strategy: %7!hs!, ba requested strategy: %8!hs!, cache: %9!hs!, uncache: %10!hs!, dependency: %11!hs!, expected install registration state: %12!hs!, expected cache registration state: %13!hs! | 421 | Planned package: %1!ls!, state: %2!hs!, default requested: %3!hs!, ba requested: %4!hs!, execute: %5!hs!, rollback: %6!hs!, scope: %14!hs!, default cache strategy: %7!hs!, ba requested strategy: %8!hs!, cache: %9!hs!, uncache: %10!hs!, dependency: %11!hs!, expected install registration state: %12!hs!, expected cache registration state: %13!hs! |
| 415 | . | 422 | . |
| 416 | 423 | ||
| 417 | MessageId=203 | 424 | MessageId=203 |
| @@ -782,7 +789,7 @@ MessageId=328 | |||
| 782 | Severity=Warning | 789 | Severity=Warning |
| 783 | SymbolicName=MSG_DEPENDENCY_PACKAGE_DEPENDENT | 790 | SymbolicName=MSG_DEPENDENCY_PACKAGE_DEPENDENT |
| 784 | Language=English | 791 | Language=English |
| 785 | Found dependent: %1!ls!, name: %2!ls! | 792 | Found dependent: %1!ls!, name: %2!ls! |
| 786 | . | 793 | . |
| 787 | 794 | ||
| 788 | MessageId=329 | 795 | MessageId=329 |
| @@ -1288,3 +1295,17 @@ SymbolicName=MSG_DEPENDENCY_PACKAGE_DEPENDENTS_OVERRIDDEN | |||
| 1288 | Language=English | 1295 | Language=English |
| 1289 | BA requested to uninstall package: %1!ls!, despite dependents: | 1296 | BA requested to uninstall package: %1!ls!, despite dependents: |
| 1290 | . | 1297 | . |
| 1298 | MessageId=702 | ||
| 1299 | Severity=Warning | ||
| 1300 | SymbolicName=MSG_SCOPE_IGNORED_BA_SCOPE | ||
| 1301 | Language=English | ||
| 1302 | Scope command-line switch ignored because the bootstrapper application already specified a scope. | ||
| 1303 | . | ||
| 1304 | |||
| 1305 | MessageId=703 | ||
| 1306 | Severity=Warning | ||
| 1307 | SymbolicName=MSG_SCOPE_IGNORED_UNCONFIGURABLE | ||
| 1308 | Language=English | ||
| 1309 | Scope command-line switch ignored because the bundle doesn't have any packages with configurable scope. | ||
| 1310 | . | ||
| 1311 | |||
diff --git a/src/burn/engine/engine.vcxproj b/src/burn/engine/engine.vcxproj index 98556ea6..5ab9f1ce 100644 --- a/src/burn/engine/engine.vcxproj +++ b/src/burn/engine/engine.vcxproj | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-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 | |||
| 4 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 3 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 5 | <ItemGroup Label="ProjectConfigurations"> | 4 | <ItemGroup Label="ProjectConfigurations"> |
| 6 | <ProjectConfiguration Include="Debug|Win32"> | 5 | <ProjectConfiguration Include="Debug|Win32"> |
| @@ -28,7 +27,6 @@ | |||
| 28 | <Platform>ARM64</Platform> | 27 | <Platform>ARM64</Platform> |
| 29 | </ProjectConfiguration> | 28 | </ProjectConfiguration> |
| 30 | </ItemGroup> | 29 | </ItemGroup> |
| 31 | |||
| 32 | <PropertyGroup Label="Globals"> | 30 | <PropertyGroup Label="Globals"> |
| 33 | <ProjectGuid>{8119537D-E1D9-6591-D51A-49768A2F9C37}</ProjectGuid> | 31 | <ProjectGuid>{8119537D-E1D9-6591-D51A-49768A2F9C37}</ProjectGuid> |
| 34 | <ConfigurationType>StaticLibrary</ConfigurationType> | 32 | <ConfigurationType>StaticLibrary</ConfigurationType> |
| @@ -37,20 +35,15 @@ | |||
| 37 | <Description>Native component of WixToolset.Burn</Description> | 35 | <Description>Native component of WixToolset.Burn</Description> |
| 38 | <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets> | 36 | <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets> |
| 39 | </PropertyGroup> | 37 | </PropertyGroup> |
| 40 | |||
| 41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 38 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
| 42 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 39 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
| 43 | |||
| 44 | <PropertyGroup> | 40 | <PropertyGroup> |
| 45 | <ProjectAdditionalIncludeDirectories>..\..\api\burn\inc;$(BurnGeneratedHeaderDirectory);$(ProjectAdditionalIncludeDirectories)</ProjectAdditionalIncludeDirectories> | 41 | <ProjectAdditionalIncludeDirectories>..\..\api\burn\inc;$(BurnGeneratedHeaderDirectory);$(ProjectAdditionalIncludeDirectories)</ProjectAdditionalIncludeDirectories> |
| 46 | </PropertyGroup> | 42 | </PropertyGroup> |
| 47 | |||
| 48 | <ImportGroup Label="ExtensionSettings"> | 43 | <ImportGroup Label="ExtensionSettings"> |
| 49 | </ImportGroup> | 44 | </ImportGroup> |
| 50 | |||
| 51 | <ImportGroup Label="Shared"> | 45 | <ImportGroup Label="Shared"> |
| 52 | </ImportGroup> | 46 | </ImportGroup> |
| 53 | |||
| 54 | <ItemGroup> | 47 | <ItemGroup> |
| 55 | <ClCompile Include="apply.cpp" /> | 48 | <ClCompile Include="apply.cpp" /> |
| 56 | <ClCompile Include="approvedexe.cpp" /> | 49 | <ClCompile Include="approvedexe.cpp" /> |
| @@ -97,7 +90,6 @@ | |||
| 97 | <ClCompile Include="variable.cpp" /> | 90 | <ClCompile Include="variable.cpp" /> |
| 98 | <ClCompile Include="variant.cpp" /> | 91 | <ClCompile Include="variant.cpp" /> |
| 99 | </ItemGroup> | 92 | </ItemGroup> |
| 100 | |||
| 101 | <ItemGroup> | 93 | <ItemGroup> |
| 102 | <ClInclude Include="apply.h" /> | 94 | <ClInclude Include="apply.h" /> |
| 103 | <ClInclude Include="approvedexe.h" /> | 95 | <ClInclude Include="approvedexe.h" /> |
| @@ -147,7 +139,6 @@ | |||
| 147 | <ClInclude Include="variable.h" /> | 139 | <ClInclude Include="variable.h" /> |
| 148 | <ClInclude Include="variant.h" /> | 140 | <ClInclude Include="variant.h" /> |
| 149 | </ItemGroup> | 141 | </ItemGroup> |
| 150 | |||
| 151 | <ItemDefinitionGroup> | 142 | <ItemDefinitionGroup> |
| 152 | <CustomBuildStep> | 143 | <CustomBuildStep> |
| 153 | <Message>Compiling message file...</Message> | 144 | <Message>Compiling message file...</Message> |
| @@ -157,7 +148,6 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command> | |||
| 157 | <Outputs>$(IntDir)engine.messages.h;$(IntDir)engine.messages.rc</Outputs> | 148 | <Outputs>$(IntDir)engine.messages.h;$(IntDir)engine.messages.rc</Outputs> |
| 158 | </CustomBuildStep> | 149 | </CustomBuildStep> |
| 159 | </ItemDefinitionGroup> | 150 | </ItemDefinitionGroup> |
| 160 | |||
| 161 | <Target Name="SetWixVersion" BeforeTargets="ClCompile"> | 151 | <Target Name="SetWixVersion" BeforeTargets="ClCompile"> |
| 162 | <PropertyGroup> | 152 | <PropertyGroup> |
| 163 | <rmj>$(SomeVerInfoMajor)</rmj> | 153 | <rmj>$(SomeVerInfoMajor)</rmj> |
| @@ -172,11 +162,12 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command> | |||
| 172 | </ItemGroup> | 162 | </ItemGroup> |
| 173 | <WriteLinesToFile Overwrite="true" File="$(BurnGeneratedHeaderDirectory)engine.version.h" Lines="@(BurnVersionLines)" /> | 163 | <WriteLinesToFile Overwrite="true" File="$(BurnGeneratedHeaderDirectory)engine.version.h" Lines="@(BurnVersionLines)" /> |
| 174 | </Target> | 164 | </Target> |
| 175 | |||
| 176 | <ItemGroup> | 165 | <ItemGroup> |
| 177 | <PackageReference Include="WixToolset.DUtil" /> | 166 | <PackageReference Include="WixToolset.DUtil" /> |
| 178 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> | 167 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> |
| 179 | </ItemGroup> | 168 | </ItemGroup> |
| 180 | 169 | <ItemGroup> | |
| 170 | <None Include="engine.mc" /> | ||
| 171 | </ItemGroup> | ||
| 181 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 172 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
| 182 | </Project> | 173 | </Project> \ No newline at end of file |
diff --git a/src/burn/engine/externalengine.cpp b/src/burn/engine/externalengine.cpp index 352d184c..d4814dc1 100644 --- a/src/burn/engine/externalengine.cpp +++ b/src/burn/engine/externalengine.cpp | |||
| @@ -633,8 +633,9 @@ LExit: | |||
| 633 | 633 | ||
| 634 | HRESULT ExternalEnginePlan( | 634 | HRESULT ExternalEnginePlan( |
| 635 | __in BAENGINE_CONTEXT* pEngineContext, | 635 | __in BAENGINE_CONTEXT* pEngineContext, |
| 636 | __in const BOOTSTRAPPER_ACTION action | 636 | __in const BOOTSTRAPPER_ACTION action, |
| 637 | ) | 637 | __in const BOOTSTRAPPER_SCOPE plannedScope |
| 638 | ) | ||
| 638 | { | 639 | { |
| 639 | HRESULT hr = S_OK; | 640 | HRESULT hr = S_OK; |
| 640 | BAENGINE_ACTION* pAction = NULL; | 641 | BAENGINE_ACTION* pAction = NULL; |
| @@ -649,6 +650,7 @@ HRESULT ExternalEnginePlan( | |||
| 649 | 650 | ||
| 650 | pAction->dwMessage = WM_BURN_PLAN; | 651 | pAction->dwMessage = WM_BURN_PLAN; |
| 651 | pAction->plan.action = action; | 652 | pAction->plan.action = action; |
| 653 | pAction->plan.plannedScope = plannedScope; | ||
| 652 | 654 | ||
| 653 | hr = EnqueueAction(pEngineContext, &pAction); | 655 | hr = EnqueueAction(pEngineContext, &pAction); |
| 654 | ExitOnFailure(hr, "Failed to enqueue plan action."); | 656 | ExitOnFailure(hr, "Failed to enqueue plan action."); |
diff --git a/src/burn/engine/externalengine.h b/src/burn/engine/externalengine.h index 9b95e645..1053d0c0 100644 --- a/src/burn/engine/externalengine.h +++ b/src/burn/engine/externalengine.h | |||
| @@ -146,8 +146,9 @@ HRESULT ExternalEngineDetect( | |||
| 146 | 146 | ||
| 147 | HRESULT ExternalEnginePlan( | 147 | HRESULT ExternalEnginePlan( |
| 148 | __in BAENGINE_CONTEXT* pEngineContext, | 148 | __in BAENGINE_CONTEXT* pEngineContext, |
| 149 | __in const BOOTSTRAPPER_ACTION action | 149 | __in const BOOTSTRAPPER_ACTION action, |
| 150 | ); | 150 | __in const BOOTSTRAPPER_SCOPE plannedScope |
| 151 | ); | ||
| 151 | 152 | ||
| 152 | HRESULT ExternalEngineElevate( | 153 | HRESULT ExternalEngineElevate( |
| 153 | __in BAENGINE_CONTEXT* pEngineContext, | 154 | __in BAENGINE_CONTEXT* pEngineContext, |
diff --git a/src/burn/engine/logging.cpp b/src/burn/engine/logging.cpp index 52123499..47f52d27 100644 --- a/src/burn/engine/logging.cpp +++ b/src/burn/engine/logging.cpp | |||
| @@ -968,6 +968,42 @@ extern "C" LPCSTR LoggingInstallScopeToString( | |||
| 968 | return fPerMachine ? "PerMachine" : "PerUser"; | 968 | return fPerMachine ? "PerMachine" : "PerUser"; |
| 969 | } | 969 | } |
| 970 | 970 | ||
| 971 | extern "C" LPCSTR LoggingPackageScopeToString( | ||
| 972 | __in BOOTSTRAPPER_PACKAGE_SCOPE scope | ||
| 973 | ) | ||
| 974 | { | ||
| 975 | switch (scope) | ||
| 976 | { | ||
| 977 | case BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE: | ||
| 978 | return "PerMachine"; | ||
| 979 | case BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER: | ||
| 980 | return "PerMachineOrUser"; | ||
| 981 | case BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE: | ||
| 982 | return "PerUserOrMachine"; | ||
| 983 | case BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER: | ||
| 984 | return "PerUser"; | ||
| 985 | default: | ||
| 986 | return "Invalid"; | ||
| 987 | } | ||
| 988 | } | ||
| 989 | |||
| 990 | extern "C" LPCSTR LoggingBundleScopeToString( | ||
| 991 | __in BOOTSTRAPPER_SCOPE scope | ||
| 992 | ) | ||
| 993 | { | ||
| 994 | switch (scope) | ||
| 995 | { | ||
| 996 | case BOOTSTRAPPER_SCOPE_DEFAULT: | ||
| 997 | return "Default"; | ||
| 998 | case BOOTSTRAPPER_SCOPE_PER_MACHINE: | ||
| 999 | return "PerMachine"; | ||
| 1000 | case BOOTSTRAPPER_SCOPE_PER_USER: | ||
| 1001 | return "PerUser"; | ||
| 1002 | default: | ||
| 1003 | return "Invalid"; | ||
| 1004 | } | ||
| 1005 | } | ||
| 1006 | |||
| 971 | 1007 | ||
| 972 | // internal function declarations | 1008 | // internal function declarations |
| 973 | 1009 | ||
diff --git a/src/burn/engine/logging.h b/src/burn/engine/logging.h index b28a53d4..76103732 100644 --- a/src/burn/engine/logging.h +++ b/src/burn/engine/logging.h | |||
| @@ -202,6 +202,13 @@ LPCSTR LoggingInstallScopeToString( | |||
| 202 | __in BOOL fPerMachine | 202 | __in BOOL fPerMachine |
| 203 | ); | 203 | ); |
| 204 | 204 | ||
| 205 | LPCSTR LoggingPackageScopeToString( | ||
| 206 | __in BOOTSTRAPPER_PACKAGE_SCOPE scope | ||
| 207 | ); | ||
| 208 | |||
| 209 | LPCSTR LoggingBundleScopeToString( | ||
| 210 | __in BOOTSTRAPPER_SCOPE scope | ||
| 211 | ); | ||
| 205 | 212 | ||
| 206 | #if defined(__cplusplus) | 213 | #if defined(__cplusplus) |
| 207 | } | 214 | } |
diff --git a/src/burn/engine/msiengine.cpp b/src/burn/engine/msiengine.cpp index a1379054..11bb8a0e 100644 --- a/src/burn/engine/msiengine.cpp +++ b/src/burn/engine/msiengine.cpp | |||
| @@ -454,7 +454,18 @@ extern "C" HRESULT MsiEngineDetectPackage( | |||
| 454 | 454 | ||
| 455 | // detect self by product code | 455 | // detect self by product code |
| 456 | // TODO: what to do about MSIINSTALLCONTEXT_USERMANAGED? | 456 | // TODO: what to do about MSIINSTALLCONTEXT_USERMANAGED? |
| 457 | hr = WiuGetProductInfoEx(pPackage->Msi.sczProductCode, NULL, pPackage->fPerMachine ? MSIINSTALLCONTEXT_MACHINE : MSIINSTALLCONTEXT_USERUNMANAGED, INSTALLPROPERTY_VERSIONSTRING, &sczInstalledVersion); | 457 | if (BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER == pPackage->scope || BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE == pPackage->scope) |
| 458 | { | ||
| 459 | hr = WiuGetProductInfoEx(pPackage->Msi.sczProductCode, NULL, MSIINSTALLCONTEXT_MACHINE, INSTALLPROPERTY_VERSIONSTRING, &sczInstalledVersion); | ||
| 460 | if (FAILED(hr)) | ||
| 461 | { | ||
| 462 | hr = WiuGetProductInfoEx(pPackage->Msi.sczProductCode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, INSTALLPROPERTY_VERSIONSTRING, &sczInstalledVersion); | ||
| 463 | } | ||
| 464 | } | ||
| 465 | else | ||
| 466 | { | ||
| 467 | hr = WiuGetProductInfoEx(pPackage->Msi.sczProductCode, NULL, pPackage->scope == BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE ? MSIINSTALLCONTEXT_MACHINE : MSIINSTALLCONTEXT_USERUNMANAGED, INSTALLPROPERTY_VERSIONSTRING, &sczInstalledVersion); | ||
| 468 | } | ||
| 458 | if (SUCCEEDED(hr)) | 469 | if (SUCCEEDED(hr)) |
| 459 | { | 470 | { |
| 460 | fDetectFeatures = TRUE; | 471 | fDetectFeatures = TRUE; |
| @@ -777,7 +788,18 @@ extern "C" HRESULT MsiEngineDetectCompatiblePackage( | |||
| 777 | ExitFunction(); | 788 | ExitFunction(); |
| 778 | } | 789 | } |
| 779 | 790 | ||
| 780 | hr = WiuGetProductInfoEx(wzCompatibleProductCode, NULL, pPackage->fPerMachine ? MSIINSTALLCONTEXT_MACHINE : MSIINSTALLCONTEXT_USERUNMANAGED, INSTALLPROPERTY_VERSIONSTRING, &sczVersion); | 791 | if (BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER == pPackage->scope || BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE == pPackage->scope) |
| 792 | { | ||
| 793 | hr = WiuGetProductInfoEx(wzCompatibleProductCode, NULL, MSIINSTALLCONTEXT_MACHINE, INSTALLPROPERTY_VERSIONSTRING, &sczVersion); | ||
| 794 | if (FAILED(hr)) | ||
| 795 | { | ||
| 796 | hr = WiuGetProductInfoEx(wzCompatibleProductCode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, INSTALLPROPERTY_VERSIONSTRING, &sczVersion); | ||
| 797 | } | ||
| 798 | } | ||
| 799 | else | ||
| 800 | { | ||
| 801 | hr = WiuGetProductInfoEx(wzCompatibleProductCode, NULL, pPackage->scope == BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE ? MSIINSTALLCONTEXT_MACHINE : MSIINSTALLCONTEXT_USERUNMANAGED, INSTALLPROPERTY_VERSIONSTRING, &sczVersion); | ||
| 802 | } | ||
| 781 | if (HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT) == hr || HRESULT_FROM_WIN32(ERROR_UNKNOWN_PROPERTY) == hr || E_INVALIDARG == hr) | 803 | if (HRESULT_FROM_WIN32(ERROR_UNKNOWN_PRODUCT) == hr || HRESULT_FROM_WIN32(ERROR_UNKNOWN_PROPERTY) == hr || E_INVALIDARG == hr) |
| 782 | { | 804 | { |
| 783 | ExitFunction1(hr = S_OK); | 805 | ExitFunction1(hr = S_OK); |
| @@ -1336,10 +1358,10 @@ extern "C" HRESULT MsiEngineExecutePackage( | |||
| 1336 | hr = ConcatPatchProperty(pCache, pPackage, fRollback, &sczObfuscatedProperties); | 1358 | hr = ConcatPatchProperty(pCache, pPackage, fRollback, &sczObfuscatedProperties); |
| 1337 | ExitOnFailure(hr, "Failed to add patch properties to obfuscated argument string."); | 1359 | ExitOnFailure(hr, "Failed to add patch properties to obfuscated argument string."); |
| 1338 | 1360 | ||
| 1339 | hr = MsiEngineConcatBurnProperties(pExecuteAction->msiPackage.action, pExecuteAction->msiPackage.actionMsiProperty, pExecuteAction->msiPackage.fileVersioning, TRUE, 0 != pPackage->Msi.cFeatures, &sczProperties); | 1361 | hr = MsiEngineConcatBurnProperties(pExecuteAction->msiPackage.action, pExecuteAction->msiPackage.actionMsiProperty, pExecuteAction->msiPackage.fileVersioning, TRUE, 0 != pPackage->Msi.cFeatures, pExecuteAction->msiPackage.pPackage->scope, pExecuteAction->msiPackage.pPackage->fPerMachine, &sczProperties); |
| 1340 | ExitOnFailure(hr, "Failed to add action property to argument string."); | 1362 | ExitOnFailure(hr, "Failed to add action property to argument string."); |
| 1341 | 1363 | ||
| 1342 | hr = MsiEngineConcatBurnProperties(pExecuteAction->msiPackage.action, pExecuteAction->msiPackage.actionMsiProperty, pExecuteAction->msiPackage.fileVersioning, TRUE, 0 != pPackage->Msi.cFeatures, &sczObfuscatedProperties); | 1364 | hr = MsiEngineConcatBurnProperties(pExecuteAction->msiPackage.action, pExecuteAction->msiPackage.actionMsiProperty, pExecuteAction->msiPackage.fileVersioning, TRUE, 0 != pPackage->Msi.cFeatures, pPackage->scope, pPackage->fPerMachine, &sczObfuscatedProperties); |
| 1343 | ExitOnFailure(hr, "Failed to add action property to obfuscated argument string."); | 1365 | ExitOnFailure(hr, "Failed to add action property to obfuscated argument string."); |
| 1344 | 1366 | ||
| 1345 | LogId(REPORT_STANDARD, MSG_APPLYING_PACKAGE, LoggingRollbackOrExecute(fRollback), pPackage->sczId, LoggingActionStateToString(pExecuteAction->msiPackage.action), sczMsiPath, sczObfuscatedProperties ? sczObfuscatedProperties : L""); | 1367 | LogId(REPORT_STANDARD, MSG_APPLYING_PACKAGE, LoggingRollbackOrExecute(fRollback), pPackage->sczId, LoggingActionStateToString(pExecuteAction->msiPackage.action), sczMsiPath, sczObfuscatedProperties ? sczObfuscatedProperties : L""); |
| @@ -1449,7 +1471,7 @@ extern "C" HRESULT MsiEngineUninstallCompatiblePackage( | |||
| 1449 | ExitOnFailure(hr, "Failed to enable logging for compatible package: %ls to: %ls", pCompatibleEntry->sczId, pExecuteAction->uninstallMsiCompatiblePackage.sczLogPath); | 1471 | ExitOnFailure(hr, "Failed to enable logging for compatible package: %ls to: %ls", pCompatibleEntry->sczId, pExecuteAction->uninstallMsiCompatiblePackage.sczLogPath); |
| 1450 | } | 1472 | } |
| 1451 | 1473 | ||
| 1452 | hr = MsiEngineConcatBurnProperties(action, burnMsiProperty, fileVersioning, TRUE, FALSE, &sczProperties); | 1474 | hr = MsiEngineConcatBurnProperties(action, burnMsiProperty, fileVersioning, TRUE, FALSE, pParentPackage->scope, pParentPackage->fPerMachine, &sczProperties); |
| 1453 | ExitOnFailure(hr, "Failed to add action property to argument string."); | 1475 | ExitOnFailure(hr, "Failed to add action property to argument string."); |
| 1454 | 1476 | ||
| 1455 | LogId(REPORT_STANDARD, MSG_APPLYING_ORPHAN_COMPATIBLE_PACKAGE, LoggingRollbackOrExecute(fRollback), pCompatibleEntry->sczId, pParentPackage->sczId, LoggingActionStateToString(action), sczProperties ? sczProperties : L""); | 1477 | LogId(REPORT_STANDARD, MSG_APPLYING_ORPHAN_COMPATIBLE_PACKAGE, LoggingRollbackOrExecute(fRollback), pCompatibleEntry->sczId, pParentPackage->sczId, LoggingActionStateToString(action), sczProperties ? sczProperties : L""); |
| @@ -1491,6 +1513,8 @@ extern "C" HRESULT MsiEngineConcatBurnProperties( | |||
| 1491 | __in BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning, | 1513 | __in BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning, |
| 1492 | __in BOOL fMsiPackage, | 1514 | __in BOOL fMsiPackage, |
| 1493 | __in BOOL fFeatureSelectionEnabled, | 1515 | __in BOOL fFeatureSelectionEnabled, |
| 1516 | __in BOOTSTRAPPER_PACKAGE_SCOPE scope, | ||
| 1517 | __in BOOL fPlannedPerMachineScope, | ||
| 1494 | __deref_out_z LPWSTR* psczProperties | 1518 | __deref_out_z LPWSTR* psczProperties |
| 1495 | ) | 1519 | ) |
| 1496 | { | 1520 | { |
| @@ -1534,6 +1558,7 @@ extern "C" HRESULT MsiEngineConcatBurnProperties( | |||
| 1534 | break; | 1558 | break; |
| 1535 | } | 1559 | } |
| 1536 | 1560 | ||
| 1561 | // Append properties used by WixUI (and usable otherwise) to adjust internal UI behavior. | ||
| 1537 | switch (actionMsiProperty) | 1562 | switch (actionMsiProperty) |
| 1538 | { | 1563 | { |
| 1539 | case BURN_MSI_PROPERTY_INSTALL: | 1564 | case BURN_MSI_PROPERTY_INSTALL: |
| @@ -1581,6 +1606,20 @@ extern "C" HRESULT MsiEngineConcatBurnProperties( | |||
| 1581 | ExitOnFailure(hr, "Failed to add reinstall mode."); | 1606 | ExitOnFailure(hr, "Failed to add reinstall mode."); |
| 1582 | } | 1607 | } |
| 1583 | 1608 | ||
| 1609 | if (BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE == scope || BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER == scope) | ||
| 1610 | { | ||
| 1611 | if (fPlannedPerMachineScope) | ||
| 1612 | { | ||
| 1613 | hr = StrAllocConcatFormattedSecure(psczProperties, L" MSIINSTALLPERUSER=\"\""); | ||
| 1614 | ExitOnFailure(hr, "Failed to add per-machine scope properties."); | ||
| 1615 | } | ||
| 1616 | else | ||
| 1617 | { | ||
| 1618 | hr = StrAllocConcatFormattedSecure(psczProperties, L" MSIINSTALLPERUSER=\"1\""); | ||
| 1619 | ExitOnFailure(hr, "Failed to add per-user scope properties."); | ||
| 1620 | } | ||
| 1621 | } | ||
| 1622 | |||
| 1584 | hr = StrAllocConcatSecure(psczProperties, L" REBOOT=ReallySuppress", 0); | 1623 | hr = StrAllocConcatSecure(psczProperties, L" REBOOT=ReallySuppress", 0); |
| 1585 | ExitOnFailure(hr, "Failed to add reboot suppression property."); | 1624 | ExitOnFailure(hr, "Failed to add reboot suppression property."); |
| 1586 | 1625 | ||
diff --git a/src/burn/engine/msiengine.h b/src/burn/engine/msiengine.h index 862c4f6a..d4660dc8 100644 --- a/src/burn/engine/msiengine.h +++ b/src/burn/engine/msiengine.h | |||
| @@ -93,6 +93,8 @@ HRESULT MsiEngineConcatBurnProperties( | |||
| 93 | __in BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning, | 93 | __in BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning, |
| 94 | __in BOOL fMsiPackage, | 94 | __in BOOL fMsiPackage, |
| 95 | __in BOOL fFeatureSelectionEnabled, | 95 | __in BOOL fFeatureSelectionEnabled, |
| 96 | __in BOOTSTRAPPER_PACKAGE_SCOPE scope, | ||
| 97 | __in BOOL fPlannedPerMachineScope, | ||
| 96 | __deref_out_z LPWSTR* psczProperties | 98 | __deref_out_z LPWSTR* psczProperties |
| 97 | ); | 99 | ); |
| 98 | HRESULT MsiEngineConcatPackageProperties( | 100 | HRESULT MsiEngineConcatPackageProperties( |
diff --git a/src/burn/engine/mspengine.cpp b/src/burn/engine/mspengine.cpp index e8ef7fcb..18be3cc6 100644 --- a/src/burn/engine/mspengine.cpp +++ b/src/burn/engine/mspengine.cpp | |||
| @@ -676,10 +676,10 @@ extern "C" HRESULT MspEngineExecutePackage( | |||
| 676 | } | 676 | } |
| 677 | 677 | ||
| 678 | // Always add Burn properties last. | 678 | // Always add Burn properties last. |
| 679 | hr = MsiEngineConcatBurnProperties(pExecuteAction->mspTarget.action, pExecuteAction->mspTarget.actionMsiProperty, pExecuteAction->mspTarget.fileVersioning, FALSE, FALSE, &sczProperties); | 679 | hr = MsiEngineConcatBurnProperties(pExecuteAction->mspTarget.action, pExecuteAction->mspTarget.actionMsiProperty, pExecuteAction->mspTarget.fileVersioning, FALSE, FALSE, pExecuteAction->mspTarget.pPackage->scope, pExecuteAction->mspTarget.pPackage->fPerMachine, &sczProperties); |
| 680 | ExitOnFailure(hr, "Failed to add action property to argument string."); | 680 | ExitOnFailure(hr, "Failed to add action property to argument string."); |
| 681 | 681 | ||
| 682 | hr = MsiEngineConcatBurnProperties(pExecuteAction->mspTarget.action, pExecuteAction->mspTarget.actionMsiProperty, pExecuteAction->mspTarget.fileVersioning, FALSE, FALSE, &sczObfuscatedProperties); | 682 | hr = MsiEngineConcatBurnProperties(pExecuteAction->mspTarget.action, pExecuteAction->mspTarget.actionMsiProperty, pExecuteAction->mspTarget.fileVersioning, FALSE, FALSE, pExecuteAction->mspTarget.pPackage->scope, pExecuteAction->mspTarget.pPackage->fPerMachine, &sczObfuscatedProperties); |
| 683 | ExitOnFailure(hr, "Failed to add action property to obfuscated argument string."); | 683 | ExitOnFailure(hr, "Failed to add action property to obfuscated argument string."); |
| 684 | 684 | ||
| 685 | LogId(REPORT_STANDARD, MSG_APPLYING_PATCH_PACKAGE, pExecuteAction->mspTarget.pPackage->sczId, LoggingActionStateToString(pExecuteAction->mspTarget.action), sczPatches, sczObfuscatedProperties, pExecuteAction->mspTarget.sczTargetProductCode); | 685 | LogId(REPORT_STANDARD, MSG_APPLYING_PATCH_PACKAGE, pExecuteAction->mspTarget.pPackage->sczId, LoggingActionStateToString(pExecuteAction->mspTarget.action), sczPatches, sczObfuscatedProperties, pExecuteAction->mspTarget.sczTargetProductCode); |
diff --git a/src/burn/engine/package.cpp b/src/burn/engine/package.cpp index 3bf676ba..61b73dc6 100644 --- a/src/burn/engine/package.cpp +++ b/src/burn/engine/package.cpp | |||
| @@ -154,9 +154,12 @@ extern "C" HRESULT PackagesParseFromXml( | |||
| 154 | hr = XmlGetAttributeUInt64(pixnNode, L"InstallSize", &pPackage->qwInstallSize); | 154 | hr = XmlGetAttributeUInt64(pixnNode, L"InstallSize", &pPackage->qwInstallSize); |
| 155 | ExitOnOptionalXmlQueryFailure(hr, fFoundXml, "Failed to get @InstallSize."); | 155 | ExitOnOptionalXmlQueryFailure(hr, fFoundXml, "Failed to get @InstallSize."); |
| 156 | 156 | ||
| 157 | // @PerMachine | 157 | // @Scope |
| 158 | hr = XmlGetYesNoAttribute(pixnNode, L"PerMachine", &pPackage->fPerMachine); | 158 | hr = PackageParseScopeFromXml(pixnNode, &pPackage->scope); |
| 159 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @PerMachine."); | 159 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Scope."); |
| 160 | |||
| 161 | // Shortcut for static per-machine or per-user packages. | ||
| 162 | pPackage->fPerMachine = BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE == pPackage->scope; | ||
| 160 | 163 | ||
| 161 | // @Permanent | 164 | // @Permanent |
| 162 | hr = XmlGetYesNoAttribute(pixnNode, L"Permanent", &pPackage->fPermanent); | 165 | hr = XmlGetYesNoAttribute(pixnNode, L"Permanent", &pPackage->fPermanent); |
| @@ -593,6 +596,45 @@ LExit: | |||
| 593 | return hr; | 596 | return hr; |
| 594 | } | 597 | } |
| 595 | 598 | ||
| 599 | extern "C" HRESULT PackageParseScopeFromXml( | ||
| 600 | __in IXMLDOMNode* pixn, | ||
| 601 | __in BOOTSTRAPPER_PACKAGE_SCOPE* pScope | ||
| 602 | ) | ||
| 603 | { | ||
| 604 | HRESULT hr = S_OK; | ||
| 605 | LPWSTR scz = NULL; | ||
| 606 | |||
| 607 | hr = XmlGetAttributeEx(pixn, L"Scope", &scz); | ||
| 608 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Scope."); | ||
| 609 | |||
| 610 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, scz, -1, L"perMachine", -1)) | ||
| 611 | { | ||
| 612 | *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE; | ||
| 613 | } | ||
| 614 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, scz, -1, L"perUser", -1)) | ||
| 615 | { | ||
| 616 | *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER; | ||
| 617 | } | ||
| 618 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, scz, -1, L"perUserOrMachine", -1)) | ||
| 619 | { | ||
| 620 | *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE; | ||
| 621 | } | ||
| 622 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, scz, -1, L"perMachineOrUser", -1)) | ||
| 623 | { | ||
| 624 | *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER; | ||
| 625 | } | ||
| 626 | else | ||
| 627 | { | ||
| 628 | hr = E_UNEXPECTED; | ||
| 629 | ExitOnRootFailure(hr, "Invalid scope: %ls", scz); | ||
| 630 | } | ||
| 631 | |||
| 632 | LExit: | ||
| 633 | ReleaseStr(scz); | ||
| 634 | |||
| 635 | return hr; | ||
| 636 | } | ||
| 637 | |||
| 596 | 638 | ||
| 597 | // internal function declarations | 639 | // internal function declarations |
| 598 | 640 | ||
diff --git a/src/burn/engine/package.h b/src/burn/engine/package.h index d596d7c0..5397e9cc 100644 --- a/src/burn/engine/package.h +++ b/src/burn/engine/package.h | |||
| @@ -268,7 +268,8 @@ typedef struct _BURN_PACKAGE | |||
| 268 | 268 | ||
| 269 | LPWSTR sczInstallCondition; | 269 | LPWSTR sczInstallCondition; |
| 270 | LPWSTR sczRepairCondition; | 270 | LPWSTR sczRepairCondition; |
| 271 | BOOL fPerMachine; | 271 | BOOTSTRAPPER_PACKAGE_SCOPE scope; |
| 272 | BOOL fPerMachine; // only valid after Plan (for PUOM/PMOU packages). | ||
| 272 | BOOL fPermanent; | 273 | BOOL fPermanent; |
| 273 | BOOL fVital; | 274 | BOOL fVital; |
| 274 | BOOL fCanAffectRegistration; | 275 | BOOL fCanAffectRegistration; |
| @@ -483,6 +484,10 @@ HRESULT PackageFindRollbackBoundaryById( | |||
| 483 | __in_z LPCWSTR wzId, | 484 | __in_z LPCWSTR wzId, |
| 484 | __out BURN_ROLLBACK_BOUNDARY** ppRollbackBoundary | 485 | __out BURN_ROLLBACK_BOUNDARY** ppRollbackBoundary |
| 485 | ); | 486 | ); |
| 487 | HRESULT PackageParseScopeFromXml( | ||
| 488 | __in IXMLDOMNode* pixn, | ||
| 489 | __in BOOTSTRAPPER_PACKAGE_SCOPE* pScope | ||
| 490 | ); | ||
| 486 | 491 | ||
| 487 | 492 | ||
| 488 | #if defined(__cplusplus) | 493 | #if defined(__cplusplus) |
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp index edc09033..6c46269b 100644 --- a/src/burn/engine/plan.cpp +++ b/src/burn/engine/plan.cpp | |||
| @@ -278,7 +278,7 @@ extern "C" void PlanReset( | |||
| 278 | } | 278 | } |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | PlanSetVariables(BOOTSTRAPPER_ACTION_UNKNOWN, pVariables); | 281 | PlanSetVariables(BOOTSTRAPPER_ACTION_UNKNOWN, BOOTSTRAPPER_PACKAGE_SCOPE_INVALID, BOOTSTRAPPER_SCOPE_DEFAULT, pVariables); |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | extern "C" void PlanUninitializeExecuteAction( | 284 | extern "C" void PlanUninitializeExecuteAction( |
| @@ -332,6 +332,8 @@ extern "C" void PlanUninitializeExecuteAction( | |||
| 332 | 332 | ||
| 333 | extern "C" HRESULT PlanSetVariables( | 333 | extern "C" HRESULT PlanSetVariables( |
| 334 | __in BOOTSTRAPPER_ACTION action, | 334 | __in BOOTSTRAPPER_ACTION action, |
| 335 | __in BOOTSTRAPPER_PACKAGE_SCOPE authoredScope, | ||
| 336 | __in BOOTSTRAPPER_SCOPE plannedScope, | ||
| 335 | __in BURN_VARIABLES* pVariables | 337 | __in BURN_VARIABLES* pVariables |
| 336 | ) | 338 | ) |
| 337 | { | 339 | { |
| @@ -340,6 +342,12 @@ extern "C" HRESULT PlanSetVariables( | |||
| 340 | hr = VariableSetNumeric(pVariables, BURN_BUNDLE_ACTION, action, TRUE); | 342 | hr = VariableSetNumeric(pVariables, BURN_BUNDLE_ACTION, action, TRUE); |
| 341 | ExitOnFailure(hr, "Failed to set the bundle action built-in variable."); | 343 | ExitOnFailure(hr, "Failed to set the bundle action built-in variable."); |
| 342 | 344 | ||
| 345 | hr = VariableSetNumeric(pVariables, BURN_BUNDLE_SCOPE, authoredScope, TRUE); | ||
| 346 | ExitOnFailure(hr, "Failed to set the bundle authored scope built-in variable."); | ||
| 347 | |||
| 348 | hr = VariableSetNumeric(pVariables, BURN_BUNDLE_PLANNED_SCOPE, plannedScope, TRUE); | ||
| 349 | ExitOnFailure(hr, "Failed to set the bundle planned scope built-in variable."); | ||
| 350 | |||
| 343 | LExit: | 351 | LExit: |
| 344 | return hr; | 352 | return hr; |
| 345 | } | 353 | } |
| @@ -812,6 +820,66 @@ LExit: | |||
| 812 | return hr; | 820 | return hr; |
| 813 | } | 821 | } |
| 814 | 822 | ||
| 823 | extern "C" HRESULT PlanPackagesAndBundleScope( | ||
| 824 | __in BURN_PACKAGE* rgPackages, | ||
| 825 | __in DWORD cPackages, | ||
| 826 | __in BOOTSTRAPPER_SCOPE scope, | ||
| 827 | __in BOOTSTRAPPER_PACKAGE_SCOPE authoredScope, | ||
| 828 | __in BOOTSTRAPPER_SCOPE commandLineScope, | ||
| 829 | __out BOOTSTRAPPER_SCOPE* pResultingScope, | ||
| 830 | __out BOOL* pfRegistrationPerMachine | ||
| 831 | ) | ||
| 832 | { | ||
| 833 | HRESULT hr = S_OK; | ||
| 834 | BOOL fRegistrationPerMachine = TRUE; | ||
| 835 | |||
| 836 | // If a scope was specified on the command line and the BA didn't set a scope, | ||
| 837 | // let the command-line switch override. | ||
| 838 | if (BOOTSTRAPPER_SCOPE_DEFAULT != commandLineScope) | ||
| 839 | { | ||
| 840 | if (BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER == authoredScope || BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE == authoredScope) | ||
| 841 | { | ||
| 842 | if (BOOTSTRAPPER_SCOPE_DEFAULT == scope) | ||
| 843 | { | ||
| 844 | scope = commandLineScope; | ||
| 845 | } | ||
| 846 | else | ||
| 847 | { | ||
| 848 | LogId(REPORT_STANDARD, MSG_SCOPE_IGNORED_BA_SCOPE); | ||
| 849 | } | ||
| 850 | } | ||
| 851 | else | ||
| 852 | { | ||
| 853 | LogId(REPORT_STANDARD, MSG_SCOPE_IGNORED_UNCONFIGURABLE); | ||
| 854 | } | ||
| 855 | } | ||
| 856 | |||
| 857 | for (DWORD i = 0; i < cPackages; ++i) | ||
| 858 | { | ||
| 859 | BURN_PACKAGE* pPackage = rgPackages + i; | ||
| 860 | |||
| 861 | pPackage->fPerMachine = | ||
| 862 | (BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE == pPackage->scope) | ||
| 863 | || (BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER == pPackage->scope && | ||
| 864 | (BOOTSTRAPPER_SCOPE_DEFAULT == scope || BOOTSTRAPPER_SCOPE_PER_MACHINE == scope)) | ||
| 865 | || (BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE == pPackage->scope && | ||
| 866 | BOOTSTRAPPER_SCOPE_PER_MACHINE == scope); | ||
| 867 | |||
| 868 | // Any per-user package makes the registration per-user as well. | ||
| 869 | if (!pPackage->fPerMachine) | ||
| 870 | { | ||
| 871 | fRegistrationPerMachine = FALSE; | ||
| 872 | } | ||
| 873 | } | ||
| 874 | |||
| 875 | *pResultingScope = scope; | ||
| 876 | *pfRegistrationPerMachine = fRegistrationPerMachine; | ||
| 877 | |||
| 878 | //LExit: | ||
| 879 | return hr; | ||
| 880 | } | ||
| 881 | |||
| 882 | |||
| 815 | static HRESULT PlanPackagesHelper( | 883 | static HRESULT PlanPackagesHelper( |
| 816 | __in BURN_PACKAGE* rgPackages, | 884 | __in BURN_PACKAGE* rgPackages, |
| 817 | __in DWORD cPackages, | 885 | __in DWORD cPackages, |
| @@ -2971,7 +3039,7 @@ static void ExecuteActionLog( | |||
| 2971 | break; | 3039 | break; |
| 2972 | 3040 | ||
| 2973 | case BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE: | 3041 | case BURN_EXECUTE_ACTION_TYPE_MSI_PACKAGE: |
| 2974 | LogStringLine(PlanDumpLevel, "%ls action[%u]: MSI_PACKAGE package id: %ls, action: %hs, action msi property: %ls, ui level: %u, disable externaluihandler: %hs, file versioning: %hs, log path: %ls, logging attrib: %u", wzBase, iAction, pAction->msiPackage.pPackage->sczId, LoggingActionStateToString(pAction->msiPackage.action), LoggingBurnMsiPropertyToString(pAction->msiPackage.actionMsiProperty), pAction->msiPackage.uiLevel, LoggingBoolToString(pAction->msiPackage.fDisableExternalUiHandler), LoggingMsiFileVersioningToString(pAction->msiPackage.fileVersioning), pAction->msiPackage.sczLogPath, pAction->msiPackage.dwLoggingAttributes); | 3042 | LogStringLine(PlanDumpLevel, "%ls action[%u]: MSI_PACKAGE package id: %ls, scope: %hs, action: %hs, action msi property: %ls, ui level: %u, disable externaluihandler: %hs, file versioning: %hs, log path: %ls, logging attrib: %u", wzBase, iAction, pAction->msiPackage.pPackage->sczId, LoggingPackageScopeToString(pAction->msiPackage.pPackage->scope), LoggingActionStateToString(pAction->msiPackage.action), LoggingBurnMsiPropertyToString(pAction->msiPackage.actionMsiProperty), pAction->msiPackage.uiLevel, LoggingBoolToString(pAction->msiPackage.fDisableExternalUiHandler), LoggingMsiFileVersioningToString(pAction->msiPackage.fileVersioning), pAction->msiPackage.sczLogPath, pAction->msiPackage.dwLoggingAttributes); |
| 2975 | for (DWORD j = 0; j < pAction->msiPackage.pPackage->Msi.cSlipstreamMspPackages; ++j) | 3043 | for (DWORD j = 0; j < pAction->msiPackage.pPackage->Msi.cSlipstreamMspPackages; ++j) |
| 2976 | { | 3044 | { |
| 2977 | const BURN_SLIPSTREAM_MSP* pSlipstreamMsp = pAction->msiPackage.pPackage->Msi.rgSlipstreamMsps + j; | 3045 | const BURN_SLIPSTREAM_MSP* pSlipstreamMsp = pAction->msiPackage.pPackage->Msi.rgSlipstreamMsps + j; |
| @@ -3083,6 +3151,7 @@ extern "C" void PlanDump( | |||
| 3083 | LogStringLine(PlanDumpLevel, " bundle code: %ls", pPlan->wzBundleCode); | 3151 | LogStringLine(PlanDumpLevel, " bundle code: %ls", pPlan->wzBundleCode); |
| 3084 | LogStringLine(PlanDumpLevel, " bundle provider key: %ls", pPlan->wzBundleProviderKey); | 3152 | LogStringLine(PlanDumpLevel, " bundle provider key: %ls", pPlan->wzBundleProviderKey); |
| 3085 | LogStringLine(PlanDumpLevel, " use-forward-compatible: %hs", LoggingTrueFalseToString(pPlan->fEnabledForwardCompatibleBundle)); | 3153 | LogStringLine(PlanDumpLevel, " use-forward-compatible: %hs", LoggingTrueFalseToString(pPlan->fEnabledForwardCompatibleBundle)); |
| 3154 | LogStringLine(PlanDumpLevel, " planned scope: %hs", LoggingBundleScopeToString(pPlan->plannedScope)); | ||
| 3086 | LogStringLine(PlanDumpLevel, " per-machine: %hs", LoggingTrueFalseToString(pPlan->fPerMachine)); | 3155 | LogStringLine(PlanDumpLevel, " per-machine: %hs", LoggingTrueFalseToString(pPlan->fPerMachine)); |
| 3087 | LogStringLine(PlanDumpLevel, " can affect machine state: %hs", LoggingTrueFalseToString(pPlan->fCanAffectMachineState)); | 3156 | LogStringLine(PlanDumpLevel, " can affect machine state: %hs", LoggingTrueFalseToString(pPlan->fCanAffectMachineState)); |
| 3088 | LogStringLine(PlanDumpLevel, " disable-rollback: %hs", LoggingTrueFalseToString(pPlan->fDisableRollback)); | 3157 | LogStringLine(PlanDumpLevel, " disable-rollback: %hs", LoggingTrueFalseToString(pPlan->fDisableRollback)); |
diff --git a/src/burn/engine/plan.h b/src/burn/engine/plan.h index 03b1423d..a20d7c76 100644 --- a/src/burn/engine/plan.h +++ b/src/burn/engine/plan.h | |||
| @@ -249,6 +249,7 @@ typedef struct _BURN_CLEAN_ACTION | |||
| 249 | typedef struct _BURN_PLAN | 249 | typedef struct _BURN_PLAN |
| 250 | { | 250 | { |
| 251 | BOOTSTRAPPER_ACTION action; | 251 | BOOTSTRAPPER_ACTION action; |
| 252 | BOOTSTRAPPER_SCOPE plannedScope; | ||
| 252 | BURN_CACHE* pCache; | 253 | BURN_CACHE* pCache; |
| 253 | BOOTSTRAPPER_COMMAND* pCommand; | 254 | BOOTSTRAPPER_COMMAND* pCommand; |
| 254 | BURN_ENGINE_COMMAND* pInternalCommand; | 255 | BURN_ENGINE_COMMAND* pInternalCommand; |
| @@ -328,6 +329,8 @@ void PlanUninitializeExecuteAction( | |||
| 328 | ); | 329 | ); |
| 329 | HRESULT PlanSetVariables( | 330 | HRESULT PlanSetVariables( |
| 330 | __in BOOTSTRAPPER_ACTION action, | 331 | __in BOOTSTRAPPER_ACTION action, |
| 332 | __in BOOTSTRAPPER_PACKAGE_SCOPE authoredScope, | ||
| 333 | __in BOOTSTRAPPER_SCOPE plannedScope, | ||
| 331 | __in BURN_VARIABLES* pVariables | 334 | __in BURN_VARIABLES* pVariables |
| 332 | ); | 335 | ); |
| 333 | HRESULT PlanDefaultRelatedBundlePlanType( | 336 | HRESULT PlanDefaultRelatedBundlePlanType( |
| @@ -479,6 +482,15 @@ HRESULT PlanSetResumeCommand( | |||
| 479 | void PlanDump( | 482 | void PlanDump( |
| 480 | __in BURN_PLAN* pPlan | 483 | __in BURN_PLAN* pPlan |
| 481 | ); | 484 | ); |
| 485 | HRESULT PlanPackagesAndBundleScope( | ||
| 486 | __in BURN_PACKAGE* rgPackages, | ||
| 487 | __in DWORD cPackages, | ||
| 488 | __in BOOTSTRAPPER_SCOPE scope, | ||
| 489 | __in BOOTSTRAPPER_PACKAGE_SCOPE authoredScope, | ||
| 490 | __in BOOTSTRAPPER_SCOPE commandLineScope, | ||
| 491 | __out BOOTSTRAPPER_SCOPE* pResultingScope, | ||
| 492 | __out BOOL* pfPerMachine | ||
| 493 | ); | ||
| 482 | 494 | ||
| 483 | #if defined(__cplusplus) | 495 | #if defined(__cplusplus) |
| 484 | } | 496 | } |
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp index 9733e92c..fa1b024a 100644 --- a/src/burn/engine/registration.cpp +++ b/src/burn/engine/registration.cpp | |||
| @@ -39,10 +39,6 @@ static HRESULT ParseSoftwareTagsFromXml( | |||
| 39 | __out BURN_SOFTWARE_TAG** prgSoftwareTags, | 39 | __out BURN_SOFTWARE_TAG** prgSoftwareTags, |
| 40 | __out DWORD* pcSoftwareTags | 40 | __out DWORD* pcSoftwareTags |
| 41 | ); | 41 | ); |
| 42 | static HRESULT SetPaths( | ||
| 43 | __in BURN_REGISTRATION* pRegistration, | ||
| 44 | __in BURN_CACHE* pCache | ||
| 45 | ); | ||
| 46 | static HRESULT GetBundleManufacturer( | 42 | static HRESULT GetBundleManufacturer( |
| 47 | __in BURN_REGISTRATION* pRegistration, | 43 | __in BURN_REGISTRATION* pRegistration, |
| 48 | __in BURN_VARIABLES* pVariables, | 44 | __in BURN_VARIABLES* pVariables, |
| @@ -108,6 +104,15 @@ static HRESULT UpdateEstimatedSize( | |||
| 108 | ); | 104 | ); |
| 109 | static BOOL IsWuRebootPending(); | 105 | static BOOL IsWuRebootPending(); |
| 110 | static BOOL IsRegistryRebootPending(); | 106 | static BOOL IsRegistryRebootPending(); |
| 107 | static HRESULT RegistrationDetectResumeTypeByHive( | ||
| 108 | __in HKEY hkRegistrationRoot, | ||
| 109 | __in BURN_REGISTRATION* pRegistration, | ||
| 110 | __out BOOTSTRAPPER_RESUME_TYPE* pResumeType | ||
| 111 | ); | ||
| 112 | static HRESULT DetectInstalled( | ||
| 113 | __in BURN_REGISTRATION* pRegistration, | ||
| 114 | __in HKEY hkRoot | ||
| 115 | ); | ||
| 111 | 116 | ||
| 112 | // function definitions | 117 | // function definitions |
| 113 | 118 | ||
| @@ -163,9 +168,9 @@ extern "C" HRESULT RegistrationParseFromXml( | |||
| 163 | hr = XmlGetAttributeEx(pixnRegistrationNode, L"ExecutableName", &pRegistration->sczExecutableName); | 168 | hr = XmlGetAttributeEx(pixnRegistrationNode, L"ExecutableName", &pRegistration->sczExecutableName); |
| 164 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @ExecutableName."); | 169 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @ExecutableName."); |
| 165 | 170 | ||
| 166 | // @PerMachine | 171 | // @Scope |
| 167 | hr = XmlGetYesNoAttribute(pixnRegistrationNode, L"PerMachine", &pRegistration->fPerMachine); | 172 | hr = PackageParseScopeFromXml(pixnRegistrationNode, &pRegistration->scope); |
| 168 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @PerMachine."); | 173 | ExitOnOptionalXmlQueryFailure(hr, fFoundXml, "Failed to get @Scope."); |
| 169 | 174 | ||
| 170 | // select ARP node | 175 | // select ARP node |
| 171 | hr = XmlSelectSingleNode(pixnRegistrationNode, L"Arp", &pixnArpNode); | 176 | hr = XmlSelectSingleNode(pixnRegistrationNode, L"Arp", &pixnArpNode); |
| @@ -285,8 +290,18 @@ extern "C" HRESULT RegistrationParseFromXml( | |||
| 285 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Classification."); | 290 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Classification."); |
| 286 | } | 291 | } |
| 287 | 292 | ||
| 288 | hr = SetPaths(pRegistration, pCache); | 293 | // Handle the easy case of build-time bundle scope early. |
| 289 | ExitOnFailure(hr, "Failed to set registration paths."); | 294 | if (BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE == pRegistration->scope || BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER == pRegistration->scope) |
| 295 | { | ||
| 296 | pRegistration->fPerMachine = BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE == pRegistration->scope; | ||
| 297 | |||
| 298 | hr = RegistrationSetPaths(pRegistration, pCache); | ||
| 299 | ExitOnFailure(hr, "Failed to set registration paths for fixed scope."); | ||
| 300 | } | ||
| 301 | else | ||
| 302 | { | ||
| 303 | pRegistration->hkRoot = reinterpret_cast<HKEY>(0ull); | ||
| 304 | } | ||
| 290 | 305 | ||
| 291 | LExit: | 306 | LExit: |
| 292 | ReleaseObject(pixnRegistrationNode); | 307 | ReleaseObject(pixnRegistrationNode); |
| @@ -452,31 +467,28 @@ LExit: | |||
| 452 | 467 | ||
| 453 | extern "C" HRESULT RegistrationDetectInstalled( | 468 | extern "C" HRESULT RegistrationDetectInstalled( |
| 454 | __in BURN_REGISTRATION* pRegistration | 469 | __in BURN_REGISTRATION* pRegistration |
| 455 | ) | 470 | ) |
| 456 | { | 471 | { |
| 457 | HRESULT hr = S_OK; | 472 | HRESULT hr = S_OK; |
| 458 | HKEY hkRegistration = NULL; | ||
| 459 | DWORD dwInstalled = 0; | ||
| 460 | 473 | ||
| 461 | pRegistration->fCached = FileExistsEx(pRegistration->sczCacheExecutablePath, NULL); | 474 | if (pRegistration->hkRoot) |
| 462 | pRegistration->detectedRegistrationType = BOOTSTRAPPER_REGISTRATION_TYPE_NONE; | ||
| 463 | |||
| 464 | // open registration key | ||
| 465 | hr = RegOpen(pRegistration->hkRoot, pRegistration->sczRegistrationKey, KEY_QUERY_VALUE, &hkRegistration); | ||
| 466 | if (SUCCEEDED(hr)) | ||
| 467 | { | 475 | { |
| 468 | hr = RegReadNumber(hkRegistration, REGISTRY_BUNDLE_INSTALLED, &dwInstalled); | 476 | hr = DetectInstalled(pRegistration, pRegistration->hkRoot); |
| 469 | |||
| 470 | pRegistration->detectedRegistrationType = (1 == dwInstalled) ? BOOTSTRAPPER_REGISTRATION_TYPE_FULL : BOOTSTRAPPER_REGISTRATION_TYPE_INPROGRESS; | ||
| 471 | } | 477 | } |
| 472 | 478 | else | |
| 473 | // Not finding the key or value is okay. | ||
| 474 | if (E_FILENOTFOUND == hr || E_PATHNOTFOUND == hr) | ||
| 475 | { | 479 | { |
| 476 | hr = S_OK; | 480 | // For PUOM/PMOU bundles, check per-machine then fall back to per-user. |
| 481 | hr = DetectInstalled(pRegistration, HKEY_LOCAL_MACHINE); | ||
| 482 | ExitOnFailure(hr, "Failed to detect HKEY_LOCAL_MACHINE bundle registration install state."); | ||
| 483 | |||
| 484 | if (BOOTSTRAPPER_REGISTRATION_TYPE_NONE == pRegistration->detectedRegistrationType) | ||
| 485 | { | ||
| 486 | hr = DetectInstalled(pRegistration, HKEY_CURRENT_USER); | ||
| 487 | ExitOnFailure(hr, "Failed to detect HKEY_CURRENT_USER bundle registration install state."); | ||
| 488 | } | ||
| 477 | } | 489 | } |
| 478 | 490 | ||
| 479 | ReleaseRegKey(hkRegistration); | 491 | LExit: |
| 480 | return hr; | 492 | return hr; |
| 481 | } | 493 | } |
| 482 | 494 | ||
| @@ -488,63 +500,26 @@ extern "C" HRESULT RegistrationDetectInstalled( | |||
| 488 | extern "C" HRESULT RegistrationDetectResumeType( | 500 | extern "C" HRESULT RegistrationDetectResumeType( |
| 489 | __in BURN_REGISTRATION* pRegistration, | 501 | __in BURN_REGISTRATION* pRegistration, |
| 490 | __out BOOTSTRAPPER_RESUME_TYPE* pResumeType | 502 | __out BOOTSTRAPPER_RESUME_TYPE* pResumeType |
| 491 | ) | 503 | ) |
| 492 | { | 504 | { |
| 493 | HRESULT hr = S_OK; | 505 | HRESULT hr = S_OK; |
| 494 | HKEY hkRegistration = NULL; | ||
| 495 | BOOL fExists = FALSE; | ||
| 496 | DWORD dwResume = 0; | ||
| 497 | 506 | ||
| 498 | // open registration key | 507 | if (pRegistration->hkRoot) |
| 499 | hr = RegOpen(pRegistration->hkRoot, pRegistration->sczRegistrationKey, KEY_QUERY_VALUE, &hkRegistration); | ||
| 500 | ExitOnPathFailure(hr, fExists, "Failed to open registration key."); | ||
| 501 | |||
| 502 | if (!fExists) | ||
| 503 | { | 508 | { |
| 504 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_NONE; | 509 | hr = RegistrationDetectResumeTypeByHive(pRegistration->hkRoot, pRegistration, pResumeType); |
| 505 | ExitFunction(); | ||
| 506 | } | 510 | } |
| 507 | 511 | else | |
| 508 | // read Resume value | ||
| 509 | hr = RegReadNumber(hkRegistration, L"Resume", &dwResume); | ||
| 510 | ExitOnPathFailure(hr, fExists, "Failed to read Resume value."); | ||
| 511 | |||
| 512 | if (!fExists) | ||
| 513 | { | ||
| 514 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_INVALID; | ||
| 515 | ExitFunction(); | ||
| 516 | } | ||
| 517 | |||
| 518 | switch (dwResume) | ||
| 519 | { | 512 | { |
| 520 | case BURN_RESUME_MODE_ACTIVE: | 513 | hr = RegistrationDetectResumeTypeByHive(HKEY_LOCAL_MACHINE, pRegistration, pResumeType); |
| 521 | // a previous run was interrupted | ||
| 522 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_INTERRUPTED; | ||
| 523 | break; | ||
| 524 | |||
| 525 | case BURN_RESUME_MODE_SUSPEND: | ||
| 526 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_SUSPEND; | ||
| 527 | break; | ||
| 528 | |||
| 529 | case BURN_RESUME_MODE_ARP: | ||
| 530 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_ARP; | ||
| 531 | break; | ||
| 532 | |||
| 533 | case BURN_RESUME_MODE_REBOOT_PENDING: | ||
| 534 | // The volatile pending registry doesn't exist (checked above) which means | ||
| 535 | // the system was successfully restarted. | ||
| 536 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_REBOOT; | ||
| 537 | break; | ||
| 538 | 514 | ||
| 539 | default: | 515 | if (BOOTSTRAPPER_RESUME_TYPE_NONE == *pResumeType) |
| 540 | // the value stored in the registry is not valid | 516 | { |
| 541 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_INVALID; | 517 | hr = RegistrationDetectResumeTypeByHive(HKEY_CURRENT_USER, pRegistration, pResumeType); |
| 542 | break; | 518 | } |
| 543 | } | 519 | } |
| 520 | ExitOnFailure(hr, "Failed to find bundle registration: %ls", pRegistration->sczRegistrationKey); | ||
| 544 | 521 | ||
| 545 | LExit: | 522 | LExit: |
| 546 | ReleaseRegKey(hkRegistration); | ||
| 547 | |||
| 548 | return hr; | 523 | return hr; |
| 549 | } | 524 | } |
| 550 | 525 | ||
| @@ -889,7 +864,7 @@ extern "C" HRESULT RegistrationSessionEnd( | |||
| 889 | 864 | ||
| 890 | // Open registration key. | 865 | // Open registration key. |
| 891 | hr = RegOpen(pRegistration->hkRoot, pRegistration->sczRegistrationKey, KEY_WRITE, &hkRegistration); | 866 | hr = RegOpen(pRegistration->hkRoot, pRegistration->sczRegistrationKey, KEY_WRITE, &hkRegistration); |
| 892 | ExitOnFailure(hr, "Failed to open registration key."); | 867 | ExitOnFailure(hr, "Failed to open registration key for ending session."); |
| 893 | 868 | ||
| 894 | // update display name | 869 | // update display name |
| 895 | hr = UpdateBundleNameRegistration(pRegistration, pVariables, hkRegistration, BOOTSTRAPPER_REGISTRATION_TYPE_INPROGRESS == registrationType); | 870 | hr = UpdateBundleNameRegistration(pRegistration, pVariables, hkRegistration, BOOTSTRAPPER_REGISTRATION_TYPE_INPROGRESS == registrationType); |
| @@ -1068,6 +1043,39 @@ extern "C" HRESULT RegistrationGetResumeCommandLine( | |||
| 1068 | return hr; | 1043 | return hr; |
| 1069 | } | 1044 | } |
| 1070 | 1045 | ||
| 1046 | extern "C" HRESULT RegistrationSetPaths( | ||
| 1047 | __in BURN_REGISTRATION* pRegistration, | ||
| 1048 | __in BURN_CACHE* pCache | ||
| 1049 | ) | ||
| 1050 | { | ||
| 1051 | HRESULT hr = S_OK; | ||
| 1052 | LPWSTR sczCacheDirectory = NULL; | ||
| 1053 | |||
| 1054 | // save registration key root | ||
| 1055 | pRegistration->hkRoot = pRegistration->fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | ||
| 1056 | |||
| 1057 | // build uninstall registry key path | ||
| 1058 | hr = StrAllocFormatted(&pRegistration->sczRegistrationKey, L"%ls\\%ls", BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY, pRegistration->sczCode); | ||
| 1059 | ExitOnFailure(hr, "Failed to build uninstall registry key path."); | ||
| 1060 | |||
| 1061 | // build cache directory | ||
| 1062 | hr = CacheGetCompletedPath(pCache, pRegistration->fPerMachine, pRegistration->sczCode, &sczCacheDirectory); | ||
| 1063 | ExitOnFailure(hr, "Failed to build cache directory."); | ||
| 1064 | |||
| 1065 | // build cached executable path | ||
| 1066 | hr = PathConcatRelativeToFullyQualifiedBase(sczCacheDirectory, pRegistration->sczExecutableName, &pRegistration->sczCacheExecutablePath); | ||
| 1067 | ExitOnFailure(hr, "Failed to build cached executable path."); | ||
| 1068 | |||
| 1069 | // build state file path | ||
| 1070 | hr = StrAllocFormatted(&pRegistration->sczStateFile, L"%ls\\state.rsm", sczCacheDirectory); | ||
| 1071 | ExitOnFailure(hr, "Failed to build state file path."); | ||
| 1072 | |||
| 1073 | LExit: | ||
| 1074 | ReleaseStr(sczCacheDirectory); | ||
| 1075 | |||
| 1076 | return hr; | ||
| 1077 | } | ||
| 1078 | |||
| 1071 | 1079 | ||
| 1072 | // internal helper functions | 1080 | // internal helper functions |
| 1073 | 1081 | ||
| @@ -1141,38 +1149,6 @@ LExit: | |||
| 1141 | return hr; | 1149 | return hr; |
| 1142 | } | 1150 | } |
| 1143 | 1151 | ||
| 1144 | static HRESULT SetPaths( | ||
| 1145 | __in BURN_REGISTRATION* pRegistration, | ||
| 1146 | __in BURN_CACHE* pCache | ||
| 1147 | ) | ||
| 1148 | { | ||
| 1149 | HRESULT hr = S_OK; | ||
| 1150 | LPWSTR sczCacheDirectory = NULL; | ||
| 1151 | |||
| 1152 | // save registration key root | ||
| 1153 | pRegistration->hkRoot = pRegistration->fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; | ||
| 1154 | |||
| 1155 | // build uninstall registry key path | ||
| 1156 | hr = StrAllocFormatted(&pRegistration->sczRegistrationKey, L"%ls\\%ls", BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY, pRegistration->sczCode); | ||
| 1157 | ExitOnFailure(hr, "Failed to build uninstall registry key path."); | ||
| 1158 | |||
| 1159 | // build cache directory | ||
| 1160 | hr = CacheGetCompletedPath(pCache, pRegistration->fPerMachine, pRegistration->sczCode, &sczCacheDirectory); | ||
| 1161 | ExitOnFailure(hr, "Failed to build cache directory."); | ||
| 1162 | |||
| 1163 | // build cached executable path | ||
| 1164 | hr = PathConcatRelativeToFullyQualifiedBase(sczCacheDirectory, pRegistration->sczExecutableName, &pRegistration->sczCacheExecutablePath); | ||
| 1165 | ExitOnFailure(hr, "Failed to build cached executable path."); | ||
| 1166 | |||
| 1167 | // build state file path | ||
| 1168 | hr = StrAllocFormatted(&pRegistration->sczStateFile, L"%ls\\state.rsm", sczCacheDirectory); | ||
| 1169 | ExitOnFailure(hr, "Failed to build state file path."); | ||
| 1170 | |||
| 1171 | LExit: | ||
| 1172 | ReleaseStr(sczCacheDirectory); | ||
| 1173 | return hr; | ||
| 1174 | } | ||
| 1175 | |||
| 1176 | static HRESULT GetBundleManufacturer( | 1152 | static HRESULT GetBundleManufacturer( |
| 1177 | __in BURN_REGISTRATION* pRegistration, | 1153 | __in BURN_REGISTRATION* pRegistration, |
| 1178 | __in BURN_VARIABLES* pVariables, | 1154 | __in BURN_VARIABLES* pVariables, |
| @@ -1703,3 +1679,102 @@ static BOOL IsRegistryRebootPending() | |||
| 1703 | 1679 | ||
| 1704 | return fRebootPending; | 1680 | return fRebootPending; |
| 1705 | } | 1681 | } |
| 1682 | |||
| 1683 | static HRESULT RegistrationDetectResumeTypeByHive( | ||
| 1684 | __in HKEY hkRegistrationRoot, | ||
| 1685 | __in BURN_REGISTRATION* pRegistration, | ||
| 1686 | __out BOOTSTRAPPER_RESUME_TYPE* pResumeType | ||
| 1687 | ) | ||
| 1688 | { | ||
| 1689 | HRESULT hr = S_OK; | ||
| 1690 | HKEY hkRegistration = NULL; | ||
| 1691 | BOOL fExists = FALSE; | ||
| 1692 | DWORD dwResume = 0; | ||
| 1693 | |||
| 1694 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_NONE; | ||
| 1695 | |||
| 1696 | // open registration key | ||
| 1697 | hr = RegOpen(hkRegistrationRoot, pRegistration->sczRegistrationKey, KEY_QUERY_VALUE, &hkRegistration); | ||
| 1698 | ExitOnPathFailure(hr, fExists, "Failed to open registration key."); | ||
| 1699 | |||
| 1700 | if (!fExists) | ||
| 1701 | { | ||
| 1702 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_NONE; | ||
| 1703 | ExitFunction(); | ||
| 1704 | } | ||
| 1705 | |||
| 1706 | // read Resume value | ||
| 1707 | hr = RegReadNumber(hkRegistration, L"Resume", &dwResume); | ||
| 1708 | ExitOnPathFailure(hr, fExists, "Failed to read Resume value."); | ||
| 1709 | |||
| 1710 | if (!fExists) | ||
| 1711 | { | ||
| 1712 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_INVALID; | ||
| 1713 | ExitFunction(); | ||
| 1714 | } | ||
| 1715 | |||
| 1716 | switch (dwResume) | ||
| 1717 | { | ||
| 1718 | case BURN_RESUME_MODE_ACTIVE: | ||
| 1719 | // a previous run was interrupted | ||
| 1720 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_INTERRUPTED; | ||
| 1721 | break; | ||
| 1722 | |||
| 1723 | case BURN_RESUME_MODE_SUSPEND: | ||
| 1724 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_SUSPEND; | ||
| 1725 | break; | ||
| 1726 | |||
| 1727 | case BURN_RESUME_MODE_ARP: | ||
| 1728 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_ARP; | ||
| 1729 | break; | ||
| 1730 | |||
| 1731 | case BURN_RESUME_MODE_REBOOT_PENDING: | ||
| 1732 | // The volatile pending registry doesn't exist (checked above) which means | ||
| 1733 | // the system was successfully restarted. | ||
| 1734 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_REBOOT; | ||
| 1735 | break; | ||
| 1736 | |||
| 1737 | default: | ||
| 1738 | // the value stored in the registry is not valid | ||
| 1739 | *pResumeType = BOOTSTRAPPER_RESUME_TYPE_INVALID; | ||
| 1740 | break; | ||
| 1741 | } | ||
| 1742 | |||
| 1743 | LExit: | ||
| 1744 | ReleaseRegKey(hkRegistration); | ||
| 1745 | |||
| 1746 | return hr; | ||
| 1747 | } | ||
| 1748 | |||
| 1749 | static HRESULT DetectInstalled( | ||
| 1750 | __in BURN_REGISTRATION* pRegistration, | ||
| 1751 | __in HKEY hkRoot | ||
| 1752 | ) | ||
| 1753 | { | ||
| 1754 | HRESULT hr = S_OK; | ||
| 1755 | HKEY hkRegistration = NULL; | ||
| 1756 | DWORD dwInstalled = 0; | ||
| 1757 | |||
| 1758 | pRegistration->fCached = pRegistration->sczCacheExecutablePath && FileExistsEx(pRegistration->sczCacheExecutablePath, NULL); | ||
| 1759 | pRegistration->detectedRegistrationType = BOOTSTRAPPER_REGISTRATION_TYPE_NONE; | ||
| 1760 | |||
| 1761 | // open registration key | ||
| 1762 | hr = RegOpen(hkRoot, pRegistration->sczRegistrationKey, KEY_QUERY_VALUE, &hkRegistration); | ||
| 1763 | if (SUCCEEDED(hr)) | ||
| 1764 | { | ||
| 1765 | hr = RegReadNumber(hkRegistration, REGISTRY_BUNDLE_INSTALLED, &dwInstalled); | ||
| 1766 | |||
| 1767 | pRegistration->detectedRegistrationType = (1 == dwInstalled) ? BOOTSTRAPPER_REGISTRATION_TYPE_FULL : BOOTSTRAPPER_REGISTRATION_TYPE_INPROGRESS; | ||
| 1768 | } | ||
| 1769 | |||
| 1770 | // Not finding the key or value is okay. | ||
| 1771 | if (E_FILENOTFOUND == hr || E_PATHNOTFOUND == hr) | ||
| 1772 | { | ||
| 1773 | hr = S_OK; | ||
| 1774 | } | ||
| 1775 | |||
| 1776 | ReleaseRegKey(hkRegistration); | ||
| 1777 | |||
| 1778 | return hr; | ||
| 1779 | } | ||
| 1780 | |||
diff --git a/src/burn/engine/registration.h b/src/burn/engine/registration.h index 326f21c6..e83b75b6 100644 --- a/src/burn/engine/registration.h +++ b/src/burn/engine/registration.h | |||
| @@ -94,11 +94,12 @@ typedef struct _BURN_SOFTWARE_TAGS | |||
| 94 | 94 | ||
| 95 | typedef struct _BURN_REGISTRATION | 95 | typedef struct _BURN_REGISTRATION |
| 96 | { | 96 | { |
| 97 | BOOL fPerMachine; | 97 | BOOL fPerMachine; // For PUOM/PMOU bundles, only valid after planning. |
| 98 | BOOL fForceSystemComponent; | 98 | BOOL fForceSystemComponent; |
| 99 | BOOL fDisableResume; | 99 | BOOL fDisableResume; |
| 100 | BOOL fCached; | 100 | BOOL fCached; |
| 101 | BOOTSTRAPPER_REGISTRATION_TYPE detectedRegistrationType; | 101 | BOOTSTRAPPER_REGISTRATION_TYPE detectedRegistrationType; |
| 102 | BOOTSTRAPPER_PACKAGE_SCOPE scope; | ||
| 102 | LPWSTR sczCode; | 103 | LPWSTR sczCode; |
| 103 | LPWSTR sczTag; | 104 | LPWSTR sczTag; |
| 104 | 105 | ||
| @@ -167,7 +168,7 @@ HRESULT RegistrationParseFromXml( | |||
| 167 | __in BURN_REGISTRATION* pRegistration, | 168 | __in BURN_REGISTRATION* pRegistration, |
| 168 | __in BURN_CACHE* pCache, | 169 | __in BURN_CACHE* pCache, |
| 169 | __in IXMLDOMNode* pixnBundle | 170 | __in IXMLDOMNode* pixnBundle |
| 170 | ); | 171 | ); |
| 171 | void RegistrationUninitialize( | 172 | void RegistrationUninitialize( |
| 172 | __in BURN_REGISTRATION* pRegistration | 173 | __in BURN_REGISTRATION* pRegistration |
| 173 | ); | 174 | ); |
| @@ -191,7 +192,7 @@ HRESULT RegistrationDetectRelatedBundles( | |||
| 191 | ); | 192 | ); |
| 192 | HRESULT RegistrationPlanInitialize( | 193 | HRESULT RegistrationPlanInitialize( |
| 193 | __in BURN_REGISTRATION* pRegistration | 194 | __in BURN_REGISTRATION* pRegistration |
| 194 | ); | 195 | ); |
| 195 | HRESULT RegistrationSessionBegin( | 196 | HRESULT RegistrationSessionBegin( |
| 196 | __in_z LPCWSTR wzEngineWorkingPath, | 197 | __in_z LPCWSTR wzEngineWorkingPath, |
| 197 | __in BURN_REGISTRATION* pRegistration, | 198 | __in BURN_REGISTRATION* pRegistration, |
| @@ -225,6 +226,10 @@ HRESULT RegistrationGetResumeCommandLine( | |||
| 225 | __in const BURN_REGISTRATION* pRegistration, | 226 | __in const BURN_REGISTRATION* pRegistration, |
| 226 | __deref_out_z LPWSTR* psczResumeCommandLine | 227 | __deref_out_z LPWSTR* psczResumeCommandLine |
| 227 | ); | 228 | ); |
| 229 | HRESULT RegistrationSetPaths( | ||
| 230 | __in BURN_REGISTRATION* pRegistration, | ||
| 231 | __in BURN_CACHE* pCache | ||
| 232 | ); | ||
| 228 | 233 | ||
| 229 | 234 | ||
| 230 | #if defined(__cplusplus) | 235 | #if defined(__cplusplus) |
diff --git a/src/burn/engine/relatedbundle.cpp b/src/burn/engine/relatedbundle.cpp index c9aa7170..d0b97af0 100644 --- a/src/burn/engine/relatedbundle.cpp +++ b/src/burn/engine/relatedbundle.cpp | |||
| @@ -22,7 +22,7 @@ static __callback int __cdecl CompareRelatedBundlesPlan( | |||
| 22 | ); | 22 | ); |
| 23 | static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback( | 23 | static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback( |
| 24 | __in const BUNDLE_QUERY_RELATED_BUNDLE_RESULT* pBundle, | 24 | __in const BUNDLE_QUERY_RELATED_BUNDLE_RESULT* pBundle, |
| 25 | __in_opt LPVOID pvContext | 25 | __in LPVOID pvContext |
| 26 | ); | 26 | ); |
| 27 | static HRESULT LoadIfRelatedBundle( | 27 | static HRESULT LoadIfRelatedBundle( |
| 28 | __in const BUNDLE_QUERY_RELATED_BUNDLE_RESULT* pBundle, | 28 | __in const BUNDLE_QUERY_RELATED_BUNDLE_RESULT* pBundle, |
| @@ -258,7 +258,7 @@ static __callback int __cdecl CompareRelatedBundlesPlan( | |||
| 258 | 258 | ||
| 259 | static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback( | 259 | static BUNDLE_QUERY_CALLBACK_RESULT CALLBACK QueryRelatedBundlesCallback( |
| 260 | __in const BUNDLE_QUERY_RELATED_BUNDLE_RESULT* pBundle, | 260 | __in const BUNDLE_QUERY_RELATED_BUNDLE_RESULT* pBundle, |
| 261 | __in_opt LPVOID pvContext | 261 | __in LPVOID pvContext |
| 262 | ) | 262 | ) |
| 263 | { | 263 | { |
| 264 | HRESULT hr = S_OK; | 264 | HRESULT hr = S_OK; |
diff --git a/src/burn/engine/uithread.cpp b/src/burn/engine/uithread.cpp index 9beb9f80..1f7db965 100644 --- a/src/burn/engine/uithread.cpp +++ b/src/burn/engine/uithread.cpp | |||
| @@ -123,7 +123,7 @@ static DWORD WINAPI ThreadProc( | |||
| 123 | info.pEngineState = pEngineState; | 123 | info.pEngineState = pEngineState; |
| 124 | 124 | ||
| 125 | // Create the window to handle reboots without activating it. | 125 | // Create the window to handle reboots without activating it. |
| 126 | hWnd = ::CreateWindowExW(WS_EX_NOACTIVATE, wc.lpszClassName, NULL, WS_POPUP, 0, 0, 0, 0, HWND_DESKTOP, NULL, pContext->hInstance, &info); | 126 | hWnd = ::CreateWindowExW(WS_EX_NOACTIVATE, wc.lpszClassName, BURN_UITHREAD_CLASS_WINDOW, WS_POPUP, 0, 0, 0, 0, HWND_DESKTOP, NULL, pContext->hInstance, &info); |
| 127 | ExitOnNullWithLastError(hWnd, hr, "Failed to create Burn UI thread window."); | 127 | ExitOnNullWithLastError(hWnd, hr, "Failed to create Burn UI thread window."); |
| 128 | 128 | ||
| 129 | ::ShowWindow(hWnd, SW_SHOWNA); | 129 | ::ShowWindow(hWnd, SW_SHOWNA); |
diff --git a/src/burn/engine/variable.cpp b/src/burn/engine/variable.cpp index a795d76c..1b7dc4d1 100644 --- a/src/burn/engine/variable.cpp +++ b/src/burn/engine/variable.cpp | |||
| @@ -305,6 +305,8 @@ extern "C" HRESULT VariableInitialize( | |||
| 305 | {BURN_BUNDLE_TAG, InitializeVariableString, (DWORD_PTR)L"", FALSE, TRUE}, | 305 | {BURN_BUNDLE_TAG, InitializeVariableString, (DWORD_PTR)L"", FALSE, TRUE}, |
| 306 | {BURN_BUNDLE_UILEVEL, InitializeVariableNumeric, 0, FALSE, TRUE}, | 306 | {BURN_BUNDLE_UILEVEL, InitializeVariableNumeric, 0, FALSE, TRUE}, |
| 307 | {BURN_BUNDLE_VERSION, InitializeVariableVersion, (DWORD_PTR)L"0", FALSE, TRUE}, | 307 | {BURN_BUNDLE_VERSION, InitializeVariableVersion, (DWORD_PTR)L"0", FALSE, TRUE}, |
| 308 | {BURN_BUNDLE_SCOPE, InitializeVariableNumeric, 0, FALSE, TRUE}, | ||
| 309 | {BURN_BUNDLE_PLANNED_SCOPE, InitializeVariableNumeric, 0, FALSE, TRUE}, | ||
| 308 | }; | 310 | }; |
| 309 | 311 | ||
| 310 | const WELL_KNOWN_VARIABLE_DECLARATION vrgWellKnownVariableNames[] = | 312 | const WELL_KNOWN_VARIABLE_DECLARATION vrgWellKnownVariableNames[] = |
diff --git a/src/burn/test/BurnUnitTest/ApprovedExeTest.cpp b/src/burn/test/BurnUnitTest/ApprovedExeTest.cpp index da51f1f8..6798d3cb 100644 --- a/src/burn/test/BurnUnitTest/ApprovedExeTest.cpp +++ b/src/burn/test/BurnUnitTest/ApprovedExeTest.cpp | |||
| @@ -2,11 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | namespace Microsoft | 5 | namespace WixToolset |
| 6 | { | ||
| 7 | namespace Tools | ||
| 8 | { | ||
| 9 | namespace WindowsInstallerXml | ||
| 10 | { | 6 | { |
| 11 | namespace Test | 7 | namespace Test |
| 12 | { | 8 | { |
| @@ -308,5 +304,3 @@ namespace Bootstrapper | |||
| 308 | } | 304 | } |
| 309 | } | 305 | } |
| 310 | } | 306 | } |
| 311 | } | ||
| 312 | } | ||
diff --git a/src/burn/test/BurnUnitTest/BurnTestException.h b/src/burn/test/BurnUnitTest/BurnTestException.h index b9467926..b6055041 100644 --- a/src/burn/test/BurnUnitTest/BurnTestException.h +++ b/src/burn/test/BurnUnitTest/BurnTestException.h | |||
| @@ -2,11 +2,7 @@ | |||
| 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 | 4 | ||
| 5 | namespace Microsoft | 5 | namespace WixToolset |
| 6 | { | ||
| 7 | namespace Tools | ||
| 8 | { | ||
| 9 | namespace WindowsInstallerXml | ||
| 10 | { | 6 | { |
| 11 | namespace Test | 7 | namespace Test |
| 12 | { | 8 | { |
| @@ -35,8 +31,6 @@ namespace Bootstrapper | |||
| 35 | } | 31 | } |
| 36 | } | 32 | } |
| 37 | } | 33 | } |
| 38 | } | ||
| 39 | } | ||
| 40 | 34 | ||
| 41 | // this class is used by __TestThrowOnFailure_Format() below to deallocate | 35 | // this class is used by __TestThrowOnFailure_Format() below to deallocate |
| 42 | // the string created after the function call has returned | 36 | // the string created after the function call has returned |
| @@ -83,6 +77,6 @@ LExit: | |||
| 83 | } | 77 | } |
| 84 | #pragma warning (pop) | 78 | #pragma warning (pop) |
| 85 | 79 | ||
| 86 | #define TestThrowOnFailure(hr, s) if (FAILED(hr)) { throw gcnew Microsoft::Tools::WindowsInstallerXml::Test::Bootstrapper::BurnTestException(hr, gcnew System::String(s)); } | 80 | #define TestThrowOnFailure(hr, s) if (FAILED(hr)) { throw gcnew WixToolset::Test::Bootstrapper::BurnTestException(hr, gcnew System::String(s)); } |
| 87 | #define TestThrowOnFailure1(hr, s, p) if (FAILED(hr)) { throw gcnew Microsoft::Tools::WindowsInstallerXml::Test::Bootstrapper::BurnTestException(hr, gcnew System::String(__TestThrowOnFailure_Format(s, p))); } | 81 | #define TestThrowOnFailure1(hr, s, p) if (FAILED(hr)) { throw gcnew WixToolset::Test::Bootstrapper::BurnTestException(hr, gcnew System::String(__TestThrowOnFailure_Format(s, p))); } |
| 88 | #define TestThrowOnFailure2(hr, s, p1, p2) if (FAILED(hr)) { throw gcnew Microsoft::Tools::WindowsInstallerXml::Test::Bootstrapper::BurnTestException(hr, gcnew System::String(__TestThrowOnFailure_Format(s, p1, p2))); } | 82 | #define TestThrowOnFailure2(hr, s, p1, p2) if (FAILED(hr)) { throw gcnew WixToolset::Test::Bootstrapper::BurnTestException(hr, gcnew System::String(__TestThrowOnFailure_Format(s, p1, p2))); } |
diff --git a/src/burn/test/BurnUnitTest/BurnTestFixture.h b/src/burn/test/BurnUnitTest/BurnTestFixture.h index 35acba67..95fd6fe5 100644 --- a/src/burn/test/BurnUnitTest/BurnTestFixture.h +++ b/src/burn/test/BurnUnitTest/BurnTestFixture.h | |||
| @@ -2,11 +2,7 @@ | |||
| 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 | 4 | ||
| 5 | namespace Microsoft | 5 | namespace WixToolset |
| 6 | { | ||
| 7 | namespace Tools | ||
| 8 | { | ||
| 9 | namespace WindowsInstallerXml | ||
| 10 | { | 6 | { |
| 11 | namespace Test | 7 | namespace Test |
| 12 | { | 8 | { |
| @@ -71,5 +67,3 @@ namespace Bootstrapper | |||
| 71 | } | 67 | } |
| 72 | } | 68 | } |
| 73 | } | 69 | } |
| 74 | } | ||
| 75 | } | ||
diff --git a/src/burn/test/BurnUnitTest/BurnUnitTest.h b/src/burn/test/BurnUnitTest/BurnUnitTest.h index ed1d2956..33cfe46d 100644 --- a/src/burn/test/BurnUnitTest/BurnUnitTest.h +++ b/src/burn/test/BurnUnitTest/BurnUnitTest.h | |||
| @@ -2,11 +2,7 @@ | |||
| 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 | 4 | ||
| 5 | namespace Microsoft | 5 | namespace WixToolset |
| 6 | { | ||
| 7 | namespace Tools | ||
| 8 | { | ||
| 9 | namespace WindowsInstallerXml | ||
| 10 | { | 6 | { |
| 11 | namespace Test | 7 | namespace Test |
| 12 | { | 8 | { |
| @@ -44,5 +40,3 @@ namespace Bootstrapper | |||
| 44 | } | 40 | } |
| 45 | } | 41 | } |
| 46 | } | 42 | } |
| 47 | } | ||
| 48 | } | ||
diff --git a/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj b/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj index 9704efa5..c741789e 100644 --- a/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj +++ b/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | <Platform>x64</Platform> | 22 | <Platform>x64</Platform> |
| 23 | </ProjectConfiguration> | 23 | </ProjectConfiguration> |
| 24 | </ItemGroup> | 24 | </ItemGroup> |
| 25 | |||
| 26 | <PropertyGroup Label="Globals"> | 25 | <PropertyGroup Label="Globals"> |
| 27 | <ProjectTypes>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</ProjectTypes> | 26 | <ProjectTypes>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</ProjectTypes> |
| 28 | <ProjectGuid>{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}</ProjectGuid> | 27 | <ProjectGuid>{9D1F1BA3-9393-4833-87A3-D5F1FC08EF67}</ProjectGuid> |
| @@ -34,15 +33,12 @@ | |||
| 34 | <SignOutput>false</SignOutput> | 33 | <SignOutput>false</SignOutput> |
| 35 | <IsWixTestProject>true</IsWixTestProject> | 34 | <IsWixTestProject>true</IsWixTestProject> |
| 36 | </PropertyGroup> | 35 | </PropertyGroup> |
| 37 | |||
| 38 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 36 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
| 39 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 37 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
| 40 | |||
| 41 | <PropertyGroup> | 38 | <PropertyGroup> |
| 42 | <ProjectAdditionalIncludeDirectories>$(ProjectAdditionalIncludeDirectories);$(BurnGeneratedHeaderDirectory);..\..\engine;..\..\..\api\burn\inc;..\..\..\libs\dutil\WixToolset.Dutil\inc</ProjectAdditionalIncludeDirectories> | 39 | <ProjectAdditionalIncludeDirectories>$(ProjectAdditionalIncludeDirectories);$(BurnGeneratedHeaderDirectory);..\..\engine;..\..\..\api\burn\inc;..\..\..\libs\dutil\WixToolset.Dutil\inc</ProjectAdditionalIncludeDirectories> |
| 43 | <ProjectAdditionalLinkLibraries>cabinet.lib;crypt32.lib;msi.lib;rpcrt4.lib;shlwapi.lib;userenv.lib;wininet.lib;wintrust.lib;$(RootBuildFolder)libs\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\dutil.lib;engine.res</ProjectAdditionalLinkLibraries> | 40 | <ProjectAdditionalLinkLibraries>cabinet.lib;crypt32.lib;msi.lib;rpcrt4.lib;shlwapi.lib;userenv.lib;wininet.lib;wintrust.lib;$(RootBuildFolder)libs\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\dutil.lib;engine.res</ProjectAdditionalLinkLibraries> |
| 44 | </PropertyGroup> | 41 | </PropertyGroup> |
| 45 | |||
| 46 | <ItemGroup> | 42 | <ItemGroup> |
| 47 | <ClCompile Include="AssemblyInfo.cpp" /> | 43 | <ClCompile Include="AssemblyInfo.cpp" /> |
| 48 | <ClCompile Include="ApprovedExeTest.cpp" /> | 44 | <ClCompile Include="ApprovedExeTest.cpp" /> |
| @@ -76,11 +72,9 @@ | |||
| 76 | <ClInclude Include="TestRegistryFixture.h" /> | 72 | <ClInclude Include="TestRegistryFixture.h" /> |
| 77 | <ClInclude Include="VariableHelpers.h" /> | 73 | <ClInclude Include="VariableHelpers.h" /> |
| 78 | </ItemGroup> | 74 | </ItemGroup> |
| 79 | |||
| 80 | <ItemGroup> | 75 | <ItemGroup> |
| 81 | <ResourceCompile Include="BurnUnitTest.rc" /> | 76 | <ResourceCompile Include="BurnUnitTest.rc" /> |
| 82 | </ItemGroup> | 77 | </ItemGroup> |
| 83 | |||
| 84 | <ItemGroup> | 78 | <ItemGroup> |
| 85 | <None Include="TestData\CacheTest\CacheSignatureTest.File" CopyToOutputDirectory="PreserveNewest" /> | 79 | <None Include="TestData\CacheTest\CacheSignatureTest.File" CopyToOutputDirectory="PreserveNewest" /> |
| 86 | <None Include="TestData\PlanTest\BasicFunctionality_BundleA_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | 80 | <None Include="TestData\PlanTest\BasicFunctionality_BundleA_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> |
| @@ -91,14 +85,23 @@ | |||
| 91 | <None Include="TestData\PlanTest\MsuPackageFixture_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | 85 | <None Include="TestData\PlanTest\MsuPackageFixture_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> |
| 92 | <None Include="TestData\PlanTest\Slipstream_BundleA_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | 86 | <None Include="TestData\PlanTest\Slipstream_BundleA_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> |
| 93 | <None Include="TestData\PlanTest\Slipstream_BundleA_modified_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | 87 | <None Include="TestData\PlanTest\Slipstream_BundleA_modified_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> |
| 88 | <None Include="TestData\PlanTest\AllPmouBundle_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 89 | <None Include="TestData\PlanTest\AllPuomBundle_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 90 | <None Include="TestData\PlanTest\PerUserBundle_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 91 | <None Include="TestData\PlanTest\PerMachineBundle_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 92 | <None Include="TestData\PlanTest\PuPmouBundle_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 93 | <None Include="TestData\PlanTest\PuPuomBundle_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 94 | <None Include="TestData\PlanTest\PmPuomBundle_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 95 | <None Include="TestData\PlanTest\PmPmouBundle_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 96 | <None Include="TestData\PlanTest\PmPuPmouBundle_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 97 | <None Include="TestData\PlanTest\PmPuPuomBundle_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 98 | <None Include="TestData\PlanTest\PuomBundlePackage_manifest.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
| 94 | </ItemGroup> | 99 | </ItemGroup> |
| 95 | |||
| 96 | <ItemGroup> | 100 | <ItemGroup> |
| 97 | <ProjectReference Include="..\..\engine\engine.vcxproj"> | 101 | <ProjectReference Include="..\..\engine\engine.vcxproj"> |
| 98 | <Project>{8119537D-E1D9-6591-D51A-49770A2F9C37}</Project> | 102 | <Project>{8119537D-E1D9-6591-D51A-49770A2F9C37}</Project> |
| 99 | </ProjectReference> | 103 | </ProjectReference> |
| 100 | </ItemGroup> | 104 | </ItemGroup> |
| 101 | |||
| 102 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 105 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
| 103 | <Import Project="..\..\..\internal\WixInternal.TestSupport.Native\build\WixInternal.TestSupport.Native.targets" /> | 106 | <Import Project="..\..\..\internal\WixInternal.TestSupport.Native\build\WixInternal.TestSupport.Native.targets" /> |
| 104 | </Project> | 107 | </Project> |
diff --git a/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj.filters b/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj.filters index aac5ab8b..0c458f48 100644 --- a/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj.filters +++ b/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj.filters | |||
| @@ -98,4 +98,20 @@ | |||
| 98 | <Filter>Resource Files</Filter> | 98 | <Filter>Resource Files</Filter> |
| 99 | </ResourceCompile> | 99 | </ResourceCompile> |
| 100 | </ItemGroup> | 100 | </ItemGroup> |
| 101 | </Project> | 101 | <ItemGroup> |
| 102 | <None Include="$(MSBuildThisFileDirectory)xunit.runner.visualstudio.testadapter.dll" /> | ||
| 103 | <None Include="$(MSBuildThisFileDirectory)xunit.abstractions.dll" /> | ||
| 104 | <None Include="$(MSBuildThisFileDirectory)xunit.runner.reporters.net452.dll" /> | ||
| 105 | <None Include="$(MSBuildThisFileDirectory)xunit.runner.utility.net452.dll" /> | ||
| 106 | <None Include="TestData\CacheTest\CacheSignatureTest.File" /> | ||
| 107 | <None Include="TestData\PlanTest\BasicFunctionality_BundleA_manifest.xml" /> | ||
| 108 | <None Include="TestData\PlanTest\BundlePackage_Multiple_manifest.xml" /> | ||
| 109 | <None Include="TestData\PlanTest\ExePackage_PerUserArpEntry_manifest.xml" /> | ||
| 110 | <None Include="TestData\PlanTest\Failure_BundleD_manifest.xml" /> | ||
| 111 | <None Include="TestData\PlanTest\PuomWithPerMachineBundle_manifest.xml" /> | ||
| 112 | <None Include="TestData\PlanTest\MsiTransaction_BundleAv1_manifest.xml" /> | ||
| 113 | <None Include="TestData\PlanTest\MsuPackageFixture_manifest.xml" /> | ||
| 114 | <None Include="TestData\PlanTest\Slipstream_BundleA_manifest.xml" /> | ||
| 115 | <None Include="TestData\PlanTest\Slipstream_BundleA_modified_manifest.xml" /> | ||
| 116 | </ItemGroup> | ||
| 117 | </Project> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/CacheTest.cpp b/src/burn/test/BurnUnitTest/CacheTest.cpp index 8e3660b2..c142e673 100644 --- a/src/burn/test/BurnUnitTest/CacheTest.cpp +++ b/src/burn/test/BurnUnitTest/CacheTest.cpp | |||
| @@ -23,11 +23,7 @@ typedef struct _CACHE_TEST_CONTEXT | |||
| 23 | { | 23 | { |
| 24 | } CACHE_TEST_CONTEXT; | 24 | } CACHE_TEST_CONTEXT; |
| 25 | 25 | ||
| 26 | namespace Microsoft | 26 | namespace WixToolset |
| 27 | { | ||
| 28 | namespace Tools | ||
| 29 | { | ||
| 30 | namespace WindowsInstallerXml | ||
| 31 | { | 27 | { |
| 32 | namespace Test | 28 | namespace Test |
| 33 | { | 29 | { |
| @@ -158,7 +154,7 @@ namespace Bootstrapper | |||
| 158 | hr = StrAllocHexDecode(L"25e61cd83485062b70713aebddd3fe4992826cb121466fddc8de3eacb1e42f39d4bdd8455d95eec8c9529ced4c0296ab861931fe2c86df2f2b4e8d259a6d9223", &pb, &cb); | 154 | hr = StrAllocHexDecode(L"25e61cd83485062b70713aebddd3fe4992826cb121466fddc8de3eacb1e42f39d4bdd8455d95eec8c9529ced4c0296ab861931fe2c86df2f2b4e8d259a6d9223", &pb, &cb); |
| 159 | Assert::Equal(S_OK, hr); | 155 | Assert::Equal(S_OK, hr); |
| 160 | 156 | ||
| 161 | package.fPerMachine = FALSE; | 157 | package.scope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER; |
| 162 | package.sczCacheId = L"Bootstrapper.CacheTest.CacheSignatureTest"; | 158 | package.sczCacheId = L"Bootstrapper.CacheTest.CacheSignatureTest"; |
| 163 | payload.sczKey = L"CacheSignatureTest.PayloadKey"; | 159 | payload.sczKey = L"CacheSignatureTest.PayloadKey"; |
| 164 | payload.sczFilePath = L"CacheSignatureTest.File"; | 160 | payload.sczFilePath = L"CacheSignatureTest.File"; |
| @@ -192,8 +188,6 @@ namespace Bootstrapper | |||
| 192 | } | 188 | } |
| 193 | } | 189 | } |
| 194 | } | 190 | } |
| 195 | } | ||
| 196 | } | ||
| 197 | 191 | ||
| 198 | static HRESULT CALLBACK CacheTestEventRoutine( | 192 | static HRESULT CALLBACK CacheTestEventRoutine( |
| 199 | __in BURN_CACHE_MESSAGE* /*pMessage*/, | 193 | __in BURN_CACHE_MESSAGE* /*pMessage*/, |
diff --git a/src/burn/test/BurnUnitTest/ElevationTest.cpp b/src/burn/test/BurnUnitTest/ElevationTest.cpp index 81e9f93e..feacdb7c 100644 --- a/src/burn/test/BurnUnitTest/ElevationTest.cpp +++ b/src/burn/test/BurnUnitTest/ElevationTest.cpp | |||
| @@ -25,11 +25,7 @@ static HRESULT ProcessChildMessages( | |||
| 25 | __out DWORD* pdwResult | 25 | __out DWORD* pdwResult |
| 26 | ); | 26 | ); |
| 27 | 27 | ||
| 28 | namespace Microsoft | 28 | namespace WixToolset |
| 29 | { | ||
| 30 | namespace Tools | ||
| 31 | { | ||
| 32 | namespace WindowsInstallerXml | ||
| 33 | { | 29 | { |
| 34 | namespace Test | 30 | namespace Test |
| 35 | { | 31 | { |
| @@ -92,8 +88,6 @@ namespace Bootstrapper | |||
| 92 | } | 88 | } |
| 93 | } | 89 | } |
| 94 | } | 90 | } |
| 95 | } | ||
| 96 | } | ||
| 97 | 91 | ||
| 98 | 92 | ||
| 99 | static BOOL STDAPICALLTYPE ElevateTest_ShellExecuteExW( | 93 | static BOOL STDAPICALLTYPE ElevateTest_ShellExecuteExW( |
diff --git a/src/burn/test/BurnUnitTest/EmbeddedTest.cpp b/src/burn/test/BurnUnitTest/EmbeddedTest.cpp index a19790ad..33f03282 100644 --- a/src/burn/test/BurnUnitTest/EmbeddedTest.cpp +++ b/src/burn/test/BurnUnitTest/EmbeddedTest.cpp | |||
| @@ -33,11 +33,7 @@ static int EmbeddedTest_GenericMessageHandler( | |||
| 33 | __in LPVOID pvContext | 33 | __in LPVOID pvContext |
| 34 | ); | 34 | ); |
| 35 | 35 | ||
| 36 | namespace Microsoft | 36 | namespace WixToolset |
| 37 | { | ||
| 38 | namespace Tools | ||
| 39 | { | ||
| 40 | namespace WindowsInstallerXml | ||
| 41 | { | 37 | { |
| 42 | namespace Test | 38 | namespace Test |
| 43 | { | 39 | { |
| @@ -84,8 +80,6 @@ namespace Bootstrapper | |||
| 84 | } | 80 | } |
| 85 | } | 81 | } |
| 86 | } | 82 | } |
| 87 | } | ||
| 88 | } | ||
| 89 | 83 | ||
| 90 | 84 | ||
| 91 | static BOOL STDAPICALLTYPE EmbeddedTest_CreateProcessW( | 85 | static BOOL STDAPICALLTYPE EmbeddedTest_CreateProcessW( |
diff --git a/src/burn/test/BurnUnitTest/ExitCodeTest.cpp b/src/burn/test/BurnUnitTest/ExitCodeTest.cpp index 9b66f4c0..0529fa45 100644 --- a/src/burn/test/BurnUnitTest/ExitCodeTest.cpp +++ b/src/burn/test/BurnUnitTest/ExitCodeTest.cpp | |||
| @@ -2,11 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | namespace Microsoft | 5 | namespace WixToolset |
| 6 | { | ||
| 7 | namespace Tools | ||
| 8 | { | ||
| 9 | namespace WindowsInstallerXml | ||
| 10 | { | 6 | { |
| 11 | namespace Test | 7 | namespace Test |
| 12 | { | 8 | { |
| @@ -328,7 +324,7 @@ static void LoadEngineState( | |||
| 328 | L"<BurnManifest>" | 324 | L"<BurnManifest>" |
| 329 | L" <Payload Id='test.exe' FilePath='test.exe' Packaging='external' SourcePath='test.exe' Hash='000000000000' FileSize='1' />" | 325 | L" <Payload Id='test.exe' FilePath='test.exe' Packaging='external' SourcePath='test.exe' Hash='000000000000' FileSize='1' />" |
| 330 | L" <Chain>" | 326 | L" <Chain>" |
| 331 | L" <ExePackage Id='Custom' Cache='remove' CacheId='test.exe' InstallSize='1' Size='1' PerMachine='no' Permanent='yes' Vital='yes' DetectCondition='' InstallArguments='[ExeExitCode]' UninstallArguments='' Uninstallable='no' RepairArguments='' Repairable='no' Protocol='none' DetectionType='condition'>" | 327 | L" <ExePackage Id='Custom' Cache='remove' CacheId='test.exe' InstallSize='1' Size='1' Scope='peruser' Permanent='yes' Vital='yes' DetectCondition='' InstallArguments='[ExeExitCode]' UninstallArguments='' Uninstallable='no' RepairArguments='' Repairable='no' Protocol='none' DetectionType='condition'>" |
| 332 | L" <ExitCode Code='0' Type='2' />" | 328 | L" <ExitCode Code='0' Type='2' />" |
| 333 | L" <ExitCode Code='3' Type='3' />" | 329 | L" <ExitCode Code='3' Type='3' />" |
| 334 | L" <ExitCode Code='4' Type='4' />" | 330 | L" <ExitCode Code='4' Type='4' />" |
| @@ -349,7 +345,7 @@ static void LoadEngineState( | |||
| 349 | L" <ExitCode Code='*' Type='1' />" | 345 | L" <ExitCode Code='*' Type='1' />" |
| 350 | L" <PayloadRef Id='test.exe' />" | 346 | L" <PayloadRef Id='test.exe' />" |
| 351 | L" </ExePackage>" | 347 | L" </ExePackage>" |
| 352 | L" <ExePackage Id='Standard' Cache='remove' CacheId='test.exe' InstallSize='1' Size='1' PerMachine='no' Permanent='yes' Vital='yes' DetectCondition='' InstallArguments='[ExeExitCode]' UninstallArguments='' Uninstallable='no' RepairArguments='' Repairable='no' Protocol='none' DetectionType='condition'>" | 348 | L" <ExePackage Id='Standard' Cache='remove' CacheId='test.exe' InstallSize='1' Size='1' Scope='peruser' Permanent='yes' Vital='yes' DetectCondition='' InstallArguments='[ExeExitCode]' UninstallArguments='' Uninstallable='no' RepairArguments='' Repairable='no' Protocol='none' DetectionType='condition'>" |
| 353 | L" <PayloadRef Id='test.exe' />" | 349 | L" <PayloadRef Id='test.exe' />" |
| 354 | L" </ExePackage>" | 350 | L" </ExePackage>" |
| 355 | L" </Chain>" | 351 | L" </Chain>" |
| @@ -376,5 +372,3 @@ static void LoadEngineState( | |||
| 376 | } | 372 | } |
| 377 | } | 373 | } |
| 378 | } | 374 | } |
| 379 | } | ||
| 380 | } | ||
diff --git a/src/burn/test/BurnUnitTest/LoggingTest.cpp b/src/burn/test/BurnUnitTest/LoggingTest.cpp index ed74c875..7619b913 100644 --- a/src/burn/test/BurnUnitTest/LoggingTest.cpp +++ b/src/burn/test/BurnUnitTest/LoggingTest.cpp | |||
| @@ -2,11 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | namespace Microsoft | 5 | namespace WixToolset |
| 6 | { | ||
| 7 | namespace Tools | ||
| 8 | { | ||
| 9 | namespace WindowsInstallerXml | ||
| 10 | { | 6 | { |
| 11 | namespace Test | 7 | namespace Test |
| 12 | { | 8 | { |
| @@ -64,5 +60,3 @@ namespace Bootstrapper | |||
| 64 | } | 60 | } |
| 65 | } | 61 | } |
| 66 | } | 62 | } |
| 67 | } | ||
| 68 | } | ||
diff --git a/src/burn/test/BurnUnitTest/ManifestHelpers.cpp b/src/burn/test/BurnUnitTest/ManifestHelpers.cpp index 96d5fab4..b68504aa 100644 --- a/src/burn/test/BurnUnitTest/ManifestHelpers.cpp +++ b/src/burn/test/BurnUnitTest/ManifestHelpers.cpp | |||
| @@ -7,11 +7,7 @@ using namespace System; | |||
| 7 | using namespace Xunit; | 7 | using namespace Xunit; |
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | namespace Microsoft | 10 | namespace WixToolset |
| 11 | { | ||
| 12 | namespace Tools | ||
| 13 | { | ||
| 14 | namespace WindowsInstallerXml | ||
| 15 | { | 11 | { |
| 16 | namespace Test | 12 | namespace Test |
| 17 | { | 13 | { |
| @@ -37,5 +33,3 @@ namespace Bootstrapper | |||
| 37 | } | 33 | } |
| 38 | } | 34 | } |
| 39 | } | 35 | } |
| 40 | } | ||
| 41 | } | ||
diff --git a/src/burn/test/BurnUnitTest/ManifestHelpers.h b/src/burn/test/BurnUnitTest/ManifestHelpers.h index e3e57555..e3c97c64 100644 --- a/src/burn/test/BurnUnitTest/ManifestHelpers.h +++ b/src/burn/test/BurnUnitTest/ManifestHelpers.h | |||
| @@ -2,11 +2,7 @@ | |||
| 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 | 4 | ||
| 5 | namespace Microsoft | 5 | namespace WixToolset |
| 6 | { | ||
| 7 | namespace Tools | ||
| 8 | { | ||
| 9 | namespace WindowsInstallerXml | ||
| 10 | { | 6 | { |
| 11 | namespace Test | 7 | namespace Test |
| 12 | { | 8 | { |
| @@ -20,5 +16,3 @@ void LoadBundleXmlHelper(LPCWSTR wzDocument, IXMLDOMElement** ppixeBundle); | |||
| 20 | } | 16 | } |
| 21 | } | 17 | } |
| 22 | } | 18 | } |
| 23 | } | ||
| 24 | } | ||
diff --git a/src/burn/test/BurnUnitTest/ManifestTest.cpp b/src/burn/test/BurnUnitTest/ManifestTest.cpp index 4959cee0..4e6bac24 100644 --- a/src/burn/test/BurnUnitTest/ManifestTest.cpp +++ b/src/burn/test/BurnUnitTest/ManifestTest.cpp | |||
| @@ -2,11 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | namespace Microsoft | 5 | namespace WixToolset |
| 6 | { | ||
| 7 | namespace Tools | ||
| 8 | { | ||
| 9 | namespace WindowsInstallerXml | ||
| 10 | { | 6 | { |
| 11 | namespace Test | 7 | namespace Test |
| 12 | { | 8 | { |
| @@ -40,7 +36,7 @@ namespace Bootstrapper | |||
| 40 | " <UX PrimaryPayloadId='ux.exe'>" | 36 | " <UX PrimaryPayloadId='ux.exe'>" |
| 41 | " <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='u0' />" | 37 | " <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='u0' />" |
| 42 | " </UX>" | 38 | " </UX>" |
| 43 | " <Registration Code='{D54F896D-1952-43e6-9C67-B5652240618C}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no' />" | 39 | " <Registration Code='{D54F896D-1952-43e6-9C67-B5652240618C}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' Scope='peruser' />" |
| 44 | " <Variable Id='Variable1' Type='numeric' Value='1' Hidden='no' Persisted='no' />" | 40 | " <Variable Id='Variable1' Type='numeric' Value='1' Hidden='no' Persisted='no' />" |
| 45 | " <RegistrySearch Id='Search1' Type='exists' Root='HKLM' Key='SOFTWARE\\Microsoft' Variable='Variable1' Condition='0' />" | 41 | " <RegistrySearch Id='Search1' Type='exists' Root='HKLM' Key='SOFTWARE\\Microsoft' Variable='Variable1' Condition='0' />" |
| 46 | "</BurnManifest>"; | 42 | "</BurnManifest>"; |
| @@ -67,5 +63,3 @@ namespace Bootstrapper | |||
| 67 | } | 63 | } |
| 68 | } | 64 | } |
| 69 | } | 65 | } |
| 70 | } | ||
| 71 | } | ||
diff --git a/src/burn/test/BurnUnitTest/PlanTest.cpp b/src/burn/test/BurnUnitTest/PlanTest.cpp index e2850a62..7e7d84cc 100644 --- a/src/burn/test/BurnUnitTest/PlanTest.cpp +++ b/src/burn/test/BurnUnitTest/PlanTest.cpp | |||
| @@ -2,12 +2,20 @@ | |||
| 2 | 2 | ||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | #if TODO_REIMPLEMENT | ||
| 5 | static HRESULT WINAPI PlanTestBAProc( | 6 | static HRESULT WINAPI PlanTestBAProc( |
| 6 | __in BOOTSTRAPPER_APPLICATION_MESSAGE message, | 7 | __in BOOTSTRAPPER_APPLICATION_MESSAGE message, |
| 7 | __in const LPVOID pvArgs, | 8 | __in const LPVOID pvArgs, |
| 8 | __inout LPVOID pvResults, | 9 | __inout LPVOID pvResults, |
| 9 | __in_opt LPVOID pvContext | 10 | __in_opt LPVOID pvContext |
| 10 | ); | 11 | ); |
| 12 | #endif | ||
| 13 | |||
| 14 | struct REDIRECTED_LOGGING_CONTEXT | ||
| 15 | { | ||
| 16 | LPSTR pszBuffer; | ||
| 17 | }; | ||
| 18 | |||
| 11 | 19 | ||
| 12 | static LPCWSTR wzArpEntryExeManifestFileName = L"ExePackage_PerUserArpEntry_manifest.xml"; | 20 | static LPCWSTR wzArpEntryExeManifestFileName = L"ExePackage_PerUserArpEntry_manifest.xml"; |
| 13 | static LPCWSTR wzMsiTransactionManifestFileName = L"MsiTransaction_BundleAv1_manifest.xml"; | 21 | static LPCWSTR wzMsiTransactionManifestFileName = L"MsiTransaction_BundleAv1_manifest.xml"; |
| @@ -28,11 +36,7 @@ static BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE vRelatedBundlePlanType = BOOTSTRAPP | |||
| 28 | static BURN_DEPENDENCY_ACTION registerActions1[] = { BURN_DEPENDENCY_ACTION_REGISTER }; | 36 | static BURN_DEPENDENCY_ACTION registerActions1[] = { BURN_DEPENDENCY_ACTION_REGISTER }; |
| 29 | static BURN_DEPENDENCY_ACTION unregisterActions1[] = { BURN_DEPENDENCY_ACTION_UNREGISTER }; | 37 | static BURN_DEPENDENCY_ACTION unregisterActions1[] = { BURN_DEPENDENCY_ACTION_UNREGISTER }; |
| 30 | 38 | ||
| 31 | namespace Microsoft | 39 | namespace WixToolset |
| 32 | { | ||
| 33 | namespace Tools | ||
| 34 | { | ||
| 35 | namespace WindowsInstallerXml | ||
| 36 | { | 40 | { |
| 37 | namespace Test | 41 | namespace Test |
| 38 | { | 42 | { |
| @@ -43,12 +47,314 @@ namespace Bootstrapper | |||
| 43 | 47 | ||
| 44 | public ref class PlanTest : BurnUnitTest | 48 | public ref class PlanTest : BurnUnitTest |
| 45 | { | 49 | { |
| 50 | private: | ||
| 51 | void ScopeTest( | ||
| 52 | LPCWSTR wzManifestFileName, | ||
| 53 | BOOL fDefaultPlanPerMachine, | ||
| 54 | BOOL fDefaultRegistrationPerMachine, | ||
| 55 | BOOL fPerUserPlanPerMachine, | ||
| 56 | BOOL fPerUserRegistrationPerMachine, | ||
| 57 | BOOL fPerMachinePlanPerMachine, | ||
| 58 | BOOL fPerMachineRegistrationPerMachine | ||
| 59 | ) | ||
| 60 | { | ||
| 61 | HRESULT hr = S_OK; | ||
| 62 | BURN_ENGINE_STATE engineState = { }; | ||
| 63 | BURN_ENGINE_STATE* pEngineState = &engineState; | ||
| 64 | BURN_PLAN* pPlan = &engineState.plan; | ||
| 65 | |||
| 66 | InitializeEngineStateForCorePlan(wzManifestFileName, pEngineState); | ||
| 67 | DetectAttachedContainerAsAttached(pEngineState); | ||
| 68 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | ||
| 69 | |||
| 70 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); | ||
| 71 | NativeAssert::Succeeded(hr, "CorePlan default failed"); | ||
| 72 | |||
| 73 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | ||
| 74 | Assert::Equal<DWORD>(BOOTSTRAPPER_SCOPE_DEFAULT, pPlan->plannedScope); | ||
| 75 | Assert::Equal<DWORD>(fDefaultPlanPerMachine, pPlan->fPerMachine); | ||
| 76 | Assert::Equal<DWORD>(fDefaultRegistrationPerMachine, engineState.registration.fPerMachine); | ||
| 77 | |||
| 78 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_PER_USER); | ||
| 79 | NativeAssert::Succeeded(hr, "CorePlan per-user failed"); | ||
| 80 | |||
| 81 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | ||
| 82 | Assert::Equal<DWORD>(BOOTSTRAPPER_SCOPE_PER_USER, pPlan->plannedScope); | ||
| 83 | Assert::Equal<DWORD>(fPerUserPlanPerMachine, pPlan->fPerMachine); | ||
| 84 | Assert::Equal<DWORD>(fPerUserRegistrationPerMachine, engineState.registration.fPerMachine); | ||
| 85 | |||
| 86 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_PER_MACHINE); | ||
| 87 | NativeAssert::Succeeded(hr, "CorePlan per-machine failed"); | ||
| 88 | |||
| 89 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | ||
| 90 | Assert::Equal<DWORD>(BOOTSTRAPPER_SCOPE_PER_MACHINE, pPlan->plannedScope); | ||
| 91 | Assert::Equal<DWORD>(fPerMachinePlanPerMachine, pPlan->fPerMachine); | ||
| 92 | Assert::Equal<DWORD>(fPerMachineRegistrationPerMachine, engineState.registration.fPerMachine); | ||
| 93 | } | ||
| 94 | |||
| 46 | public: | 95 | public: |
| 47 | PlanTest(BurnTestFixture^ fixture) : BurnUnitTest(fixture) | 96 | PlanTest(BurnTestFixture^ fixture) : BurnUnitTest(fixture) |
| 48 | { | 97 | { |
| 49 | } | 98 | } |
| 50 | 99 | ||
| 51 | [Fact] | 100 | [Fact] |
| 101 | void CommandLineScopeTestNoop() | ||
| 102 | { | ||
| 103 | HRESULT hr = S_OK; | ||
| 104 | BURN_ENGINE_STATE engineState = { }; | ||
| 105 | BURN_ENGINE_STATE* pEngineState = &engineState; | ||
| 106 | BURN_PLAN* pPlan = &engineState.plan; | ||
| 107 | |||
| 108 | engineState.command.commandLineScope = BOOTSTRAPPER_SCOPE_PER_MACHINE; | ||
| 109 | |||
| 110 | InitializeEngineStateForCorePlan(L"AllPmouBundle_manifest.xml", pEngineState); | ||
| 111 | DetectAttachedContainerAsAttached(pEngineState); | ||
| 112 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | ||
| 113 | |||
| 114 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_PER_USER); | ||
| 115 | NativeAssert::Succeeded(hr, "CorePlan default failed"); | ||
| 116 | |||
| 117 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | ||
| 118 | Assert::Equal<DWORD>(BOOTSTRAPPER_SCOPE_PER_USER, pPlan->plannedScope); | ||
| 119 | Assert::Equal<DWORD>(FALSE, pPlan->fPerMachine); | ||
| 120 | Assert::Equal<DWORD>(FALSE, engineState.registration.fPerMachine); | ||
| 121 | } | ||
| 122 | |||
| 123 | [Fact] | ||
| 124 | void CommandLineScopePerUserTest() | ||
| 125 | { | ||
| 126 | HRESULT hr = S_OK; | ||
| 127 | BURN_ENGINE_STATE engineState = { }; | ||
| 128 | BURN_ENGINE_STATE* pEngineState = &engineState; | ||
| 129 | BURN_PLAN* pPlan = &engineState.plan; | ||
| 130 | |||
| 131 | engineState.command.commandLineScope = BOOTSTRAPPER_SCOPE_PER_USER; | ||
| 132 | |||
| 133 | InitializeEngineStateForCorePlan(L"AllPmouBundle_manifest.xml", pEngineState); | ||
| 134 | DetectAttachedContainerAsAttached(pEngineState); | ||
| 135 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | ||
| 136 | |||
| 137 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); | ||
| 138 | NativeAssert::Succeeded(hr, "CorePlan default failed"); | ||
| 139 | |||
| 140 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | ||
| 141 | Assert::Equal<DWORD>(BOOTSTRAPPER_SCOPE_PER_USER, pPlan->plannedScope); | ||
| 142 | Assert::Equal<DWORD>(FALSE, pPlan->fPerMachine); | ||
| 143 | Assert::Equal<DWORD>(FALSE, engineState.registration.fPerMachine); | ||
| 144 | } | ||
| 145 | |||
| 146 | [Fact] | ||
| 147 | void CommandLineScopePerMachineTest() | ||
| 148 | { | ||
| 149 | HRESULT hr = S_OK; | ||
| 150 | BURN_ENGINE_STATE engineState = { }; | ||
| 151 | BURN_ENGINE_STATE* pEngineState = &engineState; | ||
| 152 | BURN_PLAN* pPlan = &engineState.plan; | ||
| 153 | |||
| 154 | engineState.command.commandLineScope = BOOTSTRAPPER_SCOPE_PER_MACHINE; | ||
| 155 | |||
| 156 | InitializeEngineStateForCorePlan(L"AllPmouBundle_manifest.xml", pEngineState); | ||
| 157 | DetectAttachedContainerAsAttached(pEngineState); | ||
| 158 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | ||
| 159 | |||
| 160 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); | ||
| 161 | NativeAssert::Succeeded(hr, "CorePlan default failed"); | ||
| 162 | |||
| 163 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | ||
| 164 | Assert::Equal<DWORD>(BOOTSTRAPPER_SCOPE_PER_MACHINE, pPlan->plannedScope); | ||
| 165 | Assert::Equal<DWORD>(TRUE, pPlan->fPerMachine); | ||
| 166 | Assert::Equal<DWORD>(TRUE, engineState.registration.fPerMachine); | ||
| 167 | } | ||
| 168 | |||
| 169 | [Fact] | ||
| 170 | void BundlePackageScopeTestNoop() | ||
| 171 | { | ||
| 172 | HRESULT hr = S_OK; | ||
| 173 | BURN_ENGINE_STATE engineState = { }; | ||
| 174 | BURN_ENGINE_STATE* pEngineState = &engineState; | ||
| 175 | BURN_PLAN* pPlan = &engineState.plan; | ||
| 176 | |||
| 177 | engineState.command.commandLineScope = BOOTSTRAPPER_SCOPE_PER_MACHINE; | ||
| 178 | |||
| 179 | InitializeEngineStateForCorePlan(L"PuomBundlePackage_manifest.xml", pEngineState); | ||
| 180 | DetectAttachedContainerAsAttached(pEngineState); | ||
| 181 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | ||
| 182 | |||
| 183 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_PER_USER); | ||
| 184 | NativeAssert::Succeeded(hr, "CorePlan default failed"); | ||
| 185 | |||
| 186 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | ||
| 187 | Assert::Equal<DWORD>(BOOTSTRAPPER_SCOPE_PER_USER, pPlan->plannedScope); | ||
| 188 | Assert::Equal<DWORD>(BOOTSTRAPPER_SCOPE_DEFAULT, engineState.packages.rgPackages[0].fPerMachine); | ||
| 189 | Assert::Equal<DWORD>(FALSE, pPlan->fPerMachine); | ||
| 190 | Assert::Equal<DWORD>(FALSE, engineState.registration.fPerMachine); | ||
| 191 | } | ||
| 192 | |||
| 193 | [Fact] | ||
| 194 | void BundlePackageScopeTestSucceeds() | ||
| 195 | { | ||
| 196 | HRESULT hr = S_OK; | ||
| 197 | BURN_ENGINE_STATE engineState = { }; | ||
| 198 | BURN_ENGINE_STATE* pEngineState = &engineState; | ||
| 199 | BURN_PLAN* pPlan = &engineState.plan; | ||
| 200 | |||
| 201 | engineState.command.commandLineScope = BOOTSTRAPPER_SCOPE_PER_MACHINE; | ||
| 202 | |||
| 203 | InitializeEngineStateForCorePlan(L"PuomBundlePackage_manifest.xml", pEngineState); | ||
| 204 | DetectAttachedContainerAsAttached(pEngineState); | ||
| 205 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | ||
| 206 | |||
| 207 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); | ||
| 208 | NativeAssert::Succeeded(hr, "CorePlan default failed"); | ||
| 209 | |||
| 210 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | ||
| 211 | Assert::Equal<DWORD>(BOOTSTRAPPER_SCOPE_PER_MACHINE, pPlan->plannedScope); | ||
| 212 | Assert::Equal<DWORD>(BOOTSTRAPPER_SCOPE_PER_MACHINE, engineState.packages.rgPackages[0].fPerMachine); | ||
| 213 | Assert::Equal<DWORD>(TRUE, pPlan->fPerMachine); | ||
| 214 | Assert::Equal<DWORD>(TRUE, engineState.registration.fPerMachine); | ||
| 215 | } | ||
| 216 | |||
| 217 | [Fact] | ||
| 218 | void AllPerUserScopeTest() | ||
| 219 | { | ||
| 220 | ScopeTest( | ||
| 221 | L"PerUserBundle_manifest.xml", | ||
| 222 | FALSE /*fDefaultPlanPerMachine*/, | ||
| 223 | FALSE /*fDefaultRegistrationPerMachine*/, | ||
| 224 | FALSE /*fPerUserPlanPerMachine*/, | ||
| 225 | FALSE /*fPerUserRegistrationPerMachine*/, | ||
| 226 | FALSE /*fPerMachinePlanPerMachine*/, | ||
| 227 | FALSE /*fPerMachineRegistrationPerMachine*/ | ||
| 228 | ); | ||
| 229 | } | ||
| 230 | |||
| 231 | [Fact] | ||
| 232 | void AllPerMachineScopeTest() | ||
| 233 | { | ||
| 234 | ScopeTest( | ||
| 235 | L"PerMachineBundle_manifest.xml", | ||
| 236 | TRUE /*fDefaultPlanPerMachine*/, | ||
| 237 | TRUE /*fDefaultRegistrationPerMachine*/, | ||
| 238 | TRUE /*fPerUserPlanPerMachine*/, | ||
| 239 | TRUE /*fPerUserRegistrationPerMachine*/, | ||
| 240 | TRUE /*fPerMachinePlanPerMachine*/, | ||
| 241 | TRUE /*fPerMachineRegistrationPerMachine*/ | ||
| 242 | ); | ||
| 243 | } | ||
| 244 | |||
| 245 | [Fact] | ||
| 246 | void AllPerMachineOrUserPackagesScopeTest() | ||
| 247 | { | ||
| 248 | ScopeTest( | ||
| 249 | L"AllPmouBundle_manifest.xml", | ||
| 250 | TRUE /*fDefaultPlanPerMachine*/, | ||
| 251 | TRUE /*fDefaultRegistrationPerMachine*/, | ||
| 252 | FALSE /*fPerUserPlanPerMachine*/, | ||
| 253 | FALSE /*fPerUserRegistrationPerMachine*/, | ||
| 254 | TRUE /*fPerMachinePlanPerMachine*/, | ||
| 255 | TRUE /*fPerMachineRegistrationPerMachine*/ | ||
| 256 | ); | ||
| 257 | } | ||
| 258 | |||
| 259 | [Fact] | ||
| 260 | void AllPerUserOrMachinePackagesScopeTest() | ||
| 261 | { | ||
| 262 | ScopeTest( | ||
| 263 | L"AllPuomBundle_manifest.xml", | ||
| 264 | FALSE /*fDefaultPlanPerMachine*/, | ||
| 265 | FALSE /*fDefaultRegistrationPerMachine*/, | ||
| 266 | FALSE /*fPerUserPlanPerMachine*/, | ||
| 267 | FALSE /*fPerUserRegistrationPerMachine*/, | ||
| 268 | TRUE /*fPerMachinePlanPerMachine*/, | ||
| 269 | TRUE /*fPerMachineRegistrationPerMachine*/ | ||
| 270 | ); | ||
| 271 | } | ||
| 272 | |||
| 273 | [Fact] | ||
| 274 | void PerMachineAndPerMachineOrUserScopeTest() | ||
| 275 | { | ||
| 276 | ScopeTest( | ||
| 277 | L"PmPmouBundle_manifest.xml", | ||
| 278 | TRUE /*fDefaultPlanPerMachine*/, | ||
| 279 | TRUE /*fDefaultRegistrationPerMachine*/, | ||
| 280 | TRUE /*fPerUserPlanPerMachine*/, | ||
| 281 | FALSE /*fPerUserRegistrationPerMachine*/, | ||
| 282 | TRUE /*fPerMachinePlanPerMachine*/, | ||
| 283 | TRUE /*fPerMachineRegistrationPerMachine*/ | ||
| 284 | ); | ||
| 285 | } | ||
| 286 | |||
| 287 | [Fact] | ||
| 288 | void PerMachineAndPerUserOrMachineScopeTest() | ||
| 289 | { | ||
| 290 | ScopeTest( | ||
| 291 | L"PmPuomBundle_manifest.xml", | ||
| 292 | TRUE /*fDefaultPlanPerMachine*/, | ||
| 293 | FALSE /*fDefaultRegistrationPerMachine*/, | ||
| 294 | TRUE /*fPerUserPlanPerMachine*/, | ||
| 295 | FALSE /*fPerUserRegistrationPerMachine*/, | ||
| 296 | TRUE /*fPerMachinePlanPerMachine*/, | ||
| 297 | TRUE /*fPerMachineRegistrationPerMachine*/ | ||
| 298 | ); | ||
| 299 | } | ||
| 300 | |||
| 301 | [Fact] | ||
| 302 | void PerMachineAndPerUserAndPerMachineOrUserScopeTest() | ||
| 303 | { | ||
| 304 | ScopeTest( | ||
| 305 | L"PmPuPmouBundle_manifest.xml", | ||
| 306 | TRUE /*fDefaultPlanPerMachine*/, | ||
| 307 | FALSE /*fDefaultRegistrationPerMachine*/, | ||
| 308 | TRUE /*fPerUserPlanPerMachine*/, | ||
| 309 | FALSE /*fPerUserRegistrationPerMachine*/, | ||
| 310 | TRUE /*fPerMachinePlanPerMachine*/, | ||
| 311 | FALSE /*fPerMachineRegistrationPerMachine*/ | ||
| 312 | ); | ||
| 313 | } | ||
| 314 | |||
| 315 | [Fact] | ||
| 316 | void PerMachineAndPerUserAndPerUserOrMachineScopeTest() | ||
| 317 | { | ||
| 318 | ScopeTest( | ||
| 319 | L"PmPuPuomBundle_manifest.xml", | ||
| 320 | TRUE /*fDefaultPlanPerMachine*/, | ||
| 321 | FALSE /*fDefaultRegistrationPerMachine*/, | ||
| 322 | TRUE /*fPerUserPlanPerMachine*/, | ||
| 323 | FALSE /*fPerUserRegistrationPerMachine*/, | ||
| 324 | TRUE /*fPerMachinePlanPerMachine*/, | ||
| 325 | FALSE /*fPerMachineRegistrationPerMachine*/ | ||
| 326 | ); | ||
| 327 | } | ||
| 328 | |||
| 329 | [Fact] | ||
| 330 | void PerUserAndPerMachineOrUserScopeTest() | ||
| 331 | { | ||
| 332 | ScopeTest( | ||
| 333 | L"PuPmouBundle_manifest.xml", | ||
| 334 | TRUE /*fDefaultPlanPerMachine*/, | ||
| 335 | FALSE /*fDefaultRegistrationPerMachine*/, | ||
| 336 | FALSE /*fPerUserPlanPerMachine*/, | ||
| 337 | FALSE /*fPerUserRegistrationPerMachine*/, | ||
| 338 | TRUE /*fPerMachinePlanPerMachine*/, | ||
| 339 | FALSE /*fPerMachineRegistrationPerMachine*/ | ||
| 340 | ); | ||
| 341 | } | ||
| 342 | |||
| 343 | [Fact] | ||
| 344 | void PerUserAndPerUserOrMachineScopeTest() | ||
| 345 | { | ||
| 346 | ScopeTest( | ||
| 347 | L"PuPuomBundle_manifest.xml", | ||
| 348 | FALSE /*fDefaultPlanPerMachine*/, | ||
| 349 | FALSE /*fDefaultRegistrationPerMachine*/, | ||
| 350 | FALSE /*fPerUserPlanPerMachine*/, | ||
| 351 | FALSE /*fPerUserRegistrationPerMachine*/, | ||
| 352 | TRUE /*fPerMachinePlanPerMachine*/, | ||
| 353 | FALSE /*fPerMachineRegistrationPerMachine*/ | ||
| 354 | ); | ||
| 355 | } | ||
| 356 | |||
| 357 | [Fact] | ||
| 52 | void ArpEntryExeInstallTest() | 358 | void ArpEntryExeInstallTest() |
| 53 | { | 359 | { |
| 54 | HRESULT hr = S_OK; | 360 | HRESULT hr = S_OK; |
| @@ -60,7 +366,7 @@ namespace Bootstrapper | |||
| 60 | DetectAttachedContainerAsAttached(pEngineState); | 366 | DetectAttachedContainerAsAttached(pEngineState); |
| 61 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | 367 | DetectPermanentPackagesAsPresentAndCached(pEngineState); |
| 62 | 368 | ||
| 63 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 369 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 64 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 370 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 65 | 371 | ||
| 66 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 372 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| @@ -154,12 +460,13 @@ namespace Bootstrapper | |||
| 154 | 460 | ||
| 155 | pEngineState->packages.rgPackages[1].currentState = BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE; | 461 | pEngineState->packages.rgPackages[1].currentState = BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE; |
| 156 | 462 | ||
| 157 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 463 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 158 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 464 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 159 | 465 | ||
| 160 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 466 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| 161 | NativeAssert::StringEqual(L"{9C459DAD-0E64-40C8-8C9F-4F68E46AB223}", pPlan->wzBundleCode); | 467 | NativeAssert::StringEqual(L"{9C459DAD-0E64-40C8-8C9F-4F68E46AB223}", pPlan->wzBundleCode); |
| 162 | NativeAssert::StringEqual(L"{9C459DAD-0E64-40C8-8C9F-4F68E46AB223}", pPlan->wzBundleProviderKey); | 468 | NativeAssert::StringEqual(L"{9C459DAD-0E64-40C8-8C9F-4F68E46AB223}", pPlan->wzBundleProviderKey); |
| 469 | |||
| 163 | Assert::Equal<BOOL>(FALSE, pPlan->fEnabledForwardCompatibleBundle); | 470 | Assert::Equal<BOOL>(FALSE, pPlan->fEnabledForwardCompatibleBundle); |
| 164 | Assert::Equal<BOOL>(FALSE, pPlan->fPerMachine); | 471 | Assert::Equal<BOOL>(FALSE, pPlan->fPerMachine); |
| 165 | Assert::Equal<BOOL>(TRUE, pPlan->fCanAffectMachineState); | 472 | Assert::Equal<BOOL>(TRUE, pPlan->fCanAffectMachineState); |
| @@ -233,7 +540,7 @@ namespace Bootstrapper | |||
| 233 | InitializeEngineStateForCorePlan(wzArpEntryExeManifestFileName, pEngineState); | 540 | InitializeEngineStateForCorePlan(wzArpEntryExeManifestFileName, pEngineState); |
| 234 | DetectPackagesAsPresentAndCached(pEngineState); | 541 | DetectPackagesAsPresentAndCached(pEngineState); |
| 235 | 542 | ||
| 236 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 543 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 237 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 544 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 238 | 545 | ||
| 239 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 546 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -326,9 +633,11 @@ namespace Bootstrapper | |||
| 326 | DetectPackagesAsAbsent(pEngineState); | 633 | DetectPackagesAsAbsent(pEngineState); |
| 327 | DetectRelatedBundle(pEngineState, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", L"1.0.0.0", BOOTSTRAPPER_RELATION_UPGRADE); | 634 | DetectRelatedBundle(pEngineState, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", L"1.0.0.0", BOOTSTRAPPER_RELATION_UPGRADE); |
| 328 | 635 | ||
| 329 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 636 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 330 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 637 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 331 | 638 | ||
| 639 | PlanDump(pPlan); | ||
| 640 | |||
| 332 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 641 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| 333 | NativeAssert::StringEqual(L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", pPlan->wzBundleCode); | 642 | NativeAssert::StringEqual(L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", pPlan->wzBundleCode); |
| 334 | NativeAssert::StringEqual(L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", pPlan->wzBundleProviderKey); | 643 | NativeAssert::StringEqual(L"{E6469F05-BDC8-4EB8-B218-67412543EFAA}", pPlan->wzBundleProviderKey); |
| @@ -486,7 +795,7 @@ namespace Bootstrapper | |||
| 486 | InitializeEngineStateForCorePlan(wzMsiTransactionManifestFileName, pEngineState); | 795 | InitializeEngineStateForCorePlan(wzMsiTransactionManifestFileName, pEngineState); |
| 487 | DetectPackagesAsPresentAndCached(pEngineState); | 796 | DetectPackagesAsPresentAndCached(pEngineState); |
| 488 | 797 | ||
| 489 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 798 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 490 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 799 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 491 | 800 | ||
| 492 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 801 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -627,7 +936,7 @@ namespace Bootstrapper | |||
| 627 | DetectAttachedContainerAsAttached(pEngineState); | 936 | DetectAttachedContainerAsAttached(pEngineState); |
| 628 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | 937 | DetectPermanentPackagesAsPresentAndCached(pEngineState); |
| 629 | 938 | ||
| 630 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 939 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 631 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 940 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 632 | 941 | ||
| 633 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 942 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| @@ -742,7 +1051,7 @@ namespace Bootstrapper | |||
| 742 | DetectAttachedContainerAsAttached(pEngineState); | 1051 | DetectAttachedContainerAsAttached(pEngineState); |
| 743 | DetectPackagesAsPresentAndCached(pEngineState); | 1052 | DetectPackagesAsPresentAndCached(pEngineState); |
| 744 | 1053 | ||
| 745 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_REPAIR); | 1054 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_REPAIR, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 746 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 1055 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 747 | 1056 | ||
| 748 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_REPAIR, pPlan->action); | 1057 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_REPAIR, pPlan->action); |
| @@ -836,7 +1145,7 @@ namespace Bootstrapper | |||
| 836 | DetectAttachedContainerAsAttached(pEngineState); | 1145 | DetectAttachedContainerAsAttached(pEngineState); |
| 837 | DetectPackagesAsPresentAndCached(pEngineState); | 1146 | DetectPackagesAsPresentAndCached(pEngineState); |
| 838 | 1147 | ||
| 839 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 1148 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 840 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 1149 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 841 | 1150 | ||
| 842 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 1151 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -955,7 +1264,7 @@ namespace Bootstrapper | |||
| 955 | DetectPackagesAsAbsent(pEngineState); | 1264 | DetectPackagesAsAbsent(pEngineState); |
| 956 | DetectCompatibleMsiPackage(pEngineState, pEngineState->packages.rgPackages, L"{C24F3903-38E7-4D44-8037-D9856B3C5046}", L"2.0.0.0"); | 1265 | DetectCompatibleMsiPackage(pEngineState, pEngineState->packages.rgPackages, L"{C24F3903-38E7-4D44-8037-D9856B3C5046}", L"2.0.0.0"); |
| 957 | 1266 | ||
| 958 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 1267 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 959 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 1268 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 960 | 1269 | ||
| 961 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 1270 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -1055,7 +1364,7 @@ namespace Bootstrapper | |||
| 1055 | vfUseRelatedBundlePlanType = TRUE; | 1364 | vfUseRelatedBundlePlanType = TRUE; |
| 1056 | vRelatedBundlePlanType = BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_UPGRADE; | 1365 | vRelatedBundlePlanType = BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_UPGRADE; |
| 1057 | 1366 | ||
| 1058 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 1367 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1059 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 1368 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1060 | 1369 | ||
| 1061 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 1370 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| @@ -1174,7 +1483,7 @@ namespace Bootstrapper | |||
| 1174 | BURN_RELATED_BUNDLE* pRelatedBundle = DetectRelatedBundle(pEngineState, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", L"0.9.0.0", BOOTSTRAPPER_RELATION_UPGRADE); | 1483 | BURN_RELATED_BUNDLE* pRelatedBundle = DetectRelatedBundle(pEngineState, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", L"0.9.0.0", BOOTSTRAPPER_RELATION_UPGRADE); |
| 1175 | pRelatedBundle->fPlannable = FALSE; | 1484 | pRelatedBundle->fPlannable = FALSE; |
| 1176 | 1485 | ||
| 1177 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 1486 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1178 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 1487 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1179 | 1488 | ||
| 1180 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 1489 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| @@ -1276,7 +1585,7 @@ namespace Bootstrapper | |||
| 1276 | DetectAttachedContainerAsAttached(pEngineState); | 1585 | DetectAttachedContainerAsAttached(pEngineState); |
| 1277 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | 1586 | DetectPermanentPackagesAsPresentAndCached(pEngineState); |
| 1278 | 1587 | ||
| 1279 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 1588 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1280 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 1589 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1281 | 1590 | ||
| 1282 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 1591 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| @@ -1369,7 +1678,7 @@ namespace Bootstrapper | |||
| 1369 | DetectAttachedContainerAsAttached(pEngineState); | 1678 | DetectAttachedContainerAsAttached(pEngineState); |
| 1370 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | 1679 | DetectPermanentPackagesAsPresentAndCached(pEngineState); |
| 1371 | 1680 | ||
| 1372 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_LAYOUT); | 1681 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_LAYOUT, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1373 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 1682 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1374 | 1683 | ||
| 1375 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_LAYOUT, pPlan->action); | 1684 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_LAYOUT, pPlan->action); |
| @@ -1452,7 +1761,7 @@ namespace Bootstrapper | |||
| 1452 | DetectPackagesAsAbsent(pEngineState); | 1761 | DetectPackagesAsAbsent(pEngineState); |
| 1453 | DetectRelatedBundle(pEngineState, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", L"0.9.0.0", BOOTSTRAPPER_RELATION_UPGRADE); | 1762 | DetectRelatedBundle(pEngineState, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", L"0.9.0.0", BOOTSTRAPPER_RELATION_UPGRADE); |
| 1454 | 1763 | ||
| 1455 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_CACHE); | 1764 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_CACHE, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1456 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 1765 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1457 | 1766 | ||
| 1458 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_CACHE, pPlan->action); | 1767 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_CACHE, pPlan->action); |
| @@ -1541,7 +1850,7 @@ namespace Bootstrapper | |||
| 1541 | DetectPackagesAsAbsent(pEngineState); | 1850 | DetectPackagesAsAbsent(pEngineState); |
| 1542 | DetectRelatedBundle(pEngineState, L"{AF8355C9-CCDD-4D61-BF5F-EA5F948D8F01}", L"1.1.0.0", BOOTSTRAPPER_RELATION_UPGRADE); | 1851 | DetectRelatedBundle(pEngineState, L"{AF8355C9-CCDD-4D61-BF5F-EA5F948D8F01}", L"1.1.0.0", BOOTSTRAPPER_RELATION_UPGRADE); |
| 1543 | 1852 | ||
| 1544 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 1853 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1545 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 1854 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1546 | 1855 | ||
| 1547 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 1856 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| @@ -1616,7 +1925,7 @@ namespace Bootstrapper | |||
| 1616 | vfUseRelatedBundleRequestState = TRUE; | 1925 | vfUseRelatedBundleRequestState = TRUE; |
| 1617 | vRelatedBundleRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT; | 1926 | vRelatedBundleRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT; |
| 1618 | 1927 | ||
| 1619 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 1928 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1620 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 1929 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1621 | 1930 | ||
| 1622 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 1931 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -1705,7 +2014,7 @@ namespace Bootstrapper | |||
| 1705 | vfUseRelatedBundleRequestState = TRUE; | 2014 | vfUseRelatedBundleRequestState = TRUE; |
| 1706 | vRelatedBundleRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT; | 2015 | vRelatedBundleRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT; |
| 1707 | 2016 | ||
| 1708 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 2017 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1709 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2018 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1710 | 2019 | ||
| 1711 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 2020 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| @@ -1798,7 +2107,7 @@ namespace Bootstrapper | |||
| 1798 | DetectPackagesAsAbsent(pEngineState); | 2107 | DetectPackagesAsAbsent(pEngineState); |
| 1799 | DetectRelatedBundle(pEngineState, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", L"0.9.0.0", BOOTSTRAPPER_RELATION_UPGRADE); | 2108 | DetectRelatedBundle(pEngineState, L"{FD9920AD-DBCA-4C6C-8CD5-B47431CE8D21}", L"0.9.0.0", BOOTSTRAPPER_RELATION_UPGRADE); |
| 1800 | 2109 | ||
| 1801 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 2110 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1802 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2111 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1803 | 2112 | ||
| 1804 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 2113 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| @@ -1904,7 +2213,7 @@ namespace Bootstrapper | |||
| 1904 | 2213 | ||
| 1905 | pEngineState->registration.detectedRegistrationType = BOOTSTRAPPER_REGISTRATION_TYPE_FULL; | 2214 | pEngineState->registration.detectedRegistrationType = BOOTSTRAPPER_REGISTRATION_TYPE_FULL; |
| 1906 | 2215 | ||
| 1907 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_MODIFY); | 2216 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_MODIFY, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1908 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2217 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1909 | 2218 | ||
| 1910 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_MODIFY, pPlan->action); | 2219 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_MODIFY, pPlan->action); |
| @@ -1983,7 +2292,7 @@ namespace Bootstrapper | |||
| 1983 | InitializeEngineStateForCorePlan(wzSingleMsiManifestFileName, pEngineState); | 2292 | InitializeEngineStateForCorePlan(wzSingleMsiManifestFileName, pEngineState); |
| 1984 | DetectPackagesAsPresentAndCached(pEngineState); | 2293 | DetectPackagesAsPresentAndCached(pEngineState); |
| 1985 | 2294 | ||
| 1986 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 2295 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 1987 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2296 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 1988 | 2297 | ||
| 1989 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 2298 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -2084,7 +2393,7 @@ namespace Bootstrapper | |||
| 2084 | DetectPackagesAsPresentAndCached(pEngineState); | 2393 | DetectPackagesAsPresentAndCached(pEngineState); |
| 2085 | DetectBundleDependent(pEngineState, L"{29855EB1-724D-4285-A89C-5D37D8549DCD}"); | 2394 | DetectBundleDependent(pEngineState, L"{29855EB1-724D-4285-A89C-5D37D8549DCD}"); |
| 2086 | 2395 | ||
| 2087 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 2396 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 2088 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2397 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 2089 | 2398 | ||
| 2090 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 2399 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -2154,7 +2463,7 @@ namespace Bootstrapper | |||
| 2154 | InitializeEngineStateForCorePlan(wzSingleMsiManifestFileName, pEngineState); | 2463 | InitializeEngineStateForCorePlan(wzSingleMsiManifestFileName, pEngineState); |
| 2155 | DetectAsRelatedUpgradeBundle(&engineState, L"{02940F3E-C83E-452D-BFCF-C943777ACEAE}", L"2.0.0.0"); | 2464 | DetectAsRelatedUpgradeBundle(&engineState, L"{02940F3E-C83E-452D-BFCF-C943777ACEAE}", L"2.0.0.0"); |
| 2156 | 2465 | ||
| 2157 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 2466 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 2158 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2467 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 2159 | 2468 | ||
| 2160 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 2469 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -2240,7 +2549,7 @@ namespace Bootstrapper | |||
| 2240 | pEngineState->packages.rgPackages[0].currentState = BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED; | 2549 | pEngineState->packages.rgPackages[0].currentState = BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED; |
| 2241 | pEngineState->packages.rgPackages[0].Msi.operation = BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE; | 2550 | pEngineState->packages.rgPackages[0].Msi.operation = BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE; |
| 2242 | 2551 | ||
| 2243 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 2552 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 2244 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2553 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 2245 | 2554 | ||
| 2246 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 2555 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -2328,7 +2637,7 @@ namespace Bootstrapper | |||
| 2328 | InitializeEngineStateForCorePlan(wzSingleMsiManifestFileName, pEngineState); | 2637 | InitializeEngineStateForCorePlan(wzSingleMsiManifestFileName, pEngineState); |
| 2329 | DetectPackagesAsPresentAndCached(pEngineState); | 2638 | DetectPackagesAsPresentAndCached(pEngineState); |
| 2330 | 2639 | ||
| 2331 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL); | 2640 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 2332 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2641 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 2333 | 2642 | ||
| 2334 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL, pPlan->action); | 2643 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL, pPlan->action); |
| @@ -2430,7 +2739,7 @@ namespace Bootstrapper | |||
| 2430 | DetectAttachedContainerAsAttached(pEngineState); | 2739 | DetectAttachedContainerAsAttached(pEngineState); |
| 2431 | DetectPackagesAsAbsent(pEngineState); | 2740 | DetectPackagesAsAbsent(pEngineState); |
| 2432 | 2741 | ||
| 2433 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 2742 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 2434 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2743 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 2435 | 2744 | ||
| 2436 | llPlannedAction = VariableGetNumericHelper(&engineState.variables, BURN_BUNDLE_ACTION); | 2745 | llPlannedAction = VariableGetNumericHelper(&engineState.variables, BURN_BUNDLE_ACTION); |
| @@ -2523,7 +2832,7 @@ namespace Bootstrapper | |||
| 2523 | DetectPermanentPackagesAsPresentAndCached(pEngineState); | 2832 | DetectPermanentPackagesAsPresentAndCached(pEngineState); |
| 2524 | PlanTestDetectPatchInitialize(pEngineState); | 2833 | PlanTestDetectPatchInitialize(pEngineState); |
| 2525 | 2834 | ||
| 2526 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 2835 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 2527 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2836 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 2528 | 2837 | ||
| 2529 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 2838 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| @@ -2587,8 +2896,14 @@ namespace Bootstrapper | |||
| 2587 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{22D1DDBA-284D-40A7-BD14-95EA07906F21}", registerActions1, 1); | 2896 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PackageA", L"{22D1DDBA-284D-40A7-BD14-95EA07906F21}", registerActions1, 1); |
| 2588 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 2897 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 2589 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 2898 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 2899 | |||
| 2900 | |||
| 2590 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PatchA", registerActions1, 1); | 2901 | ValidateExecutePackageProvider(pPlan, fRollback, dwIndex++, L"PatchA", registerActions1, 1); |
| 2902 | |||
| 2903 | |||
| 2591 | pExecuteAction = ValidateDeletedExecuteMspTarget(pPlan, fRollback, dwIndex++, L"PatchA", BOOTSTRAPPER_ACTION_STATE_INSTALL, L"{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}", TRUE, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER, TRUE); | 2904 | pExecuteAction = ValidateDeletedExecuteMspTarget(pPlan, fRollback, dwIndex++, L"PatchA", BOOTSTRAPPER_ACTION_STATE_INSTALL, L"{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}", TRUE, BURN_MSI_PROPERTY_INSTALL, INSTALLUILEVEL_NONE, FALSE, BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER, TRUE); |
| 2905 | |||
| 2906 | |||
| 2592 | ValidateExecuteMspTargetPatch(pExecuteAction, 0, L"PatchA"); | 2907 | ValidateExecuteMspTargetPatch(pExecuteAction, 0, L"PatchA"); |
| 2593 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); | 2908 | ValidateExecuteCheckpoint(pPlan, fRollback, dwIndex++, dwExecuteCheckpointId++); |
| 2594 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PatchA", L"{22D1DDBA-284D-40A7-BD14-95EA07906F21}", registerActions1, 1); | 2909 | ValidateExecutePackageDependency(pPlan, fRollback, dwIndex++, L"PatchA", L"{22D1DDBA-284D-40A7-BD14-95EA07906F21}", registerActions1, 1); |
| @@ -2654,7 +2969,7 @@ namespace Bootstrapper | |||
| 2654 | InitializeEngineStateForCorePlan(wzSlipstreamManifestFileName, pEngineState); | 2969 | InitializeEngineStateForCorePlan(wzSlipstreamManifestFileName, pEngineState); |
| 2655 | DetectPackagesAsPresentAndCached(pEngineState); | 2970 | DetectPackagesAsPresentAndCached(pEngineState); |
| 2656 | 2971 | ||
| 2657 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 2972 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 2658 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 2973 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 2659 | 2974 | ||
| 2660 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 2975 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -2784,7 +3099,7 @@ namespace Bootstrapper | |||
| 2784 | vfUsePackageRequestState = TRUE; | 3099 | vfUsePackageRequestState = TRUE; |
| 2785 | vPackageRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT; | 3100 | vPackageRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT; |
| 2786 | 3101 | ||
| 2787 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL); | 3102 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_UNINSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 2788 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 3103 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 2789 | 3104 | ||
| 2790 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); | 3105 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_UNINSTALL, pPlan->action); |
| @@ -2885,7 +3200,7 @@ namespace Bootstrapper | |||
| 2885 | InitializeEngineStateForCorePlan(wzSlipstreamModifiedManifestFileName, pEngineState); | 3200 | InitializeEngineStateForCorePlan(wzSlipstreamModifiedManifestFileName, pEngineState); |
| 2886 | DetectPackagesAsAbsent(pEngineState); | 3201 | DetectPackagesAsAbsent(pEngineState); |
| 2887 | 3202 | ||
| 2888 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL); | 3203 | hr = CorePlan(pEngineState, BOOTSTRAPPER_ACTION_INSTALL, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 2889 | NativeAssert::Succeeded(hr, "CorePlan failed"); | 3204 | NativeAssert::Succeeded(hr, "CorePlan failed"); |
| 2890 | 3205 | ||
| 2891 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); | 3206 | Assert::Equal<DWORD>(BOOTSTRAPPER_ACTION_INSTALL, pPlan->action); |
| @@ -3031,7 +3346,7 @@ namespace Bootstrapper | |||
| 3031 | Assert::True(FileExistsEx(sczFilePath, NULL), "Test file does not exist."); | 3346 | Assert::True(FileExistsEx(sczFilePath, NULL), "Test file does not exist."); |
| 3032 | 3347 | ||
| 3033 | hr = ManifestLoadXmlFromFile(sczFilePath, pEngineState); | 3348 | hr = ManifestLoadXmlFromFile(sczFilePath, pEngineState); |
| 3034 | NativeAssert::Succeeded(hr, "Failed to load manifest."); | 3349 | NativeAssert::Succeeded(hr, "Failed to load test manifest."); |
| 3035 | } | 3350 | } |
| 3036 | finally | 3351 | finally |
| 3037 | { | 3352 | { |
| @@ -3222,7 +3537,7 @@ namespace Bootstrapper | |||
| 3222 | for (DWORD j = 0; j < pPackage->Msi.cSlipstreamMspPackages; ++j) | 3537 | for (DWORD j = 0; j < pPackage->Msi.cSlipstreamMspPackages; ++j) |
| 3223 | { | 3538 | { |
| 3224 | BURN_PACKAGE* pMspPackage = pPackage->Msi.rgSlipstreamMsps[j].pMspPackage; | 3539 | BURN_PACKAGE* pMspPackage = pPackage->Msi.rgSlipstreamMsps[j].pMspPackage; |
| 3225 | MspEngineAddDetectedTargetProduct(&pEngineState->packages, pMspPackage, j, pPackage->Msi.sczProductCode, pPackage->fPerMachine ? MSIINSTALLCONTEXT_MACHINE : MSIINSTALLCONTEXT_USERUNMANAGED); | 3540 | MspEngineAddDetectedTargetProduct(&pEngineState->packages, pMspPackage, j, pPackage->Msi.sczProductCode, pPackage->scope == BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE ? MSIINSTALLCONTEXT_MACHINE : MSIINSTALLCONTEXT_USERUNMANAGED); |
| 3226 | 3541 | ||
| 3227 | BURN_MSPTARGETPRODUCT* pTargetProduct = pMspPackage->Msp.rgTargetProducts + (pMspPackage->Msp.cTargetProductCodes - 1); | 3542 | BURN_MSPTARGETPRODUCT* pTargetProduct = pMspPackage->Msp.rgTargetProducts + (pMspPackage->Msp.cTargetProductCodes - 1); |
| 3228 | pTargetProduct->patchPackageState = BOOTSTRAPPER_PACKAGE_STATE_PRESENT; | 3543 | pTargetProduct->patchPackageState = BOOTSTRAPPER_PACKAGE_STATE_PRESENT; |
| @@ -3759,8 +4074,8 @@ namespace Bootstrapper | |||
| 3759 | void ValidatePlannedProvider( | 4074 | void ValidatePlannedProvider( |
| 3760 | __in BURN_PLAN* pPlan, | 4075 | __in BURN_PLAN* pPlan, |
| 3761 | __in UINT uIndex, | 4076 | __in UINT uIndex, |
| 3762 | __in LPCWSTR wzKey, | 4077 | __in_z LPCWSTR wzKey, |
| 3763 | __in LPCWSTR wzName | 4078 | __in_z_opt LPCWSTR wzName |
| 3764 | ) | 4079 | ) |
| 3765 | { | 4080 | { |
| 3766 | Assert::InRange(uIndex + 1u, 1u, pPlan->cPlannedProviders); | 4081 | Assert::InRange(uIndex + 1u, 1u, pPlan->cPlannedProviders); |
| @@ -3811,8 +4126,6 @@ namespace Bootstrapper | |||
| 3811 | } | 4126 | } |
| 3812 | } | 4127 | } |
| 3813 | } | 4128 | } |
| 3814 | } | ||
| 3815 | } | ||
| 3816 | 4129 | ||
| 3817 | #if TODO_REIMPLEMENT | 4130 | #if TODO_REIMPLEMENT |
| 3818 | 4131 | ||
diff --git a/src/burn/test/BurnUnitTest/RegistrationTest.cpp b/src/burn/test/BurnUnitTest/RegistrationTest.cpp index 3068eb6a..1c43c442 100644 --- a/src/burn/test/BurnUnitTest/RegistrationTest.cpp +++ b/src/burn/test/BurnUnitTest/RegistrationTest.cpp | |||
| @@ -9,11 +9,7 @@ | |||
| 9 | #define TEST_BUNDLE_UPGRADE_CODE L"{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}" | 9 | #define TEST_BUNDLE_UPGRADE_CODE L"{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}" |
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | namespace Microsoft | 12 | namespace WixToolset |
| 13 | { | ||
| 14 | namespace Tools | ||
| 15 | { | ||
| 16 | namespace WindowsInstallerXml | ||
| 17 | { | 13 | { |
| 18 | namespace Test | 14 | namespace Test |
| 19 | { | 15 | { |
| @@ -73,7 +69,7 @@ namespace Bootstrapper | |||
| 73 | L" <UX PrimaryPayloadId='ux.exe'>" | 69 | L" <UX PrimaryPayloadId='ux.exe'>" |
| 74 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" | 70 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" |
| 75 | L" </UX>" | 71 | L" </UX>" |
| 76 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" | 72 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Scope='peruser' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe'>" |
| 77 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" | 73 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" |
| 78 | L" </Registration>" | 74 | L" </Registration>" |
| 79 | L"</Bundle>"; | 75 | L"</Bundle>"; |
| @@ -93,6 +89,12 @@ namespace Bootstrapper | |||
| 93 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); | 89 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); |
| 94 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); | 90 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); |
| 95 | 91 | ||
| 92 | hr = RegistrationSetPaths(®istration, &cache); | ||
| 93 | TestThrowOnFailure(hr, "Failed to set registration paths."); | ||
| 94 | |||
| 95 | hr = RegistrationPlanInitialize(®istration); | ||
| 96 | TestThrowOnFailure(hr, "Failed to initialize registration for the plan."); | ||
| 97 | |||
| 96 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; | 98 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
| 97 | plan.pCommand = &command; | 99 | plan.pCommand = &command; |
| 98 | plan.pInternalCommand = &internalCommand; | 100 | plan.pInternalCommand = &internalCommand; |
| @@ -173,7 +175,7 @@ namespace Bootstrapper | |||
| 173 | L" <UX PrimaryPayloadId='ux.exe'>" | 175 | L" <UX PrimaryPayloadId='ux.exe'>" |
| 174 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" | 176 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" |
| 175 | L" </UX>" | 177 | L" </UX>" |
| 176 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" | 178 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Scope='peruser' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe'>" |
| 177 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='Product1' InProgressDisplayName='Product1 Installation' DisplayVersion='1.0.0.0' />" | 179 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='Product1' InProgressDisplayName='Product1 Installation' DisplayVersion='1.0.0.0' />" |
| 178 | L" </Registration>" | 180 | L" </Registration>" |
| 179 | L"</Bundle>"; | 181 | L"</Bundle>"; |
| @@ -193,6 +195,12 @@ namespace Bootstrapper | |||
| 193 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); | 195 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); |
| 194 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); | 196 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); |
| 195 | 197 | ||
| 198 | hr = RegistrationSetPaths(®istration, &cache); | ||
| 199 | TestThrowOnFailure(hr, "Failed to set registration paths."); | ||
| 200 | |||
| 201 | hr = RegistrationPlanInitialize(®istration); | ||
| 202 | TestThrowOnFailure(hr, "Failed to initialize registration for the plan."); | ||
| 203 | |||
| 196 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; | 204 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
| 197 | plan.pCommand = &command; | 205 | plan.pCommand = &command; |
| 198 | plan.pInternalCommand = &internalCommand; | 206 | plan.pInternalCommand = &internalCommand; |
| @@ -294,7 +302,7 @@ namespace Bootstrapper | |||
| 294 | L" <UX PrimaryPayloadId='ux.exe'>" | 302 | L" <UX PrimaryPayloadId='ux.exe'>" |
| 295 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" | 303 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" |
| 296 | L" </UX>" | 304 | L" </UX>" |
| 297 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='bar' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" | 305 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Scope='peruser' Tag='foo' ProviderKey='bar' Version='1.0.0.0' ExecutableName='setup.exe'>" |
| 298 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='Product1' DisplayVersion='1.0.0.0' />" | 306 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='Product1' DisplayVersion='1.0.0.0' />" |
| 299 | L" </Registration>" | 307 | L" </Registration>" |
| 300 | L"</Bundle>"; | 308 | L"</Bundle>"; |
| @@ -314,6 +322,12 @@ namespace Bootstrapper | |||
| 314 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); | 322 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); |
| 315 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); | 323 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); |
| 316 | 324 | ||
| 325 | hr = RegistrationSetPaths(®istration, &cache); | ||
| 326 | TestThrowOnFailure(hr, "Failed to set registration paths."); | ||
| 327 | |||
| 328 | hr = RegistrationPlanInitialize(®istration); | ||
| 329 | TestThrowOnFailure(hr, "Failed to initialize registration for the plan."); | ||
| 330 | |||
| 317 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; | 331 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
| 318 | plan.pCommand = &command; | 332 | plan.pCommand = &command; |
| 319 | plan.pInternalCommand = &internalCommand; | 333 | plan.pInternalCommand = &internalCommand; |
| @@ -415,7 +429,7 @@ namespace Bootstrapper | |||
| 415 | L" <UX PrimaryPayloadId='ux.exe'>" | 429 | L" <UX PrimaryPayloadId='ux.exe'>" |
| 416 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" | 430 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" |
| 417 | L" </UX>" | 431 | L" </UX>" |
| 418 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" | 432 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Scope='peruser' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe'>" |
| 419 | L" <Arp Register='yes' DisplayName='DisplayName1' DisplayVersion='1.2.3.4' Publisher='Publisher1' HelpLink='http://www.microsoft.com/help'" | 433 | L" <Arp Register='yes' DisplayName='DisplayName1' DisplayVersion='1.2.3.4' Publisher='Publisher1' HelpLink='http://www.microsoft.com/help'" |
| 420 | L" HelpTelephone='555-555-5555' AboutUrl='http://www.microsoft.com/about' UpdateUrl='http://www.microsoft.com/update'" | 434 | L" HelpTelephone='555-555-5555' AboutUrl='http://www.microsoft.com/about' UpdateUrl='http://www.microsoft.com/update'" |
| 421 | L" Comments='Comments1' Contact='Contact1' DisableModify='yes' DisableRemove='yes' />" | 435 | L" Comments='Comments1' Contact='Contact1' DisableModify='yes' DisableRemove='yes' />" |
| @@ -437,6 +451,12 @@ namespace Bootstrapper | |||
| 437 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); | 451 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); |
| 438 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); | 452 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); |
| 439 | 453 | ||
| 454 | hr = RegistrationSetPaths(®istration, &cache); | ||
| 455 | TestThrowOnFailure(hr, "Failed to set registration paths."); | ||
| 456 | |||
| 457 | hr = RegistrationPlanInitialize(®istration); | ||
| 458 | TestThrowOnFailure(hr, "Failed to initialize registration for the plan."); | ||
| 459 | |||
| 440 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; | 460 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
| 441 | plan.pCommand = &command; | 461 | plan.pCommand = &command; |
| 442 | plan.pInternalCommand = &internalCommand; | 462 | plan.pInternalCommand = &internalCommand; |
| @@ -554,7 +574,7 @@ namespace Bootstrapper | |||
| 554 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" | 574 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" |
| 555 | L" </UX>" | 575 | L" </UX>" |
| 556 | L" <RelatedBundle Code='" TEST_BUNDLE_UPGRADE_CODE L"' Action='Upgrade' />" | 576 | L" <RelatedBundle Code='" TEST_BUNDLE_UPGRADE_CODE L"' Action='Upgrade' />" |
| 557 | L" <Registration Code='" TEST_BUNDLE_ID L"' Tag='foo' ProviderKey='" TEST_BUNDLE_ID L"' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" | 577 | L" <Registration Code='" TEST_BUNDLE_ID L"' Scope='peruser' Tag='foo' ProviderKey='" TEST_BUNDLE_ID L"' Version='1.0.0.0' ExecutableName='setup.exe'>" |
| 558 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" | 578 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" |
| 559 | L" </Registration>" | 579 | L" </Registration>" |
| 560 | L" <Variable Id='MyBurnVariable1' Type='numeric' Value='0' Hidden='no' Persisted='yes' />" | 580 | L" <Variable Id='MyBurnVariable1' Type='numeric' Value='0' Hidden='no' Persisted='yes' />" |
| @@ -582,6 +602,12 @@ namespace Bootstrapper | |||
| 582 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); | 602 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); |
| 583 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); | 603 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); |
| 584 | 604 | ||
| 605 | hr = RegistrationSetPaths(®istration, &cache); | ||
| 606 | TestThrowOnFailure(hr, "Failed to set registration paths."); | ||
| 607 | |||
| 608 | hr = RegistrationPlanInitialize(®istration); | ||
| 609 | TestThrowOnFailure(hr, "Failed to initialize registration for the plan."); | ||
| 610 | |||
| 585 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; | 611 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
| 586 | plan.pCommand = &command; | 612 | plan.pCommand = &command; |
| 587 | plan.pInternalCommand = &internalCommand; | 613 | plan.pInternalCommand = &internalCommand; |
| @@ -694,7 +720,7 @@ namespace Bootstrapper | |||
| 694 | L" <UX PrimaryPayloadId='ux.exe'>" | 720 | L" <UX PrimaryPayloadId='ux.exe'>" |
| 695 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" | 721 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' Hash='000000000000' />" |
| 696 | L" </UX>" | 722 | L" </UX>" |
| 697 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" | 723 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' UpgradeCode='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Scope='peruser' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe'>" |
| 698 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" | 724 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" |
| 699 | L" </Registration>" | 725 | L" </Registration>" |
| 700 | L" <Variable Id='MyBurnVariable1' Type='numeric' Value='0' Hidden='no' Persisted='yes' />" | 726 | L" <Variable Id='MyBurnVariable1' Type='numeric' Value='0' Hidden='no' Persisted='yes' />" |
| @@ -720,6 +746,12 @@ namespace Bootstrapper | |||
| 720 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); | 746 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); |
| 721 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); | 747 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); |
| 722 | 748 | ||
| 749 | hr = RegistrationSetPaths(®istration, &cache); | ||
| 750 | TestThrowOnFailure(hr, "Failed to set registration paths."); | ||
| 751 | |||
| 752 | hr = RegistrationPlanInitialize(®istration); | ||
| 753 | TestThrowOnFailure(hr, "Failed to initialize registration for the plan."); | ||
| 754 | |||
| 723 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; | 755 | plan.action = BOOTSTRAPPER_ACTION_INSTALL; |
| 724 | plan.pCommand = &command; | 756 | plan.pCommand = &command; |
| 725 | plan.pInternalCommand = &internalCommand; | 757 | plan.pInternalCommand = &internalCommand; |
| @@ -882,5 +914,3 @@ namespace Bootstrapper | |||
| 882 | } | 914 | } |
| 883 | } | 915 | } |
| 884 | } | 916 | } |
| 885 | } | ||
| 886 | } | ||
diff --git a/src/burn/test/BurnUnitTest/RelatedBundleTest.cpp b/src/burn/test/BurnUnitTest/RelatedBundleTest.cpp index 9feb85d6..dcccc589 100644 --- a/src/burn/test/BurnUnitTest/RelatedBundleTest.cpp +++ b/src/burn/test/BurnUnitTest/RelatedBundleTest.cpp | |||
| @@ -3,11 +3,7 @@ | |||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | namespace Microsoft | 6 | namespace WixToolset |
| 7 | { | ||
| 8 | namespace Tools | ||
| 9 | { | ||
| 10 | namespace WindowsInstallerXml | ||
| 11 | { | 7 | { |
| 12 | namespace Test | 8 | namespace Test |
| 13 | { | 9 | { |
| @@ -49,7 +45,7 @@ namespace Bootstrapper | |||
| 49 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' />" | 45 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' />" |
| 50 | L" </UX>" | 46 | L" </UX>" |
| 51 | L" <RelatedBundle Code='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Action='Upgrade' />" | 47 | L" <RelatedBundle Code='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Action='Upgrade' />" |
| 52 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe' PerMachine='yes'>" | 48 | L" <Registration Code='{D54F896D-1952-43E6-9C67-B5652240618C}' Tag='foo' ProviderKey='foo' Version='1.0.0.0' ExecutableName='setup.exe'>" |
| 53 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" | 49 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='1.0.0.0' />" |
| 54 | L" </Registration>" | 50 | L" </Registration>" |
| 55 | L"</Bundle>"; | 51 | L"</Bundle>"; |
| @@ -63,7 +59,7 @@ namespace Bootstrapper | |||
| 63 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); | 59 | hr = RegistrationParseFromXml(®istration, &cache, pixeBundle); |
| 64 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); | 60 | TestThrowOnFailure(hr, L"Failed to parse registration from XML."); |
| 65 | 61 | ||
| 66 | RelatedBundlesInitializeForScope(registration.fPerMachine, ®istration, &relatedBundles); | 62 | RelatedBundlesInitializeForScope(/*registration.fPlannedPerMachineScope*/TRUE, ®istration, &relatedBundles); |
| 67 | 63 | ||
| 68 | Assert::Equal(1lu, relatedBundles.cRelatedBundles); | 64 | Assert::Equal(1lu, relatedBundles.cRelatedBundles); |
| 69 | 65 | ||
| @@ -101,7 +97,7 @@ namespace Bootstrapper | |||
| 101 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' />" | 97 | L" <Payload Id='ux.exe' FilePath='ux.exe' Packaging='embedded' SourcePath='ux.exe' />" |
| 102 | L" </UX>" | 98 | L" </UX>" |
| 103 | L" <RelatedBundle Code='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Action='Upgrade' />" | 99 | L" <RelatedBundle Code='{89FDAE1F-8CC1-48B9-B930-3945E0D3E7F0}' Action='Upgrade' />" |
| 104 | L" <Registration Code='{3DB49D3D-1FB8-4147-A465-BBE8BFD0DAD0}' Tag='foo' ProviderKey='foo' Version='4.0.0.0' ExecutableName='setup.exe' PerMachine='no'>" | 100 | L" <Registration Code='{3DB49D3D-1FB8-4147-A465-BBE8BFD0DAD0}' Tag='foo' ProviderKey='foo' Version='4.0.0.0' ExecutableName='setup.exe'>" |
| 105 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='4.0.0.0' />" | 101 | L" <Arp Register='yes' Publisher='WiX Toolset' DisplayName='RegisterBasicTest' DisplayVersion='4.0.0.0' />" |
| 106 | L" </Registration>" | 102 | L" </Registration>" |
| 107 | L"</Bundle>"; | 103 | L"</Bundle>"; |
| @@ -195,5 +191,3 @@ namespace Bootstrapper | |||
| 195 | } | 191 | } |
| 196 | } | 192 | } |
| 197 | } | 193 | } |
| 198 | } | ||
| 199 | } | ||
diff --git a/src/burn/test/BurnUnitTest/SearchTest.cpp b/src/burn/test/BurnUnitTest/SearchTest.cpp index e3c714cb..ac6119de 100644 --- a/src/burn/test/BurnUnitTest/SearchTest.cpp +++ b/src/burn/test/BurnUnitTest/SearchTest.cpp | |||
| @@ -33,11 +33,7 @@ using namespace System; | |||
| 33 | using namespace Xunit; | 33 | using namespace Xunit; |
| 34 | using namespace Microsoft::Win32; | 34 | using namespace Microsoft::Win32; |
| 35 | 35 | ||
| 36 | namespace Microsoft | 36 | namespace WixToolset |
| 37 | { | ||
| 38 | namespace Tools | ||
| 39 | { | ||
| 40 | namespace WindowsInstallerXml | ||
| 41 | { | 37 | { |
| 42 | namespace Test | 38 | namespace Test |
| 43 | { | 39 | { |
| @@ -595,8 +591,6 @@ namespace Bootstrapper | |||
| 595 | } | 591 | } |
| 596 | } | 592 | } |
| 597 | } | 593 | } |
| 598 | } | ||
| 599 | } | ||
| 600 | 594 | ||
| 601 | 595 | ||
| 602 | static INSTALLSTATE WINAPI MsiComponentSearchTest_MsiGetComponentPathW( | 596 | static INSTALLSTATE WINAPI MsiComponentSearchTest_MsiGetComponentPathW( |
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/AllPmouBundle_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/AllPmouBundle_manifest.xml new file mode 100644 index 00000000..8be9f5b9 --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/AllPmouBundle_manifest.xml | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="AllPmouBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{F5172FB5-DC8E-5671-A533-A6C4ED8B226A}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="65634" Hash="142E90105EC2705DA169B29ED252A7829AA9EF3CC9B55EB5CD47DFC93035B57E7C1C1E64D1D92C9B54BA4653A5D0B18CFD675E4B7A5AEA7B833D643D84DF8B96" FilePath="AllPmouBundle.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="PmouPkg1.msi" FilePath="PmouPkg1.msi" FileSize="32768" Hash="BCBB4F1C48953D23BE56CD7D5005BB38CB02C7BAC4AF30F87B7ADF7715EA721D28A3FCFC025D26FD5DC069BAB69F462577C3212C1BFE3707FCCE60FF3F3ED12C" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <Payload Id="PmouPkg2.msi" FilePath="PmouPkg2.msi" FileSize="32768" Hash="C3BABBCCC0FDA4ACE44D28C60FAB2CA76C00655A405CF6F7A3593F9130FCF47AD18C4DAE1A32D5C0177F58DBAE00CBF7EDCA027BEE19B96E0145A3FA00811B51" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | ||
| 16 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 17 | <Registration BundleId="AllPmouBundle" Code="{CA3BE971-4A75-46D1-BA74-005F9C7B8F6F}" ExecutableName="AllPmouBundle.exe" Scope="perMachineOrUser" Tag="" Version="1.0.0.0" ProviderKey="{CA3BE971-4A75-46D1-BA74-005F9C7B8F6F}"> | ||
| 18 | <Arp DisplayName="AllPmouBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 19 | </Registration> | ||
| 20 | <Chain> | ||
| 21 | <MsiPackage Id="PmouPkg1.msi" Cache="keep" CacheId="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}v1.0.0.0" InstallSize="279" Size="32768" Scope="perMachineOrUser" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PmouPkg1.msi" RollbackLogPathVariable="WixBundleRollbackLog_PmouPkg1.msi" ProductCode="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}" Language="1033" Version="1.0.0.0" UpgradeCode="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}"> | ||
| 22 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 23 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 24 | <Provides Key="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}_v1.0.0.0" Version="1.0.0.0" DisplayName="PmouPkg1" /> | ||
| 25 | <RelatedPackage Id="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 26 | <Language Id="1033" /> | ||
| 27 | </RelatedPackage> | ||
| 28 | <RelatedPackage Id="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 29 | <Language Id="1033" /> | ||
| 30 | </RelatedPackage> | ||
| 31 | <PayloadRef Id="PmouPkg1.msi" /> | ||
| 32 | </MsiPackage> | ||
| 33 | <MsiPackage Id="PmouPkg2.msi" Cache="keep" CacheId="{1B1D793E-4026-48CA-B088-F919E70440AC}v1.0.0.0" InstallSize="279" Size="32768" Scope="perMachineOrUser" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PmouPkg2.msi" RollbackLogPathVariable="WixBundleRollbackLog_PmouPkg2.msi" ProductCode="{1B1D793E-4026-48CA-B088-F919E70440AC}" Language="1033" Version="1.0.0.0" UpgradeCode="{98F763B3-EA17-5AE5-AD47-21004FB34B24}"> | ||
| 34 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 35 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 36 | <Provides Key="{1B1D793E-4026-48CA-B088-F919E70440AC}_v1.0.0.0" Version="1.0.0.0" DisplayName="PmouPkg2" /> | ||
| 37 | <RelatedPackage Id="{98F763B3-EA17-5AE5-AD47-21004FB34B24}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 38 | <Language Id="1033" /> | ||
| 39 | </RelatedPackage> | ||
| 40 | <RelatedPackage Id="{98F763B3-EA17-5AE5-AD47-21004FB34B24}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 41 | <Language Id="1033" /> | ||
| 42 | </RelatedPackage> | ||
| 43 | <PayloadRef Id="PmouPkg2.msi" /> | ||
| 44 | </MsiPackage> | ||
| 45 | </Chain> | ||
| 46 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/AllPuomBundle_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/AllPuomBundle_manifest.xml new file mode 100644 index 00000000..a3cbd183 --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/AllPuomBundle_manifest.xml | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="AllPuomBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{689DDFCE-6492-596F-92DC-341CCDF59ABB}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="65634" Hash="541AB7BED551A38137C7C965D46FF4817DE6E22C89AF98EC9461939024D6B39E7ACF9C3F526F4B567E73364289E7CE24FD84973F7B2151514F09E165FABE6234" FilePath="AllPuomBundle.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="PuomPkg1.msi" FilePath="PuomPkg1.msi" FileSize="32768" Hash="EF19E061C2647AD42E39A1721299D5D970F1E42CE6636ACA53009DC0D0D1F8B6F2FD516B7D3EEDAAF1EEDA364D54DA6C18FB929C385EC1BDDA08AEA50370B357" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <Payload Id="PuomPkg2.msi" FilePath="PuomPkg2.msi" FileSize="32768" Hash="F927CE9CD3272AF6571E39C72A68E6BD6808D944B6893B09253887B1942E1C043EC5E1E1E758D3C261FF8B566121EE809C4CBCB931D00EBF14CC6CFE24001292" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | ||
| 16 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 17 | <Registration BundleId="AllPuomBundle" Code="{37A6F602-178E-4A32-B766-EDC2CB81274B}" ExecutableName="AllPuomBundle.exe" Scope="perUserOrMachine" Tag="" Version="1.0.0.0" ProviderKey="{37A6F602-178E-4A32-B766-EDC2CB81274B}"> | ||
| 18 | <Arp DisplayName="AllPuomBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 19 | </Registration> | ||
| 20 | <Chain> | ||
| 21 | <MsiPackage Id="PuomPkg1.msi" Cache="keep" CacheId="{167C572B-D847-4BCF-9693-C8B5EB6350CD}v1.0.0.0" InstallSize="279" Size="32768" Scope="perUserOrMachine" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PuomPkg1.msi" RollbackLogPathVariable="WixBundleRollbackLog_PuomPkg1.msi" ProductCode="{167C572B-D847-4BCF-9693-C8B5EB6350CD}" Language="1033" Version="1.0.0.0" UpgradeCode="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}"> | ||
| 22 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 23 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 24 | <Provides Key="{167C572B-D847-4BCF-9693-C8B5EB6350CD}_v1.0.0.0" Version="1.0.0.0" DisplayName="PuomPkg1" /> | ||
| 25 | <RelatedPackage Id="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 26 | <Language Id="1033" /> | ||
| 27 | </RelatedPackage> | ||
| 28 | <RelatedPackage Id="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 29 | <Language Id="1033" /> | ||
| 30 | </RelatedPackage> | ||
| 31 | <PayloadRef Id="PuomPkg1.msi" /> | ||
| 32 | </MsiPackage> | ||
| 33 | <MsiPackage Id="PuomPkg2.msi" Cache="keep" CacheId="{07617017-CE68-4F88-981A-4629835C9BD2}v1.0.0.0" InstallSize="279" Size="32768" Scope="perUserOrMachine" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PuomPkg2.msi" RollbackLogPathVariable="WixBundleRollbackLog_PuomPkg2.msi" ProductCode="{07617017-CE68-4F88-981A-4629835C9BD2}" Language="1033" Version="1.0.0.0" UpgradeCode="{C977A922-168B-59F0-84FD-CAB89DB314E0}"> | ||
| 34 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 35 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 36 | <Provides Key="{07617017-CE68-4F88-981A-4629835C9BD2}_v1.0.0.0" Version="1.0.0.0" DisplayName="PuomPkg2" /> | ||
| 37 | <RelatedPackage Id="{C977A922-168B-59F0-84FD-CAB89DB314E0}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 38 | <Language Id="1033" /> | ||
| 39 | </RelatedPackage> | ||
| 40 | <RelatedPackage Id="{C977A922-168B-59F0-84FD-CAB89DB314E0}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 41 | <Language Id="1033" /> | ||
| 42 | </RelatedPackage> | ||
| 43 | <PayloadRef Id="PuomPkg2.msi" /> | ||
| 44 | </MsiPackage> | ||
| 45 | </Chain> | ||
| 46 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/BasicFunctionality_BundleA_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/BasicFunctionality_BundleA_manifest.xml index f3848eda..b19b911f 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/BasicFunctionality_BundleA_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/BasicFunctionality_BundleA_manifest.xml | |||
| @@ -15,11 +15,11 @@ | |||
| 15 | <Payload Id="PackageA" FilePath="PackageA.msi" FileSize="32768" Hash="89C61F8A105A81B08036401152A1FDE67CDC0158" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | 15 | <Payload Id="PackageA" FilePath="PackageA.msi" FileSize="32768" Hash="89C61F8A105A81B08036401152A1FDE67CDC0158" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> |
| 16 | <Payload Id="cab9Ins_fTP3wNwq5Gxo41ch5VUPaQ" FilePath="1a.cab" FileSize="975" Hash="11DE5863C4B2A8762D0EE23FE25B7774CA07676B" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | 16 | <Payload Id="cab9Ins_fTP3wNwq5Gxo41ch5VUPaQ" FilePath="1a.cab" FileSize="975" Hash="11DE5863C4B2A8762D0EE23FE25B7774CA07676B" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> |
| 17 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | 17 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> |
| 18 | <Registration Code="{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}" ExecutableName="BundleA.exe" PerMachine="yes" Tag="" Version="1.0.0.0" ProviderKey="{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}"> | 18 | <Registration Code="{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}" ExecutableName="BundleA.exe" Scope="permachine" Tag="" Version="1.0.0.0" ProviderKey="{A6F0CBF7-1578-450C-B9D7-9CF2EEC40002}"> |
| 19 | <Arp Register="yes" DisplayName="~BasicFunctionalityTests - BundleA" DisplayVersion="1.0.0.0" /> | 19 | <Arp Register="yes" DisplayName="~BasicFunctionalityTests - BundleA" DisplayVersion="1.0.0.0" /> |
| 20 | </Registration> | 20 | </Registration> |
| 21 | <Chain> | 21 | <Chain> |
| 22 | <MsiPackage Id="PackageA" Cache="keep" CacheId="{64633047-D172-4BBB-B202-64337D15C952}v1.0.0.0" InstallSize="1951" Size="33743" PerMachine="yes" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PackageA" RollbackLogPathVariable="WixBundleRollbackLog_PackageA" ProductCode="{64633047-D172-4BBB-B202-64337D15C952}" Language="1033" Version="1.0.0.0" UpgradeCode="{7FD50F1B-D134-4365-923C-DFA160F74738}"> | 22 | <MsiPackage Id="PackageA" Cache="keep" CacheId="{64633047-D172-4BBB-B202-64337D15C952}v1.0.0.0" InstallSize="1951" Size="33743" Scope="permachine" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PackageA" RollbackLogPathVariable="WixBundleRollbackLog_PackageA" ProductCode="{64633047-D172-4BBB-B202-64337D15C952}" Language="1033" Version="1.0.0.0" UpgradeCode="{7FD50F1B-D134-4365-923C-DFA160F74738}"> |
| 23 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | 23 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> |
| 24 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | 24 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> |
| 25 | <Provides Key="{64633047-D172-4BBB-B202-64337D15C952}" Version="1.0.0.0" DisplayName="~BasicFunctionalityTests - PackageA" /> | 25 | <Provides Key="{64633047-D172-4BBB-B202-64337D15C952}" Version="1.0.0.0" DisplayName="~BasicFunctionalityTests - PackageA" /> |
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml index 988bbfe0..651b491d 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml | |||
| @@ -46,19 +46,19 @@ | |||
| 46 | <Payload Id="PackageA" FilePath="BundleA.exe" FileSize="5241635" Hash="20E1AFF76DE4693CB2876DC6BCCA0152DB16BE49AEDE2CD581C03FC39AB89DEA12BC25CB435F06E4D7D2B4443CE8A8935D5E92E2E49A4981B60A273980E4B29B" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | 46 | <Payload Id="PackageA" FilePath="BundleA.exe" FileSize="5241635" Hash="20E1AFF76DE4693CB2876DC6BCCA0152DB16BE49AEDE2CD581C03FC39AB89DEA12BC25CB435F06E4D7D2B4443CE8A8935D5E92E2E49A4981B60A273980E4B29B" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> |
| 47 | <Payload Id="PackageB" FilePath="BundleB_x64.exe" FileSize="10450821" Hash="43A58873D61D6E0FA83F6C5266F2F05FEA9BC85D11C195493B7FD9F0B4AA799C1EFCB78D76DCED32124D2EC62A4E7114B62CDE6F0B87E42A7E28CDBB0DA0FF8E" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | 47 | <Payload Id="PackageB" FilePath="BundleB_x64.exe" FileSize="10450821" Hash="43A58873D61D6E0FA83F6C5266F2F05FEA9BC85D11C195493B7FD9F0B4AA799C1EFCB78D76DCED32124D2EC62A4E7114B62CDE6F0B87E42A7E28CDBB0DA0FF8E" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> |
| 48 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | 48 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> |
| 49 | <Registration Code="{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}" ExecutableName="MultipleBundlePackagesBundle.exe" PerMachine="yes" Tag="" Version="1.0.0.0" ProviderKey="{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}"> | 49 | <Registration Code="{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}" ExecutableName="MultipleBundlePackagesBundle.exe" Scope="permachine" Tag="" Version="1.0.0.0" ProviderKey="{35192ED0-C70A-49B2-9D12-3B1FA39B5E6F}"> |
| 50 | <Arp Register="yes" DisplayName="~BundlePackageTests - MultipleBundlePackagesBundle" DisplayVersion="1.0.0.0" /> | 50 | <Arp Register="yes" DisplayName="~BundlePackageTests - MultipleBundlePackagesBundle" DisplayVersion="1.0.0.0" /> |
| 51 | </Registration> | 51 | </Registration> |
| 52 | <Chain> | 52 | <Chain> |
| 53 | <ExePackage Id="NetFx48Web" Cache="remove" CacheId="642721C60D52051C7F3434D8710FE3406A7CFE10B2B39E90EA847719ED1697D7C614F2DF44AD50412B1DF8C98DD78FDC57CA1D047D28C81AC158092E5FB18040" InstallSize="1439328" Size="1439328" PerMachine="yes" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="NetFx48WebLog" RollbackLogPathVariable="WixBundleRollbackLog_NetFx48Web" DetectCondition="NETFRAMEWORK45 >= 528040" InstallArguments="/q /norestart /log "[NetFx48WebLog].html"" UninstallArguments="" Uninstallable="no" RepairArguments="" Repairable="no" Protocol="netfx4" DetectionType="condition"> | 53 | <ExePackage Id="NetFx48Web" Cache="remove" CacheId="642721C60D52051C7F3434D8710FE3406A7CFE10B2B39E90EA847719ED1697D7C614F2DF44AD50412B1DF8C98DD78FDC57CA1D047D28C81AC158092E5FB18040" InstallSize="1439328" Size="1439328" Scope="permachine" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="NetFx48WebLog" RollbackLogPathVariable="WixBundleRollbackLog_NetFx48Web" DetectCondition="NETFRAMEWORK45 >= 528040" InstallArguments="/q /norestart /log "[NetFx48WebLog].html"" UninstallArguments="" Uninstallable="no" RepairArguments="" Repairable="no" Protocol="netfx4" DetectionType="condition"> |
| 54 | <PayloadRef Id="NetFx48Web" /> | 54 | <PayloadRef Id="NetFx48Web" /> |
| 55 | </ExePackage> | 55 | </ExePackage> |
| 56 | <BundlePackage Id="PackageA" Cache="keep" CacheId="{B39CEE4D-CCD7-4797-BE3A-6613BD1DC4BE}v1.0.0.0" InstallSize="2169" Size="5241635" Version="1.0.0.0" PerMachine="yes" Permanent="no" Vital="yes" RepairCondition="0" LogPathVariable="WixBundleLog_PackageA" RollbackLogPathVariable="WixBundleRollbackLog_PackageA" BundleCode="{B39CEE4D-CCD7-4797-BE3A-6613BD1DC4BE}" InstallArguments="" UninstallArguments="" RepairArguments="" SupportsBurnProtocol="yes" Win64="no"> | 56 | <BundlePackage Id="PackageA" Cache="keep" CacheId="{B39CEE4D-CCD7-4797-BE3A-6613BD1DC4BE}v1.0.0.0" InstallSize="2169" Size="5241635" Version="1.0.0.0" Scope="permachine" Permanent="no" Vital="yes" RepairCondition="0" LogPathVariable="WixBundleLog_PackageA" RollbackLogPathVariable="WixBundleRollbackLog_PackageA" BundleCode="{B39CEE4D-CCD7-4797-BE3A-6613BD1DC4BE}" InstallArguments="" UninstallArguments="" RepairArguments="" SupportsBurnProtocol="yes" Win64="no"> |
| 57 | <Provides Key="{B39CEE4D-CCD7-4797-BE3A-6613BD1DC4BE}" Version="1.0.0.0" DisplayName="~BasicFunctionalityTests - BundleA" Imported="yes" /> | 57 | <Provides Key="{B39CEE4D-CCD7-4797-BE3A-6613BD1DC4BE}" Version="1.0.0.0" DisplayName="~BasicFunctionalityTests - BundleA" Imported="yes" /> |
| 58 | <RelatedBundle Code="{8C7E2C47-1EE7-4BBE-99A2-EAB7F3693F48}" Action="Upgrade" /> | 58 | <RelatedBundle Code="{8C7E2C47-1EE7-4BBE-99A2-EAB7F3693F48}" Action="Upgrade" /> |
| 59 | <PayloadRef Id="PackageA" /> | 59 | <PayloadRef Id="PackageA" /> |
| 60 | </BundlePackage> | 60 | </BundlePackage> |
| 61 | <BundlePackage Id="PackageB" Cache="keep" CacheId="{7506235A-7C59-4750-82C7-EB460A87ED3A}v1.0.0.0" InstallSize="1441497" Size="10450821" Version="1.0.0.0" PerMachine="yes" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PackageB" RollbackLogPathVariable="WixBundleRollbackLog_PackageB" BundleCode="{7506235A-7C59-4750-82C7-EB460A87ED3A}" InstallArguments="" UninstallArguments="" RepairArguments="" SupportsBurnProtocol="yes" Win64="yes"> | 61 | <BundlePackage Id="PackageB" Cache="keep" CacheId="{7506235A-7C59-4750-82C7-EB460A87ED3A}v1.0.0.0" InstallSize="1441497" Size="10450821" Version="1.0.0.0" Scope="permachine" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PackageB" RollbackLogPathVariable="WixBundleRollbackLog_PackageB" BundleCode="{7506235A-7C59-4750-82C7-EB460A87ED3A}" InstallArguments="" UninstallArguments="" RepairArguments="" SupportsBurnProtocol="yes" Win64="yes"> |
| 62 | <Provides Key="{7506235A-7C59-4750-82C7-EB460A87ED3A}" Version="1.0.0.0" DisplayName="~BasicFunctionalityTests - BundleB_x64" Imported="yes" /> | 62 | <Provides Key="{7506235A-7C59-4750-82C7-EB460A87ED3A}" Version="1.0.0.0" DisplayName="~BasicFunctionalityTests - BundleB_x64" Imported="yes" /> |
| 63 | <RelatedBundle Code="{79F45B7A-D990-46E4-819B-078D87C3321A}" Action="Upgrade" /> | 63 | <RelatedBundle Code="{79F45B7A-D990-46E4-819B-078D87C3321A}" Action="Upgrade" /> |
| 64 | <PayloadRef Id="PackageB" /> | 64 | <PayloadRef Id="PackageB" /> |
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml index a5dfc188..51d86d4a 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml | |||
| @@ -46,14 +46,14 @@ | |||
| 46 | <Payload Id="TestExe.exe" FilePath="TestExe.exe" FileSize="23552" Hash="8A3CAD62E7C15EE88B3B78A5F61EFA6D4C9AED67049075688A641EE65E1526589797B0C52398DEB520A7911E41F2A6F73C178D19C9FFBC03ECF964A822E6438E" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | 46 | <Payload Id="TestExe.exe" FilePath="TestExe.exe" FileSize="23552" Hash="8A3CAD62E7C15EE88B3B78A5F61EFA6D4C9AED67049075688A641EE65E1526589797B0C52398DEB520A7911E41F2A6F73C178D19C9FFBC03ECF964A822E6438E" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> |
| 47 | <Payload Id="paygJp32KbpyjbVEQFNbl5_izmhdZw" FilePath="TestExe.exe.config" FileSize="387" Hash="8C819A9E835F3921FA80C5C783AB0C42DDAADF0C0F2BEF8630EA122ABCB9DC8EAF0B14E061C46B37C92F55114BB09A8D5B1B613947A76A648953F2C63C0ACA63" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | 47 | <Payload Id="paygJp32KbpyjbVEQFNbl5_izmhdZw" FilePath="TestExe.exe.config" FileSize="387" Hash="8C819A9E835F3921FA80C5C783AB0C42DDAADF0C0F2BEF8630EA122ABCB9DC8EAF0B14E061C46B37C92F55114BB09A8D5B1B613947A76A648953F2C63C0ACA63" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> |
| 48 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | 48 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> |
| 49 | <Registration Code="{9C459DAD-0E64-40C8-8C9F-4F68E46AB223}" ExecutableName="PerUserArpEntryExePackage.exe" PerMachine="no" Tag="" Version="1.0.0.0" ProviderKey="{9C459DAD-0E64-40C8-8C9F-4F68E46AB223}"> | 49 | <Registration Code="{9C459DAD-0E64-40C8-8C9F-4F68E46AB223}" ExecutableName="PerUserArpEntryExePackage.exe" Scope="peruser" Tag="" Version="1.0.0.0" ProviderKey="{9C459DAD-0E64-40C8-8C9F-4F68E46AB223}"> |
| 50 | <Arp DisplayName="~ExePackageTests - PerUserArpEntryExePackage" DisplayVersion="1.0.0.0" /> | 50 | <Arp DisplayName="~ExePackageTests - PerUserArpEntryExePackage" DisplayVersion="1.0.0.0" /> |
| 51 | </Registration> | 51 | </Registration> |
| 52 | <Chain> | 52 | <Chain> |
| 53 | <ExePackage Id="NetFx48Web" Cache="remove" CacheId="642721C60D52051C7F3434D8710FE3406A7CFE10B2B39E90EA847719ED1697D7C614F2DF44AD50412B1DF8C98DD78FDC57CA1D047D28C81AC158092E5FB18040" InstallSize="1439328" Size="1439328" PerMachine="yes" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="NetFx48WebLog" RollbackLogPathVariable="WixBundleRollbackLog_NetFx48Web" InstallArguments="/q /norestart /log "[NetFx48WebLog].html"" RepairArguments="" Repairable="no" DetectionType="condition" DetectCondition="NETFRAMEWORK45 >= 528040" Protocol="netfx4"> | 53 | <ExePackage Id="NetFx48Web" Cache="remove" CacheId="642721C60D52051C7F3434D8710FE3406A7CFE10B2B39E90EA847719ED1697D7C614F2DF44AD50412B1DF8C98DD78FDC57CA1D047D28C81AC158092E5FB18040" InstallSize="1439328" Size="1439328" Scope="permachine" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="NetFx48WebLog" RollbackLogPathVariable="WixBundleRollbackLog_NetFx48Web" InstallArguments="/q /norestart /log "[NetFx48WebLog].html"" RepairArguments="" Repairable="no" DetectionType="condition" DetectCondition="NETFRAMEWORK45 >= 528040" Protocol="netfx4"> |
| 54 | <PayloadRef Id="NetFx48Web" /> | 54 | <PayloadRef Id="NetFx48Web" /> |
| 55 | </ExePackage> | 55 | </ExePackage> |
| 56 | <ExePackage Id="TestExe" Cache="keep" CacheId="8A3CAD62E7C15EE88B3B78A5F61EFA6D4C9AED67049075688A641EE65E1526589797B0C52398DEB520A7911E41F2A6F73C178D19C9FFBC03ECF964A822E6438E" InstallSize="23939" Size="23939" PerMachine="no" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_TestExe" RollbackLogPathVariable="WixBundleRollbackLog_TestExe" InstallArguments="/regw "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9B5300C7-9B34-4670-9614-185B02AB87EF},DisplayVersion,String,1.0.0.0" /regw "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9B5300C7-9B34-4670-9614-185B02AB87EF},QuietUninstallString,String,\"[WixBundleExecutePackageCacheFolder]testexe.exe\" /regd \"HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9B5300C7-9B34-4670-9614-185B02AB87EF}\""" RepairArguments="" Repairable="no" DetectionType="arp" ArpId="{9B5300C7-9B34-4670-9614-185B02AB87EF}" ArpDisplayVersion="1.0.0.0"> | 56 | <ExePackage Id="TestExe" Cache="keep" CacheId="8A3CAD62E7C15EE88B3B78A5F61EFA6D4C9AED67049075688A641EE65E1526589797B0C52398DEB520A7911E41F2A6F73C178D19C9FFBC03ECF964A822E6438E" InstallSize="23939" Size="23939" Scope="peruser" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_TestExe" RollbackLogPathVariable="WixBundleRollbackLog_TestExe" InstallArguments="/regw "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9B5300C7-9B34-4670-9614-185B02AB87EF},DisplayVersion,String,1.0.0.0" /regw "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9B5300C7-9B34-4670-9614-185B02AB87EF},QuietUninstallString,String,\"[WixBundleExecutePackageCacheFolder]testexe.exe\" /regd \"HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9B5300C7-9B34-4670-9614-185B02AB87EF}\""" RepairArguments="" Repairable="no" DetectionType="arp" ArpId="{9B5300C7-9B34-4670-9614-185B02AB87EF}" ArpDisplayVersion="1.0.0.0"> |
| 57 | <PayloadRef Id="TestExe.exe" /> | 57 | <PayloadRef Id="TestExe.exe" /> |
| 58 | <PayloadRef Id="paygJp32KbpyjbVEQFNbl5_izmhdZw" /> | 58 | <PayloadRef Id="paygJp32KbpyjbVEQFNbl5_izmhdZw" /> |
| 59 | </ExePackage> | 59 | </ExePackage> |
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml index f3cfb179..84370c44 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml | |||
| @@ -47,14 +47,14 @@ | |||
| 47 | <Payload Id="TestExe.exe" FilePath="TestExe.exe" FileSize="23552" Hash="4344604ECBA4DFE5DE7C680CB1AA5BD6FAA29BF95CE07740F02878C2BB1EF6DE6432944A0DB79B034D1C6F68CF80842EEE442EA8A551816E52D3F68901C50AB9" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | 47 | <Payload Id="TestExe.exe" FilePath="TestExe.exe" FileSize="23552" Hash="4344604ECBA4DFE5DE7C680CB1AA5BD6FAA29BF95CE07740F02878C2BB1EF6DE6432944A0DB79B034D1C6F68CF80842EEE442EA8A551816E52D3F68901C50AB9" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> |
| 48 | <Payload Id="paygJp32KbpyjbVEQFNbl5_izmhdZw" FilePath="TestExe.exe.config" FileSize="387" Hash="8C819A9E835F3921FA80C5C783AB0C42DDAADF0C0F2BEF8630EA122ABCB9DC8EAF0B14E061C46B37C92F55114BB09A8D5B1B613947A76A648953F2C63C0ACA63" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | 48 | <Payload Id="paygJp32KbpyjbVEQFNbl5_izmhdZw" FilePath="TestExe.exe.config" FileSize="387" Hash="8C819A9E835F3921FA80C5C783AB0C42DDAADF0C0F2BEF8630EA122ABCB9DC8EAF0B14E061C46B37C92F55114BB09A8D5B1B613947A76A648953F2C63C0ACA63" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> |
| 49 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | 49 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> |
| 50 | <Registration Code="{9C184683-04FB-49AD-9D79-65101BDC3EE3}" ExecutableName="BundleD.exe" PerMachine="yes" Tag="" Version="1.0.0.0" ProviderKey="{9C184683-04FB-49AD-9D79-65101BDC3EE3}"> | 50 | <Registration Code="{9C184683-04FB-49AD-9D79-65101BDC3EE3}" ExecutableName="BundleD.exe" Scope="permachine" Tag="" Version="1.0.0.0" ProviderKey="{9C184683-04FB-49AD-9D79-65101BDC3EE3}"> |
| 51 | <Arp Register="yes" DisplayName="~FailureTests - BundleD" DisplayVersion="1.0.0.0" /> | 51 | <Arp Register="yes" DisplayName="~FailureTests - BundleD" DisplayVersion="1.0.0.0" /> |
| 52 | </Registration> | 52 | </Registration> |
| 53 | <Chain> | 53 | <Chain> |
| 54 | <ExePackage Id="NetFx48Web" Cache="remove" CacheId="642721C60D52051C7F3434D8710FE3406A7CFE10B2B39E90EA847719ED1697D7C614F2DF44AD50412B1DF8C98DD78FDC57CA1D047D28C81AC158092E5FB18040" InstallSize="1439328" Size="1439328" PerMachine="yes" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="NetFx48WebLog" RollbackLogPathVariable="WixBundleRollbackLog_NetFx48Web" DetectCondition="NETFRAMEWORK45 >= 528040" InstallArguments="/q /norestart /log "[NetFx48WebLog].html"" UninstallArguments="" Uninstallable="no" RepairArguments="" Repairable="no" Protocol="netfx4" DetectionType="condition"> | 54 | <ExePackage Id="NetFx48Web" Cache="remove" CacheId="642721C60D52051C7F3434D8710FE3406A7CFE10B2B39E90EA847719ED1697D7C614F2DF44AD50412B1DF8C98DD78FDC57CA1D047D28C81AC158092E5FB18040" InstallSize="1439328" Size="1439328" Scope="permachine" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="NetFx48WebLog" RollbackLogPathVariable="WixBundleRollbackLog_NetFx48Web" DetectCondition="NETFRAMEWORK45 >= 528040" InstallArguments="/q /norestart /log "[NetFx48WebLog].html"" UninstallArguments="" Uninstallable="no" RepairArguments="" Repairable="no" Protocol="netfx4" DetectionType="condition"> |
| 55 | <PayloadRef Id="NetFx48Web" /> | 55 | <PayloadRef Id="NetFx48Web" /> |
| 56 | </ExePackage> | 56 | </ExePackage> |
| 57 | <ExePackage Id="ExeA" Cache="remove" CacheId="4344604ECBA4DFE5DE7C680CB1AA5BD6FAA29BF95CE07740F02878C2BB1EF6DE6432944A0DB79B034D1C6F68CF80842EEE442EA8A551816E52D3F68901C50AB9" InstallSize="23939" Size="23939" PerMachine="yes" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_ExeA" RollbackLogPathVariable="WixBundleRollbackLog_ExeA" DetectCondition="ExeA_Version AND ExeA_Version >= v1.0.0.0" InstallArguments="/s 5000 /regw "HKLM\Software\WiX\Tests\FailureTests\ExeA,Version,String,1.0.0.0"" UninstallArguments="/regd "HKLM\Software\WiX\Tests\FailureTests\ExeA,Version"" Uninstallable="yes" RepairArguments="/regw "HKLM\Software\WiX\Tests\FailureTests\ExeA,Version,String,1.0.0.0"" Repairable="yes" DetectionType="condition"> | 57 | <ExePackage Id="ExeA" Cache="remove" CacheId="4344604ECBA4DFE5DE7C680CB1AA5BD6FAA29BF95CE07740F02878C2BB1EF6DE6432944A0DB79B034D1C6F68CF80842EEE442EA8A551816E52D3F68901C50AB9" InstallSize="23939" Size="23939" Scope="permachine" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_ExeA" RollbackLogPathVariable="WixBundleRollbackLog_ExeA" DetectCondition="ExeA_Version AND ExeA_Version >= v1.0.0.0" InstallArguments="/s 5000 /regw "HKLM\Software\WiX\Tests\FailureTests\ExeA,Version,String,1.0.0.0"" UninstallArguments="/regd "HKLM\Software\WiX\Tests\FailureTests\ExeA,Version"" Uninstallable="yes" RepairArguments="/regw "HKLM\Software\WiX\Tests\FailureTests\ExeA,Version,String,1.0.0.0"" Repairable="yes" DetectionType="condition"> |
| 58 | <PayloadRef Id="TestExe.exe" /> | 58 | <PayloadRef Id="TestExe.exe" /> |
| 59 | <PayloadRef Id="paygJp32KbpyjbVEQFNbl5_izmhdZw" /> | 59 | <PayloadRef Id="paygJp32KbpyjbVEQFNbl5_izmhdZw" /> |
| 60 | </ExePackage> | 60 | </ExePackage> |
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/MsiTransaction_BundleAv1_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/MsiTransaction_BundleAv1_manifest.xml index 2047f495..c6f7a6eb 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/MsiTransaction_BundleAv1_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/MsiTransaction_BundleAv1_manifest.xml | |||
| @@ -20,11 +20,11 @@ | |||
| 20 | <Payload Id="cab3wekki1le1R8RPDV2B8_g8jcjZc" FilePath="1cv1.cab" FileSize="975" Hash="11DE5863C4B2A8762D0EE23FE25B7774CA07676B" Packaging="embedded" SourcePath="a5" Container="WixAttachedContainer" /> | 20 | <Payload Id="cab3wekki1le1R8RPDV2B8_g8jcjZc" FilePath="1cv1.cab" FileSize="975" Hash="11DE5863C4B2A8762D0EE23FE25B7774CA07676B" Packaging="embedded" SourcePath="a5" Container="WixAttachedContainer" /> |
| 21 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | 21 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> |
| 22 | <RollbackBoundary Id="rbaOCA08D8ky7uBOK71_6FWz1K3TuQ" Vital="yes" Transaction="yes" /> | 22 | <RollbackBoundary Id="rbaOCA08D8ky7uBOK71_6FWz1K3TuQ" Vital="yes" Transaction="yes" /> |
| 23 | <Registration Code="{E6469F05-BDC8-4EB8-B218-67412543EFAA}" ExecutableName="BundleAv1.exe" PerMachine="yes" Tag="" Version="1.0.0.0" ProviderKey="{E6469F05-BDC8-4EB8-B218-67412543EFAA}"> | 23 | <Registration Code="{E6469F05-BDC8-4EB8-B218-67412543EFAA}" ExecutableName="BundleAv1.exe" Scope="permachine" Tag="" Version="1.0.0.0" ProviderKey="{E6469F05-BDC8-4EB8-B218-67412543EFAA}"> |
| 24 | <Arp Register="yes" DisplayName="~MsiTransactionTests - BundleAv1" DisplayVersion="1.0.0.0" /> | 24 | <Arp Register="yes" DisplayName="~MsiTransactionTests - BundleAv1" DisplayVersion="1.0.0.0" /> |
| 25 | </Registration> | 25 | </Registration> |
| 26 | <Chain> | 26 | <Chain> |
| 27 | <MsiPackage Id="PackageA" Cache="keep" CacheId="{01E6B748-7B95-4BA9-976D-B6F35076CEF4}v1.0.0.0" InstallSize="1951" Size="33743" PerMachine="yes" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PackageA" RollbackLogPathVariable="WixBundleRollbackLog_PackageA" ProductCode="{01E6B748-7B95-4BA9-976D-B6F35076CEF4}" Language="1033" Version="1.0.0.0" UpgradeCode="{7772FCDF-5FDB-497D-B5DF-C6D17D667976}"> | 27 | <MsiPackage Id="PackageA" Cache="keep" CacheId="{01E6B748-7B95-4BA9-976D-B6F35076CEF4}v1.0.0.0" InstallSize="1951" Size="33743" Scope="permachine" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PackageA" RollbackLogPathVariable="WixBundleRollbackLog_PackageA" ProductCode="{01E6B748-7B95-4BA9-976D-B6F35076CEF4}" Language="1033" Version="1.0.0.0" UpgradeCode="{7772FCDF-5FDB-497D-B5DF-C6D17D667976}"> |
| 28 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | 28 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> |
| 29 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | 29 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> |
| 30 | <Provides Key="{01E6B748-7B95-4BA9-976D-B6F35076CEF4}" Version="1.0.0.0" DisplayName="~MsiTransactionTests - PackageA" /> | 30 | <Provides Key="{01E6B748-7B95-4BA9-976D-B6F35076CEF4}" Version="1.0.0.0" DisplayName="~MsiTransactionTests - PackageA" /> |
| @@ -37,7 +37,7 @@ | |||
| 37 | <PayloadRef Id="PackageA" /> | 37 | <PayloadRef Id="PackageA" /> |
| 38 | <PayloadRef Id="cab9Ins_fTP3wNwq5Gxo41ch5VUPaQ" /> | 38 | <PayloadRef Id="cab9Ins_fTP3wNwq5Gxo41ch5VUPaQ" /> |
| 39 | </MsiPackage> | 39 | </MsiPackage> |
| 40 | <MsiPackage Id="PackageB" Cache="keep" CacheId="{D1D01094-23CE-4AF0-84B6-4A1A133F21D3}v1.0.0.0" InstallSize="1951" Size="33743" PerMachine="yes" Permanent="no" Vital="yes" RollbackBoundaryForward="rbaOCA08D8ky7uBOK71_6FWz1K3TuQ" LogPathVariable="WixBundleLog_PackageB" RollbackLogPathVariable="WixBundleRollbackLog_PackageB" ProductCode="{D1D01094-23CE-4AF0-84B6-4A1A133F21D3}" Language="1033" Version="1.0.0.0" UpgradeCode="{EAFC0C6B-626E-415C-8132-536FBD19F49B}"> | 40 | <MsiPackage Id="PackageB" Cache="keep" CacheId="{D1D01094-23CE-4AF0-84B6-4A1A133F21D3}v1.0.0.0" InstallSize="1951" Size="33743" Scope="permachine" Permanent="no" Vital="yes" RollbackBoundaryForward="rbaOCA08D8ky7uBOK71_6FWz1K3TuQ" LogPathVariable="WixBundleLog_PackageB" RollbackLogPathVariable="WixBundleRollbackLog_PackageB" ProductCode="{D1D01094-23CE-4AF0-84B6-4A1A133F21D3}" Language="1033" Version="1.0.0.0" UpgradeCode="{EAFC0C6B-626E-415C-8132-536FBD19F49B}"> |
| 41 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | 41 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> |
| 42 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | 42 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> |
| 43 | <Provides Key="{D1D01094-23CE-4AF0-84B6-4A1A133F21D3}" Version="1.0.0.0" DisplayName="~MsiTransactionTests - PackageBv1" /> | 43 | <Provides Key="{D1D01094-23CE-4AF0-84B6-4A1A133F21D3}" Version="1.0.0.0" DisplayName="~MsiTransactionTests - PackageBv1" /> |
| @@ -50,7 +50,7 @@ | |||
| 50 | <PayloadRef Id="PackageB" /> | 50 | <PayloadRef Id="PackageB" /> |
| 51 | <PayloadRef Id="cablKtJUKxAbhSMIBwQU6vJ_CDsIkE" /> | 51 | <PayloadRef Id="cablKtJUKxAbhSMIBwQU6vJ_CDsIkE" /> |
| 52 | </MsiPackage> | 52 | </MsiPackage> |
| 53 | <MsiPackage Id="PackageC" Cache="keep" CacheId="{A497C5E5-C78B-4F0B-BF72-B33E1DB1C4B8}v1.0.0.0" InstallSize="1951" Size="33743" PerMachine="yes" Permanent="no" Vital="yes" RollbackBoundaryBackward="rbaOCA08D8ky7uBOK71_6FWz1K3TuQ" LogPathVariable="WixBundleLog_PackageC" RollbackLogPathVariable="WixBundleRollbackLog_PackageC" ProductCode="{A497C5E5-C78B-4F0B-BF72-B33E1DB1C4B8}" Language="1033" Version="1.0.0.0" UpgradeCode="{A18BDC12-DAEC-43EE-87D1-31B2C2BC6269}"> | 53 | <MsiPackage Id="PackageC" Cache="keep" CacheId="{A497C5E5-C78B-4F0B-BF72-B33E1DB1C4B8}v1.0.0.0" InstallSize="1951" Size="33743" Scope="permachine" Permanent="no" Vital="yes" RollbackBoundaryBackward="rbaOCA08D8ky7uBOK71_6FWz1K3TuQ" LogPathVariable="WixBundleLog_PackageC" RollbackLogPathVariable="WixBundleRollbackLog_PackageC" ProductCode="{A497C5E5-C78B-4F0B-BF72-B33E1DB1C4B8}" Language="1033" Version="1.0.0.0" UpgradeCode="{A18BDC12-DAEC-43EE-87D1-31B2C2BC6269}"> |
| 54 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | 54 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> |
| 55 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | 55 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> |
| 56 | <Provides Key="{A497C5E5-C78B-4F0B-BF72-B33E1DB1C4B8}" Version="1.0.0.0" DisplayName="~MsiTransactionTests - PackageCv1" /> | 56 | <Provides Key="{A497C5E5-C78B-4F0B-BF72-B33E1DB1C4B8}" Version="1.0.0.0" DisplayName="~MsiTransactionTests - PackageCv1" /> |
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/MsuPackageFixture_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/MsuPackageFixture_manifest.xml index 4fd1d75a..6e678d12 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/MsuPackageFixture_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/MsuPackageFixture_manifest.xml | |||
| @@ -10,11 +10,11 @@ | |||
| 10 | <Container Id="WixAttachedContainer" FileSize="119" Hash="06D28293FD57CD231E125EF9C82418A488928A98832A6937A77A3283A17A5C37F8D619C51759319A57E8F8A948FA73E8C5814185A0114130F3213AB268073555" FilePath="test.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | 10 | <Container Id="WixAttachedContainer" FileSize="119" Hash="06D28293FD57CD231E125EF9C82418A488928A98832A6937A77A3283A17A5C37F8D619C51759319A57E8F8A948FA73E8C5814185A0114130F3213AB268073555" FilePath="test.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> |
| 11 | <Payload Id="test.msu" FilePath="test.msu" FileSize="28" Hash="B040F02D2F90E04E9AFBDC91C00CEB5DF97D48E205D96DC0A44E10AF8870794DAE62CA70224F12BE9112AA730BBE470CA81FB5617AAC690E832F3F84510E92BA" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | 11 | <Payload Id="test.msu" FilePath="test.msu" FileSize="28" Hash="B040F02D2F90E04E9AFBDC91C00CEB5DF97D48E205D96DC0A44E10AF8870794DAE62CA70224F12BE9112AA730BBE470CA81FB5617AAC690E832F3F84510E92BA" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> |
| 12 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | 12 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> |
| 13 | <Registration Code="{06077C60-DC46-4F4A-8D3C-05F869187191}" ExecutableName="test.exe" PerMachine="yes" Tag="" Version="1.0.0.0" ProviderKey="{06077C60-DC46-4F4A-8D3C-05F869187191}"> | 13 | <Registration Code="{06077C60-DC46-4F4A-8D3C-05F869187191}" ExecutableName="test.exe" Scope="permachine" Tag="" Version="1.0.0.0" ProviderKey="{06077C60-DC46-4F4A-8D3C-05F869187191}"> |
| 14 | <Arp Register="yes" DisplayName="BurnBundle" DisplayVersion="1.0.0.0" Publisher="Example Corporation" /> | 14 | <Arp Register="yes" DisplayName="BurnBundle" DisplayVersion="1.0.0.0" Publisher="Example Corporation" /> |
| 15 | </Registration> | 15 | </Registration> |
| 16 | <Chain> | 16 | <Chain> |
| 17 | <MsuPackage Id="test.msu" Cache="keep" CacheId="B040F02D2F90E04E9AFBDC91C00CEB5DF97D48E205D96DC0A44E10AF8870794DAE62CA70224F12BE9112AA730BBE470CA81FB5617AAC690E832F3F84510E92BA" InstallSize="28" Size="28" PerMachine="yes" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" RollbackBoundaryBackward="WixDefaultBoundary" DetectCondition="DetectedTheMsu"> | 17 | <MsuPackage Id="test.msu" Cache="keep" CacheId="B040F02D2F90E04E9AFBDC91C00CEB5DF97D48E205D96DC0A44E10AF8870794DAE62CA70224F12BE9112AA730BBE470CA81FB5617AAC690E832F3F84510E92BA" InstallSize="28" Size="28" Scope="permachine" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" RollbackBoundaryBackward="WixDefaultBoundary" DetectCondition="DetectedTheMsu"> |
| 18 | <PayloadRef Id="test.msu" /> | 18 | <PayloadRef Id="test.msu" /> |
| 19 | </MsuPackage> | 19 | </MsuPackage> |
| 20 | </Chain> | 20 | </Chain> |
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/PerMachineBundle_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/PerMachineBundle_manifest.xml new file mode 100644 index 00000000..66864c70 --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/PerMachineBundle_manifest.xml | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="PerMachineBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{650EDC96-0BDF-512A-A544-4E5D7DD5D11E}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="32839" Hash="5BE3F4AAE711DB99A43B248F380EFB9F069C7D85F2C6D20D2B25033AABEDA09BCCF5203C2A99A7DB02D040168785EBB0260DC4073FEF2677F3760821B0948202" FilePath="PerMachineBundle.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="PerMachinePkg.msi" FilePath="PerMachinePkg.msi" FileSize="32768" Hash="4458C6B56290B207657AFB52DC20729FEDDA76799F21C14A7095E08CFB68CF382C5487CD53535CF24C16610066203ADFC29F25489BDE54290D1E480B7DED8FA6" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 16 | <Registration BundleId="PerMachineBundle" Code="{3B58FF9C-2B33-417F-8240-10DA7FD7A6C4}" ExecutableName="PerMachineBundle.exe" Scope="perMachine" Tag="" Version="1.0.0.0" ProviderKey="{3B58FF9C-2B33-417F-8240-10DA7FD7A6C4}"> | ||
| 17 | <Arp DisplayName="PerMachineBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 18 | </Registration> | ||
| 19 | <Chain> | ||
| 20 | <MsiPackage Id="PerMachinePkg.msi" Cache="keep" CacheId="{DD544949-52BA-432B-925E-9BF0C4DB4B83}v1.0.0.0" InstallSize="283" Size="32768" Scope="perMachine" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PerMachinePkg.msi" RollbackLogPathVariable="WixBundleRollbackLog_PerMachinePkg.msi" ProductCode="{DD544949-52BA-432B-925E-9BF0C4DB4B83}" Language="1033" Version="1.0.0.0" UpgradeCode="{40B2312E-4395-5299-A08F-5B2744AA5A39}"> | ||
| 21 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 22 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 23 | <Provides Key="{DD544949-52BA-432B-925E-9BF0C4DB4B83}_v1.0.0.0" Version="1.0.0.0" DisplayName="PerMachinePkg" /> | ||
| 24 | <RelatedPackage Id="{40B2312E-4395-5299-A08F-5B2744AA5A39}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 25 | <Language Id="1033" /> | ||
| 26 | </RelatedPackage> | ||
| 27 | <RelatedPackage Id="{40B2312E-4395-5299-A08F-5B2744AA5A39}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 28 | <Language Id="1033" /> | ||
| 29 | </RelatedPackage> | ||
| 30 | <PayloadRef Id="PerMachinePkg.msi" /> | ||
| 31 | </MsiPackage> | ||
| 32 | </Chain> | ||
| 33 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/PerUserBundle_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/PerUserBundle_manifest.xml new file mode 100644 index 00000000..6c26f708 --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/PerUserBundle_manifest.xml | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="PerUserBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{DEB06D62-A48E-5455-920C-DC8E2DD660F9}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="32839" Hash="CF67D7D05B0449D5221DE5FB08E93DC85A8ECB4AC8E3614DCB63B9FE9010F08FE71A29FC55D6E4383CE73ED5420A5E73628B314932F229E7E0FBBC262522F68C" FilePath="PerUserBundle.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="PerUserPkg.msi" FilePath="PerUserPkg.msi" FileSize="32768" Hash="26CA1B74EFC52FA969279450110B6A9472E629004EF5655A661D8609A7E4DDB76CA220E5DB6FC2AE554415D9A4E28567014F48EF978EFDEE0B4431E81498572F" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 16 | <Registration BundleId="PerUserBundle" Code="{7786E965-CCB4-42B2-AA90-F2652EE3B5C5}" ExecutableName="PerUserBundle.exe" Scope="perUser" Tag="" Version="1.0.0.0" ProviderKey="{7786E965-CCB4-42B2-AA90-F2652EE3B5C5}"> | ||
| 17 | <Arp DisplayName="PerUserBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 18 | </Registration> | ||
| 19 | <Chain> | ||
| 20 | <MsiPackage Id="PerUserPkg.msi" Cache="keep" CacheId="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}v1.0.0.0" InstallSize="274" Size="32768" Scope="perUser" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PerUserPkg.msi" RollbackLogPathVariable="WixBundleRollbackLog_PerUserPkg.msi" ProductCode="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}" Language="1033" Version="1.0.0.0" UpgradeCode="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}"> | ||
| 21 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 22 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 23 | <Provides Key="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}_v1.0.0.0" Version="1.0.0.0" DisplayName="PerUserPkg" /> | ||
| 24 | <RelatedPackage Id="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 25 | <Language Id="1033" /> | ||
| 26 | </RelatedPackage> | ||
| 27 | <RelatedPackage Id="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 28 | <Language Id="1033" /> | ||
| 29 | </RelatedPackage> | ||
| 30 | <PayloadRef Id="PerUserPkg.msi" /> | ||
| 31 | </MsiPackage> | ||
| 32 | </Chain> | ||
| 33 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPmouBundle_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPmouBundle_manifest.xml new file mode 100644 index 00000000..47ce485a --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPmouBundle_manifest.xml | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="PmPmouBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{62D1B851-3DC9-58B7-B923-71A0F75703E0}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="98429" Hash="27A597EF7C5C69BDFE548E655FB4ACE548F379EBCC24EF56401BD22D3EECC0A904A68595FE5D3F448B7137A9B03A5EA2C0B422E3003DD293C7E73E2E4FE9D43B" FilePath="PmPmouBundle.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="PerMachinePkg.msi" FilePath="PerMachinePkg.msi" FileSize="32768" Hash="4458C6B56290B207657AFB52DC20729FEDDA76799F21C14A7095E08CFB68CF382C5487CD53535CF24C16610066203ADFC29F25489BDE54290D1E480B7DED8FA6" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <Payload Id="PmouPkg1.msi" FilePath="PmouPkg1.msi" FileSize="32768" Hash="BCBB4F1C48953D23BE56CD7D5005BB38CB02C7BAC4AF30F87B7ADF7715EA721D28A3FCFC025D26FD5DC069BAB69F462577C3212C1BFE3707FCCE60FF3F3ED12C" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | ||
| 16 | <Payload Id="PmouPkg2.msi" FilePath="PmouPkg2.msi" FileSize="32768" Hash="C3BABBCCC0FDA4ACE44D28C60FAB2CA76C00655A405CF6F7A3593F9130FCF47AD18C4DAE1A32D5C0177F58DBAE00CBF7EDCA027BEE19B96E0145A3FA00811B51" Packaging="embedded" SourcePath="a2" Container="WixAttachedContainer" /> | ||
| 17 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 18 | <Registration BundleId="PmPmouBundle" Code="{91B17F62-3EC0-4BDB-9094-A00B3B575E5B}" ExecutableName="PmPmouBundle.exe" Scope="perMachineOrUser" Tag="" Version="1.0.0.0" ProviderKey="{91B17F62-3EC0-4BDB-9094-A00B3B575E5B}"> | ||
| 19 | <Arp DisplayName="PmPmouBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 20 | </Registration> | ||
| 21 | <Chain> | ||
| 22 | <MsiPackage Id="PerMachinePkg.msi" Cache="keep" CacheId="{DD544949-52BA-432B-925E-9BF0C4DB4B83}v1.0.0.0" InstallSize="283" Size="32768" Scope="perMachine" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PerMachinePkg.msi" RollbackLogPathVariable="WixBundleRollbackLog_PerMachinePkg.msi" ProductCode="{DD544949-52BA-432B-925E-9BF0C4DB4B83}" Language="1033" Version="1.0.0.0" UpgradeCode="{40B2312E-4395-5299-A08F-5B2744AA5A39}"> | ||
| 23 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 24 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 25 | <Provides Key="{DD544949-52BA-432B-925E-9BF0C4DB4B83}_v1.0.0.0" Version="1.0.0.0" DisplayName="PerMachinePkg" /> | ||
| 26 | <RelatedPackage Id="{40B2312E-4395-5299-A08F-5B2744AA5A39}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 27 | <Language Id="1033" /> | ||
| 28 | </RelatedPackage> | ||
| 29 | <RelatedPackage Id="{40B2312E-4395-5299-A08F-5B2744AA5A39}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 30 | <Language Id="1033" /> | ||
| 31 | </RelatedPackage> | ||
| 32 | <PayloadRef Id="PerMachinePkg.msi" /> | ||
| 33 | </MsiPackage> | ||
| 34 | <MsiPackage Id="PmouPkg1.msi" Cache="keep" CacheId="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}v1.0.0.0" InstallSize="279" Size="32768" Scope="perMachineOrUser" Permanent="no" Vital="yes" LogPathVariable="WixBundleLog_PmouPkg1.msi" RollbackLogPathVariable="WixBundleRollbackLog_PmouPkg1.msi" ProductCode="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}" Language="1033" Version="1.0.0.0" UpgradeCode="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}"> | ||
| 35 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 36 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 37 | <Provides Key="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}_v1.0.0.0" Version="1.0.0.0" DisplayName="PmouPkg1" /> | ||
| 38 | <RelatedPackage Id="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 39 | <Language Id="1033" /> | ||
| 40 | </RelatedPackage> | ||
| 41 | <RelatedPackage Id="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 42 | <Language Id="1033" /> | ||
| 43 | </RelatedPackage> | ||
| 44 | <PayloadRef Id="PmouPkg1.msi" /> | ||
| 45 | </MsiPackage> | ||
| 46 | <MsiPackage Id="PmouPkg2.msi" Cache="keep" CacheId="{1B1D793E-4026-48CA-B088-F919E70440AC}v1.0.0.0" InstallSize="279" Size="32768" Scope="perMachineOrUser" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PmouPkg2.msi" RollbackLogPathVariable="WixBundleRollbackLog_PmouPkg2.msi" ProductCode="{1B1D793E-4026-48CA-B088-F919E70440AC}" Language="1033" Version="1.0.0.0" UpgradeCode="{98F763B3-EA17-5AE5-AD47-21004FB34B24}"> | ||
| 47 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 48 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 49 | <Provides Key="{1B1D793E-4026-48CA-B088-F919E70440AC}_v1.0.0.0" Version="1.0.0.0" DisplayName="PmouPkg2" /> | ||
| 50 | <RelatedPackage Id="{98F763B3-EA17-5AE5-AD47-21004FB34B24}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 51 | <Language Id="1033" /> | ||
| 52 | </RelatedPackage> | ||
| 53 | <RelatedPackage Id="{98F763B3-EA17-5AE5-AD47-21004FB34B24}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 54 | <Language Id="1033" /> | ||
| 55 | </RelatedPackage> | ||
| 56 | <PayloadRef Id="PmouPkg2.msi" /> | ||
| 57 | </MsiPackage> | ||
| 58 | </Chain> | ||
| 59 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPuPmouBundle_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPuPmouBundle_manifest.xml new file mode 100644 index 00000000..86c1b1b0 --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPuPmouBundle_manifest.xml | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="PmPuPmouBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{F04C3701-1AC4-5C1D-8B26-400FB0C9F52A}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="131224" Hash="4F6D2A7D5A20E974F7708B50FF149D18B2739FC2CC9AF779D291FD1A4BFA7CC523E4D1DC2D7C372E519AE9FD1253329FE3182C172F2B43ED91E167AE2A9C5343" FilePath="PmPuPmouBundle.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="PerMachinePkg.msi" FilePath="PerMachinePkg.msi" FileSize="32768" Hash="4458C6B56290B207657AFB52DC20729FEDDA76799F21C14A7095E08CFB68CF382C5487CD53535CF24C16610066203ADFC29F25489BDE54290D1E480B7DED8FA6" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <Payload Id="PmouPkg1.msi" FilePath="PmouPkg1.msi" FileSize="32768" Hash="BCBB4F1C48953D23BE56CD7D5005BB38CB02C7BAC4AF30F87B7ADF7715EA721D28A3FCFC025D26FD5DC069BAB69F462577C3212C1BFE3707FCCE60FF3F3ED12C" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | ||
| 16 | <Payload Id="PmouPkg2.msi" FilePath="PmouPkg2.msi" FileSize="32768" Hash="C3BABBCCC0FDA4ACE44D28C60FAB2CA76C00655A405CF6F7A3593F9130FCF47AD18C4DAE1A32D5C0177F58DBAE00CBF7EDCA027BEE19B96E0145A3FA00811B51" Packaging="embedded" SourcePath="a2" Container="WixAttachedContainer" /> | ||
| 17 | <Payload Id="PerUserPkg.msi" FilePath="PerUserPkg.msi" FileSize="32768" Hash="26CA1B74EFC52FA969279450110B6A9472E629004EF5655A661D8609A7E4DDB76CA220E5DB6FC2AE554415D9A4E28567014F48EF978EFDEE0B4431E81498572F" Packaging="embedded" SourcePath="a3" Container="WixAttachedContainer" /> | ||
| 18 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 19 | <Registration BundleId="PmPuPmouBundle" Code="{6D7831C5-3A3B-481E-B048-E150DB402C74}" ExecutableName="PmPuPmouBundle.exe" Scope="perUser" Tag="" Version="1.0.0.0" ProviderKey="{6D7831C5-3A3B-481E-B048-E150DB402C74}"> | ||
| 20 | <Arp DisplayName="PmPuPmouBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 21 | </Registration> | ||
| 22 | <Chain> | ||
| 23 | <MsiPackage Id="PerMachinePkg.msi" Cache="keep" CacheId="{DD544949-52BA-432B-925E-9BF0C4DB4B83}v1.0.0.0" InstallSize="283" Size="32768" Scope="perMachine" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PerMachinePkg.msi" RollbackLogPathVariable="WixBundleRollbackLog_PerMachinePkg.msi" ProductCode="{DD544949-52BA-432B-925E-9BF0C4DB4B83}" Language="1033" Version="1.0.0.0" UpgradeCode="{40B2312E-4395-5299-A08F-5B2744AA5A39}"> | ||
| 24 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 25 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 26 | <Provides Key="{DD544949-52BA-432B-925E-9BF0C4DB4B83}_v1.0.0.0" Version="1.0.0.0" DisplayName="PerMachinePkg" /> | ||
| 27 | <RelatedPackage Id="{40B2312E-4395-5299-A08F-5B2744AA5A39}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 28 | <Language Id="1033" /> | ||
| 29 | </RelatedPackage> | ||
| 30 | <RelatedPackage Id="{40B2312E-4395-5299-A08F-5B2744AA5A39}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 31 | <Language Id="1033" /> | ||
| 32 | </RelatedPackage> | ||
| 33 | <PayloadRef Id="PerMachinePkg.msi" /> | ||
| 34 | </MsiPackage> | ||
| 35 | <MsiPackage Id="PmouPkg1.msi" Cache="keep" CacheId="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}v1.0.0.0" InstallSize="279" Size="32768" Scope="perMachineOrUser" Permanent="no" Vital="yes" LogPathVariable="WixBundleLog_PmouPkg1.msi" RollbackLogPathVariable="WixBundleRollbackLog_PmouPkg1.msi" ProductCode="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}" Language="1033" Version="1.0.0.0" UpgradeCode="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}"> | ||
| 36 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 37 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 38 | <Provides Key="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}_v1.0.0.0" Version="1.0.0.0" DisplayName="PmouPkg1" /> | ||
| 39 | <RelatedPackage Id="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 40 | <Language Id="1033" /> | ||
| 41 | </RelatedPackage> | ||
| 42 | <RelatedPackage Id="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 43 | <Language Id="1033" /> | ||
| 44 | </RelatedPackage> | ||
| 45 | <PayloadRef Id="PmouPkg1.msi" /> | ||
| 46 | </MsiPackage> | ||
| 47 | <MsiPackage Id="PmouPkg2.msi" Cache="keep" CacheId="{1B1D793E-4026-48CA-B088-F919E70440AC}v1.0.0.0" InstallSize="279" Size="32768" Scope="perMachineOrUser" Permanent="no" Vital="yes" LogPathVariable="WixBundleLog_PmouPkg2.msi" RollbackLogPathVariable="WixBundleRollbackLog_PmouPkg2.msi" ProductCode="{1B1D793E-4026-48CA-B088-F919E70440AC}" Language="1033" Version="1.0.0.0" UpgradeCode="{98F763B3-EA17-5AE5-AD47-21004FB34B24}"> | ||
| 48 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 49 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 50 | <Provides Key="{1B1D793E-4026-48CA-B088-F919E70440AC}_v1.0.0.0" Version="1.0.0.0" DisplayName="PmouPkg2" /> | ||
| 51 | <RelatedPackage Id="{98F763B3-EA17-5AE5-AD47-21004FB34B24}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 52 | <Language Id="1033" /> | ||
| 53 | </RelatedPackage> | ||
| 54 | <RelatedPackage Id="{98F763B3-EA17-5AE5-AD47-21004FB34B24}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 55 | <Language Id="1033" /> | ||
| 56 | </RelatedPackage> | ||
| 57 | <PayloadRef Id="PmouPkg2.msi" /> | ||
| 58 | </MsiPackage> | ||
| 59 | <MsiPackage Id="PerUserPkg.msi" Cache="keep" CacheId="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}v1.0.0.0" InstallSize="274" Size="32768" Scope="perUser" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PerUserPkg.msi" RollbackLogPathVariable="WixBundleRollbackLog_PerUserPkg.msi" ProductCode="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}" Language="1033" Version="1.0.0.0" UpgradeCode="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}"> | ||
| 60 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 61 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 62 | <Provides Key="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}_v1.0.0.0" Version="1.0.0.0" DisplayName="PerUserPkg" /> | ||
| 63 | <RelatedPackage Id="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 64 | <Language Id="1033" /> | ||
| 65 | </RelatedPackage> | ||
| 66 | <RelatedPackage Id="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 67 | <Language Id="1033" /> | ||
| 68 | </RelatedPackage> | ||
| 69 | <PayloadRef Id="PerUserPkg.msi" /> | ||
| 70 | </MsiPackage> | ||
| 71 | </Chain> | ||
| 72 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPuPuomBundle_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPuPuomBundle_manifest.xml new file mode 100644 index 00000000..4bbd5307 --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPuPuomBundle_manifest.xml | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="PmPuPuomBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{24F67952-8FCC-58B6-8A79-76F35525AAC4}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="131224" Hash="5A33E8012AC2E16CBD94668E8F871F023044CB37BE65C62A483C1896DC262C0F7D16C374405C28AE0F3AD000BEF8CED1858B9A7DBDEC9CDB2E01B7B67C506D1B" FilePath="PmPuPuomBundle.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="PerMachinePkg.msi" FilePath="PerMachinePkg.msi" FileSize="32768" Hash="4458C6B56290B207657AFB52DC20729FEDDA76799F21C14A7095E08CFB68CF382C5487CD53535CF24C16610066203ADFC29F25489BDE54290D1E480B7DED8FA6" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <Payload Id="PuomPkg1.msi" FilePath="PuomPkg1.msi" FileSize="32768" Hash="EF19E061C2647AD42E39A1721299D5D970F1E42CE6636ACA53009DC0D0D1F8B6F2FD516B7D3EEDAAF1EEDA364D54DA6C18FB929C385EC1BDDA08AEA50370B357" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | ||
| 16 | <Payload Id="PuomPkg2.msi" FilePath="PuomPkg2.msi" FileSize="32768" Hash="F927CE9CD3272AF6571E39C72A68E6BD6808D944B6893B09253887B1942E1C043EC5E1E1E758D3C261FF8B566121EE809C4CBCB931D00EBF14CC6CFE24001292" Packaging="embedded" SourcePath="a2" Container="WixAttachedContainer" /> | ||
| 17 | <Payload Id="PerUserPkg.msi" FilePath="PerUserPkg.msi" FileSize="32768" Hash="26CA1B74EFC52FA969279450110B6A9472E629004EF5655A661D8609A7E4DDB76CA220E5DB6FC2AE554415D9A4E28567014F48EF978EFDEE0B4431E81498572F" Packaging="embedded" SourcePath="a3" Container="WixAttachedContainer" /> | ||
| 18 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 19 | <Registration BundleId="PmPuPuomBundle" Code="{37290F81-A99C-4FBE-84F2-9A2E4742453C}" ExecutableName="PmPuPuomBundle.exe" Scope="perUser" Tag="" Version="1.0.0.0" ProviderKey="{37290F81-A99C-4FBE-84F2-9A2E4742453C}"> | ||
| 20 | <Arp DisplayName="PmPuPuomBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 21 | </Registration> | ||
| 22 | <Chain> | ||
| 23 | <MsiPackage Id="PerMachinePkg.msi" Cache="keep" CacheId="{DD544949-52BA-432B-925E-9BF0C4DB4B83}v1.0.0.0" InstallSize="283" Size="32768" Scope="perMachine" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PerMachinePkg.msi" RollbackLogPathVariable="WixBundleRollbackLog_PerMachinePkg.msi" ProductCode="{DD544949-52BA-432B-925E-9BF0C4DB4B83}" Language="1033" Version="1.0.0.0" UpgradeCode="{40B2312E-4395-5299-A08F-5B2744AA5A39}"> | ||
| 24 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 25 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 26 | <Provides Key="{DD544949-52BA-432B-925E-9BF0C4DB4B83}_v1.0.0.0" Version="1.0.0.0" DisplayName="PerMachinePkg" /> | ||
| 27 | <RelatedPackage Id="{40B2312E-4395-5299-A08F-5B2744AA5A39}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 28 | <Language Id="1033" /> | ||
| 29 | </RelatedPackage> | ||
| 30 | <RelatedPackage Id="{40B2312E-4395-5299-A08F-5B2744AA5A39}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 31 | <Language Id="1033" /> | ||
| 32 | </RelatedPackage> | ||
| 33 | <PayloadRef Id="PerMachinePkg.msi" /> | ||
| 34 | </MsiPackage> | ||
| 35 | <MsiPackage Id="PuomPkg1.msi" Cache="keep" CacheId="{167C572B-D847-4BCF-9693-C8B5EB6350CD}v1.0.0.0" InstallSize="279" Size="32768" Scope="perUserOrMachine" Permanent="no" Vital="yes" LogPathVariable="WixBundleLog_PuomPkg1.msi" RollbackLogPathVariable="WixBundleRollbackLog_PuomPkg1.msi" ProductCode="{167C572B-D847-4BCF-9693-C8B5EB6350CD}" Language="1033" Version="1.0.0.0" UpgradeCode="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}"> | ||
| 36 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 37 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 38 | <Provides Key="{167C572B-D847-4BCF-9693-C8B5EB6350CD}_v1.0.0.0" Version="1.0.0.0" DisplayName="PuomPkg1" /> | ||
| 39 | <RelatedPackage Id="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 40 | <Language Id="1033" /> | ||
| 41 | </RelatedPackage> | ||
| 42 | <RelatedPackage Id="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 43 | <Language Id="1033" /> | ||
| 44 | </RelatedPackage> | ||
| 45 | <PayloadRef Id="PuomPkg1.msi" /> | ||
| 46 | </MsiPackage> | ||
| 47 | <MsiPackage Id="PuomPkg2.msi" Cache="keep" CacheId="{07617017-CE68-4F88-981A-4629835C9BD2}v1.0.0.0" InstallSize="279" Size="32768" Scope="perUserOrMachine" Permanent="no" Vital="yes" LogPathVariable="WixBundleLog_PuomPkg2.msi" RollbackLogPathVariable="WixBundleRollbackLog_PuomPkg2.msi" ProductCode="{07617017-CE68-4F88-981A-4629835C9BD2}" Language="1033" Version="1.0.0.0" UpgradeCode="{C977A922-168B-59F0-84FD-CAB89DB314E0}"> | ||
| 48 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 49 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 50 | <Provides Key="{07617017-CE68-4F88-981A-4629835C9BD2}_v1.0.0.0" Version="1.0.0.0" DisplayName="PuomPkg2" /> | ||
| 51 | <RelatedPackage Id="{C977A922-168B-59F0-84FD-CAB89DB314E0}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 52 | <Language Id="1033" /> | ||
| 53 | </RelatedPackage> | ||
| 54 | <RelatedPackage Id="{C977A922-168B-59F0-84FD-CAB89DB314E0}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 55 | <Language Id="1033" /> | ||
| 56 | </RelatedPackage> | ||
| 57 | <PayloadRef Id="PuomPkg2.msi" /> | ||
| 58 | </MsiPackage> | ||
| 59 | <MsiPackage Id="PerUserPkg.msi" Cache="keep" CacheId="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}v1.0.0.0" InstallSize="274" Size="32768" Scope="perUser" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PerUserPkg.msi" RollbackLogPathVariable="WixBundleRollbackLog_PerUserPkg.msi" ProductCode="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}" Language="1033" Version="1.0.0.0" UpgradeCode="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}"> | ||
| 60 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 61 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 62 | <Provides Key="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}_v1.0.0.0" Version="1.0.0.0" DisplayName="PerUserPkg" /> | ||
| 63 | <RelatedPackage Id="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 64 | <Language Id="1033" /> | ||
| 65 | </RelatedPackage> | ||
| 66 | <RelatedPackage Id="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 67 | <Language Id="1033" /> | ||
| 68 | </RelatedPackage> | ||
| 69 | <PayloadRef Id="PerUserPkg.msi" /> | ||
| 70 | </MsiPackage> | ||
| 71 | </Chain> | ||
| 72 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPuomBundle_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPuomBundle_manifest.xml new file mode 100644 index 00000000..6ea9e9bd --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/PmPuomBundle_manifest.xml | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="PmPuomBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{24038F27-3104-5E4E-987B-1C1F81A88D56}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="98429" Hash="5AF2416362232E3DED34FDBAA37EBA07FAA96526A87DDA64609762CC95B85DD95D4CB3F907A0D331C9A19D89121737C8A54E78DD65A4979189B040A4521F2115" FilePath="PmPuomBundle.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="PerMachinePkg.msi" FilePath="PerMachinePkg.msi" FileSize="32768" Hash="4458C6B56290B207657AFB52DC20729FEDDA76799F21C14A7095E08CFB68CF382C5487CD53535CF24C16610066203ADFC29F25489BDE54290D1E480B7DED8FA6" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <Payload Id="PuomPkg1.msi" FilePath="PuomPkg1.msi" FileSize="32768" Hash="EF19E061C2647AD42E39A1721299D5D970F1E42CE6636ACA53009DC0D0D1F8B6F2FD516B7D3EEDAAF1EEDA364D54DA6C18FB929C385EC1BDDA08AEA50370B357" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | ||
| 16 | <Payload Id="PuomPkg2.msi" FilePath="PuomPkg2.msi" FileSize="32768" Hash="F927CE9CD3272AF6571E39C72A68E6BD6808D944B6893B09253887B1942E1C043EC5E1E1E758D3C261FF8B566121EE809C4CBCB931D00EBF14CC6CFE24001292" Packaging="embedded" SourcePath="a2" Container="WixAttachedContainer" /> | ||
| 17 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 18 | <Registration BundleId="PmPuomBundle" Code="{8D5DB5A9-22B1-475E-AC99-CA7E9179B94F}" ExecutableName="PmPuomBundle.exe" Scope="perUserOrMachine" Tag="" Version="1.0.0.0" ProviderKey="{8D5DB5A9-22B1-475E-AC99-CA7E9179B94F}"> | ||
| 19 | <Arp DisplayName="PmPuomBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 20 | </Registration> | ||
| 21 | <Chain> | ||
| 22 | <MsiPackage Id="PerMachinePkg.msi" Cache="keep" CacheId="{DD544949-52BA-432B-925E-9BF0C4DB4B83}v1.0.0.0" InstallSize="283" Size="32768" Scope="perMachine" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PerMachinePkg.msi" RollbackLogPathVariable="WixBundleRollbackLog_PerMachinePkg.msi" ProductCode="{DD544949-52BA-432B-925E-9BF0C4DB4B83}" Language="1033" Version="1.0.0.0" UpgradeCode="{40B2312E-4395-5299-A08F-5B2744AA5A39}"> | ||
| 23 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 24 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 25 | <Provides Key="{DD544949-52BA-432B-925E-9BF0C4DB4B83}_v1.0.0.0" Version="1.0.0.0" DisplayName="PerMachinePkg" /> | ||
| 26 | <RelatedPackage Id="{40B2312E-4395-5299-A08F-5B2744AA5A39}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 27 | <Language Id="1033" /> | ||
| 28 | </RelatedPackage> | ||
| 29 | <RelatedPackage Id="{40B2312E-4395-5299-A08F-5B2744AA5A39}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 30 | <Language Id="1033" /> | ||
| 31 | </RelatedPackage> | ||
| 32 | <PayloadRef Id="PerMachinePkg.msi" /> | ||
| 33 | </MsiPackage> | ||
| 34 | <MsiPackage Id="PuomPkg1.msi" Cache="keep" CacheId="{167C572B-D847-4BCF-9693-C8B5EB6350CD}v1.0.0.0" InstallSize="279" Size="32768" Scope="perUserOrMachine" Permanent="no" Vital="yes" LogPathVariable="WixBundleLog_PuomPkg1.msi" RollbackLogPathVariable="WixBundleRollbackLog_PuomPkg1.msi" ProductCode="{167C572B-D847-4BCF-9693-C8B5EB6350CD}" Language="1033" Version="1.0.0.0" UpgradeCode="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}"> | ||
| 35 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 36 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 37 | <Provides Key="{167C572B-D847-4BCF-9693-C8B5EB6350CD}_v1.0.0.0" Version="1.0.0.0" DisplayName="PuomPkg1" /> | ||
| 38 | <RelatedPackage Id="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 39 | <Language Id="1033" /> | ||
| 40 | </RelatedPackage> | ||
| 41 | <RelatedPackage Id="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 42 | <Language Id="1033" /> | ||
| 43 | </RelatedPackage> | ||
| 44 | <PayloadRef Id="PuomPkg1.msi" /> | ||
| 45 | </MsiPackage> | ||
| 46 | <MsiPackage Id="PuomPkg2.msi" Cache="keep" CacheId="{07617017-CE68-4F88-981A-4629835C9BD2}v1.0.0.0" InstallSize="279" Size="32768" Scope="perUserOrMachine" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PuomPkg2.msi" RollbackLogPathVariable="WixBundleRollbackLog_PuomPkg2.msi" ProductCode="{07617017-CE68-4F88-981A-4629835C9BD2}" Language="1033" Version="1.0.0.0" UpgradeCode="{C977A922-168B-59F0-84FD-CAB89DB314E0}"> | ||
| 47 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 48 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 49 | <Provides Key="{07617017-CE68-4F88-981A-4629835C9BD2}_v1.0.0.0" Version="1.0.0.0" DisplayName="PuomPkg2" /> | ||
| 50 | <RelatedPackage Id="{C977A922-168B-59F0-84FD-CAB89DB314E0}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 51 | <Language Id="1033" /> | ||
| 52 | </RelatedPackage> | ||
| 53 | <RelatedPackage Id="{C977A922-168B-59F0-84FD-CAB89DB314E0}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 54 | <Language Id="1033" /> | ||
| 55 | </RelatedPackage> | ||
| 56 | <PayloadRef Id="PuomPkg2.msi" /> | ||
| 57 | </MsiPackage> | ||
| 58 | </Chain> | ||
| 59 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/PuPmouBundle_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/PuPmouBundle_manifest.xml new file mode 100644 index 00000000..79bb2500 --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/PuPmouBundle_manifest.xml | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="PuPmouBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{92C1B57B-1972-5EB7-BB59-B4D230D806C7}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="98429" Hash="787872CCF9B905BE17725AD6F4DA2C8ACE196AA7BB90B54421E5029D85FF1F70BB51A91FAD81D2F7E09A956430866E208EF2A51681822501A39B791B88703F20" FilePath="PuPmouBundle.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="PmouPkg1.msi" FilePath="PmouPkg1.msi" FileSize="32768" Hash="BCBB4F1C48953D23BE56CD7D5005BB38CB02C7BAC4AF30F87B7ADF7715EA721D28A3FCFC025D26FD5DC069BAB69F462577C3212C1BFE3707FCCE60FF3F3ED12C" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <Payload Id="PmouPkg2.msi" FilePath="PmouPkg2.msi" FileSize="32768" Hash="C3BABBCCC0FDA4ACE44D28C60FAB2CA76C00655A405CF6F7A3593F9130FCF47AD18C4DAE1A32D5C0177F58DBAE00CBF7EDCA027BEE19B96E0145A3FA00811B51" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | ||
| 16 | <Payload Id="PerUserPkg.msi" FilePath="PerUserPkg.msi" FileSize="32768" Hash="26CA1B74EFC52FA969279450110B6A9472E629004EF5655A661D8609A7E4DDB76CA220E5DB6FC2AE554415D9A4E28567014F48EF978EFDEE0B4431E81498572F" Packaging="embedded" SourcePath="a2" Container="WixAttachedContainer" /> | ||
| 17 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 18 | <Registration BundleId="PuPmouBundle" Code="{E974001C-97B1-4FF7-B1E3-B2CAACF1FF4A}" ExecutableName="PuPmouBundle.exe" Scope="perUser" Tag="" Version="1.0.0.0" ProviderKey="{E974001C-97B1-4FF7-B1E3-B2CAACF1FF4A}"> | ||
| 19 | <Arp DisplayName="PuPmouBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 20 | </Registration> | ||
| 21 | <Chain> | ||
| 22 | <MsiPackage Id="PmouPkg1.msi" Cache="keep" CacheId="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}v1.0.0.0" InstallSize="279" Size="32768" Scope="perMachineOrUser" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PmouPkg1.msi" RollbackLogPathVariable="WixBundleRollbackLog_PmouPkg1.msi" ProductCode="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}" Language="1033" Version="1.0.0.0" UpgradeCode="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}"> | ||
| 23 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 24 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 25 | <Provides Key="{E46705B9-D2F9-4BE8-8270-F1A11196A9D4}_v1.0.0.0" Version="1.0.0.0" DisplayName="PmouPkg1" /> | ||
| 26 | <RelatedPackage Id="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 27 | <Language Id="1033" /> | ||
| 28 | </RelatedPackage> | ||
| 29 | <RelatedPackage Id="{B0DA1185-5CF5-55A3-8351-01F1AD3E50CE}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 30 | <Language Id="1033" /> | ||
| 31 | </RelatedPackage> | ||
| 32 | <PayloadRef Id="PmouPkg1.msi" /> | ||
| 33 | </MsiPackage> | ||
| 34 | <MsiPackage Id="PmouPkg2.msi" Cache="keep" CacheId="{1B1D793E-4026-48CA-B088-F919E70440AC}v1.0.0.0" InstallSize="279" Size="32768" Scope="perMachineOrUser" Permanent="no" Vital="yes" LogPathVariable="WixBundleLog_PmouPkg2.msi" RollbackLogPathVariable="WixBundleRollbackLog_PmouPkg2.msi" ProductCode="{1B1D793E-4026-48CA-B088-F919E70440AC}" Language="1033" Version="1.0.0.0" UpgradeCode="{98F763B3-EA17-5AE5-AD47-21004FB34B24}"> | ||
| 35 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 36 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 37 | <Provides Key="{1B1D793E-4026-48CA-B088-F919E70440AC}_v1.0.0.0" Version="1.0.0.0" DisplayName="PmouPkg2" /> | ||
| 38 | <RelatedPackage Id="{98F763B3-EA17-5AE5-AD47-21004FB34B24}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 39 | <Language Id="1033" /> | ||
| 40 | </RelatedPackage> | ||
| 41 | <RelatedPackage Id="{98F763B3-EA17-5AE5-AD47-21004FB34B24}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 42 | <Language Id="1033" /> | ||
| 43 | </RelatedPackage> | ||
| 44 | <PayloadRef Id="PmouPkg2.msi" /> | ||
| 45 | </MsiPackage> | ||
| 46 | <MsiPackage Id="PerUserPkg.msi" Cache="keep" CacheId="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}v1.0.0.0" InstallSize="274" Size="32768" Scope="perUser" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PerUserPkg.msi" RollbackLogPathVariable="WixBundleRollbackLog_PerUserPkg.msi" ProductCode="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}" Language="1033" Version="1.0.0.0" UpgradeCode="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}"> | ||
| 47 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 48 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 49 | <Provides Key="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}_v1.0.0.0" Version="1.0.0.0" DisplayName="PerUserPkg" /> | ||
| 50 | <RelatedPackage Id="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 51 | <Language Id="1033" /> | ||
| 52 | </RelatedPackage> | ||
| 53 | <RelatedPackage Id="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 54 | <Language Id="1033" /> | ||
| 55 | </RelatedPackage> | ||
| 56 | <PayloadRef Id="PerUserPkg.msi" /> | ||
| 57 | </MsiPackage> | ||
| 58 | </Chain> | ||
| 59 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/PuPuomBundle_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/PuPuomBundle_manifest.xml new file mode 100644 index 00000000..20dc0102 --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/PuPuomBundle_manifest.xml | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="PuPuomBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{B0E91543-B4AC-5229-A871-3310CC2C32DF}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="98429" Hash="29DF486489C9075258FB216672D76A4BB5BEC498157964F641EA360DB2C80EE37B737654A54B6F1FBB2E96E727A80B2B708AD69534EE9CE0E29ACEF09704896D" FilePath="PuPuomBundle.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="PuomPkg1.msi" FilePath="PuomPkg1.msi" FileSize="32768" Hash="EF19E061C2647AD42E39A1721299D5D970F1E42CE6636ACA53009DC0D0D1F8B6F2FD516B7D3EEDAAF1EEDA364D54DA6C18FB929C385EC1BDDA08AEA50370B357" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <Payload Id="PuomPkg2.msi" FilePath="PuomPkg2.msi" FileSize="32768" Hash="F927CE9CD3272AF6571E39C72A68E6BD6808D944B6893B09253887B1942E1C043EC5E1E1E758D3C261FF8B566121EE809C4CBCB931D00EBF14CC6CFE24001292" Packaging="embedded" SourcePath="a1" Container="WixAttachedContainer" /> | ||
| 16 | <Payload Id="PerUserPkg.msi" FilePath="PerUserPkg.msi" FileSize="32768" Hash="26CA1B74EFC52FA969279450110B6A9472E629004EF5655A661D8609A7E4DDB76CA220E5DB6FC2AE554415D9A4E28567014F48EF978EFDEE0B4431E81498572F" Packaging="embedded" SourcePath="a2" Container="WixAttachedContainer" /> | ||
| 17 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 18 | <Registration BundleId="PuPuomBundle" Code="{6440CE0F-C219-4559-A051-97A655C4230A}" ExecutableName="PuPuomBundle.exe" Scope="perUser" Tag="" Version="1.0.0.0" ProviderKey="{6440CE0F-C219-4559-A051-97A655C4230A}"> | ||
| 19 | <Arp DisplayName="PuPuomBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 20 | </Registration> | ||
| 21 | <Chain> | ||
| 22 | <MsiPackage Id="PuomPkg1.msi" Cache="keep" CacheId="{167C572B-D847-4BCF-9693-C8B5EB6350CD}v1.0.0.0" InstallSize="279" Size="32768" Scope="perUserOrMachine" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PuomPkg1.msi" RollbackLogPathVariable="WixBundleRollbackLog_PuomPkg1.msi" ProductCode="{167C572B-D847-4BCF-9693-C8B5EB6350CD}" Language="1033" Version="1.0.0.0" UpgradeCode="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}"> | ||
| 23 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 24 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 25 | <Provides Key="{167C572B-D847-4BCF-9693-C8B5EB6350CD}_v1.0.0.0" Version="1.0.0.0" DisplayName="PuomPkg1" /> | ||
| 26 | <RelatedPackage Id="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 27 | <Language Id="1033" /> | ||
| 28 | </RelatedPackage> | ||
| 29 | <RelatedPackage Id="{AC3A2D0C-CB37-5F8B-8CE1-9233B963E5BB}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 30 | <Language Id="1033" /> | ||
| 31 | </RelatedPackage> | ||
| 32 | <PayloadRef Id="PuomPkg1.msi" /> | ||
| 33 | </MsiPackage> | ||
| 34 | <MsiPackage Id="PuomPkg2.msi" Cache="keep" CacheId="{07617017-CE68-4F88-981A-4629835C9BD2}v1.0.0.0" InstallSize="279" Size="32768" Scope="perUserOrMachine" Permanent="no" Vital="yes" LogPathVariable="WixBundleLog_PuomPkg2.msi" RollbackLogPathVariable="WixBundleRollbackLog_PuomPkg2.msi" ProductCode="{07617017-CE68-4F88-981A-4629835C9BD2}" Language="1033" Version="1.0.0.0" UpgradeCode="{C977A922-168B-59F0-84FD-CAB89DB314E0}"> | ||
| 35 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 36 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 37 | <Provides Key="{07617017-CE68-4F88-981A-4629835C9BD2}_v1.0.0.0" Version="1.0.0.0" DisplayName="PuomPkg2" /> | ||
| 38 | <RelatedPackage Id="{C977A922-168B-59F0-84FD-CAB89DB314E0}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 39 | <Language Id="1033" /> | ||
| 40 | </RelatedPackage> | ||
| 41 | <RelatedPackage Id="{C977A922-168B-59F0-84FD-CAB89DB314E0}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 42 | <Language Id="1033" /> | ||
| 43 | </RelatedPackage> | ||
| 44 | <PayloadRef Id="PuomPkg2.msi" /> | ||
| 45 | </MsiPackage> | ||
| 46 | <MsiPackage Id="PerUserPkg.msi" Cache="keep" CacheId="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}v1.0.0.0" InstallSize="274" Size="32768" Scope="perUser" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PerUserPkg.msi" RollbackLogPathVariable="WixBundleRollbackLog_PerUserPkg.msi" ProductCode="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}" Language="1033" Version="1.0.0.0" UpgradeCode="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}"> | ||
| 47 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | ||
| 48 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | ||
| 49 | <Provides Key="{7DA760D5-30A8-4A32-A2E0-1563E0C99CEB}_v1.0.0.0" Version="1.0.0.0" DisplayName="PerUserPkg" /> | ||
| 50 | <RelatedPackage Id="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}" MaxVersion="1.0.0.0" MaxInclusive="no" OnlyDetect="no" LangInclusive="yes"> | ||
| 51 | <Language Id="1033" /> | ||
| 52 | </RelatedPackage> | ||
| 53 | <RelatedPackage Id="{0D1FCBA3-488C-5309-B67C-E00C8B3FCADD}" MinVersion="1.0.0.0" MinInclusive="no" OnlyDetect="yes" LangInclusive="yes"> | ||
| 54 | <Language Id="1033" /> | ||
| 55 | </RelatedPackage> | ||
| 56 | <PayloadRef Id="PerUserPkg.msi" /> | ||
| 57 | </MsiPackage> | ||
| 58 | </Chain> | ||
| 59 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/PuomBundlePackage_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/PuomBundlePackage_manifest.xml new file mode 100644 index 00000000..60123409 --- /dev/null +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/PuomBundlePackage_manifest.xml | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <BurnManifest EngineVersion="7.0.0.54" ProtocolVersion="1" Win64="no" xmlns="http://wixtoolset.org/schemas/v4/2008/Burn"> | ||
| 3 | <Log PathVariable="WixBundleLog" Prefix="AllPuomBundle" Extension="log" /> | ||
| 4 | <RelatedBundle Code="{689DDFCE-6492-596F-92DC-341CCDF59ABB}" Action="Upgrade" /> | ||
| 5 | <UX PrimaryPayloadId="WixStandardBootstrapperApplication_X86"> | ||
| 6 | <Payload Id="payberKyKpNVb0s10isnONgjD92jYc" FilePath="thm.xml" SourcePath="u0" /> | ||
| 7 | <Payload Id="payXE.1bvyKgymWAWeJwB8BL4ifPGo" FilePath="thm.wxl" SourcePath="u1" /> | ||
| 8 | <Payload Id="pay8cUoxSucOqsVErqhu1LEW8wSG1s" FilePath="logo.png" SourcePath="u2" /> | ||
| 9 | <Payload Id="WixStandardBootstrapperApplication_X86" FilePath="wixstdba.exe" SourcePath="u3" /> | ||
| 10 | <Payload Id="uxTxMXPVMXwQrPTMIGa5WGt93w0Ns" FilePath="BootstrapperApplicationData.xml" SourcePath="u4" /> | ||
| 11 | <Payload Id="uxmKgAFS4cS31ZH_Myfqo5J4kHixQ" FilePath="BootstrapperExtensionData.xml" SourcePath="u5" /> | ||
| 12 | </UX> | ||
| 13 | <Container Id="WixAttachedContainer" FileSize="6212364" Hash="62B3BCE91659C71B4382EBE5699FDB0D9A903D5293EB6EC9211D401590C72F9A0C755F28F88D0A70BB7716710457B5480A8EBC9FEC6E103A30F2A03A301AFD10" FilePath="PuomBundlePackage.exe" AttachedIndex="1" Attached="yes" Primary="yes" /> | ||
| 14 | <Payload Id="AllPuomBundle.exe" FilePath="AllPuomBundle.exe" FileSize="6210781" Hash="99C28419B07FDFC7C89AAB483FE7B2BB35102556959E9F2169CAB8A25FCFF2583F7B1079A69CB902ACDD3EE390E890AC9C9D54A108D70BFBB4AF26EC61AB4929" Packaging="embedded" SourcePath="a0" Container="WixAttachedContainer" /> | ||
| 15 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | ||
| 16 | <Registration BundleId="AllPuomBundle" Code="{AF0B0375-34C0-4BEF-9411-ACD15D2084CB}" ExecutableName="PuomBundlePackage.exe" Scope="perUserOrMachine" Tag="" Version="1.0.0.0" ProviderKey="{AF0B0375-34C0-4BEF-9411-ACD15D2084CB}"> | ||
| 17 | <Arp DisplayName="AllPuomBundle" DisplayVersion="1.0.0.0" Publisher="Acme" /> | ||
| 18 | </Registration> | ||
| 19 | <Chain> | ||
| 20 | <BundlePackage Id="AllPuomBundle.exe" Cache="keep" CacheId="{37A6F602-178E-4A32-B766-EDC2CB81274B}v1.0.0.0" InstallSize="558" Size="6210781" Scope="perUserOrMachine" Permanent="no" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_AllPuomBundle.exe" RollbackLogPathVariable="WixBundleRollbackLog_AllPuomBundle.exe" BundleCode="{37A6F602-178E-4A32-B766-EDC2CB81274B}" Version="1.0.0.0" InstallArguments="" UninstallArguments="" RepairArguments="" SupportsBurnProtocol="yes" Win64="no" HideARP="yes"> | ||
| 21 | <Provides Key="{37A6F602-178E-4A32-B766-EDC2CB81274B}" Version="1.0.0.0" DisplayName="AllPuomBundle" Imported="yes" /> | ||
| 22 | <RelatedBundle Code="{689DDFCE-6492-596F-92DC-341CCDF59ABB}" Action="Upgrade" /> | ||
| 23 | <PayloadRef Id="AllPuomBundle.exe" /> | ||
| 24 | </BundlePackage> | ||
| 25 | </Chain> | ||
| 26 | </BurnManifest> \ No newline at end of file | ||
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml index 495bbf05..e4075796 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml | |||
| @@ -45,14 +45,14 @@ | |||
| 45 | <Payload Id="PackageA" FilePath="PackageAv1.msi" FileSize="32768" Hash="2369B16B7219B3C834DFBC5D2AF8B2EF8803D43D" Packaging="external" SourcePath="PackageAv1.msi" /> | 45 | <Payload Id="PackageA" FilePath="PackageAv1.msi" FileSize="32768" Hash="2369B16B7219B3C834DFBC5D2AF8B2EF8803D43D" Packaging="external" SourcePath="PackageAv1.msi" /> |
| 46 | <Payload Id="PatchA" FilePath="PatchA.msp" FileSize="20480" Hash="FABC6C18E4A778E127E84CDF67F93A291CAEC8BB" Packaging="external" SourcePath="PatchA.msp" /> | 46 | <Payload Id="PatchA" FilePath="PatchA.msp" FileSize="20480" Hash="FABC6C18E4A778E127E84CDF67F93A291CAEC8BB" Packaging="external" SourcePath="PatchA.msp" /> |
| 47 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | 47 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> |
| 48 | <Registration Code="{22D1DDBA-284D-40A7-BD14-95EA07906F21}" ExecutableName="BundleA.exe" PerMachine="yes" Tag="" Version="1.0.0.0" ProviderKey="{22D1DDBA-284D-40A7-BD14-95EA07906F21}"> | 48 | <Registration Code="{22D1DDBA-284D-40A7-BD14-95EA07906F21}" ExecutableName="BundleA.exe" Scope="permachine" Tag="" Version="1.0.0.0" ProviderKey="{22D1DDBA-284D-40A7-BD14-95EA07906F21}"> |
| 49 | <Arp Register="yes" DisplayName="~SlipstreamTests - BundleA" DisplayVersion="1.0.0.0" /> | 49 | <Arp Register="yes" DisplayName="~SlipstreamTests - BundleA" DisplayVersion="1.0.0.0" /> |
| 50 | </Registration> | 50 | </Registration> |
| 51 | <Chain> | 51 | <Chain> |
| 52 | <ExePackage Id="NetFx48Web" Cache="keep" CacheId="5A84A8E612E270E27D0061D58DB6B470153BE1F9" InstallSize="1479400" Size="1479400" PerMachine="yes" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="NetFx48WebLog" RollbackLogPathVariable="WixBundleRollbackLog_NetFx48Web" DetectCondition="NETFRAMEWORK45 >= 528040" InstallArguments="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html"" UninstallArguments="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html"" RepairArguments="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html"" Repairable="yes" Uninstallable="yes" Protocol="netfx4" DetectionType="condition"> | 52 | <ExePackage Id="NetFx48Web" Cache="keep" CacheId="5A84A8E612E270E27D0061D58DB6B470153BE1F9" InstallSize="1479400" Size="1479400" Scope="permachine" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="NetFx48WebLog" RollbackLogPathVariable="WixBundleRollbackLog_NetFx48Web" DetectCondition="NETFRAMEWORK45 >= 528040" InstallArguments="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html"" UninstallArguments="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html"" RepairArguments="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html"" Repairable="yes" Uninstallable="yes" Protocol="netfx4" DetectionType="condition"> |
| 53 | <PayloadRef Id="NetFx48Web" /> | 53 | <PayloadRef Id="NetFx48Web" /> |
| 54 | </ExePackage> | 54 | </ExePackage> |
| 55 | <MsiPackage Id="PackageA" Cache="keep" CacheId="{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}v1.0.0.0" InstallSize="2103" Size="32768" PerMachine="yes" Permanent="no" Vital="yes" LogPathVariable="WixBundleLog_PackageA" RollbackLogPathVariable="WixBundleRollbackLog_PackageA" ProductCode="{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}" Language="1033" Version="1.0.0.0" UpgradeCode="{DB87BB66-FE5D-4293-81AC-EE313D3F864B}"> | 55 | <MsiPackage Id="PackageA" Cache="keep" CacheId="{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}v1.0.0.0" InstallSize="2103" Size="32768" Scope="permachine" Permanent="no" Vital="yes" LogPathVariable="WixBundleLog_PackageA" RollbackLogPathVariable="WixBundleRollbackLog_PackageA" ProductCode="{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}" Language="1033" Version="1.0.0.0" UpgradeCode="{DB87BB66-FE5D-4293-81AC-EE313D3F864B}"> |
| 56 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | 56 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> |
| 57 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | 57 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> |
| 58 | <SlipstreamMsp Id="PatchA" /> | 58 | <SlipstreamMsp Id="PatchA" /> |
| @@ -65,7 +65,7 @@ | |||
| 65 | </RelatedPackage> | 65 | </RelatedPackage> |
| 66 | <PayloadRef Id="PackageA" /> | 66 | <PayloadRef Id="PackageA" /> |
| 67 | </MsiPackage> | 67 | </MsiPackage> |
| 68 | <MspPackage Id="PatchA" Cache="keep" CacheId="{0A5113E3-06A5-4CE0-8E83-9EB42F6764A6}" InstallSize="20480" Size="20480" PerMachine="yes" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PatchA" RollbackLogPathVariable="WixBundleRollbackLog_PatchA" PatchCode="{0A5113E3-06A5-4CE0-8E83-9EB42F6764A6}" PatchXml="<?xml version="1.0" encoding="utf-16"?><MsiPatch xmlns="http://www.microsoft.com/msi/patch_applicability.xsd" SchemaVersion="1.0.0.0" PatchGUID="{0A5113E3-06A5-4CE0-8E83-9EB42F6764A6}" MinMsiVersion="5" TargetsRTM="true"><TargetProduct MinMsiVersion="500"><TargetProductCode Validate="true">{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}</TargetProductCode><TargetVersion Validate="true" ComparisonType="Equal" ComparisonFilter="MajorMinorUpdate">1.0.0.0</TargetVersion><UpdatedVersion>1.0.1.0</UpdatedVersion><TargetLanguage Validate="false">1033</TargetLanguage><UpdatedLanguages>1033</UpdatedLanguages><UpgradeCode Validate="true">{DB87BB66-FE5D-4293-81AC-EE313D3F864B}</UpgradeCode></TargetProduct><TargetProductCode>{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}</TargetProductCode></MsiPatch>"> | 68 | <MspPackage Id="PatchA" Cache="keep" CacheId="{0A5113E3-06A5-4CE0-8E83-9EB42F6764A6}" InstallSize="20480" Size="20480" Scope="permachine" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PatchA" RollbackLogPathVariable="WixBundleRollbackLog_PatchA" PatchCode="{0A5113E3-06A5-4CE0-8E83-9EB42F6764A6}" PatchXml="<?xml version="1.0" encoding="utf-16"?><MsiPatch xmlns="http://www.microsoft.com/msi/patch_applicability.xsd" SchemaVersion="1.0.0.0" PatchGUID="{0A5113E3-06A5-4CE0-8E83-9EB42F6764A6}" MinMsiVersion="5" TargetsRTM="true"><TargetProduct MinMsiVersion="500"><TargetProductCode Validate="true">{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}</TargetProductCode><TargetVersion Validate="true" ComparisonType="Equal" ComparisonFilter="MajorMinorUpdate">1.0.0.0</TargetVersion><UpdatedVersion>1.0.1.0</UpdatedVersion><TargetLanguage Validate="false">1033</TargetLanguage><UpdatedLanguages>1033</UpdatedLanguages><UpgradeCode Validate="true">{DB87BB66-FE5D-4293-81AC-EE313D3F864B}</UpgradeCode></TargetProduct><TargetProductCode>{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}</TargetProductCode></MsiPatch>"> |
| 69 | <Provides Key="{0A5113E3-06A5-4CE0-8E83-9EB42F6764A6}" DisplayName="SlipstreamTests - Patch A" /> | 69 | <Provides Key="{0A5113E3-06A5-4CE0-8E83-9EB42F6764A6}" DisplayName="SlipstreamTests - Patch A" /> |
| 70 | <PayloadRef Id="PatchA" /> | 70 | <PayloadRef Id="PatchA" /> |
| 71 | </MspPackage> | 71 | </MspPackage> |
diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml index de73c66f..1d9fcbee 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml | |||
| @@ -44,14 +44,14 @@ | |||
| 44 | <Payload Id="NetFx48Web" FilePath="redist\ndp48-web.exe" FileSize="1479400" Hash="5A84A8E612E270E27D0061D58DB6B470153BE1F9" DownloadUrl="https://go.microsoft.com/fwlink/?LinkId=2085155" Packaging="external" SourcePath="redist\ndp48-web.exe" /> | 44 | <Payload Id="NetFx48Web" FilePath="redist\ndp48-web.exe" FileSize="1479400" Hash="5A84A8E612E270E27D0061D58DB6B470153BE1F9" DownloadUrl="https://go.microsoft.com/fwlink/?LinkId=2085155" Packaging="external" SourcePath="redist\ndp48-web.exe" /> |
| 45 | <Payload Id="PackageA" FilePath="PackageAv1.msi" FileSize="32768" Hash="2369B16B7219B3C834DFBC5D2AF8B2EF8803D43D" Packaging="external" SourcePath="PackageAv1.msi" /> | 45 | <Payload Id="PackageA" FilePath="PackageAv1.msi" FileSize="32768" Hash="2369B16B7219B3C834DFBC5D2AF8B2EF8803D43D" Packaging="external" SourcePath="PackageAv1.msi" /> |
| 46 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> | 46 | <RollbackBoundary Id="WixDefaultBoundary" Vital="yes" Transaction="no" /> |
| 47 | <Registration Code="{22D1DDBA-284D-40A7-BD14-95EA07906F21}" ExecutableName="BundleA.exe" PerMachine="yes" Tag="" Version="1.0.0.0" ProviderKey="{DC94A8E0-4BF4-4026-B80B-2755DAFC05D3}"> | 47 | <Registration Code="{22D1DDBA-284D-40A7-BD14-95EA07906F21}" ExecutableName="BundleA.exe" Scope="permachine" Tag="" Version="1.0.0.0" ProviderKey="{DC94A8E0-4BF4-4026-B80B-2755DAFC05D3}"> |
| 48 | <Arp Register="yes" DisplayName="~SlipstreamTests - BundleA" DisplayVersion="1.0.0.0" /> | 48 | <Arp Register="yes" DisplayName="~SlipstreamTests - BundleA" DisplayVersion="1.0.0.0" /> |
| 49 | </Registration> | 49 | </Registration> |
| 50 | <Chain> | 50 | <Chain> |
| 51 | <ExePackage Id="NetFx48Web" Cache="keep" CacheId="5A84A8E612E270E27D0061D58DB6B470153BE1F9" InstallSize="1479400" Size="1479400" PerMachine="yes" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="NetFx48WebLog" RollbackLogPathVariable="WixBundleRollbackLog_NetFx48Web" DetectCondition="NETFRAMEWORK45 >= 528040" InstallArguments="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html"" UninstallArguments="" RepairArguments="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html"" Repairable="yes" Uninstallable="no" Protocol="netfx4" DetectionType="condition"> | 51 | <ExePackage Id="NetFx48Web" Cache="keep" CacheId="5A84A8E612E270E27D0061D58DB6B470153BE1F9" InstallSize="1479400" Size="1479400" Scope="permachine" Permanent="yes" Vital="yes" RollbackBoundaryForward="WixDefaultBoundary" LogPathVariable="NetFx48WebLog" RollbackLogPathVariable="WixBundleRollbackLog_NetFx48Web" DetectCondition="NETFRAMEWORK45 >= 528040" InstallArguments="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html"" UninstallArguments="" RepairArguments="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html"" Repairable="yes" Uninstallable="no" Protocol="netfx4" DetectionType="condition"> |
| 52 | <PayloadRef Id="NetFx48Web" /> | 52 | <PayloadRef Id="NetFx48Web" /> |
| 53 | </ExePackage> | 53 | </ExePackage> |
| 54 | <MsiPackage Id="PackageA" Cache="keep" CacheId="{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}v1.0.0.0" InstallSize="2103" Size="32768" PerMachine="yes" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PackageA" RollbackLogPathVariable="WixBundleRollbackLog_PackageA" ProductCode="{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}" Language="1033" Version="1.0.0.0" UpgradeCode="{DB87BB66-FE5D-4293-81AC-EE313D3F864B}"> | 54 | <MsiPackage Id="PackageA" Cache="keep" CacheId="{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}v1.0.0.0" InstallSize="2103" Size="32768" Scope="permachine" Permanent="no" Vital="yes" RollbackBoundaryBackward="WixDefaultBoundary" LogPathVariable="WixBundleLog_PackageA" RollbackLogPathVariable="WixBundleRollbackLog_PackageA" ProductCode="{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}" Language="1033" Version="1.0.0.0" UpgradeCode="{DB87BB66-FE5D-4293-81AC-EE313D3F864B}"> |
| 55 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> | 55 | <MsiProperty Id="ARPSYSTEMCOMPONENT" Value="1" /> |
| 56 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> | 56 | <MsiProperty Id="MSIFASTINSTALL" Value="7" /> |
| 57 | <Provides Key="{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}" Version="1.0.0.0" DisplayName="~SlipstreamTests - PackageA" /> | 57 | <Provides Key="{5FF7F534-3FFC-41E0-80CD-E6361E5E7B7B}" Version="1.0.0.0" DisplayName="~SlipstreamTests - PackageA" /> |
diff --git a/src/burn/test/BurnUnitTest/VariableHelpers.cpp b/src/burn/test/BurnUnitTest/VariableHelpers.cpp index 40f958f8..b1106492 100644 --- a/src/burn/test/BurnUnitTest/VariableHelpers.cpp +++ b/src/burn/test/BurnUnitTest/VariableHelpers.cpp | |||
| @@ -7,11 +7,7 @@ using namespace System; | |||
| 7 | using namespace Xunit; | 7 | using namespace Xunit; |
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | namespace Microsoft | 10 | namespace WixToolset |
| 11 | { | ||
| 12 | namespace Tools | ||
| 13 | { | ||
| 14 | namespace WindowsInstallerXml | ||
| 15 | { | 11 | { |
| 16 | namespace Test | 12 | namespace Test |
| 17 | { | 13 | { |
| @@ -213,5 +209,3 @@ namespace Bootstrapper | |||
| 213 | } | 209 | } |
| 214 | } | 210 | } |
| 215 | } | 211 | } |
| 216 | } | ||
| 217 | } | ||
diff --git a/src/burn/test/BurnUnitTest/VariableHelpers.h b/src/burn/test/BurnUnitTest/VariableHelpers.h index d460c60f..4783c48c 100644 --- a/src/burn/test/BurnUnitTest/VariableHelpers.h +++ b/src/burn/test/BurnUnitTest/VariableHelpers.h | |||
| @@ -2,11 +2,7 @@ | |||
| 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 | 4 | ||
| 5 | namespace Microsoft | 5 | namespace WixToolset |
| 6 | { | ||
| 7 | namespace Tools | ||
| 8 | { | ||
| 9 | namespace WindowsInstallerXml | ||
| 10 | { | 6 | { |
| 11 | namespace Test | 7 | namespace Test |
| 12 | { | 8 | { |
| @@ -32,5 +28,3 @@ int VariableGetTypeHelper(BURN_VARIABLES* pVariables, LPCWSTR wzVariable); | |||
| 32 | } | 28 | } |
| 33 | } | 29 | } |
| 34 | } | 30 | } |
| 35 | } | ||
| 36 | } | ||
diff --git a/src/burn/test/BurnUnitTest/VariableTest.cpp b/src/burn/test/BurnUnitTest/VariableTest.cpp index 2e2c36c9..7bd6f20a 100644 --- a/src/burn/test/BurnUnitTest/VariableTest.cpp +++ b/src/burn/test/BurnUnitTest/VariableTest.cpp | |||
| @@ -4,11 +4,7 @@ | |||
| 4 | #undef GetTempPath | 4 | #undef GetTempPath |
| 5 | #undef GetEnvironmentVariable | 5 | #undef GetEnvironmentVariable |
| 6 | 6 | ||
| 7 | namespace Microsoft | 7 | namespace WixToolset |
| 8 | { | ||
| 9 | namespace Tools | ||
| 10 | { | ||
| 11 | namespace WindowsInstallerXml | ||
| 12 | { | 8 | { |
| 13 | namespace Test | 9 | namespace Test |
| 14 | { | 10 | { |
| @@ -618,5 +614,3 @@ namespace Bootstrapper | |||
| 618 | } | 614 | } |
| 619 | } | 615 | } |
| 620 | } | 616 | } |
| 621 | } | ||
| 622 | } | ||
diff --git a/src/burn/test/BurnUnitTest/VariantTest.cpp b/src/burn/test/BurnUnitTest/VariantTest.cpp index 035864cf..8dd44a5d 100644 --- a/src/burn/test/BurnUnitTest/VariantTest.cpp +++ b/src/burn/test/BurnUnitTest/VariantTest.cpp | |||
| @@ -2,11 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | namespace Microsoft | 5 | namespace WixToolset |
| 6 | { | ||
| 7 | namespace Tools | ||
| 8 | { | ||
| 9 | namespace WindowsInstallerXml | ||
| 10 | { | 6 | { |
| 11 | namespace Test | 7 | namespace Test |
| 12 | { | 8 | { |
| @@ -215,5 +211,3 @@ namespace Bootstrapper | |||
| 215 | } | 211 | } |
| 216 | } | 212 | } |
| 217 | } | 213 | } |
| 218 | } | ||
| 219 | } | ||
diff --git a/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp index bae098d4..e746ff75 100644 --- a/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp +++ b/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp | |||
| @@ -708,7 +708,10 @@ private: | |||
| 708 | 708 | ||
| 709 | m_plannedAction = action; | 709 | m_plannedAction = action; |
| 710 | 710 | ||
| 711 | hr = m_pEngine->Plan(action); | 711 | // InternalUiBootstrapperApplication isn't in a position to let the user |
| 712 | // choose the scope, so we use the default. Unfortunately, a scope choice | ||
| 713 | // in the MSI UI can't "flow" back to affect bundle scope. | ||
| 714 | hr = m_pEngine->Plan(action, BOOTSTRAPPER_SCOPE_DEFAULT); | ||
| 712 | BalExitOnFailure(hr, "Failed to start planning packages."); | 715 | BalExitOnFailure(hr, "Failed to start planning packages."); |
| 713 | 716 | ||
| 714 | LExit: | 717 | LExit: |
diff --git a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp index c1e8b2b3..74c6b4db 100644 --- a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp +++ b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp | |||
| @@ -3420,7 +3420,7 @@ private: | |||
| 3420 | 3420 | ||
| 3421 | 3421 | ||
| 3422 | static LRESULT CallDefaultWndProc( | 3422 | static LRESULT CallDefaultWndProc( |
| 3423 | __in CWixStandardBootstrapperApplication* pBA, | 3423 | __in_opt CWixStandardBootstrapperApplication* pBA, |
| 3424 | __in HWND hWnd, | 3424 | __in HWND hWnd, |
| 3425 | __in UINT uMsg, | 3425 | __in UINT uMsg, |
| 3426 | __in WPARAM wParam, | 3426 | __in WPARAM wParam, |
| @@ -3824,7 +3824,7 @@ private: | |||
| 3824 | 3824 | ||
| 3825 | SetState(WIXSTDBA_STATE_PLANNING, hr); | 3825 | SetState(WIXSTDBA_STATE_PLANNING, hr); |
| 3826 | 3826 | ||
| 3827 | hr = m_pEngine->Plan(action); | 3827 | hr = m_pEngine->Plan(action, BOOTSTRAPPER_SCOPE_DEFAULT/*TODO*/); |
| 3828 | BalExitOnFailure(hr, "Failed to start planning packages."); | 3828 | BalExitOnFailure(hr, "Failed to start planning packages."); |
| 3829 | 3829 | ||
| 3830 | LExit: | 3830 | LExit: |
| @@ -3848,7 +3848,7 @@ private: | |||
| 3848 | 3848 | ||
| 3849 | SetState(WIXSTDBA_STATE_PLANNING_PREREQS, hr); | 3849 | SetState(WIXSTDBA_STATE_PLANNING_PREREQS, hr); |
| 3850 | 3850 | ||
| 3851 | hr = m_pEngine->Plan(action); | 3851 | hr = m_pEngine->Plan(action, BOOTSTRAPPER_SCOPE_DEFAULT); |
| 3852 | BalExitOnFailure(hr, "Failed to start planning prereq packages."); | 3852 | BalExitOnFailure(hr, "Failed to start planning prereq packages."); |
| 3853 | 3853 | ||
| 3854 | LExit: | 3854 | LExit: |
| @@ -4546,6 +4546,8 @@ LExit: | |||
| 4546 | __out DWORD* pdwPageId | 4546 | __out DWORD* pdwPageId |
| 4547 | ) | 4547 | ) |
| 4548 | { | 4548 | { |
| 4549 | *pdwPageId = 0; | ||
| 4550 | |||
| 4549 | if (BOOTSTRAPPER_DISPLAY_PASSIVE == m_commandDisplay) | 4551 | if (BOOTSTRAPPER_DISPLAY_PASSIVE == m_commandDisplay) |
| 4550 | { | 4552 | { |
| 4551 | switch (state) | 4553 | switch (state) |
| @@ -4574,10 +4576,6 @@ LExit: | |||
| 4574 | case WIXSTDBA_STATE_EXECUTED: | 4576 | case WIXSTDBA_STATE_EXECUTED: |
| 4575 | *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] ? m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] : m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS]; | 4577 | *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] ? m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS_PASSIVE] : m_rgdwPageIds[WIXSTDBA_PAGE_PROGRESS]; |
| 4576 | break; | 4578 | break; |
| 4577 | |||
| 4578 | default: | ||
| 4579 | *pdwPageId = 0; | ||
| 4580 | break; | ||
| 4581 | } | 4579 | } |
| 4582 | } | 4580 | } |
| 4583 | else if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay) | 4581 | else if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay) |
diff --git a/src/internal/WixInternal.TestSupport.Native/NativeAssert.h b/src/internal/WixInternal.TestSupport.Native/NativeAssert.h index 9ca04fea..8663c511 100644 --- a/src/internal/WixInternal.TestSupport.Native/NativeAssert.h +++ b/src/internal/WixInternal.TestSupport.Native/NativeAssert.h | |||
| @@ -43,6 +43,16 @@ namespace TestSupport { | |||
| 43 | WixAssert::StringEqual(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), ignoreCase); | 43 | WixAssert::StringEqual(NativeAssert::LPWSTRToString(expected), NativeAssert::LPWSTRToString(actual), ignoreCase); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | static void StringEqual(LPCSTR expected, LPCSTR actual) | ||
| 47 | { | ||
| 48 | NativeAssert::StringEqual(expected, actual, FALSE); | ||
| 49 | } | ||
| 50 | |||
| 51 | static void StringEqual(LPCSTR expected, LPCSTR actual, BOOL ignoreCase) | ||
| 52 | { | ||
| 53 | WixAssert::StringEqual(NativeAssert::LPSTRToString(expected), NativeAssert::LPSTRToString(actual), ignoreCase); | ||
| 54 | } | ||
| 55 | |||
| 46 | static void Succeeded(HRESULT hr, LPCSTR zFormat, LPCSTR zArg, ... array<LPCSTR>^ zArgs) | 56 | static void Succeeded(HRESULT hr, LPCSTR zFormat, LPCSTR zArg, ... array<LPCSTR>^ zArgs) |
| 47 | { | 57 | { |
| 48 | array<Object^>^ formatArgs = gcnew array<Object^, 1>(zArgs->Length + 1); | 58 | array<Object^>^ formatArgs = gcnew array<Object^, 1>(zArgs->Length + 1); |
| @@ -91,10 +101,11 @@ namespace TestSupport { | |||
| 91 | } | 101 | } |
| 92 | 102 | ||
| 93 | private: | 103 | private: |
| 94 | static String^ LPSTRToString(LPCSTR z) | 104 | static String^ LPSTRToString(LPCSTR sz) |
| 95 | { | 105 | { |
| 96 | return z ? gcnew String(z) : nullptr; | 106 | return sz ? gcnew String(sz) : nullptr; |
| 97 | } | 107 | } |
| 108 | |||
| 98 | static String^ LPWSTRToString(LPCWSTR wz) | 109 | static String^ LPWSTRToString(LPCWSTR wz) |
| 99 | { | 110 | { |
| 100 | return wz ? gcnew String(wz) : nullptr; | 111 | return wz ? gcnew String(wz) : nullptr; |
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/strutil.h b/src/libs/dutil/WixToolset.DUtil/inc/strutil.h index f2324a80..6710f599 100644 --- a/src/libs/dutil/WixToolset.DUtil/inc/strutil.h +++ b/src/libs/dutil/WixToolset.DUtil/inc/strutil.h | |||
| @@ -309,10 +309,10 @@ HRESULT DAPI StrSplitAllocArray( | |||
| 309 | ); | 309 | ); |
| 310 | 310 | ||
| 311 | HRESULT DAPI StrSecureZeroString( | 311 | HRESULT DAPI StrSecureZeroString( |
| 312 | __in LPWSTR pwz | 312 | __in_z_opt LPWSTR pwz |
| 313 | ); | 313 | ); |
| 314 | HRESULT DAPI StrSecureZeroFreeString( | 314 | HRESULT DAPI StrSecureZeroFreeString( |
| 315 | __in LPWSTR pwz | 315 | __in_z_opt LPWSTR pwz |
| 316 | ); | 316 | ); |
| 317 | 317 | ||
| 318 | #ifdef __cplusplus | 318 | #ifdef __cplusplus |
diff --git a/src/libs/dutil/WixToolset.DUtil/strutil.cpp b/src/libs/dutil/WixToolset.DUtil/strutil.cpp index 013c1b12..3c643879 100644 --- a/src/libs/dutil/WixToolset.DUtil/strutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/strutil.cpp | |||
| @@ -2774,7 +2774,7 @@ don't remain in memory. | |||
| 2774 | 2774 | ||
| 2775 | ****************************************************************************/ | 2775 | ****************************************************************************/ |
| 2776 | extern "C" DAPI_(HRESULT) StrSecureZeroString( | 2776 | extern "C" DAPI_(HRESULT) StrSecureZeroString( |
| 2777 | __in LPWSTR pwz | 2777 | __in_z_opt LPWSTR pwz |
| 2778 | ) | 2778 | ) |
| 2779 | { | 2779 | { |
| 2780 | HRESULT hr = S_OK; | 2780 | HRESULT hr = S_OK; |
| @@ -2798,7 +2798,7 @@ don't remain in memory, then frees the string. | |||
| 2798 | 2798 | ||
| 2799 | ****************************************************************************/ | 2799 | ****************************************************************************/ |
| 2800 | extern "C" DAPI_(HRESULT) StrSecureZeroFreeString( | 2800 | extern "C" DAPI_(HRESULT) StrSecureZeroFreeString( |
| 2801 | __in LPWSTR pwz | 2801 | __in_z_opt LPWSTR pwz |
| 2802 | ) | 2802 | ) |
| 2803 | { | 2803 | { |
| 2804 | HRESULT hr = S_OK; | 2804 | HRESULT hr = S_OK; |
diff --git a/src/test/burn/TestBA/TestBA.cs b/src/test/burn/TestBA/TestBA.cs index 51fc1cbd..abab863a 100644 --- a/src/test/burn/TestBA/TestBA.cs +++ b/src/test/burn/TestBA/TestBA.cs | |||
| @@ -43,6 +43,7 @@ namespace WixToolset.Test.BA | |||
| 43 | private bool rollingBack; | 43 | private bool rollingBack; |
| 44 | private string forceDownloadSource; | 44 | private string forceDownloadSource; |
| 45 | private string forceUpdateSource; | 45 | private string forceUpdateSource; |
| 46 | private BundleScope bundleScope; | ||
| 46 | 47 | ||
| 47 | private IBootstrapperCommand Command { get; set; } | 48 | private IBootstrapperCommand Command { get; set; } |
| 48 | 49 | ||
| @@ -160,6 +161,12 @@ namespace WixToolset.Test.BA | |||
| 160 | this.quitAfterDetect = false; | 161 | this.quitAfterDetect = false; |
| 161 | } | 162 | } |
| 162 | 163 | ||
| 164 | string bundleScope = this.ReadPackageAction(null, "BundleScope"); | ||
| 165 | if (String.IsNullOrEmpty(bundleScope) || !Enum.TryParse<BundleScope>(bundleScope, out this.bundleScope)) | ||
| 166 | { | ||
| 167 | this.bundleScope = BundleScope.Default; | ||
| 168 | } | ||
| 169 | |||
| 163 | this.ImportContainerSources(); | 170 | this.ImportContainerSources(); |
| 164 | this.ImportPayloadSources(); | 171 | this.ImportPayloadSources(); |
| 165 | 172 | ||
| @@ -227,7 +234,6 @@ namespace WixToolset.Test.BA | |||
| 227 | { | 234 | { |
| 228 | this.Log(" OnDetectBegin::ForceUpdateSource: {0}", this.forceUpdateSource); | 235 | this.Log(" OnDetectBegin::ForceUpdateSource: {0}", this.forceUpdateSource); |
| 229 | } | 236 | } |
| 230 | |||
| 231 | } | 237 | } |
| 232 | 238 | ||
| 233 | protected override void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) | 239 | protected override void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) |
| @@ -294,7 +300,7 @@ namespace WixToolset.Test.BA | |||
| 294 | } | 300 | } |
| 295 | else | 301 | else |
| 296 | { | 302 | { |
| 297 | this.Engine.Plan(this.action); | 303 | this.Engine.Plan(this.action, this.bundleScope); |
| 298 | } | 304 | } |
| 299 | } | 305 | } |
| 300 | else | 306 | else |
| @@ -312,7 +318,7 @@ namespace WixToolset.Test.BA | |||
| 312 | { | 318 | { |
| 313 | if (this.explicitlyElevateAndPlanFromOnElevateBegin) | 319 | if (this.explicitlyElevateAndPlanFromOnElevateBegin) |
| 314 | { | 320 | { |
| 315 | this.Engine.Plan(this.action); | 321 | this.Engine.Plan(this.action, this.bundleScope); |
| 316 | 322 | ||
| 317 | // Simulate showing some UI since these tests won't actually show the UAC prompt. | 323 | // Simulate showing some UI since these tests won't actually show the UAC prompt. |
| 318 | MessagePump.ProcessMessages(10); | 324 | MessagePump.ProcessMessages(10); |
diff --git a/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wxs b/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wxs index 0d05700f..3ff752b2 100644 --- a/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wxs +++ b/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wxs | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | <BundlePackage Id="Dotnet_Runtime_6.0" Permanent="yes"> | 13 | <BundlePackage Id="Dotnet_Runtime_6.0" Permanent="yes"> |
| 14 | <BundlePackagePayload Id="Dotnet_Runtime_6.0" Name="dotnet-runtime-6.0.10-win-x64.exe" ProductName="Microsoft .NET Runtime - 6.0.10 (x64)" Description="Microsoft .NET Runtime - 6.0.10 (x64)" DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/50336bc7-7fd1-4a12-b5a2-81ce0219edf9/8d862413975808de0d835888e41e49a7/dotnet-runtime-6.0.10-win-x64.exe" Hash="23E4C862AFEF34A2C0D6476A93274CE0158D28F1609E0404737663E4BE17263E61E5A8760382FB125D288A0965394E3D04B9E1C77F99DE80A2C590DD295B8732" Size="27912752" Version="6.0.10.31726"> | 14 | <BundlePackagePayload Id="Dotnet_Runtime_6.0" Name="dotnet-runtime-6.0.10-win-x64.exe" ProductName="Microsoft .NET Runtime - 6.0.10 (x64)" Description="Microsoft .NET Runtime - 6.0.10 (x64)" DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/50336bc7-7fd1-4a12-b5a2-81ce0219edf9/8d862413975808de0d835888e41e49a7/dotnet-runtime-6.0.10-win-x64.exe" Hash="23E4C862AFEF34A2C0D6476A93274CE0158D28F1609E0404737663E4BE17263E61E5A8760382FB125D288A0965394E3D04B9E1C77F99DE80A2C590DD295B8732" Size="27912752" Version="6.0.10.31726"> |
| 15 | <RemoteBundle BundleCode="{9A89127E-80A4-45FB-AD62-58F72634274A}" DisplayName="Microsoft .NET Runtime - 6.0.10 (x64)" InstallSize="71462036" ManifestNamespace="http://schemas.microsoft.com/wix/2008/Burn" PerMachine="yes" ProviderKey="{9a89127e-80a4-45fb-ad62-58f72634274a}" ProtocolVersion="1" Version="6.0.10.31726" Win64="no" UpgradeCode="{B19A028F-5C89-7AF4-5102-0F8ED67CCACA}" /> | 15 | <RemoteBundle BundleCode="{9A89127E-80A4-45FB-AD62-58F72634274A}" DisplayName="Microsoft .NET Runtime - 6.0.10 (x64)" InstallSize="71462036" ManifestNamespace="http://schemas.microsoft.com/wix/2008/Burn" Scope="perMachine" ProviderKey="{9a89127e-80a4-45fb-ad62-58f72634274a}" ProtocolVersion="1" Version="6.0.10.31726" Win64="no" UpgradeCode="{B19A028F-5C89-7AF4-5102-0F8ED67CCACA}" /> |
| 16 | </BundlePackagePayload> | 16 | </BundlePackagePayload> |
| 17 | </BundlePackage> | 17 | </BundlePackage> |
| 18 | </PackageGroup> | 18 | </PackageGroup> |
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleTestBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>TestBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleWixStdBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleWixStdBA.wixproj new file mode 100644 index 00000000..56db1fdc --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/AllPmouBundleWixStdBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>WixStdBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.props new file mode 100644 index 00000000..a200a063 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.props | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 8 | </ItemGroup> | ||
| 9 | <ItemGroup> | ||
| 10 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 11 | <ProjectReference Include="..\PmouPkg1\PmouPkg1.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PmouPkg2\PmouPkg2.wixproj" /> | ||
| 13 | </ItemGroup> | ||
| 14 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.wxs new file mode 100644 index 00000000..48708db4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPmouBundle/Bundle.wxs | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="AllPmouBundle$(BA)" Name="AllPmouBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PmouPkg1.msi" /> | ||
| 16 | <MsiPackage SourceFile="PmouPkg2.msi" /> | ||
| 17 | </Chain> | ||
| 18 | </Bundle> | ||
| 19 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleTestBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>TestBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleWixStdBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleWixStdBA.wixproj new file mode 100644 index 00000000..56db1fdc --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/AllPuomBundleWixStdBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>WixStdBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.props new file mode 100644 index 00000000..d704544c --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.props | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 8 | </ItemGroup> | ||
| 9 | <ItemGroup> | ||
| 10 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 11 | <ProjectReference Include="..\PuomPkg1\PuomPkg1.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PuomPkg2\PuomPkg2.wixproj" /> | ||
| 13 | </ItemGroup> | ||
| 14 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.wxs new file mode 100644 index 00000000..4cb11a98 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/AllPuomBundle/Bundle.wxs | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="AllPuomBundle$(BA)" Name="AllPuomBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PuomPkg1.msi" /> | ||
| 16 | <MsiPackage SourceFile="PuomPkg2.msi" /> | ||
| 17 | </Chain> | ||
| 18 | </Bundle> | ||
| 19 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/Bundle.wxs new file mode 100644 index 00000000..e170667b --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/Bundle.wxs | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PerMachineBundle" Name="PerMachineBundle" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <BootstrapperApplication> | ||
| 4 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 5 | </BootstrapperApplication> | ||
| 6 | |||
| 7 | <Chain> | ||
| 8 | <MsiPackage SourceFile="PerMachinePkg.msi" /> | ||
| 9 | </Chain> | ||
| 10 | </Bundle> | ||
| 11 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/PerMachineBundle.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/PerMachineBundle.wixproj new file mode 100644 index 00000000..ade65220 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerMachineBundle/PerMachineBundle.wixproj | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | </ItemGroup> | ||
| 8 | <ItemGroup> | ||
| 9 | <ProjectReference Include="..\PerMachinePkg\PerMachinePkg.wixproj" /> | ||
| 10 | </ItemGroup> | ||
| 11 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/PerMachinePkg.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/PerMachinePkg.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/PerMachinePkg.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/product.wxs new file mode 100644 index 00000000..4b14c9d2 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerMachinePkg/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PerMachinePkg" Name="PerMachinePkg" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perMachine"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/Bundle.wxs new file mode 100644 index 00000000..e0a4c170 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/Bundle.wxs | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PerUserBundle" Name="PerUserBundle" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <BootstrapperApplication> | ||
| 4 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 5 | </BootstrapperApplication> | ||
| 6 | |||
| 7 | <Chain> | ||
| 8 | <MsiPackage SourceFile="PerUserPkg.msi" /> | ||
| 9 | </Chain> | ||
| 10 | </Bundle> | ||
| 11 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/PerUserBundle.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/PerUserBundle.wixproj new file mode 100644 index 00000000..7af6148b --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerUserBundle/PerUserBundle.wixproj | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | </ItemGroup> | ||
| 8 | <ItemGroup> | ||
| 9 | <ProjectReference Include="..\PerUserPkg\PerUserPkg.wixproj" /> | ||
| 10 | </ItemGroup> | ||
| 11 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/PerUserPkg.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/PerUserPkg.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/PerUserPkg.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/product.wxs new file mode 100644 index 00000000..17c25409 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PerUserPkg/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PerUserPkg" Name="PerUserPkg" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perUser"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.props new file mode 100644 index 00000000..9ecde613 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.props | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 8 | </ItemGroup> | ||
| 9 | <ItemGroup> | ||
| 10 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 11 | <ProjectReference Include="..\PerMachinePkg\PerMachinePkg.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PmouPkg1\PmouPkg1.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PmouPkg2\PmouPkg2.wixproj" /> | ||
| 14 | </ItemGroup> | ||
| 15 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.wxs new file mode 100644 index 00000000..ecb8571b --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/Bundle.wxs | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PmPmouBundle$(BA)" Name="PmPmouBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PerMachinePkg.msi" /> | ||
| 16 | <MsiPackage SourceFile="PmouPkg1.msi" /> | ||
| 17 | <MsiPackage SourceFile="PmouPkg2.msi" /> | ||
| 18 | </Chain> | ||
| 19 | </Bundle> | ||
| 20 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/PmPmouBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/PmPmouBundleTestBA.wixproj new file mode 100644 index 00000000..66ad737c --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPmouBundle/PmPmouBundleTestBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>TestBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.props new file mode 100644 index 00000000..51458cdd --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.props | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | <SuppressSpecificWarnings>1140</SuppressSpecificWarnings> | ||
| 5 | </PropertyGroup> | ||
| 6 | <ItemGroup> | ||
| 7 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 8 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 9 | </ItemGroup> | ||
| 10 | <ItemGroup> | ||
| 11 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PerMachinePkg\PerMachinePkg.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PmouPkg1\PmouPkg1.wixproj" /> | ||
| 14 | <ProjectReference Include="..\PmouPkg2\PmouPkg2.wixproj" /> | ||
| 15 | <ProjectReference Include="..\PerUserPkg\PerUserPkg.wixproj" /> | ||
| 16 | </ItemGroup> | ||
| 17 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.wxs new file mode 100644 index 00000000..64361b42 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/Bundle.wxs | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PmPuPmouBundle$(BA)" Name="PmPuPmouBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PerMachinePkg.msi" /> | ||
| 16 | <MsiPackage SourceFile="PmouPkg1.msi" /> | ||
| 17 | <MsiPackage SourceFile="PmouPkg2.msi" /> | ||
| 18 | <MsiPackage SourceFile="PerUserPkg.msi" /> | ||
| 19 | </Chain> | ||
| 20 | </Bundle> | ||
| 21 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/PmPuPmouBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/PmPuPmouBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPmouBundle/PmPuPmouBundleTestBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>TestBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.props new file mode 100644 index 00000000..7da4792a --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.props | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | <SuppressSpecificWarnings>1140</SuppressSpecificWarnings> | ||
| 5 | </PropertyGroup> | ||
| 6 | <ItemGroup> | ||
| 7 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 8 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 9 | </ItemGroup> | ||
| 10 | <ItemGroup> | ||
| 11 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PerMachinePkg\PerMachinePkg.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PuomPkg1\PuomPkg1.wixproj" /> | ||
| 14 | <ProjectReference Include="..\PuomPkg2\PuomPkg2.wixproj" /> | ||
| 15 | <ProjectReference Include="..\PerUserPkg\PerUserPkg.wixproj" /> | ||
| 16 | </ItemGroup> | ||
| 17 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.wxs new file mode 100644 index 00000000..4c9ce68c --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/Bundle.wxs | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PmPuPuomBundle$(BA)" Name="PmPuPuomBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PerMachinePkg.msi" /> | ||
| 16 | <MsiPackage SourceFile="PuomPkg1.msi" /> | ||
| 17 | <MsiPackage SourceFile="PuomPkg2.msi" /> | ||
| 18 | <MsiPackage SourceFile="PerUserPkg.msi" /> | ||
| 19 | </Chain> | ||
| 20 | </Bundle> | ||
| 21 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/PmPuPuomBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/PmPuPuomBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuPuomBundle/PmPuPuomBundleTestBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>TestBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.props new file mode 100644 index 00000000..9ecde613 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.props | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 8 | </ItemGroup> | ||
| 9 | <ItemGroup> | ||
| 10 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 11 | <ProjectReference Include="..\PerMachinePkg\PerMachinePkg.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PmouPkg1\PmouPkg1.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PmouPkg2\PmouPkg2.wixproj" /> | ||
| 14 | </ItemGroup> | ||
| 15 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.wxs new file mode 100644 index 00000000..7f53f09a --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/Bundle.wxs | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PmPuomBundle$(BA)" Name="PmPuomBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PerMachinePkg.msi" /> | ||
| 16 | <MsiPackage SourceFile="PuomPkg1.msi" /> | ||
| 17 | <MsiPackage SourceFile="PuomPkg2.msi" /> | ||
| 18 | </Chain> | ||
| 19 | </Bundle> | ||
| 20 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/PmPuomBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/PmPuomBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmPuomBundle/PmPuomBundleTestBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>TestBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/PmouPkg1.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/PmouPkg1.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/PmouPkg1.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/product.wxs new file mode 100644 index 00000000..a41e99ca --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg1/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PmouPkg1" Name="PmouPkg1" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perMachineOrUser"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/PmouPkg2.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/PmouPkg2.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/PmouPkg2.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/product.wxs new file mode 100644 index 00000000..84f74769 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PmouPkg2/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PmouPkg2" Name="PmouPkg2" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perMachineOrUser"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.props new file mode 100644 index 00000000..95acbebe --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.props | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | <SuppressSpecificWarnings>1140</SuppressSpecificWarnings> | ||
| 5 | </PropertyGroup> | ||
| 6 | <ItemGroup> | ||
| 7 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 8 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 9 | </ItemGroup> | ||
| 10 | <ItemGroup> | ||
| 11 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PerUserPkg\PerUserPkg.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PmouPkg1\PmouPkg1.wixproj" /> | ||
| 14 | <ProjectReference Include="..\PmouPkg2\PmouPkg2.wixproj" /> | ||
| 15 | </ItemGroup> | ||
| 16 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.wxs new file mode 100644 index 00000000..70e84690 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/Bundle.wxs | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PuPmouBundle$(BA)" Name="PuPmouBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PmouPkg1.msi" /> | ||
| 16 | <MsiPackage SourceFile="PmouPkg2.msi" /> | ||
| 17 | <MsiPackage SourceFile="PerUserPkg.msi" /> | ||
| 18 | </Chain> | ||
| 19 | </Bundle> | ||
| 20 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/PuPmouBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/PuPmouBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPmouBundle/PuPmouBundleTestBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>TestBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.props b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.props new file mode 100644 index 00000000..6d0a58f1 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.props | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | <Project> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | <SuppressSpecificWarnings>1140</SuppressSpecificWarnings> | ||
| 5 | </PropertyGroup> | ||
| 6 | <ItemGroup> | ||
| 7 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 8 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 9 | </ItemGroup> | ||
| 10 | <ItemGroup> | ||
| 11 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 12 | <ProjectReference Include="..\PuomPkg1\PuomPkg1.wixproj" /> | ||
| 13 | <ProjectReference Include="..\PuomPkg2\PuomPkg2.wixproj" /> | ||
| 14 | <ProjectReference Include="..\PerUserPkg\PerUserPkg.wixproj" /> | ||
| 15 | </ItemGroup> | ||
| 16 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.wxs new file mode 100644 index 00000000..6c5b6845 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/Bundle.wxs | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="PuPuomBundle$(BA)" Name="PuPuomBundle$(BA)" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <?if $(BA) = "WixStdBA"?> | ||
| 4 | <BootstrapperApplication> | ||
| 5 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 6 | </BootstrapperApplication> | ||
| 7 | <?endif?> | ||
| 8 | |||
| 9 | <Variable Name="TestGroupName" Value="ConfigurableScopeTests" /> | ||
| 10 | |||
| 11 | <Chain> | ||
| 12 | <?if $(BA) = "TestBA"?> | ||
| 13 | <PackageGroupRef Id="TestBA" /> | ||
| 14 | <?endif?> | ||
| 15 | <MsiPackage SourceFile="PuomPkg1.msi" /> | ||
| 16 | <MsiPackage SourceFile="PuomPkg2.msi" /> | ||
| 17 | <MsiPackage SourceFile="PerUserPkg.msi" /> | ||
| 18 | </Chain> | ||
| 19 | </Bundle> | ||
| 20 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/PuPuomBundleTestBA.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/PuPuomBundleTestBA.wixproj new file mode 100644 index 00000000..30d850d4 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuPuomBundle/PuPuomBundleTestBA.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <BA>TestBA</BA> | ||
| 4 | </PropertyGroup> | ||
| 5 | |||
| 6 | <Import Project="Bundle.props" /> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs new file mode 100644 index 00000000..8b585e18 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/Bundle.wxs | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 2 | <Bundle Id="AllPuomBundle" Name="AllPuomBundle" Manufacturer="Acme" Version="1.0.0.0"> | ||
| 3 | <BootstrapperApplication> | ||
| 4 | <bal:WixStandardBootstrapperApplication LicenseUrl="https://www.example.com/license" Theme="hyperlinkLicense" /> | ||
| 5 | </BootstrapperApplication> | ||
| 6 | |||
| 7 | <Chain> | ||
| 8 | <BundlePackage SourceFile="AllPuomBundleTestBA.exe" /> | ||
| 9 | </Chain> | ||
| 10 | </Bundle> | ||
| 11 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj new file mode 100644 index 00000000..55edd282 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomBundlePackage/PuomBundlePackage.wixproj | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | <PropertyGroup> | ||
| 3 | <OutputType>Bundle</OutputType> | ||
| 4 | </PropertyGroup> | ||
| 5 | <ItemGroup> | ||
| 6 | <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> | ||
| 7 | </ItemGroup> | ||
| 8 | <ItemGroup> | ||
| 9 | <ProjectReference Include="..\AllPuomBundle\AllPuomBundleTestBA.wixproj" /> | ||
| 10 | </ItemGroup> | ||
| 11 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/PuomPkg1.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/PuomPkg1.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/PuomPkg1.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/product.wxs new file mode 100644 index 00000000..b136f7dd --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg1/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PuomPkg1" Name="PuomPkg1" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perUserOrMachine"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/PuomPkg2.wixproj b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/PuomPkg2.wixproj new file mode 100644 index 00000000..20673927 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/PuomPkg2.wixproj | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | <Project Sdk="WixToolset.Sdk"> | ||
| 2 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/product.wxs b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/product.wxs new file mode 100644 index 00000000..2c4cb170 --- /dev/null +++ b/src/test/burn/TestData/ConfigurableScopeTests/PuomPkg2/product.wxs | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="PuomPkg2" Name="PuomPkg2" Language="1033" Version="1.0.0.0" Manufacturer="Acme" Scope="perUserOrMachine"> | ||
| 3 | <MediaTemplate EmbedCab="yes" /> | ||
| 4 | <File Source="$(sys.SOURCEFILEPATH)" /> | ||
| 5 | </Package> | ||
| 6 | </Wix> | ||
diff --git a/src/test/burn/WixTestTools/ArpEntryVerifier.cs b/src/test/burn/WixTestTools/ArpEntryVerifier.cs index b3c70337..4e43062a 100644 --- a/src/test/burn/WixTestTools/ArpEntryVerifier.cs +++ b/src/test/burn/WixTestTools/ArpEntryVerifier.cs | |||
| @@ -8,17 +8,25 @@ namespace WixTestTools | |||
| 8 | { | 8 | { |
| 9 | public bool TryGetRegistration(out GenericArpRegistration registration) | 9 | public bool TryGetRegistration(out GenericArpRegistration registration) |
| 10 | { | 10 | { |
| 11 | bool success = !this.PerMachine ? GenericArpRegistration.TryGetPerUserRegistrationById(this.ArpId, out registration) | 11 | var success = this.PerMachine |
| 12 | : GenericArpRegistration.TryGetPerMachineRegistrationById(this.ArpId, this.X64, out registration); | 12 | ? GenericArpRegistration.TryGetPerMachineRegistrationById(this.ArpId, this.X64, this.TestContext.TestOutputHelper, out registration) |
| 13 | : GenericArpRegistration.TryGetPerUserRegistrationById(this.ArpId, this.TestContext.TestOutputHelper, out registration); | ||
| 13 | 14 | ||
| 14 | return success; | 15 | return success; |
| 15 | } | 16 | } |
| 16 | 17 | ||
| 17 | public void VerifyRegistered(bool registered) | 18 | public void VerifyRegistered(bool registered) |
| 18 | { | 19 | { |
| 19 | bool success = this.TryGetRegistration(out _); | 20 | var success = this.TryGetRegistration(out _); |
| 20 | 21 | ||
| 21 | Assert.Equal(registered, success); | 22 | if (registered) |
| 23 | { | ||
| 24 | Assert.True(success); | ||
| 25 | } | ||
| 26 | else | ||
| 27 | { | ||
| 28 | Assert.False(success); | ||
| 29 | } | ||
| 22 | } | 30 | } |
| 23 | } | 31 | } |
| 24 | } | 32 | } |
diff --git a/src/test/burn/WixTestTools/BundleInstaller.cs b/src/test/burn/WixTestTools/BundleInstaller.cs index 0f2cfa8f..93602661 100644 --- a/src/test/burn/WixTestTools/BundleInstaller.cs +++ b/src/test/burn/WixTestTools/BundleInstaller.cs | |||
| @@ -189,7 +189,8 @@ namespace WixTestTools | |||
| 189 | /// <returns>Path to the generated log file.</returns> | 189 | /// <returns>Path to the generated log file.</returns> |
| 190 | private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null, string layoutDirectory = null) | 190 | private string RunBundleWithArguments(int expectedExitCode, MSIExec.MSIExecMode mode, string[] arguments, bool assertOnError = true, string bundlePath = null, string layoutDirectory = null) |
| 191 | { | 191 | { |
| 192 | TestTool bundle = new TestTool(bundlePath ?? this.Bundle); | 192 | var exePath = bundlePath ?? this.Bundle; |
| 193 | var bundle = new TestTool(exePath); | ||
| 193 | var sb = new StringBuilder(); | 194 | var sb = new StringBuilder(); |
| 194 | 195 | ||
| 195 | // Be sure to run silent. | 196 | // Be sure to run silent. |
| @@ -230,6 +231,8 @@ namespace WixTestTools | |||
| 230 | // Set the arguments. | 231 | // Set the arguments. |
| 231 | bundle.Arguments = sb.ToString(); | 232 | bundle.Arguments = sb.ToString(); |
| 232 | 233 | ||
| 234 | this.TestContext.TestOutputHelper.WriteLine($"Launching '{exePath}' with arguments '{bundle.Arguments}'..."); | ||
| 235 | |||
| 233 | // Run the tool and assert the expected code. | 236 | // Run the tool and assert the expected code. |
| 234 | bundle.ExpectedExitCode = expectedExitCode; | 237 | bundle.ExpectedExitCode = expectedExitCode; |
| 235 | bundle.AlternateExitCode = this.AlternateExitCode; | 238 | bundle.AlternateExitCode = this.AlternateExitCode; |
diff --git a/src/test/burn/WixTestTools/BundleRegistration.cs b/src/test/burn/WixTestTools/BundleRegistration.cs index 524d4616..57581510 100644 --- a/src/test/burn/WixTestTools/BundleRegistration.cs +++ b/src/test/burn/WixTestTools/BundleRegistration.cs | |||
| @@ -4,6 +4,7 @@ namespace WixTestTools | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using Microsoft.Win32; | 6 | using Microsoft.Win32; |
| 7 | using Xunit.Abstractions; | ||
| 7 | 8 | ||
| 8 | public class BundleRegistration : GenericArpRegistration | 9 | public class BundleRegistration : GenericArpRegistration |
| 9 | { | 10 | { |
| @@ -36,19 +37,19 @@ namespace WixTestTools | |||
| 36 | 37 | ||
| 37 | public string[] UpgradeCodes { get; set; } | 38 | public string[] UpgradeCodes { get; set; } |
| 38 | 39 | ||
| 39 | public static bool TryGetPerMachineBundleRegistrationById(string id, bool x64, out BundleRegistration registration) | 40 | public static bool TryGetPerMachineBundleRegistrationById(string id, bool x64, ITestOutputHelper testOutputHelper, out BundleRegistration registration) |
| 40 | { | 41 | { |
| 41 | return TryGetRegistrationById(id, x64, false, out registration); | 42 | return TryGetRegistrationById(id, x64, false, testOutputHelper, out registration); |
| 42 | } | 43 | } |
| 43 | 44 | ||
| 44 | public static bool TryGetPerUserBundleRegistrationById(string id, out BundleRegistration registration) | 45 | public static bool TryGetPerUserBundleRegistrationById(string id, ITestOutputHelper testOutputHelper, out BundleRegistration registration) |
| 45 | { | 46 | { |
| 46 | return TryGetRegistrationById(id, true, true, out registration); | 47 | return TryGetRegistrationById(id, true, true, testOutputHelper, out registration); |
| 47 | } | 48 | } |
| 48 | 49 | ||
| 49 | private static bool TryGetRegistrationById(string id, bool x64, bool perUser, out BundleRegistration registration) | 50 | private static bool TryGetRegistrationById(string id, bool x64, bool perUser, ITestOutputHelper testOutputHelper, out BundleRegistration registration) |
| 50 | { | 51 | { |
| 51 | registration = GetGenericArpRegistration(id, x64, perUser, key => GetBundleRegistration(key)); | 52 | registration = GetGenericArpRegistration(id, x64, perUser, testOutputHelper, key => GetBundleRegistration(key)); |
| 52 | return registration != null; | 53 | return registration != null; |
| 53 | } | 54 | } |
| 54 | 55 | ||
diff --git a/src/test/burn/WixTestTools/BundleVerifier.cs b/src/test/burn/WixTestTools/BundleVerifier.cs index b6181047..7bfba687 100644 --- a/src/test/burn/WixTestTools/BundleVerifier.cs +++ b/src/test/burn/WixTestTools/BundleVerifier.cs | |||
| @@ -5,8 +5,6 @@ namespace WixTestTools | |||
| 5 | using System; | 5 | using System; |
| 6 | using System.IO; | 6 | using System.IO; |
| 7 | using System.Linq; | 7 | using System.Linq; |
| 8 | using System.Text; | ||
| 9 | using System.Xml.Linq; | ||
| 10 | using Microsoft.Win32; | 8 | using Microsoft.Win32; |
| 11 | using WixInternal.TestSupport; | 9 | using WixInternal.TestSupport; |
| 12 | using WixToolset.Data; | 10 | using WixToolset.Data; |
| @@ -56,43 +54,64 @@ namespace WixTestTools | |||
| 56 | { | 54 | { |
| 57 | var bundleSymbol = this.GetBundleSymbol(); | 55 | var bundleSymbol = this.GetBundleSymbol(); |
| 58 | var x64 = bundleSymbol.Platform != Platform.X86; | 56 | var x64 = bundleSymbol.Platform != Platform.X86; |
| 57 | |||
| 59 | return x64 ? FULL_BURN_POLICY_REGISTRY_PATH : FULL_BURN_POLICY_REGISTRY_PATH_WOW6432NODE; | 58 | return x64 ? FULL_BURN_POLICY_REGISTRY_PATH : FULL_BURN_POLICY_REGISTRY_PATH_WOW6432NODE; |
| 60 | } | 59 | } |
| 61 | 60 | ||
| 62 | public string GetPackageCachePathForCacheId(string cacheId, bool perMachine) | 61 | public string GetPackageCachePathForCacheId(string cacheId, WixBundleScopeType? scope, bool? plannedPerMachine = null) |
| 63 | { | 62 | { |
| 64 | string cachePath; | 63 | string cachePath; |
| 65 | if (perMachine) | 64 | |
| 65 | if (scope == WixBundleScopeType.PerMachine) | ||
| 66 | { | 66 | { |
| 67 | using var policyKey = Registry.LocalMachine.OpenSubKey(this.GetFullBurnPolicyRegistryPath()); | 67 | cachePath = GetPerMachineCacheRoot(); |
| 68 | var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; | 68 | } |
| 69 | cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); | 69 | else if (scope == WixBundleScopeType.PerUser) |
| 70 | { | ||
| 71 | cachePath = GetPerUserCacheRoot(); | ||
| 70 | } | 72 | } |
| 71 | else | 73 | else |
| 72 | { | 74 | { |
| 73 | cachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), PACKAGE_CACHE_FOLDER_NAME); | 75 | cachePath = plannedPerMachine.Value ? GetPerMachineCacheRoot() : GetPerUserCacheRoot(); |
| 74 | } | 76 | } |
| 77 | |||
| 75 | return Path.Combine(cachePath, cacheId); | 78 | return Path.Combine(cachePath, cacheId); |
| 79 | |||
| 80 | string GetPerMachineCacheRoot() | ||
| 81 | { | ||
| 82 | using var policyKey = Registry.LocalMachine.OpenSubKey(this.GetFullBurnPolicyRegistryPath()); | ||
| 83 | var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; | ||
| 84 | return redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); | ||
| 85 | } | ||
| 86 | |||
| 87 | string GetPerUserCacheRoot() | ||
| 88 | { | ||
| 89 | return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), PACKAGE_CACHE_FOLDER_NAME); | ||
| 90 | } | ||
| 76 | } | 91 | } |
| 77 | 92 | ||
| 78 | public string GetExpectedCachedBundlePath() | 93 | public string GetExpectedCachedBundlePath(bool? plannedPerMachine = null) |
| 79 | { | 94 | { |
| 80 | var bundleSymbol = this.GetBundleSymbol(); | 95 | var bundleSymbol = this.GetBundleSymbol(); |
| 81 | var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleCode, bundleSymbol.PerMachine); | 96 | var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleCode, bundleSymbol.Scope, plannedPerMachine); |
| 97 | |||
| 82 | return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); | 98 | return Path.Combine(cachePath, Path.GetFileName(this.Bundle)); |
| 83 | } | 99 | } |
| 84 | 100 | ||
| 85 | public string ManuallyCache() | 101 | public string ManuallyCache(bool? plannedPerMachine = null) |
| 86 | { | 102 | { |
| 87 | var expectedCachePath = this.GetExpectedCachedBundlePath(); | 103 | var expectedCachePath = this.GetExpectedCachedBundlePath(plannedPerMachine); |
| 104 | |||
| 88 | Directory.CreateDirectory(Path.GetDirectoryName(expectedCachePath)); | 105 | Directory.CreateDirectory(Path.GetDirectoryName(expectedCachePath)); |
| 89 | File.Copy(this.Bundle, expectedCachePath); | 106 | File.Copy(this.Bundle, expectedCachePath); |
| 107 | |||
| 90 | return expectedCachePath; | 108 | return expectedCachePath; |
| 91 | } | 109 | } |
| 92 | 110 | ||
| 93 | public void ManuallyUncache() | 111 | public void ManuallyUncache(bool? plannedPerMachine = null) |
| 94 | { | 112 | { |
| 95 | var expectedCachePath = this.GetExpectedCachedBundlePath(); | 113 | var expectedCachePath = this.GetExpectedCachedBundlePath(plannedPerMachine); |
| 114 | |||
| 96 | File.Delete(expectedCachePath); | 115 | File.Delete(expectedCachePath); |
| 97 | } | 116 | } |
| 98 | 117 | ||
| @@ -103,38 +122,51 @@ namespace WixTestTools | |||
| 103 | var section = intermediate.Sections.Single(); | 122 | var section = intermediate.Sections.Single(); |
| 104 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().SingleOrDefault(p => p.Id.Id == packageId); | 123 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().SingleOrDefault(p => p.Id.Id == packageId); |
| 105 | var exePackageSymbol = section.Symbols.OfType<WixBundleExePackageSymbol>().SingleOrDefault(p => p.Id.Id == packageId); | 124 | var exePackageSymbol = section.Symbols.OfType<WixBundleExePackageSymbol>().SingleOrDefault(p => p.Id.Id == packageId); |
| 125 | |||
| 106 | if (packageSymbol == null || exePackageSymbol == null || exePackageSymbol.DetectionType != WixBundleExePackageDetectionType.Arp) | 126 | if (packageSymbol == null || exePackageSymbol == null || exePackageSymbol.DetectionType != WixBundleExePackageDetectionType.Arp) |
| 107 | { | 127 | { |
| 128 | this.TestContext.TestOutputHelper.WriteLine($"Missing config for ExePackage {packageId}"); | ||
| 129 | |||
| 108 | arpId = null; | 130 | arpId = null; |
| 109 | arpVersion = null; | 131 | arpVersion = null; |
| 110 | arpWin64 = false; | 132 | arpWin64 = false; |
| 111 | perMachine = false; | 133 | perMachine = false; |
| 134 | |||
| 112 | return false; | 135 | return false; |
| 113 | } | 136 | } |
| 114 | 137 | ||
| 115 | arpId = exePackageSymbol.ArpId; | 138 | arpId = exePackageSymbol.ArpId; |
| 116 | arpVersion = exePackageSymbol.ArpDisplayVersion; | 139 | arpVersion = exePackageSymbol.ArpDisplayVersion; |
| 117 | arpWin64 = exePackageSymbol.ArpWin64; | 140 | arpWin64 = exePackageSymbol.ArpWin64; |
| 118 | perMachine = packageSymbol.PerMachine == true; | 141 | perMachine = packageSymbol.Scope == WixBundleScopeType.PerMachine; |
| 142 | |||
| 143 | this.TestContext.TestOutputHelper.WriteLine($"Config for ExePackage {packageId}: arpId={arpId}, arpVersion={arpVersion}, arpWin64={arpWin64}, perMachine={perMachine}"); | ||
| 144 | |||
| 119 | return true; | 145 | return true; |
| 120 | } | 146 | } |
| 121 | 147 | ||
| 122 | public bool TryGetRegistration(out BundleRegistration registration) | 148 | public bool TryGetRegistration(bool? plannedPerMachine, out BundleRegistration registration) |
| 123 | { | 149 | { |
| 124 | var bundleSymbol = this.GetBundleSymbol(); | 150 | var bundleSymbol = this.GetBundleSymbol(); |
| 125 | var x64 = bundleSymbol.Platform != Platform.X86; | 151 | var x64 = bundleSymbol.Platform != Platform.X86; |
| 126 | var bundleCode = bundleSymbol.BundleCode; | 152 | var bundleCode = bundleSymbol.BundleCode; |
| 127 | if (bundleSymbol.PerMachine) | 153 | |
| 154 | if (bundleSymbol.Scope == WixBundleScopeType.PerMachine) | ||
| 155 | { | ||
| 156 | return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleCode, x64, this.TestContext.TestOutputHelper, out registration); | ||
| 157 | } | ||
| 158 | else if (bundleSymbol.Scope == WixBundleScopeType.PerUser) | ||
| 128 | { | 159 | { |
| 129 | return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleCode, x64, out registration); | 160 | return BundleRegistration.TryGetPerUserBundleRegistrationById(bundleCode, this.TestContext.TestOutputHelper, out registration); |
| 130 | } | 161 | } |
| 131 | else | 162 | else |
| 132 | { | 163 | { |
| 133 | return BundleRegistration.TryGetPerUserBundleRegistrationById(bundleCode, out registration); | 164 | return plannedPerMachine.Value ? BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleCode, x64, this.TestContext.TestOutputHelper, out registration) |
| 165 | : BundleRegistration.TryGetPerUserBundleRegistrationById(bundleCode, this.TestContext.TestOutputHelper, out registration); | ||
| 134 | } | 166 | } |
| 135 | } | 167 | } |
| 136 | 168 | ||
| 137 | public bool TryGetUpdateRegistration(out BundleUpdateRegistration registration) | 169 | public bool TryGetUpdateRegistration(bool? plannedPerMachine, out BundleUpdateRegistration registration) |
| 138 | { | 170 | { |
| 139 | var bundleSymbol = this.GetBundleSymbol(); | 171 | var bundleSymbol = this.GetBundleSymbol(); |
| 140 | var x64 = bundleSymbol.Platform != Platform.X86; | 172 | var x64 = bundleSymbol.Platform != Platform.X86; |
| @@ -144,84 +176,93 @@ namespace WixTestTools | |||
| 144 | var productFamily = updateRegistrationSymbol.ProductFamily; | 176 | var productFamily = updateRegistrationSymbol.ProductFamily; |
| 145 | var name = updateRegistrationSymbol.Name; | 177 | var name = updateRegistrationSymbol.Name; |
| 146 | 178 | ||
| 147 | 179 | if (bundleSymbol.Scope == WixBundleScopeType.PerMachine) | |
| 148 | if (bundleSymbol.PerMachine) | ||
| 149 | { | 180 | { |
| 150 | return BundleUpdateRegistration.TryGetPerMachineBundleUpdateRegistration(manufacturer, productFamily, name, x64, out registration); | 181 | return BundleUpdateRegistration.TryGetPerMachineBundleUpdateRegistration(manufacturer, productFamily, name, x64, out registration); |
| 151 | } | 182 | } |
| 152 | else | 183 | else if (bundleSymbol.Scope == WixBundleScopeType.PerUser) |
| 153 | { | 184 | { |
| 154 | return BundleUpdateRegistration.TryGetPerUserBundleUpdateRegistration(manufacturer, productFamily, name, out registration); | 185 | return BundleUpdateRegistration.TryGetPerUserBundleUpdateRegistration(manufacturer, productFamily, name, out registration); |
| 155 | } | 186 | } |
| 187 | else | ||
| 188 | { | ||
| 189 | return plannedPerMachine.Value ? BundleUpdateRegistration.TryGetPerMachineBundleUpdateRegistration(manufacturer, productFamily, name, x64, out registration) | ||
| 190 | : BundleUpdateRegistration.TryGetPerUserBundleUpdateRegistration(manufacturer, productFamily, name, out registration); | ||
| 191 | } | ||
| 156 | } | 192 | } |
| 157 | 193 | ||
| 158 | public BundleRegistration VerifyRegisteredAndInPackageCache(int? expectedSystemComponent = null) | 194 | public BundleRegistration VerifyRegisteredAndInPackageCache(int? expectedSystemComponent = null, bool? plannedPerMachine = null) |
| 159 | { | 195 | { |
| 160 | Assert.True(this.TryGetRegistration(out var registration)); | 196 | Assert.True(this.TryGetRegistration(plannedPerMachine, out var registration)); |
| 161 | 197 | ||
| 162 | Assert.Equal(expectedSystemComponent, registration.SystemComponent); | 198 | Assert.Equal(expectedSystemComponent, registration.SystemComponent); |
| 163 | 199 | ||
| 164 | Assert.NotNull(registration.CachePath); | 200 | Assert.NotNull(registration.CachePath); |
| 165 | Assert.True(File.Exists(registration.CachePath)); | 201 | Assert.True(File.Exists(registration.CachePath)); |
| 166 | 202 | ||
| 167 | var expectedCachePath = this.GetExpectedCachedBundlePath(); | 203 | var expectedCachePath = this.GetExpectedCachedBundlePath(plannedPerMachine); |
| 168 | WixAssert.StringEqual(expectedCachePath, registration.CachePath, true); | 204 | WixAssert.StringEqual(expectedCachePath, registration.CachePath, true); |
| 169 | 205 | ||
| 170 | return registration; | 206 | return registration; |
| 171 | } | 207 | } |
| 172 | 208 | ||
| 173 | public void VerifyUnregisteredAndRemovedFromPackageCache() | 209 | public void VerifyUnregisteredAndRemovedFromPackageCache(bool? plannedPerMachine = null) |
| 174 | { | 210 | { |
| 175 | var cachedBundlePath = this.GetExpectedCachedBundlePath(); | 211 | var cachedBundlePath = this.GetExpectedCachedBundlePath(plannedPerMachine); |
| 176 | this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath); | 212 | |
| 213 | this.VerifyUnregisteredAndRemovedFromPackageCache(cachedBundlePath, plannedPerMachine); | ||
| 177 | } | 214 | } |
| 178 | 215 | ||
| 179 | public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath) | 216 | public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath, bool? plannedPerMachine = null) |
| 180 | { | 217 | { |
| 181 | Assert.False(this.TryGetRegistration(out _), $"Bundle cached at '{cachedBundlePath}' should not still be registered."); | 218 | Assert.False(this.TryGetRegistration(plannedPerMachine, out _), $"Bundle cached at '{cachedBundlePath}' should not still be registered."); |
| 182 | Assert.False(File.Exists(cachedBundlePath), $"Cached bundle should have been removed from package cache at '{cachedBundlePath}'."); | 219 | Assert.False(File.Exists(cachedBundlePath), $"Cached bundle should have been removed from package cache at '{cachedBundlePath}'."); |
| 183 | } | 220 | } |
| 184 | 221 | ||
| 185 | public void RemovePackageFromCache(string packageId) | 222 | public void RemovePackageFromCache(string packageId, bool? plannedPerMachine = null) |
| 186 | { | 223 | { |
| 187 | using var wixOutput = WixOutput.Read(this.BundlePdb); | 224 | using var wixOutput = WixOutput.Read(this.BundlePdb); |
| 188 | var intermediate = Intermediate.Load(wixOutput); | 225 | var intermediate = Intermediate.Load(wixOutput); |
| 189 | var section = intermediate.Sections.Single(); | 226 | var section = intermediate.Sections.Single(); |
| 190 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); | 227 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); |
| 191 | var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == true); | 228 | var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.Scope, plannedPerMachine); |
| 229 | |||
| 192 | if (Directory.Exists(cachePath)) | 230 | if (Directory.Exists(cachePath)) |
| 193 | { | 231 | { |
| 194 | Directory.Delete(cachePath, true); | 232 | Directory.Delete(cachePath, true); |
| 195 | } | 233 | } |
| 196 | } | 234 | } |
| 197 | 235 | ||
| 198 | public string GetPackageEntryPointCachePath(string packageId) | 236 | public string GetPackageEntryPointCachePath(string packageId, bool? plannedPerMachine = null) |
| 199 | { | 237 | { |
| 200 | using var wixOutput = WixOutput.Read(this.BundlePdb); | 238 | using var wixOutput = WixOutput.Read(this.BundlePdb); |
| 201 | var intermediate = Intermediate.Load(wixOutput); | 239 | var intermediate = Intermediate.Load(wixOutput); |
| 202 | var section = intermediate.Sections.Single(); | 240 | var section = intermediate.Sections.Single(); |
| 203 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); | 241 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); |
| 204 | var packagePayloadSymbol = section.Symbols.OfType<WixBundlePayloadSymbol>().Single(p => p.Id.Id == packageSymbol.PayloadRef); | 242 | var packagePayloadSymbol = section.Symbols.OfType<WixBundlePayloadSymbol>().Single(p => p.Id.Id == packageSymbol.PayloadRef); |
| 205 | var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == true); | 243 | var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.Scope, plannedPerMachine); |
| 244 | |||
| 206 | return Path.Combine(cachePath, packagePayloadSymbol.Name); | 245 | return Path.Combine(cachePath, packagePayloadSymbol.Name); |
| 207 | } | 246 | } |
| 208 | 247 | ||
| 209 | public void VerifyPackageIsCached(string packageId, bool cached = true) | 248 | public void VerifyPackageIsCached(string packageId, bool cached = true, bool? plannedPerMachine = null) |
| 210 | { | 249 | { |
| 211 | var entryPointCachePath = this.GetPackageEntryPointCachePath(packageId); | 250 | var entryPointCachePath = this.GetPackageEntryPointCachePath(packageId, plannedPerMachine); |
| 251 | |||
| 212 | Assert.Equal(cached, File.Exists(entryPointCachePath)); | 252 | Assert.Equal(cached, File.Exists(entryPointCachePath)); |
| 213 | } | 253 | } |
| 214 | 254 | ||
| 215 | public void VerifyPackageProviderRemoved(string packageId) | 255 | public void VerifyPackageProviderRemoved(string packageId, bool? plannedPerMachine = null) |
| 216 | { | 256 | { |
| 217 | using var wixOutput = WixOutput.Read(this.BundlePdb); | 257 | using var wixOutput = WixOutput.Read(this.BundlePdb); |
| 218 | var intermediate = Intermediate.Load(wixOutput); | 258 | var intermediate = Intermediate.Load(wixOutput); |
| 219 | var section = intermediate.Sections.Single(); | 259 | var section = intermediate.Sections.Single(); |
| 220 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); | 260 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId); |
| 221 | var providerSymbol = section.Symbols.OfType<WixDependencyProviderSymbol>().Single(p => p.ParentRef == packageId); | 261 | var providerSymbol = section.Symbols.OfType<WixDependencyProviderSymbol>().Single(p => p.ParentRef == packageId); |
| 222 | var registryRoot = packageSymbol.PerMachine == true ? Registry.LocalMachine : Registry.CurrentUser; | 262 | var registryRoot = plannedPerMachine.HasValue ? (plannedPerMachine.Value ? Registry.LocalMachine : Registry.CurrentUser) : packageSymbol.Scope == WixBundleScopeType.PerMachine ? Registry.LocalMachine : Registry.CurrentUser; |
| 223 | var subkeyPath = Path.Combine(DependencyRegistryRoot, providerSymbol.ProviderKey); | 263 | var subkeyPath = Path.Combine(DependencyRegistryRoot, providerSymbol.ProviderKey); |
| 224 | using var registryKey = registryRoot.OpenSubKey(subkeyPath); | 264 | using var registryKey = registryRoot.OpenSubKey(subkeyPath); |
| 265 | |||
| 225 | if (registryKey != null) | 266 | if (registryKey != null) |
| 226 | { | 267 | { |
| 227 | WixAssert.StringEqual(null, subkeyPath); | 268 | WixAssert.StringEqual(null, subkeyPath); |
diff --git a/src/test/burn/WixTestTools/GenericArpRegistration.cs b/src/test/burn/WixTestTools/GenericArpRegistration.cs index dfddd9a3..f3590fa4 100644 --- a/src/test/burn/WixTestTools/GenericArpRegistration.cs +++ b/src/test/burn/WixTestTools/GenericArpRegistration.cs | |||
| @@ -4,6 +4,8 @@ namespace WixTestTools | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using Microsoft.Win32; | 6 | using Microsoft.Win32; |
| 7 | using Xunit; | ||
| 8 | using Xunit.Abstractions; | ||
| 7 | 9 | ||
| 8 | public class GenericArpRegistration | 10 | public class GenericArpRegistration |
| 9 | { | 11 | { |
| @@ -69,23 +71,23 @@ namespace WixTestTools | |||
| 69 | 71 | ||
| 70 | public string UrlUpdateInfo { get; set; } | 72 | public string UrlUpdateInfo { get; set; } |
| 71 | 73 | ||
| 72 | public static bool TryGetPerMachineRegistrationById(string id, bool x64, out GenericArpRegistration registration) | 74 | public static bool TryGetPerMachineRegistrationById(string id, bool x64, ITestOutputHelper testOutputHelper, out GenericArpRegistration registration) |
| 73 | { | 75 | { |
| 74 | return TryGetRegistrationById(id, x64, false, out registration); | 76 | return TryGetRegistrationById(id, x64, perUser: false, testOutputHelper, out registration); |
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | public static bool TryGetPerUserRegistrationById(string id, out GenericArpRegistration registration) | 79 | public static bool TryGetPerUserRegistrationById(string id, ITestOutputHelper testOutputHelper, out GenericArpRegistration registration) |
| 78 | { | 80 | { |
| 79 | return TryGetRegistrationById(id, true, true, out registration); | 81 | return TryGetRegistrationById(id, x64: true, perUser: true, testOutputHelper, out registration); |
| 80 | } | 82 | } |
| 81 | 83 | ||
| 82 | private static bool TryGetRegistrationById(string id, bool x64, bool perUser, out GenericArpRegistration registration) | 84 | private static bool TryGetRegistrationById(string id, bool x64, bool perUser, ITestOutputHelper testOutputHelper, out GenericArpRegistration registration) |
| 83 | { | 85 | { |
| 84 | registration = GetGenericArpRegistration(id, x64, perUser, key => new GenericArpRegistration()); | 86 | registration = GetGenericArpRegistration(id, x64, perUser, testOutputHelper, key => new GenericArpRegistration()); |
| 85 | return registration != null; | 87 | return registration != null; |
| 86 | } | 88 | } |
| 87 | 89 | ||
| 88 | protected static T GetGenericArpRegistration<T>(string id, bool x64, bool perUser, Func<RegistryKey, T> fnCreate) | 90 | protected static T GetGenericArpRegistration<T>(string id, bool x64, bool perUser, ITestOutputHelper testOutputHelper, Func<RegistryKey, T> fnCreate) |
| 89 | where T : GenericArpRegistration | 91 | where T : GenericArpRegistration |
| 90 | { | 92 | { |
| 91 | var baseKey = perUser ? Registry.CurrentUser : Registry.LocalMachine; | 93 | var baseKey = perUser ? Registry.CurrentUser : Registry.LocalMachine; |
| @@ -95,6 +97,8 @@ namespace WixTestTools | |||
| 95 | 97 | ||
| 96 | if (idKey == null) | 98 | if (idKey == null) |
| 97 | { | 99 | { |
| 100 | testOutputHelper.WriteLine($"Failed to open key {baseKey} {registrationKeyPath} (per-user {perUser})."); | ||
| 101 | |||
| 98 | return null; | 102 | return null; |
| 99 | } | 103 | } |
| 100 | 104 | ||
diff --git a/src/test/burn/WixTestTools/PackageVerifier.cs b/src/test/burn/WixTestTools/PackageVerifier.cs index 76bc17ab..f7c7b2e6 100644 --- a/src/test/burn/WixTestTools/PackageVerifier.cs +++ b/src/test/burn/WixTestTools/PackageVerifier.cs | |||
| @@ -82,14 +82,32 @@ namespace WixTestTools | |||
| 82 | return MsiUtilities.IsProductInstalledWithVersion(productCode, prodVersion); | 82 | return MsiUtilities.IsProductInstalledWithVersion(productCode, prodVersion); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | public void VerifyInstalled(bool installed) | 85 | public void VerifyInstalled(bool installed = true) |
| 86 | { | 86 | { |
| 87 | Assert.Equal(installed, this.IsInstalled()); | 87 | var isInstalled = this.IsInstalled(); |
| 88 | |||
| 89 | if (installed) | ||
| 90 | { | ||
| 91 | Assert.True(isInstalled); | ||
| 92 | } | ||
| 93 | else | ||
| 94 | { | ||
| 95 | Assert.False(isInstalled); | ||
| 96 | } | ||
| 88 | } | 97 | } |
| 89 | 98 | ||
| 90 | public void VerifyInstalledWithVersion(bool installed) | 99 | public void VerifyInstalledWithVersion(bool installed = true) |
| 91 | { | 100 | { |
| 92 | Assert.Equal(installed, this.IsInstalledWithVersion()); | 101 | var isInstalled = this.IsInstalledWithVersion(); |
| 102 | |||
| 103 | if (installed) | ||
| 104 | { | ||
| 105 | Assert.True(isInstalled); | ||
| 106 | } | ||
| 107 | else | ||
| 108 | { | ||
| 109 | Assert.False(isInstalled); | ||
| 110 | } | ||
| 93 | } | 111 | } |
| 94 | 112 | ||
| 95 | public void DeleteTestRegistryValue(string name) | 113 | public void DeleteTestRegistryValue(string name) |
diff --git a/src/test/burn/WixTestTools/TestTool.cs b/src/test/burn/WixTestTools/TestTool.cs index b6d18ac9..6c9ad1d7 100644 --- a/src/test/burn/WixTestTools/TestTool.cs +++ b/src/test/burn/WixTestTools/TestTool.cs | |||
| @@ -26,7 +26,7 @@ namespace WixTestTools | |||
| 26 | public TestTool(string toolFile) | 26 | public TestTool(string toolFile) |
| 27 | : base(toolFile) | 27 | : base(toolFile) |
| 28 | { | 28 | { |
| 29 | this.PrintOutputToConsole = true; | 29 | this.PrintOutputToConsoleOnError = true; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | /// <summary> | 32 | /// <summary> |
| @@ -75,6 +75,11 @@ namespace WixTestTools | |||
| 75 | public bool PrintOutputToConsole { get; set; } | 75 | public bool PrintOutputToConsole { get; set; } |
| 76 | 76 | ||
| 77 | /// <summary> | 77 | /// <summary> |
| 78 | /// Print output from the tool execution to the console | ||
| 79 | /// </summary> | ||
| 80 | public bool PrintOutputToConsoleOnError { get; set; } | ||
| 81 | |||
| 82 | /// <summary> | ||
| 78 | /// The working directory of the tool | 83 | /// The working directory of the tool |
| 79 | /// </summary> | 84 | /// </summary> |
| 80 | public string WorkingDirectory { get; set; } | 85 | public string WorkingDirectory { get; set; } |
| @@ -123,7 +128,12 @@ namespace WixTestTools | |||
| 123 | 128 | ||
| 124 | if (assertOnError && 0 < this.Errors.Count) | 129 | if (assertOnError && 0 < this.Errors.Count) |
| 125 | { | 130 | { |
| 126 | if (this.PrintOutputToConsole) | 131 | if (this.PrintOutputToConsoleOnError) |
| 132 | { | ||
| 133 | Console.WriteLine(FormatResult(result)); | ||
| 134 | } | ||
| 135 | |||
| 136 | if (this.PrintOutputToConsole || this.PrintOutputToConsoleOnError) | ||
| 127 | { | 137 | { |
| 128 | this.PrintErrors(); | 138 | this.PrintErrors(); |
| 129 | } | 139 | } |
diff --git a/src/test/burn/WixTestTools/WixTestContext.cs b/src/test/burn/WixTestTools/WixTestContext.cs index a87a56fa..b30d5739 100644 --- a/src/test/burn/WixTestTools/WixTestContext.cs +++ b/src/test/burn/WixTestTools/WixTestContext.cs | |||
| @@ -16,6 +16,8 @@ namespace WixTestTools | |||
| 16 | 16 | ||
| 17 | public WixTestContext(ITestOutputHelper testOutputHelper) | 17 | public WixTestContext(ITestOutputHelper testOutputHelper) |
| 18 | { | 18 | { |
| 19 | this.TestOutputHelper = testOutputHelper; | ||
| 20 | |||
| 19 | var test = GetTest(testOutputHelper); | 21 | var test = GetTest(testOutputHelper); |
| 20 | var splitClassName = test.TestCase.TestMethod.TestClass.Class.Name.Split('.'); | 22 | var splitClassName = test.TestCase.TestMethod.TestClass.Class.Name.Split('.'); |
| 21 | 23 | ||
| @@ -34,6 +36,8 @@ namespace WixTestTools | |||
| 34 | 36 | ||
| 35 | public string TestName { get; } | 37 | public string TestName { get; } |
| 36 | 38 | ||
| 39 | public ITestOutputHelper TestOutputHelper { get; } | ||
| 40 | |||
| 37 | /// <summary> | 41 | /// <summary> |
| 38 | /// Gets the test install directory for the current test. | 42 | /// Gets the test install directory for the current test. |
| 39 | /// </summary> | 43 | /// </summary> |
diff --git a/src/test/burn/WixToolset.WixBA/WixBA.cs b/src/test/burn/WixToolset.WixBA/WixBA.cs index dca12ce8..a98bfa36 100644 --- a/src/test/burn/WixToolset.WixBA/WixBA.cs +++ b/src/test/burn/WixToolset.WixBA/WixBA.cs | |||
| @@ -104,7 +104,7 @@ namespace WixToolset.WixBA | |||
| 104 | public static void Plan(LaunchAction action) | 104 | public static void Plan(LaunchAction action) |
| 105 | { | 105 | { |
| 106 | WixBA.Model.PlannedAction = action; | 106 | WixBA.Model.PlannedAction = action; |
| 107 | WixBA.Model.Engine.Plan(WixBA.Model.PlannedAction); | 107 | WixBA.Model.Engine.Plan(WixBA.Model.PlannedAction, BundleScope.Default); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | public static void PlanLayout() | 110 | public static void PlanLayout() |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs index dc793cf0..b066899b 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs | |||
| @@ -92,7 +92,7 @@ namespace WixToolsetTest.BurnE2E | |||
| 92 | 92 | ||
| 93 | Assert.True(LogVerifier.MessageInLogFile(logPath, "Applied execute package: v3bundle.exe, result: 0x0, restart: None")); | 93 | Assert.True(LogVerifier.MessageInLogFile(logPath, "Applied execute package: v3bundle.exe, result: 0x0, restart: None")); |
| 94 | 94 | ||
| 95 | Assert.True(BundleRegistration.TryGetPerMachineBundleRegistrationById(v3BundleId, false, out var v3Registration)); | 95 | Assert.True(BundleRegistration.TryGetPerMachineBundleRegistrationById(v3BundleId, false, this.TestContext.TestOutputHelper, out var v3Registration)); |
| 96 | Assert.Null(v3Registration.SystemComponent); | 96 | Assert.Null(v3Registration.SystemComponent); |
| 97 | } | 97 | } |
| 98 | 98 | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs new file mode 100644 index 00000000..1b7d6d75 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs | |||
| @@ -0,0 +1,631 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolsetTest.BurnE2E | ||
| 4 | { | ||
| 5 | using WixTestTools; | ||
| 6 | using WixToolset.BootstrapperApplicationApi; | ||
| 7 | using Xunit; | ||
| 8 | using Xunit.Abstractions; | ||
| 9 | |||
| 10 | public class ConfigurableScopeTests : BurnE2ETests | ||
| 11 | { | ||
| 12 | public ConfigurableScopeTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | ||
| 13 | |||
| 14 | [RuntimeFact] | ||
| 15 | public void CommandLineScopeTestNoopBecauseNonDefaultPlan() | ||
| 16 | { | ||
| 17 | var testBAController = this.CreateTestBAController(); | ||
| 18 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 19 | |||
| 20 | var bundle = this.CreateBundleInstaller("AllPmouBundleTestBA"); | ||
| 21 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 22 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 23 | var log = bundle.Install(arguments: "/peruser"); | ||
| 24 | |||
| 25 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 26 | pkg1.VerifyInstalled(); | ||
| 27 | pkg2.VerifyInstalled(); | ||
| 28 | |||
| 29 | Assert.True(LogVerifier.MessageInLogFile(log, "Scope command-line switch ignored because the bootstrapper application already specified a scope.")); | ||
| 30 | |||
| 31 | bundle.Uninstall(); | ||
| 32 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 33 | pkg1.VerifyInstalled(false); | ||
| 34 | pkg2.VerifyInstalled(false); | ||
| 35 | } | ||
| 36 | |||
| 37 | [RuntimeFact] | ||
| 38 | public void CommandLineScopeTestNoopBecauseNoConfigurablePackages() | ||
| 39 | { | ||
| 40 | var bundle = this.CreateBundleInstaller("PerMachineBundle"); | ||
| 41 | var log = bundle.Install(arguments: "/peruser"); | ||
| 42 | |||
| 43 | Assert.True(LogVerifier.MessageInLogFile(log, "Scope command-line switch ignored because the bundle doesn't have any packages with configurable scope.")); | ||
| 44 | } | ||
| 45 | |||
| 46 | [RuntimeFact] | ||
| 47 | public void CommandLineScopeTestPerUser() | ||
| 48 | { | ||
| 49 | var testBAController = this.CreateTestBAController(); | ||
| 50 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 51 | |||
| 52 | var bundle = this.CreateBundleInstaller("AllPmouBundleTestBA"); | ||
| 53 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 54 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 55 | var log = bundle.Install(arguments: "/peruser"); | ||
| 56 | |||
| 57 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 58 | pkg1.VerifyInstalled(); | ||
| 59 | pkg2.VerifyInstalled(); | ||
| 60 | |||
| 61 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default")); | ||
| 62 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 63 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 64 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 65 | |||
| 66 | bundle.Uninstall(arguments: "/peruser"); | ||
| 67 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 68 | pkg1.VerifyInstalled(false); | ||
| 69 | pkg2.VerifyInstalled(false); | ||
| 70 | } | ||
| 71 | |||
| 72 | [RuntimeFact] | ||
| 73 | public void CommandLineScopeTestPerMachine() | ||
| 74 | { | ||
| 75 | var testBAController = this.CreateTestBAController(); | ||
| 76 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 77 | |||
| 78 | var bundle = this.CreateBundleInstaller("AllPuomBundleTestBA"); | ||
| 79 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 80 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 81 | var log = bundle.Install(arguments: "/permachine"); | ||
| 82 | |||
| 83 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 84 | pkg1.VerifyInstalled(); | ||
| 85 | pkg2.VerifyInstalled(); | ||
| 86 | |||
| 87 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default")); | ||
| 88 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 89 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 90 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 91 | |||
| 92 | bundle.Uninstall(arguments: "/permachine"); | ||
| 93 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 94 | pkg1.VerifyInstalled(false); | ||
| 95 | pkg2.VerifyInstalled(false); | ||
| 96 | } | ||
| 97 | |||
| 98 | [RuntimeFact] | ||
| 99 | public void PMOU_Bundle_Default_Plan_Installs_PerMachine() | ||
| 100 | { | ||
| 101 | var testBAController = this.CreateTestBAController(); | ||
| 102 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 103 | |||
| 104 | var bundle = this.CreateBundleInstaller("AllPmouBundleTestBA"); | ||
| 105 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 106 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 107 | var log = bundle.Install(); | ||
| 108 | |||
| 109 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 110 | pkg1.VerifyInstalled(); | ||
| 111 | pkg2.VerifyInstalled(); | ||
| 112 | |||
| 113 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default")); | ||
| 114 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 115 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 116 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 117 | |||
| 118 | bundle.Uninstall(); | ||
| 119 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 120 | pkg1.VerifyInstalled(false); | ||
| 121 | pkg2.VerifyInstalled(false); | ||
| 122 | } | ||
| 123 | |||
| 124 | [RuntimeFact] | ||
| 125 | public void PUOM_Bundle_Default_Plan_Installs_PerUser() | ||
| 126 | { | ||
| 127 | var testBAController = this.CreateTestBAController(); | ||
| 128 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 129 | |||
| 130 | var bundle = this.CreateBundleInstaller("AllPuomBundleTestBA"); | ||
| 131 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 132 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 133 | var log = bundle.Install(); | ||
| 134 | |||
| 135 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 136 | pkg1.VerifyInstalled(); | ||
| 137 | pkg2.VerifyInstalled(); | ||
| 138 | |||
| 139 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default")); | ||
| 140 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 141 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 142 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 143 | |||
| 144 | bundle.Uninstall(); | ||
| 145 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 146 | pkg1.VerifyInstalled(false); | ||
| 147 | pkg2.VerifyInstalled(false); | ||
| 148 | } | ||
| 149 | |||
| 150 | [RuntimeFact] | ||
| 151 | public void PMOU_Bundle_PM_Plan_Installs_PerMachine() | ||
| 152 | { | ||
| 153 | var testBAController = this.CreateTestBAController(); | ||
| 154 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 155 | |||
| 156 | var bundle = this.CreateBundleInstaller("AllPmouBundleTestBA"); | ||
| 157 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 158 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 159 | var log = bundle.Install(); | ||
| 160 | |||
| 161 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 162 | pkg1.VerifyInstalled(); | ||
| 163 | pkg2.VerifyInstalled(); | ||
| 164 | |||
| 165 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: PerMachine")); | ||
| 166 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 167 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 168 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 169 | |||
| 170 | bundle.Uninstall(); | ||
| 171 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 172 | pkg1.VerifyInstalled(false); | ||
| 173 | pkg2.VerifyInstalled(false); | ||
| 174 | } | ||
| 175 | |||
| 176 | [RuntimeFact] | ||
| 177 | public void PUOM_Bundle_PM_Plan_Installs_PerMachine() | ||
| 178 | { | ||
| 179 | var testBAController = this.CreateTestBAController(); | ||
| 180 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 181 | |||
| 182 | var bundle = this.CreateBundleInstaller("AllPuomBundleTestBA"); | ||
| 183 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 184 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 185 | var log = bundle.Install(); | ||
| 186 | |||
| 187 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 188 | pkg1.VerifyInstalled(); | ||
| 189 | pkg2.VerifyInstalled(); | ||
| 190 | |||
| 191 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: PerMachine")); | ||
| 192 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 193 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 194 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 195 | |||
| 196 | bundle.Uninstall(); | ||
| 197 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 198 | pkg1.VerifyInstalled(false); | ||
| 199 | pkg2.VerifyInstalled(false); | ||
| 200 | } | ||
| 201 | |||
| 202 | [RuntimeFact] | ||
| 203 | public void PMOU_Bundle_PU_Plan_Installs_PerUser() | ||
| 204 | { | ||
| 205 | var testBAController = this.CreateTestBAController(); | ||
| 206 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 207 | |||
| 208 | var bundle = this.CreateBundleInstaller("AllPmouBundleTestBA"); | ||
| 209 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 210 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 211 | var log = bundle.Install(); | ||
| 212 | |||
| 213 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 214 | pkg1.VerifyInstalled(); | ||
| 215 | pkg2.VerifyInstalled(); | ||
| 216 | |||
| 217 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: PerUser")); | ||
| 218 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 219 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 220 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 221 | |||
| 222 | bundle.Uninstall(); | ||
| 223 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 224 | pkg1.VerifyInstalled(false); | ||
| 225 | pkg2.VerifyInstalled(false); | ||
| 226 | } | ||
| 227 | |||
| 228 | [RuntimeFact] | ||
| 229 | public void PUOM_Bundle_PU_Plan_Installs_PerUser() | ||
| 230 | { | ||
| 231 | var testBAController = this.CreateTestBAController(); | ||
| 232 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 233 | |||
| 234 | var bundle = this.CreateBundleInstaller("AllPuomBundleTestBA"); | ||
| 235 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 236 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 237 | var log = bundle.Install(); | ||
| 238 | |||
| 239 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 240 | pkg1.VerifyInstalled(); | ||
| 241 | pkg2.VerifyInstalled(); | ||
| 242 | |||
| 243 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: PerUser")); | ||
| 244 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 245 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 246 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 247 | |||
| 248 | bundle.Uninstall(); | ||
| 249 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 250 | pkg1.VerifyInstalled(false); | ||
| 251 | pkg2.VerifyInstalled(false); | ||
| 252 | } | ||
| 253 | |||
| 254 | [RuntimeFact] | ||
| 255 | public void PM_PMOU_Bundle_Default_Plan_Installs_PerMachine() | ||
| 256 | { | ||
| 257 | var testBAController = this.CreateTestBAController(); | ||
| 258 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 259 | |||
| 260 | var bundle = this.CreateBundleInstaller("PmPmouBundleTestBA"); | ||
| 261 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 262 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 263 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 264 | var log = bundle.Install(); | ||
| 265 | |||
| 266 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 267 | perMachinePkg.VerifyInstalled(); | ||
| 268 | pkg1.VerifyInstalled(); | ||
| 269 | pkg2.VerifyInstalled(); | ||
| 270 | |||
| 271 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: Default")); | ||
| 272 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 273 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 274 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 275 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 276 | |||
| 277 | bundle.Uninstall(); | ||
| 278 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 279 | perMachinePkg.VerifyInstalled(false); | ||
| 280 | pkg1.VerifyInstalled(false); | ||
| 281 | pkg2.VerifyInstalled(false); | ||
| 282 | } | ||
| 283 | |||
| 284 | [RuntimeFact] | ||
| 285 | public void PM_PMOU_Bundle_PM_Plan_Installs_PerMachine() | ||
| 286 | { | ||
| 287 | var testBAController = this.CreateTestBAController(); | ||
| 288 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 289 | |||
| 290 | var bundle = this.CreateBundleInstaller("PmPmouBundleTestBA"); | ||
| 291 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 292 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 293 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 294 | var log = bundle.Install(); | ||
| 295 | |||
| 296 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 297 | perMachinePkg.VerifyInstalled(); | ||
| 298 | pkg1.VerifyInstalled(); | ||
| 299 | pkg2.VerifyInstalled(); | ||
| 300 | |||
| 301 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: PerMachine")); | ||
| 302 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 303 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 304 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 305 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 306 | |||
| 307 | bundle.Uninstall(); | ||
| 308 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 309 | perMachinePkg.VerifyInstalled(false); | ||
| 310 | pkg1.VerifyInstalled(false); | ||
| 311 | pkg2.VerifyInstalled(false); | ||
| 312 | } | ||
| 313 | |||
| 314 | [RuntimeFact] | ||
| 315 | public void PM_PMOU_Bundle_PU_Plan_Installs_PerUserMostly() | ||
| 316 | { | ||
| 317 | var testBAController = this.CreateTestBAController(); | ||
| 318 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 319 | |||
| 320 | var bundle = this.CreateBundleInstaller("PmPmouBundleTestBA"); | ||
| 321 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 322 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 323 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 324 | var log = bundle.Install(); | ||
| 325 | |||
| 326 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 327 | perMachinePkg.VerifyInstalled(); | ||
| 328 | pkg1.VerifyInstalled(); | ||
| 329 | pkg2.VerifyInstalled(); | ||
| 330 | |||
| 331 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: PerUser")); | ||
| 332 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 333 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 334 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 335 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 336 | |||
| 337 | bundle.Uninstall(); | ||
| 338 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 339 | perMachinePkg.VerifyInstalled(false); | ||
| 340 | pkg1.VerifyInstalled(false); | ||
| 341 | pkg2.VerifyInstalled(false); | ||
| 342 | } | ||
| 343 | |||
| 344 | [RuntimeFact] | ||
| 345 | public void PM_PUOM_Bundle_Default_Plan_Installs_PerUser() | ||
| 346 | { | ||
| 347 | var testBAController = this.CreateTestBAController(); | ||
| 348 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 349 | |||
| 350 | var bundle = this.CreateBundleInstaller("PmPuomBundleTestBA"); | ||
| 351 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 352 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 353 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 354 | var log = bundle.Install(); | ||
| 355 | |||
| 356 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 357 | perMachinePkg.VerifyInstalled(); | ||
| 358 | pkg1.VerifyInstalled(); | ||
| 359 | pkg2.VerifyInstalled(); | ||
| 360 | |||
| 361 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: Default")); | ||
| 362 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 363 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 364 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 365 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 366 | |||
| 367 | bundle.Uninstall(); | ||
| 368 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 369 | perMachinePkg.VerifyInstalled(false); | ||
| 370 | pkg1.VerifyInstalled(false); | ||
| 371 | pkg2.VerifyInstalled(false); | ||
| 372 | } | ||
| 373 | |||
| 374 | [RuntimeFact] | ||
| 375 | public void PM_PUOM_Bundle_PM_Plan_Installs_PerMachine() | ||
| 376 | { | ||
| 377 | var testBAController = this.CreateTestBAController(); | ||
| 378 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 379 | |||
| 380 | var bundle = this.CreateBundleInstaller("PmPuomBundleTestBA"); | ||
| 381 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 382 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 383 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 384 | var log = bundle.Install(); | ||
| 385 | |||
| 386 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 387 | perMachinePkg.VerifyInstalled(); | ||
| 388 | pkg1.VerifyInstalled(); | ||
| 389 | pkg2.VerifyInstalled(); | ||
| 390 | |||
| 391 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: PerMachine")); | ||
| 392 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerMachine")); | ||
| 393 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 394 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 395 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 396 | |||
| 397 | bundle.Uninstall(); | ||
| 398 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 399 | perMachinePkg.VerifyInstalled(false); | ||
| 400 | pkg1.VerifyInstalled(false); | ||
| 401 | pkg2.VerifyInstalled(false); | ||
| 402 | } | ||
| 403 | |||
| 404 | [RuntimeFact] | ||
| 405 | public void PM_PUOM_Bundle_PU_Plan_Installs_PerUserMostly() | ||
| 406 | { | ||
| 407 | var testBAController = this.CreateTestBAController(); | ||
| 408 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 409 | |||
| 410 | var bundle = this.CreateBundleInstaller("PmPuomBundleTestBA"); | ||
| 411 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 412 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 413 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 414 | var log = bundle.Install(); | ||
| 415 | |||
| 416 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 417 | perMachinePkg.VerifyInstalled(); | ||
| 418 | pkg1.VerifyInstalled(); | ||
| 419 | pkg2.VerifyInstalled(); | ||
| 420 | |||
| 421 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 4 packages, action: Install, planned scope: PerUser")); | ||
| 422 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned configurable scope: PerUser")); | ||
| 423 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 424 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 425 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 426 | |||
| 427 | bundle.Uninstall(); | ||
| 428 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 429 | perMachinePkg.VerifyInstalled(false); | ||
| 430 | pkg1.VerifyInstalled(false); | ||
| 431 | pkg2.VerifyInstalled(false); | ||
| 432 | } | ||
| 433 | |||
| 434 | [RuntimeFact] | ||
| 435 | public void PM_PU_PMOU_Bundle_Default_Plan_Installs_PerMachine() | ||
| 436 | { | ||
| 437 | var testBAController = this.CreateTestBAController(); | ||
| 438 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 439 | |||
| 440 | var bundle = this.CreateBundleInstaller("PmPuPmouBundleTestBA"); | ||
| 441 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 442 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 443 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 444 | var log = bundle.Install(); | ||
| 445 | |||
| 446 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 447 | perMachinePkg.VerifyInstalled(); | ||
| 448 | pkg1.VerifyInstalled(); | ||
| 449 | pkg2.VerifyInstalled(); | ||
| 450 | |||
| 451 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: Default")); | ||
| 452 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 453 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 454 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 455 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 456 | |||
| 457 | bundle.Uninstall(); | ||
| 458 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 459 | perMachinePkg.VerifyInstalled(false); | ||
| 460 | pkg1.VerifyInstalled(false); | ||
| 461 | pkg2.VerifyInstalled(false); | ||
| 462 | } | ||
| 463 | |||
| 464 | [RuntimeFact] | ||
| 465 | public void PM_PU_PMOU_Bundle_PM_Plan_Installs_PerMachine() | ||
| 466 | { | ||
| 467 | var testBAController = this.CreateTestBAController(); | ||
| 468 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 469 | |||
| 470 | var bundle = this.CreateBundleInstaller("PmPuPmouBundleTestBA"); | ||
| 471 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 472 | var perUserPkg = this.CreatePackageInstaller("PerUserPkg"); | ||
| 473 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 474 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 475 | var log = bundle.Install(); | ||
| 476 | |||
| 477 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 478 | perMachinePkg.VerifyInstalled(); | ||
| 479 | perUserPkg.VerifyInstalled(); | ||
| 480 | pkg1.VerifyInstalled(); | ||
| 481 | pkg2.VerifyInstalled(); | ||
| 482 | |||
| 483 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: PerMachine")); | ||
| 484 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 485 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 486 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 487 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 488 | |||
| 489 | bundle.Uninstall(); | ||
| 490 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 491 | perMachinePkg.VerifyInstalled(false); | ||
| 492 | perUserPkg.VerifyInstalled(false); | ||
| 493 | pkg1.VerifyInstalled(false); | ||
| 494 | pkg2.VerifyInstalled(false); | ||
| 495 | } | ||
| 496 | |||
| 497 | [RuntimeFact] | ||
| 498 | public void PM_PU_PMOU_Bundle_PU_Plan_Installs_PerUserMostly() | ||
| 499 | { | ||
| 500 | var testBAController = this.CreateTestBAController(); | ||
| 501 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 502 | |||
| 503 | var bundle = this.CreateBundleInstaller("PmPuPmouBundleTestBA"); | ||
| 504 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 505 | var perUserPkg = this.CreatePackageInstaller("PerUserPkg"); | ||
| 506 | var pkg1 = this.CreatePackageInstaller("PmouPkg1"); | ||
| 507 | var pkg2 = this.CreatePackageInstaller("PmouPkg2"); | ||
| 508 | var log = bundle.Install(); | ||
| 509 | |||
| 510 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 511 | perMachinePkg.VerifyInstalled(); | ||
| 512 | perUserPkg.VerifyInstalled(); | ||
| 513 | pkg1.VerifyInstalled(); | ||
| 514 | pkg2.VerifyInstalled(); | ||
| 515 | |||
| 516 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: PerUser")); | ||
| 517 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); | ||
| 518 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 519 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 520 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser,")); | ||
| 521 | |||
| 522 | bundle.Uninstall(); | ||
| 523 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 524 | perMachinePkg.VerifyInstalled(false); | ||
| 525 | perUserPkg.VerifyInstalled(false); | ||
| 526 | pkg1.VerifyInstalled(false); | ||
| 527 | pkg2.VerifyInstalled(false); | ||
| 528 | } | ||
| 529 | |||
| 530 | [RuntimeFact] | ||
| 531 | public void PM_PU_PUOM_Bundle_Default_Plan_Installs_PerUser() | ||
| 532 | { | ||
| 533 | var testBAController = this.CreateTestBAController(); | ||
| 534 | testBAController.SetBundleScope(BundleScope.Default); | ||
| 535 | |||
| 536 | var bundle = this.CreateBundleInstaller("PmPuPuomBundleTestBA"); | ||
| 537 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 538 | var perUserPkg = this.CreatePackageInstaller("PerUserPkg"); | ||
| 539 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 540 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 541 | var log = bundle.Install(); | ||
| 542 | |||
| 543 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 544 | perMachinePkg.VerifyInstalled(); | ||
| 545 | perUserPkg.VerifyInstalled(); | ||
| 546 | pkg1.VerifyInstalled(); | ||
| 547 | pkg2.VerifyInstalled(); | ||
| 548 | |||
| 549 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: Default")); | ||
| 550 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 551 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 552 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 553 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 554 | |||
| 555 | bundle.Uninstall(); | ||
| 556 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 557 | perMachinePkg.VerifyInstalled(false); | ||
| 558 | perUserPkg.VerifyInstalled(false); | ||
| 559 | pkg1.VerifyInstalled(false); | ||
| 560 | pkg2.VerifyInstalled(false); | ||
| 561 | } | ||
| 562 | |||
| 563 | [RuntimeFact] | ||
| 564 | public void PM_PU_PUOM_Bundle_PM_Plan_Installs_PerMachineMostly() | ||
| 565 | { | ||
| 566 | var testBAController = this.CreateTestBAController(); | ||
| 567 | testBAController.SetBundleScope(BundleScope.PerMachine); | ||
| 568 | |||
| 569 | var bundle = this.CreateBundleInstaller("PmPuPuomBundleTestBA"); | ||
| 570 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 571 | var perUserPkg = this.CreatePackageInstaller("PerUserPkg"); | ||
| 572 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 573 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 574 | var log = bundle.Install(); | ||
| 575 | |||
| 576 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: true); | ||
| 577 | perMachinePkg.VerifyInstalled(); | ||
| 578 | perUserPkg.VerifyInstalled(); | ||
| 579 | pkg1.VerifyInstalled(); | ||
| 580 | pkg2.VerifyInstalled(); | ||
| 581 | |||
| 582 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: PerMachine")); | ||
| 583 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 584 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 585 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 586 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 587 | |||
| 588 | bundle.Uninstall(); | ||
| 589 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: true); | ||
| 590 | perMachinePkg.VerifyInstalled(false); | ||
| 591 | perUserPkg.VerifyInstalled(false); | ||
| 592 | pkg1.VerifyInstalled(false); | ||
| 593 | pkg2.VerifyInstalled(false); | ||
| 594 | } | ||
| 595 | |||
| 596 | [RuntimeFact] | ||
| 597 | public void PM_PU_PUOM_Bundle_PU_Plan_Installs_PerUserMostly() | ||
| 598 | { | ||
| 599 | var testBAController = this.CreateTestBAController(); | ||
| 600 | testBAController.SetBundleScope(BundleScope.PerUser); | ||
| 601 | |||
| 602 | var bundle = this.CreateBundleInstaller("PmPuPuomBundleTestBA"); | ||
| 603 | var perMachinePkg = this.CreatePackageInstaller("PerMachinePkg"); | ||
| 604 | var perUserPkg = this.CreatePackageInstaller("PerUserPkg"); | ||
| 605 | var pkg1 = this.CreatePackageInstaller("PuomPkg1"); | ||
| 606 | var pkg2 = this.CreatePackageInstaller("PuomPkg2"); | ||
| 607 | var log = bundle.Install(); | ||
| 608 | |||
| 609 | bundle.VerifyRegisteredAndInPackageCache(plannedPerMachine: false); | ||
| 610 | perMachinePkg.VerifyInstalled(); | ||
| 611 | perUserPkg.VerifyInstalled(); | ||
| 612 | pkg1.VerifyInstalled(); | ||
| 613 | pkg2.VerifyInstalled(); | ||
| 614 | |||
| 615 | Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 5 packages, action: Install, planned scope: PerUser")); | ||
| 616 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerMachinePkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine")); | ||
| 617 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 618 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg1.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 619 | Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PuomPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); | ||
| 620 | |||
| 621 | bundle.Uninstall(); | ||
| 622 | bundle.VerifyUnregisteredAndRemovedFromPackageCache(plannedPerMachine: false); | ||
| 623 | perMachinePkg.VerifyInstalled(false); | ||
| 624 | perUserPkg.VerifyInstalled(false); | ||
| 625 | pkg1.VerifyInstalled(false); | ||
| 626 | pkg2.VerifyInstalled(false); | ||
| 627 | } | ||
| 628 | |||
| 629 | |||
| 630 | } | ||
| 631 | } | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs index 3731b0cc..3e848fbd 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/OptionalUpdateRegistrationTests.cs | |||
| @@ -20,11 +20,11 @@ namespace WixToolsetTest.BurnE2E | |||
| 20 | 20 | ||
| 21 | bundleAv1.Install(); | 21 | bundleAv1.Install(); |
| 22 | bundleAv1.VerifyRegisteredAndInPackageCache(); | 22 | bundleAv1.VerifyRegisteredAndInPackageCache(); |
| 23 | var gotV1Registration = bundleAv1.TryGetUpdateRegistration(out var v1Registration); | 23 | var gotV1Registration = bundleAv1.TryGetUpdateRegistration(plannedPerMachine: null, out var v1Registration); |
| 24 | 24 | ||
| 25 | bundleAv2.Install(); | 25 | bundleAv2.Install(); |
| 26 | bundleAv2.VerifyRegisteredAndInPackageCache(); | 26 | bundleAv2.VerifyRegisteredAndInPackageCache(); |
| 27 | var gotV2Registration = bundleAv2.TryGetUpdateRegistration(out var v2Registration); | 27 | var gotV2Registration = bundleAv2.TryGetUpdateRegistration(plannedPerMachine: null, out var v2Registration); |
| 28 | 28 | ||
| 29 | bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); | 29 | bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(); |
| 30 | 30 | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs b/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs index c344ebce..872e6954 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs | |||
| @@ -72,6 +72,11 @@ namespace WixToolsetTest.BurnE2E | |||
| 72 | this.SetBurnTestValue("ForceUpdateSource", url); | 72 | this.SetBurnTestValue("ForceUpdateSource", url); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | public void SetBundleScope(BundleScope scope) | ||
| 76 | { | ||
| 77 | this.SetBurnTestValue("BundleScope", scope.ToString()); | ||
| 78 | } | ||
| 79 | |||
| 75 | /// <summary> | 80 | /// <summary> |
| 76 | /// Slows the cache progress of a package. | 81 | /// Slows the cache progress of a package. |
| 77 | /// </summary> | 82 | /// </summary> |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd b/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd index ecea18a0..f6950fb0 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd +++ b/src/test/burn/WixToolsetTest.BurnE2E/runtests.cmd | |||
| @@ -1,2 +1,4 @@ | |||
| 1 | SET RuntimeTestsEnabled=true | 1 | SET RuntimeTestsEnabled=true |
| 2 | dotnet test WixToolsetTest.BurnE2E.dll -v normal --logger trx | 2 | dotnet test WixToolsetTest.BurnE2E.dll -v normal --logger trx;LogFileName=%TMP%\SandboxTests.trx |
| 3 | |||
| 4 | ROBOCOPY /NFL /NDL /S /PURGE %TMP% C:\Build\SandboxLogs *.log *.trx | ||
diff --git a/src/test/sandbox/TestSandbox.wsb b/src/test/sandbox/TestSandbox.wsb index 97c3c759..1af3f5f9 100644 --- a/src/test/sandbox/TestSandbox.wsb +++ b/src/test/sandbox/TestSandbox.wsb | |||
| @@ -1,22 +1,21 @@ | |||
| 1 | <Configuration> | 1 | <Configuration> |
| 2 | <Networking>Enable</Networking> | ||
| 3 | |||
| 2 | <MappedFolders> | 4 | <MappedFolders> |
| 3 | <MappedFolder> | 5 | <MappedFolder> |
| 4 | <HostFolder>..\..\..\build</HostFolder> | 6 | <HostFolder>..\..\..\build</HostFolder> |
| 5 | <SandboxFolder>C:\build</SandboxFolder> | 7 | <SandboxFolder>C:\build</SandboxFolder> |
| 6 | <ReadOnly>true</ReadOnly> | ||
| 7 | </MappedFolder> | ||
| 8 | <MappedFolder> | ||
| 9 | <HostFolder>..\..\..\build\logs</HostFolder> | ||
| 10 | <SandboxFolder>C:\logs</SandboxFolder> | ||
| 11 | <ReadOnly>false</ReadOnly> | 8 | <ReadOnly>false</ReadOnly> |
| 12 | </MappedFolder> | 9 | </MappedFolder> |
| 13 | <MappedFolder> | 10 | |
| 11 | <MappedFolder> | ||
| 14 | <HostFolder>.\</HostFolder> | 12 | <HostFolder>.\</HostFolder> |
| 15 | <SandboxFolder>C:\sandbox</SandboxFolder> | 13 | <SandboxFolder>C:\sandbox</SandboxFolder> |
| 16 | <ReadOnly>true</ReadOnly> | 14 | <ReadOnly>true</ReadOnly> |
| 17 | </MappedFolder> | 15 | </MappedFolder> |
| 18 | </MappedFolders> | 16 | </MappedFolders> |
| 19 | <LogonCommand> | 17 | |
| 20 | <Command>C:\sandbox\startup.bat</Command> | 18 | <LogonCommand> |
| 21 | </LogonCommand> | 19 | <Command>C:\sandbox\startup.bat</Command> |
| 20 | </LogonCommand> | ||
| 22 | </Configuration> | 21 | </Configuration> |
diff --git a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs index 64e65a55..92b25ea6 100644 --- a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs | |||
| @@ -101,8 +101,6 @@ namespace WixToolset.Core.Burn | |||
| 101 | 101 | ||
| 102 | bundleSymbol.ProviderKey = bundleSymbol.BundleCode = Guid.NewGuid().ToString("B").ToUpperInvariant(); | 102 | bundleSymbol.ProviderKey = bundleSymbol.BundleCode = Guid.NewGuid().ToString("B").ToUpperInvariant(); |
| 103 | 103 | ||
| 104 | bundleSymbol.PerMachine = true; // default to per-machine but the first-per user package wil flip the bundle per-user. | ||
| 105 | |||
| 106 | { | 104 | { |
| 107 | var command = new NormalizeRelatedBundlesCommand(this.Messaging, bundleSymbol, section); | 105 | var command = new NormalizeRelatedBundlesCommand(this.Messaging, bundleSymbol, section); |
| 108 | command.Execute(); | 106 | command.Execute(); |
| @@ -589,27 +587,32 @@ namespace WixToolset.Core.Burn | |||
| 589 | 587 | ||
| 590 | foreach (var facade in facades) | 588 | foreach (var facade in facades) |
| 591 | { | 589 | { |
| 592 | if (bundleSymbol.PerMachine && facade.PackageSymbol.PerMachine.HasValue && !facade.PackageSymbol.PerMachine.Value) | 590 | if (facade.PackageSymbol.Scope == WixBundleScopeType.PerUser) |
| 593 | { | 591 | { |
| 594 | this.Messaging.Write(VerboseMessages.SwitchingToPerUserPackage(facade.PackageSymbol.SourceLineNumbers, facade.PackageId)); | 592 | this.Messaging.Write(VerboseMessages.SwitchingToPerUserPackage(facade.PackageSymbol.SourceLineNumbers, facade.PackageId)); |
| 595 | 593 | ||
| 596 | bundleSymbol.PerMachine = false; | 594 | bundleSymbol.Scope = WixBundleScopeType.PerUser; |
| 597 | break; | 595 | } |
| 596 | else if (facade.PackageSymbol.Scope.HasValue && facade.PackageSymbol.Scope > bundleSymbol.Scope) | ||
| 597 | { | ||
| 598 | bundleSymbol.Scope = facade.PackageSymbol.Scope.Value; | ||
| 598 | } | 599 | } |
| 599 | } | 600 | } |
| 600 | 601 | ||
| 601 | foreach (var facade in facades) | 602 | foreach (var facade in facades) |
| 602 | { | 603 | { |
| 603 | // Update package scope from bundle scope if default. | 604 | // Update package scope from bundle scope once we know it and the |
| 604 | if (!facade.PackageSymbol.PerMachine.HasValue) | 605 | // package doesn't have an explicit scope. |
| 606 | if (!facade.PackageSymbol.Scope.HasValue) | ||
| 605 | { | 607 | { |
| 606 | facade.PackageSymbol.PerMachine = bundleSymbol.PerMachine; | 608 | facade.PackageSymbol.Scope = bundleSymbol.Scope; |
| 607 | } | 609 | } |
| 608 | 610 | ||
| 609 | // We will only register packages in the same scope as the bundle. Warn if any packages with providers | 611 | // We know we won't register a per-machine package for per-user bundles. Warn for that here. |
| 610 | // are in a different scope and not permanent (permanents typically don't need a ref-count). | 612 | // (Ignore permanent packates as we won't register a reference count for them.) |
| 611 | if (!bundleSymbol.PerMachine && | 613 | // TODO: At runtime, log such mismatches once we know the scope of PUOM or PMOU packages. |
| 612 | facade.PackageSymbol.PerMachine.Value && | 614 | if (bundleSymbol.Scope == WixBundleScopeType.PerUser && |
| 615 | facade.PackageSymbol.Scope.Value == WixBundleScopeType.PerMachine && | ||
| 613 | !facade.PackageSymbol.Permanent && | 616 | !facade.PackageSymbol.Permanent && |
| 614 | dependencySymbolsById.ContainsKey(facade.PackageId)) | 617 | dependencySymbolsById.ContainsKey(facade.PackageId)) |
| 615 | { | 618 | { |
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs index dd6171b6..d7f86592 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/CreateBootstrapperApplicationManifestCommand.cs | |||
| @@ -102,7 +102,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 102 | writer.WriteAttributeString("LogPathVariable", this.BundleSymbol.LogPathVariable); | 102 | writer.WriteAttributeString("LogPathVariable", this.BundleSymbol.LogPathVariable); |
| 103 | writer.WriteAttributeString("Compressed", this.BundleSymbol.Compressed == true ? "yes" : "no"); | 103 | writer.WriteAttributeString("Compressed", this.BundleSymbol.Compressed == true ? "yes" : "no"); |
| 104 | writer.WriteAttributeString("UpgradeCode", this.BundleSymbol.UpgradeCode); | 104 | writer.WriteAttributeString("UpgradeCode", this.BundleSymbol.UpgradeCode); |
| 105 | writer.WriteAttributeString("PerMachine", this.BundleSymbol.PerMachine ? "yes" : "no"); | 105 | writer.WriteAttributeString("Scope", this.BundleSymbol.ScopeAsString); |
| 106 | 106 | ||
| 107 | writer.WriteEndElement(); | 107 | writer.WriteEndElement(); |
| 108 | } | 108 | } |
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs index 8ce2623e..a1ca32ac 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs | |||
| @@ -223,7 +223,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 223 | 223 | ||
| 224 | writer.WriteAttributeString("Code", this.BundleSymbol.BundleCode); | 224 | writer.WriteAttributeString("Code", this.BundleSymbol.BundleCode); |
| 225 | writer.WriteAttributeString("ExecutableName", this.ExecutableName); | 225 | writer.WriteAttributeString("ExecutableName", this.ExecutableName); |
| 226 | writer.WriteAttributeString("PerMachine", this.BundleSymbol.PerMachine ? "yes" : "no"); | 226 | writer.WriteAttributeString("Scope", this.BundleSymbol.ScopeAsString); |
| 227 | writer.WriteAttributeString("Tag", this.BundleSymbol.Tag); | 227 | writer.WriteAttributeString("Tag", this.BundleSymbol.Tag); |
| 228 | writer.WriteAttributeString("Version", this.BundleSymbol.Version); | 228 | writer.WriteAttributeString("Version", this.BundleSymbol.Version); |
| 229 | writer.WriteAttributeString("ProviderKey", this.BundleSymbol.ProviderKey); | 229 | writer.WriteAttributeString("ProviderKey", this.BundleSymbol.ProviderKey); |
| @@ -345,10 +345,8 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 345 | var slipstreamMspsByPackage = this.Section.Symbols.OfType<WixBundleSlipstreamMspSymbol>().ToLookup(r => r.TargetPackageRef); | 345 | var slipstreamMspsByPackage = this.Section.Symbols.OfType<WixBundleSlipstreamMspSymbol>().ToLookup(r => r.TargetPackageRef); |
| 346 | var exitCodesByPackage = this.Section.Symbols.OfType<WixBundlePackageExitCodeSymbol>().ToLookup(r => r.ChainPackageId); | 346 | var exitCodesByPackage = this.Section.Symbols.OfType<WixBundlePackageExitCodeSymbol>().ToLookup(r => r.ChainPackageId); |
| 347 | var commandLinesByPackage = this.Section.Symbols.OfType<WixBundlePackageCommandLineSymbol>().ToLookup(r => r.WixBundlePackageRef); | 347 | var commandLinesByPackage = this.Section.Symbols.OfType<WixBundlePackageCommandLineSymbol>().ToLookup(r => r.WixBundlePackageRef); |
| 348 | |||
| 349 | var dependenciesByPackage = this.Section.Symbols.OfType<WixDependencyProviderSymbol>().ToLookup(p => p.ParentRef); | 348 | var dependenciesByPackage = this.Section.Symbols.OfType<WixDependencyProviderSymbol>().ToLookup(p => p.ParentRef); |
| 350 | 349 | ||
| 351 | |||
| 352 | // Build up the list of target codes from all the MSPs in the chain. | 350 | // Build up the list of target codes from all the MSPs in the chain. |
| 353 | var targetCodes = new List<WixBundlePatchTargetCodeSymbol>(); | 351 | var targetCodes = new List<WixBundlePatchTargetCodeSymbol>(); |
| 354 | 352 | ||
| @@ -376,7 +374,12 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 376 | writer.WriteAttributeString("CacheId", package.PackageSymbol.CacheId); | 374 | writer.WriteAttributeString("CacheId", package.PackageSymbol.CacheId); |
| 377 | writer.WriteAttributeString("InstallSize", Convert.ToString(package.PackageSymbol.InstallSize)); | 375 | writer.WriteAttributeString("InstallSize", Convert.ToString(package.PackageSymbol.InstallSize)); |
| 378 | writer.WriteAttributeString("Size", Convert.ToString(package.PackageSymbol.Size)); | 376 | writer.WriteAttributeString("Size", Convert.ToString(package.PackageSymbol.Size)); |
| 379 | writer.WriteAttributeString("PerMachine", package.PackageSymbol.PerMachine.HasValue && package.PackageSymbol.PerMachine.Value ? "yes" : "no"); | 377 | |
| 378 | if (!String.IsNullOrEmpty(package.PackageSymbol.ScopeAsString)) | ||
| 379 | { | ||
| 380 | writer.WriteAttributeString("Scope", package.PackageSymbol.ScopeAsString); | ||
| 381 | } | ||
| 382 | |||
| 380 | writer.WriteAttributeString("Permanent", package.PackageSymbol.Permanent ? "yes" : "no"); | 383 | writer.WriteAttributeString("Permanent", package.PackageSymbol.Permanent ? "yes" : "no"); |
| 381 | writer.WriteAttributeString("Vital", package.PackageSymbol.Vital ? "yes" : "no"); | 384 | writer.WriteAttributeString("Vital", package.PackageSymbol.Vital ? "yes" : "no"); |
| 382 | 385 | ||
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/HarvestBundlePackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/HarvestBundlePackageCommand.cs index abc54be7..e7bad501 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/HarvestBundlePackageCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/HarvestBundlePackageCommand.cs | |||
| @@ -61,10 +61,10 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 61 | string engineVersion; | 61 | string engineVersion; |
| 62 | int protocolVersion; | 62 | int protocolVersion; |
| 63 | string manifestNamespace; | 63 | string manifestNamespace; |
| 64 | bool perMachine; | ||
| 65 | string version; | 64 | string version; |
| 66 | string displayName; | 65 | string displayName; |
| 67 | long installSize; | 66 | long installSize; |
| 67 | WixBundleScopeType scope; | ||
| 68 | 68 | ||
| 69 | var sourcePath = this.PackagePayload.SourceFile.Path; | 69 | var sourcePath = this.PackagePayload.SourceFile.Path; |
| 70 | var sourceLineNumbers = this.PackagePayload.SourceLineNumbers; | 70 | var sourceLineNumbers = this.PackagePayload.SourceLineNumbers; |
| @@ -113,7 +113,21 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 113 | var registrationElement = document.SelectSingleNode("/burn:BurnManifest/burn:Registration", namespaceManager) as XmlElement; | 113 | var registrationElement = document.SelectSingleNode("/burn:BurnManifest/burn:Registration", namespaceManager) as XmlElement; |
| 114 | var arpElement = document.SelectSingleNode("/burn:BurnManifest/burn:Registration/burn:Arp", namespaceManager) as XmlElement; | 114 | var arpElement = document.SelectSingleNode("/burn:BurnManifest/burn:Registration/burn:Arp", namespaceManager) as XmlElement; |
| 115 | 115 | ||
| 116 | perMachine = registrationElement.GetAttribute("PerMachine") == "yes"; | 116 | var bundleScope = registrationElement.GetAttribute("Scope"); |
| 117 | if (!Enum.TryParse(bundleScope, ignoreCase: true, out scope)) | ||
| 118 | { | ||
| 119 | // No Scope attribute means it's a <v6.0 bundle, so fall back to PerMachine. | ||
| 120 | var perMachine = registrationElement.GetAttribute("PerMachine"); | ||
| 121 | |||
| 122 | if (!String.IsNullOrEmpty(perMachine)) | ||
| 123 | { | ||
| 124 | scope = perMachine == "yes" ? WixBundleScopeType.PerMachine : WixBundleScopeType.PerUser; | ||
| 125 | } | ||
| 126 | else | ||
| 127 | { | ||
| 128 | this.Messaging.Write(BurnBackendErrors.InvalidBundleManifest(sourceLineNumbers, sourcePath, $"Expected bundle scope but got '{bundleScope}'.")); | ||
| 129 | } | ||
| 130 | } | ||
| 117 | 131 | ||
| 118 | version = registrationElement.GetAttribute("Version"); | 132 | version = registrationElement.GetAttribute("Version"); |
| 119 | 133 | ||
| @@ -148,7 +162,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 148 | EngineVersion = engineVersion, | 162 | EngineVersion = engineVersion, |
| 149 | ManifestNamespace = manifestNamespace, | 163 | ManifestNamespace = manifestNamespace, |
| 150 | ProtocolVersion = protocolVersion, | 164 | ProtocolVersion = protocolVersion, |
| 151 | PerMachine = perMachine, | 165 | Scope = scope, |
| 152 | Version = version, | 166 | Version = version, |
| 153 | DisplayName = displayName, | 167 | DisplayName = displayName, |
| 154 | InstallSize = installSize, | 168 | InstallSize = installSize, |
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessBundlePackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessBundlePackageCommand.cs index 35bd43e6..ccea04e1 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessBundlePackageCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessBundlePackageCommand.cs | |||
| @@ -87,7 +87,6 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 87 | this.ChainPackage.Visible = true; | 87 | this.ChainPackage.Visible = true; |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | this.ChainPackage.PerMachine = harvestedBundlePackage.PerMachine; | ||
| 91 | this.PackagePayload.Version = harvestedBundlePackage.Version; | 90 | this.PackagePayload.Version = harvestedBundlePackage.Version; |
| 92 | this.BundlePackage.Version = harvestedBundlePackage.Version; | 91 | this.BundlePackage.Version = harvestedBundlePackage.Version; |
| 93 | this.ChainPackage.Version = harvestedBundlePackage.Version; | 92 | this.ChainPackage.Version = harvestedBundlePackage.Version; |
| @@ -103,6 +102,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 103 | } | 102 | } |
| 104 | 103 | ||
| 105 | this.ChainPackage.InstallSize = harvestedBundlePackage.InstallSize; | 104 | this.ChainPackage.InstallSize = harvestedBundlePackage.InstallSize; |
| 105 | this.ChainPackage.Scope = harvestedBundlePackage.Scope; | ||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | private WixBundleHarvestedBundlePackageSymbol HarvestPackage() | 108 | private WixBundleHarvestedBundlePackageSymbol HarvestPackage() |
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs index 8b370b90..e6da5ce6 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs | |||
| @@ -89,7 +89,6 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 89 | }); | 89 | }); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | this.ChainPackage.PerMachine = harvestedMsiPackage.PerMachine; | ||
| 93 | this.ChainPackage.Win64 = harvestedMsiPackage.Win64; | 92 | this.ChainPackage.Win64 = harvestedMsiPackage.Win64; |
| 94 | 93 | ||
| 95 | this.MsiPackage.ProductCode = harvestedMsiPackage.ProductCode; | 94 | this.MsiPackage.ProductCode = harvestedMsiPackage.ProductCode; |
| @@ -123,7 +122,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 123 | this.Messaging.Write(WarningMessages.InvalidMsiProductVersion(this.PackagePayload.SourceLineNumbers, this.MsiPackage.ProductVersion, this.PackageId)); | 122 | this.Messaging.Write(WarningMessages.InvalidMsiProductVersion(this.PackagePayload.SourceLineNumbers, this.MsiPackage.ProductVersion, this.PackageId)); |
| 124 | } | 123 | } |
| 125 | 124 | ||
| 126 | this.SetPerMachineAppropriately(harvestedMsiPackage.AllUsers); | 125 | this.DeterminePackageScope(harvestedMsiPackage.PerMachine, harvestedMsiPackage.AllUsers, harvestedMsiPackage.MsiInstallPerUser); |
| 127 | 126 | ||
| 128 | var msiPropertyNames = this.GetMsiPropertyNames(); | 127 | var msiPropertyNames = this.GetMsiPropertyNames(); |
| 129 | 128 | ||
| @@ -146,6 +145,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 146 | string productName; | 145 | string productName; |
| 147 | string arpComments; | 146 | string arpComments; |
| 148 | string allUsers; | 147 | string allUsers; |
| 148 | string msiInstallPerUser; | ||
| 149 | string msiFastInstall; | 149 | string msiFastInstall; |
| 150 | string arpSystemComponent; | 150 | string arpSystemComponent; |
| 151 | string productCode; | 151 | string productCode; |
| @@ -194,6 +194,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 194 | productName = ProcessMsiPackageCommand.GetProperty(view, "ProductName"); | 194 | productName = ProcessMsiPackageCommand.GetProperty(view, "ProductName"); |
| 195 | arpComments = ProcessMsiPackageCommand.GetProperty(view, "ARPCOMMENTS"); | 195 | arpComments = ProcessMsiPackageCommand.GetProperty(view, "ARPCOMMENTS"); |
| 196 | allUsers = ProcessMsiPackageCommand.GetProperty(view, "ALLUSERS"); | 196 | allUsers = ProcessMsiPackageCommand.GetProperty(view, "ALLUSERS"); |
| 197 | msiInstallPerUser = ProcessMsiPackageCommand.GetProperty(view, "MSIINSTALLPERUSER"); | ||
| 197 | msiFastInstall = ProcessMsiPackageCommand.GetProperty(view, "MSIFASTINSTALL"); | 198 | msiFastInstall = ProcessMsiPackageCommand.GetProperty(view, "MSIFASTINSTALL"); |
| 198 | arpSystemComponent = ProcessMsiPackageCommand.GetProperty(view, "ARPSYSTEMCOMPONENT"); | 199 | arpSystemComponent = ProcessMsiPackageCommand.GetProperty(view, "ARPSYSTEMCOMPONENT"); |
| 199 | 200 | ||
| @@ -234,6 +235,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 234 | ProductName = productName, | 235 | ProductName = productName, |
| 235 | ArpComments = arpComments, | 236 | ArpComments = arpComments, |
| 236 | AllUsers = allUsers, | 237 | AllUsers = allUsers, |
| 238 | MsiInstallPerUser = msiInstallPerUser, | ||
| 237 | MsiFastInstall = msiFastInstall, | 239 | MsiFastInstall = msiFastInstall, |
| 238 | ArpSystemComponent = arpSystemComponent, | 240 | ArpSystemComponent = arpSystemComponent, |
| 239 | ProductCode = productCode, | 241 | ProductCode = productCode, |
| @@ -284,18 +286,17 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 284 | } | 286 | } |
| 285 | } | 287 | } |
| 286 | 288 | ||
| 287 | private void SetPerMachineAppropriately(string allusers) | 289 | private void DeterminePackageScope(bool perMachine, string allusers, string msiInstallPerUser) |
| 288 | { | 290 | { |
| 289 | Debug.Assert(this.ChainPackage.PerMachine.HasValue); | ||
| 290 | var perMachine = this.ChainPackage.PerMachine.Value; | ||
| 291 | |||
| 292 | // Can ignore ALLUSERS from MsiProperties because it is not allowed there. | 291 | // Can ignore ALLUSERS from MsiProperties because it is not allowed there. |
| 293 | if (this.MsiPackage.ForcePerMachine) | 292 | if (this.MsiPackage.ForcePerMachine) |
| 294 | { | 293 | { |
| 294 | this.ChainPackage.Scope = WixBundleScopeType.PerMachine; // ensure that we think the package is per-machine. | ||
| 295 | |||
| 295 | if (!perMachine) | 296 | if (!perMachine) |
| 296 | { | 297 | { |
| 297 | this.Messaging.Write(BurnBackendWarnings.PerUserButForcingPerMachine(this.PackagePayload.SourceLineNumbers, this.PackageId)); | 298 | this.Messaging.Write(BurnBackendWarnings.PerUserButForcingPerMachine(this.PackagePayload.SourceLineNumbers, this.PackageId)); |
| 298 | this.ChainPackage.PerMachine = true; // ensure that we think the package is per-machine. | 299 | this.ChainPackage.Scope = WixBundleScopeType.PerMachine; // ensure that we think the package is per-machine. |
| 299 | } | 300 | } |
| 300 | 301 | ||
| 301 | // Force ALLUSERS=1 via the MSI command-line. | 302 | // Force ALLUSERS=1 via the MSI command-line. |
| @@ -306,14 +307,17 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 306 | if (String.IsNullOrEmpty(allusers)) | 307 | if (String.IsNullOrEmpty(allusers)) |
| 307 | { | 308 | { |
| 308 | // Not forced per-machine and no ALLUSERS property, flip back to per-user. | 309 | // Not forced per-machine and no ALLUSERS property, flip back to per-user. |
| 310 | this.ChainPackage.Scope = WixBundleScopeType.PerUser; | ||
| 311 | |||
| 309 | if (perMachine) | 312 | if (perMachine) |
| 310 | { | 313 | { |
| 311 | this.Messaging.Write(BurnBackendWarnings.ImplicitlyPerUser(this.ChainPackage.SourceLineNumbers, this.PackageId)); | 314 | this.Messaging.Write(BurnBackendWarnings.ImplicitlyPerUser(this.ChainPackage.SourceLineNumbers, this.PackageId)); |
| 312 | this.ChainPackage.PerMachine = false; | ||
| 313 | } | 315 | } |
| 314 | } | 316 | } |
| 315 | else if (allusers.Equals("1", StringComparison.Ordinal)) | 317 | else if (allusers.Equals("1", StringComparison.Ordinal)) |
| 316 | { | 318 | { |
| 319 | this.ChainPackage.Scope = WixBundleScopeType.PerMachine; // ensure that we think the package is per-machine. | ||
| 320 | |||
| 317 | if (!perMachine) | 321 | if (!perMachine) |
| 318 | { | 322 | { |
| 319 | this.Messaging.Write(BurnBackendErrors.PerUserButAllUsersEquals1(this.ChainPackage.SourceLineNumbers, this.PackageId)); | 323 | this.Messaging.Write(BurnBackendErrors.PerUserButAllUsersEquals1(this.ChainPackage.SourceLineNumbers, this.PackageId)); |
| @@ -321,7 +325,14 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 321 | } | 325 | } |
| 322 | else if (allusers.Equals("2", StringComparison.Ordinal)) | 326 | else if (allusers.Equals("2", StringComparison.Ordinal)) |
| 323 | { | 327 | { |
| 324 | this.Messaging.Write(BurnBackendWarnings.DiscouragedAllUsersValue(this.ChainPackage.SourceLineNumbers, this.PackageId, perMachine ? "machine" : "user")); | 328 | if (msiInstallPerUser?.Equals("1", StringComparison.Ordinal) == true) |
| 329 | { | ||
| 330 | this.ChainPackage.Scope = WixBundleScopeType.PerUserOrMachine; | ||
| 331 | } | ||
| 332 | else | ||
| 333 | { | ||
| 334 | this.ChainPackage.Scope = WixBundleScopeType.PerMachineOrUser; | ||
| 335 | } | ||
| 325 | } | 336 | } |
| 326 | else | 337 | else |
| 327 | { | 338 | { |
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsuPackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsuPackageCommand.cs index 47e89616..a3a38ed4 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsuPackageCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsuPackageCommand.cs | |||
| @@ -35,7 +35,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 35 | this.Facade.PackageSymbol.CacheId = CacheIdGenerator.GenerateLocalCacheId(this.Messaging, null, packagePayload, this.Facade.PackageSymbol.SourceLineNumbers, "MsuPackage"); | 35 | this.Facade.PackageSymbol.CacheId = CacheIdGenerator.GenerateLocalCacheId(this.Messaging, null, packagePayload, this.Facade.PackageSymbol.SourceLineNumbers, "MsuPackage"); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | this.Facade.PackageSymbol.PerMachine = true; // MSUs are always per-machine. | 38 | this.Facade.PackageSymbol.Scope = WixBundleScopeType.PerMachine; // MSUs are always per-machine. |
| 39 | } | 39 | } |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
diff --git a/src/wix/WixToolset.Core.Burn/BurnBackendWarnings.cs b/src/wix/WixToolset.Core.Burn/BurnBackendWarnings.cs index ab045981..0349c942 100644 --- a/src/wix/WixToolset.Core.Burn/BurnBackendWarnings.cs +++ b/src/wix/WixToolset.Core.Burn/BurnBackendWarnings.cs | |||
| @@ -61,11 +61,6 @@ namespace WixToolset.Core.Burn | |||
| 61 | return Message(sourceLineNumbers, Ids.DiscardedRollbackBoundary2, "Location of rollback boundary related to previous warning."); | 61 | return Message(sourceLineNumbers, Ids.DiscardedRollbackBoundary2, "Location of rollback boundary related to previous warning."); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | public static Message DiscouragedAllUsersValue(SourceLineNumber sourceLineNumbers, string path, string machineOrUser) | ||
| 65 | { | ||
| 66 | return Message(sourceLineNumbers, Ids.DiscouragedAllUsersValue, "Bundles require a package to be either per-machine or per-user. The MSI '{0}' ALLUSERS Property is set to '2' which may change from per-user to per-machine at install time. The Bundle will assume the package is per-{1} and will not work correctly if that changes. If possible, use the Package/@Scope attribute values 'perUser' or 'perMachine' instead.", path, machineOrUser); | ||
| 67 | } | ||
| 68 | |||
| 69 | public static Message DownloadUrlNotSupportedForAttachedContainers(SourceLineNumber sourceLineNumbers, string containerId) | 64 | public static Message DownloadUrlNotSupportedForAttachedContainers(SourceLineNumber sourceLineNumbers, string containerId) |
| 70 | { | 65 | { |
| 71 | return Message(sourceLineNumbers, Ids.DownloadUrlNotSupportedForAttachedContainers, "The Container '{0}' is attached but included a @DownloadUrl attribute. Attached Containers cannot be downloaded so the download URL is being ignored.", containerId); | 66 | return Message(sourceLineNumbers, Ids.DownloadUrlNotSupportedForAttachedContainers, "The Container '{0}' is attached but included a @DownloadUrl attribute. Attached Containers cannot be downloaded so the download URL is being ignored.", containerId); |
| @@ -104,7 +99,6 @@ namespace WixToolset.Core.Burn | |||
| 104 | public enum Ids | 99 | public enum Ids |
| 105 | { | 100 | { |
| 106 | DiscardedRollbackBoundary = 1129, | 101 | DiscardedRollbackBoundary = 1129, |
| 107 | DiscouragedAllUsersValue = 1133, | ||
| 108 | ImplicitlyPerUser = 1134, | 102 | ImplicitlyPerUser = 1134, |
| 109 | PerUserButForcingPerMachine = 1135, | 103 | PerUserButForcingPerMachine = 1135, |
| 110 | NoPerMachineDependencies = 1140, | 104 | NoPerMachineDependencies = 1140, |
diff --git a/src/wix/WixToolset.Core.Burn/CommandLine/RemotePayloadSubcommand.cs b/src/wix/WixToolset.Core.Burn/CommandLine/RemotePayloadSubcommand.cs index 7ccae3fd..f4d557fe 100644 --- a/src/wix/WixToolset.Core.Burn/CommandLine/RemotePayloadSubcommand.cs +++ b/src/wix/WixToolset.Core.Burn/CommandLine/RemotePayloadSubcommand.cs | |||
| @@ -438,7 +438,23 @@ namespace WixToolset.Core.Burn.CommandLine | |||
| 438 | 438 | ||
| 439 | bundleElement.Add(new XAttribute("InstallSize", command.HarvestedBundlePackage.InstallSize)); | 439 | bundleElement.Add(new XAttribute("InstallSize", command.HarvestedBundlePackage.InstallSize)); |
| 440 | bundleElement.Add(new XAttribute("ManifestNamespace", command.HarvestedBundlePackage.ManifestNamespace)); | 440 | bundleElement.Add(new XAttribute("ManifestNamespace", command.HarvestedBundlePackage.ManifestNamespace)); |
| 441 | bundleElement.Add(new XAttribute("PerMachine", command.HarvestedBundlePackage.PerMachine ? "yes" : "no")); | 441 | |
| 442 | switch (command.HarvestedBundlePackage.Scope) | ||
| 443 | { | ||
| 444 | case WixBundleScopeType.PerMachine: | ||
| 445 | bundleElement.Add(new XAttribute("Scope", "perMachine")); | ||
| 446 | break; | ||
| 447 | case WixBundleScopeType.PerUser: | ||
| 448 | bundleElement.Add(new XAttribute("Scope", "perUser")); | ||
| 449 | break; | ||
| 450 | case WixBundleScopeType.PerUserOrMachine: | ||
| 451 | bundleElement.Add(new XAttribute("Scope", "perUserOrMachine")); | ||
| 452 | break; | ||
| 453 | case WixBundleScopeType.PerMachineOrUser: | ||
| 454 | bundleElement.Add(new XAttribute("Scope", "perMachineOrUser")); | ||
| 455 | break; | ||
| 456 | } | ||
| 457 | |||
| 442 | bundleElement.Add(new XAttribute("ProviderKey", command.HarvestedDependencyProvider.ProviderKey)); | 458 | bundleElement.Add(new XAttribute("ProviderKey", command.HarvestedDependencyProvider.ProviderKey)); |
| 443 | bundleElement.Add(new XAttribute("ProtocolVersion", command.HarvestedBundlePackage.ProtocolVersion)); | 459 | bundleElement.Add(new XAttribute("ProtocolVersion", command.HarvestedBundlePackage.ProtocolVersion)); |
| 444 | 460 | ||
diff --git a/src/wix/WixToolset.Core/Compiler_Bundle.cs b/src/wix/WixToolset.Core/Compiler_Bundle.cs index 2a36581c..1c8666af 100644 --- a/src/wix/WixToolset.Core/Compiler_Bundle.cs +++ b/src/wix/WixToolset.Core/Compiler_Bundle.cs | |||
| @@ -2610,11 +2610,11 @@ namespace WixToolset.Core | |||
| 2610 | 2610 | ||
| 2611 | if (perMachine == YesNoDefaultType.Yes) | 2611 | if (perMachine == YesNoDefaultType.Yes) |
| 2612 | { | 2612 | { |
| 2613 | chainPackageSymbol.PerMachine = true; | 2613 | chainPackageSymbol.Scope = WixBundleScopeType.PerMachine; |
| 2614 | } | 2614 | } |
| 2615 | else if (perMachine == YesNoDefaultType.No) | 2615 | else if (perMachine == YesNoDefaultType.No) |
| 2616 | { | 2616 | { |
| 2617 | chainPackageSymbol.PerMachine = false; | 2617 | chainPackageSymbol.Scope = WixBundleScopeType.PerUser; |
| 2618 | } | 2618 | } |
| 2619 | 2619 | ||
| 2620 | if (installSize.HasValue) | 2620 | if (installSize.HasValue) |
| @@ -2871,9 +2871,9 @@ namespace WixToolset.Core | |||
| 2871 | string bundleCode = null; | 2871 | string bundleCode = null; |
| 2872 | string displayName = null; | 2872 | string displayName = null; |
| 2873 | string engineVersion = null; | 2873 | string engineVersion = null; |
| 2874 | WixBundleScopeType? scope = null; | ||
| 2874 | long? installSize = null; | 2875 | long? installSize = null; |
| 2875 | string manifestNamespace = null; | 2876 | string manifestNamespace = null; |
| 2876 | var perMachine = YesNoType.NotSet; | ||
| 2877 | var protocolVersion = -1; | 2877 | var protocolVersion = -1; |
| 2878 | string providerKey = null; | 2878 | string providerKey = null; |
| 2879 | string upgradeCode = null; | 2879 | string upgradeCode = null; |
| @@ -2905,7 +2905,14 @@ namespace WixToolset.Core | |||
| 2905 | manifestNamespace = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 2905 | manifestNamespace = this.Core.GetAttributeValue(sourceLineNumbers, attrib); |
| 2906 | break; | 2906 | break; |
| 2907 | case "PerMachine": | 2907 | case "PerMachine": |
| 2908 | perMachine = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 2908 | if (scope.HasValue) |
| 2909 | { | ||
| 2910 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PerMachine", "Scope", eitherOr: true)); | ||
| 2911 | } | ||
| 2912 | else | ||
| 2913 | { | ||
| 2914 | scope = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) == YesNoType.Yes ? WixBundleScopeType.PerMachine : WixBundleScopeType.PerUser; | ||
| 2915 | } | ||
| 2909 | break; | 2916 | break; |
| 2910 | case "ProtocolVersion": | 2917 | case "ProtocolVersion": |
| 2911 | protocolVersion = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); | 2918 | protocolVersion = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); |
| @@ -2913,6 +2920,34 @@ namespace WixToolset.Core | |||
| 2913 | case "ProviderKey": | 2920 | case "ProviderKey": |
| 2914 | providerKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 2921 | providerKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); |
| 2915 | break; | 2922 | break; |
| 2923 | case "Scope": | ||
| 2924 | if (scope.HasValue) | ||
| 2925 | { | ||
| 2926 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PerMachine", "Scope", eitherOr: true)); | ||
| 2927 | } | ||
| 2928 | else | ||
| 2929 | { | ||
| 2930 | var installScope = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 2931 | switch (installScope) | ||
| 2932 | { | ||
| 2933 | case "perMachine": | ||
| 2934 | scope = WixBundleScopeType.PerMachine; | ||
| 2935 | break; | ||
| 2936 | case "perUser": | ||
| 2937 | scope = WixBundleScopeType.PerUser; | ||
| 2938 | break; | ||
| 2939 | case "perUserOrMachine": | ||
| 2940 | scope = WixBundleScopeType.PerUserOrMachine; | ||
| 2941 | break; | ||
| 2942 | case "perMachineOrUser": | ||
| 2943 | scope = WixBundleScopeType.PerMachineOrUser; | ||
| 2944 | break; | ||
| 2945 | default: | ||
| 2946 | this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, installScope, "perMachine", "perUser", "perUserOrMachine")); | ||
| 2947 | break; | ||
| 2948 | } | ||
| 2949 | } | ||
| 2950 | break; | ||
| 2916 | case "UpgradeCode": | 2951 | case "UpgradeCode": |
| 2917 | upgradeCode = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib); | 2952 | upgradeCode = this.Core.GetAttributeGuidValue(sourceLineNumbers, attrib); |
| 2918 | break; | 2953 | break; |
| @@ -2943,9 +2978,9 @@ namespace WixToolset.Core | |||
| 2943 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ManifestNamespace")); | 2978 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ManifestNamespace")); |
| 2944 | } | 2979 | } |
| 2945 | 2980 | ||
| 2946 | if (perMachine == YesNoType.NotSet) | 2981 | if (scope == null) |
| 2947 | { | 2982 | { |
| 2948 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PerMachine")); | 2983 | this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Scope")); |
| 2949 | } | 2984 | } |
| 2950 | 2985 | ||
| 2951 | if (protocolVersion == -1) | 2986 | if (protocolVersion == -1) |
| @@ -2976,12 +3011,12 @@ namespace WixToolset.Core | |||
| 2976 | if (!this.Messaging.EncounteredError) | 3011 | if (!this.Messaging.EncounteredError) |
| 2977 | { | 3012 | { |
| 2978 | WixBundleHarvestedBundlePackageAttributes bundleAttributes = 0; | 3013 | WixBundleHarvestedBundlePackageAttributes bundleAttributes = 0; |
| 2979 | bundleAttributes |= (YesNoType.Yes == perMachine) ? WixBundleHarvestedBundlePackageAttributes.PerMachine : 0; | ||
| 2980 | bundleAttributes |= (YesNoType.Yes == win64) ? WixBundleHarvestedBundlePackageAttributes.Win64 : 0; | 3014 | bundleAttributes |= (YesNoType.Yes == win64) ? WixBundleHarvestedBundlePackageAttributes.Win64 : 0; |
| 2981 | 3015 | ||
| 2982 | var symbol = this.Core.AddSymbol(new WixBundleHarvestedBundlePackageSymbol(sourceLineNumbers, new Identifier(AccessModifier.Section, packagePayloadId)) | 3016 | var symbol = this.Core.AddSymbol(new WixBundleHarvestedBundlePackageSymbol(sourceLineNumbers, new Identifier(AccessModifier.Section, packagePayloadId)) |
| 2983 | { | 3017 | { |
| 2984 | Attributes = bundleAttributes, | 3018 | Attributes = bundleAttributes, |
| 3019 | Scope = scope ?? WixBundleScopeType.PerMachine, | ||
| 2985 | BundleCode = bundleCode, | 3020 | BundleCode = bundleCode, |
| 2986 | DisplayName = displayName, | 3021 | DisplayName = displayName, |
| 2987 | EngineVersion = engineVersion, | 3022 | EngineVersion = engineVersion, |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs index 8fbd4ddb..93aae7be 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | |||
| @@ -170,7 +170,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 170 | var registrationElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); | 170 | var registrationElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); |
| 171 | WixAssert.CompareLineByLine(new[] | 171 | WixAssert.CompareLineByLine(new[] |
| 172 | { | 172 | { |
| 173 | $"<Registration Code='{bundleSymbol.BundleCode}' ExecutableName='test.exe' PerMachine='yes' Tag='' Version='1.0.0.0' ProviderKey='{bundleSymbol.BundleCode}'>" + | 173 | $"<Registration Code='{bundleSymbol.BundleCode}' ExecutableName='test.exe' Scope='perMachine' Tag='' Version='1.0.0.0' ProviderKey='{bundleSymbol.BundleCode}'>" + |
| 174 | "<Arp DisplayName='~TestBundle' DisplayVersion='1.0.0.0' InProgressDisplayName='~InProgressTestBundle' Publisher='Example Corporation' />" + | 174 | "<Arp DisplayName='~TestBundle' DisplayVersion='1.0.0.0' InProgressDisplayName='~InProgressTestBundle' Publisher='Example Corporation' />" + |
| 175 | "</Registration>", | 175 | "</Registration>", |
| 176 | }, registrationElements); | 176 | }, registrationElements); |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs index 30d3aaea..7162bd60 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs | |||
| @@ -5,11 +5,11 @@ namespace WixToolsetTest.CoreIntegration | |||
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using System.IO; | 7 | using System.IO; |
| 8 | using System.Linq; | ||
| 8 | using Example.Extension; | 9 | using Example.Extension; |
| 9 | using WixInternal.TestSupport; | 10 | using WixInternal.TestSupport; |
| 10 | using WixInternal.Core.TestPackage; | 11 | using WixInternal.Core.TestPackage; |
| 11 | using Xunit; | 12 | using Xunit; |
| 12 | using System.Linq; | ||
| 13 | 13 | ||
| 14 | public class BundleManifestFixture | 14 | public class BundleManifestFixture |
| 15 | { | 15 | { |
| @@ -187,7 +187,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 187 | var dataRelatedBundlesElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBundleProperties", ignoreAttributesByElementName); | 187 | var dataRelatedBundlesElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBundleProperties", ignoreAttributesByElementName); |
| 188 | WixAssert.CompareLineByLine(new[] | 188 | WixAssert.CompareLineByLine(new[] |
| 189 | { | 189 | { |
| 190 | "<WixBundleProperties BundleId='WixToolsetTest.BundleWithInvalidUpgradeCode' Code='*' DisplayName='*' LogPathVariable='WixBundleLog' Compressed='no' UpgradeCode='{6D4CE32B-FB91-45DA-A9B5-7E0D9929A3C3}' PerMachine='yes' />", | 190 | "<WixBundleProperties BundleId='WixToolsetTest.BundleWithInvalidUpgradeCode' Code='*' DisplayName='*' LogPathVariable='WixBundleLog' Compressed='no' UpgradeCode='{6D4CE32B-FB91-45DA-A9B5-7E0D9929A3C3}' Scope='perMachine' />", |
| 191 | }, dataRelatedBundlesElements); | 191 | }, dataRelatedBundlesElements); |
| 192 | } | 192 | } |
| 193 | } | 193 | } |
| @@ -381,8 +381,8 @@ namespace WixToolsetTest.CoreIntegration | |||
| 381 | var exePackageElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributesByElementName); | 381 | var exePackageElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributesByElementName); |
| 382 | WixAssert.CompareLineByLine(new[] | 382 | WixAssert.CompareLineByLine(new[] |
| 383 | { | 383 | { |
| 384 | "<ExePackage Id='credwiz.exe' Cache='keep' CacheId='*' InstallSize='*' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' LogPathVariable='WixBundleLog_credwiz.exe' RollbackLogPathVariable='WixBundleRollbackLog_credwiz.exe' InstallArguments='' RepairArguments='' Repairable='no' DetectionType='condition' DetectCondition='none' UninstallArguments='-foo' Uninstallable='yes' Protocol='burn' Bundle='yes'><PayloadRef Id='credwiz.exe' /><PayloadRef Id='pldbF0sgj0VCScDauGEpgwmywekS84' /></ExePackage>", | 384 | "<ExePackage Id='credwiz.exe' Cache='keep' CacheId='*' InstallSize='*' Size='*' Scope='perMachine' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' LogPathVariable='WixBundleLog_credwiz.exe' RollbackLogPathVariable='WixBundleRollbackLog_credwiz.exe' InstallArguments='' RepairArguments='' Repairable='no' DetectionType='condition' DetectCondition='none' UninstallArguments='-foo' Uninstallable='yes' Protocol='burn' Bundle='yes'><PayloadRef Id='credwiz.exe' /><PayloadRef Id='pldbF0sgj0VCScDauGEpgwmywekS84' /></ExePackage>", |
| 385 | "<ExePackage Id='cscript.exe' Cache='keep' CacheId='*' InstallSize='*' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_cscript.exe' RollbackLogPathVariable='WixBundleRollbackLog_cscript.exe' InstallArguments='' RepairArguments='' Repairable='no' DetectionType='condition' DetectCondition='none' UninstallArguments='' Uninstallable='yes' Protocol='none' Bundle='yes'><PayloadRef Id='cscript.exe' /><PayloadRef Id='pldbF0sgj0VCScDauGEpgwmywekS84' /></ExePackage>", | 385 | "<ExePackage Id='cscript.exe' Cache='keep' CacheId='*' InstallSize='*' Size='*' Scope='perMachine' Permanent='yes' Vital='yes' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_cscript.exe' RollbackLogPathVariable='WixBundleRollbackLog_cscript.exe' InstallArguments='' RepairArguments='' Repairable='no' DetectionType='condition' DetectCondition='none' UninstallArguments='' Uninstallable='yes' Protocol='none' Bundle='yes'><PayloadRef Id='cscript.exe' /><PayloadRef Id='pldbF0sgj0VCScDauGEpgwmywekS84' /></ExePackage>", |
| 386 | }, exePackageElements); | 386 | }, exePackageElements); |
| 387 | } | 387 | } |
| 388 | } | 388 | } |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundlePackageFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundlePackageFixture.cs index d4ff0dbd..51fdac6f 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BundlePackageFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundlePackageFixture.cs | |||
| @@ -80,7 +80,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 80 | var bundlePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage", ignoreAttributesByElementName); | 80 | var bundlePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage", ignoreAttributesByElementName); |
| 81 | WixAssert.CompareLineByLine(new[] | 81 | WixAssert.CompareLineByLine(new[] |
| 82 | { | 82 | { |
| 83 | $"<BundlePackage Id='chain.exe' Cache='keep' CacheId='{chainBundleId}v1.0.0.0' InstallSize='34' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_chain.exe' RollbackLogPathVariable='WixBundleRollbackLog_chain.exe' BundleCode='{chainBundleId}' Version='1.0.0.0' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no' HideARP='yes'>" + | 83 | $"<BundlePackage Id='chain.exe' Cache='keep' CacheId='{chainBundleId}v1.0.0.0' InstallSize='34' Size='*' Scope='perMachine' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_chain.exe' RollbackLogPathVariable='WixBundleRollbackLog_chain.exe' BundleCode='{chainBundleId}' Version='1.0.0.0' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no' HideARP='yes'>" + |
| 84 | "<Provides Key='MyProviderKey,v1.0' Version='1.0.0.0' DisplayName='BurnBundle' Imported='yes' />" + | 84 | "<Provides Key='MyProviderKey,v1.0' Version='1.0.0.0' DisplayName='BurnBundle' Imported='yes' />" + |
| 85 | "<RelatedBundle Code='{DFEA7F84-8F9D-5330-AAAE-7D849E650215}' Action='Upgrade' />" + | 85 | "<RelatedBundle Code='{DFEA7F84-8F9D-5330-AAAE-7D849E650215}' Action='Upgrade' />" + |
| 86 | "<PayloadRef Id='chain.exe' />" + | 86 | "<PayloadRef Id='chain.exe' />" + |
| @@ -91,7 +91,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 91 | var registrations = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); | 91 | var registrations = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); |
| 92 | WixAssert.CompareLineByLine(new[] | 92 | WixAssert.CompareLineByLine(new[] |
| 93 | { | 93 | { |
| 94 | $"<Registration BundleId='WixToolsetTest.TestBundle' Code='{parentBundleId}' ExecutableName='parent.exe' PerMachine='yes' Tag='' Version='1.0.1.0' ProviderKey='{parentBundleId}'>" + | 94 | $"<Registration BundleId='WixToolsetTest.TestBundle' Code='{parentBundleId}' ExecutableName='parent.exe' Scope='perMachine' Tag='' Version='1.0.1.0' ProviderKey='{parentBundleId}'>" + |
| 95 | "<Arp DisplayName='BundlePackageBundle' DisplayVersion='1.0.1.0' Publisher='Example Corporation' />" + | 95 | "<Arp DisplayName='BundlePackageBundle' DisplayVersion='1.0.1.0' Publisher='Example Corporation' />" + |
| 96 | "</Registration>" | 96 | "</Registration>" |
| 97 | }, registrations); | 97 | }, registrations); |
| @@ -133,7 +133,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 133 | bundlePackages = grandparentExtractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage", ignoreAttributesByElementName); | 133 | bundlePackages = grandparentExtractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage", ignoreAttributesByElementName); |
| 134 | WixAssert.CompareLineByLine(new[] | 134 | WixAssert.CompareLineByLine(new[] |
| 135 | { | 135 | { |
| 136 | $"<BundlePackage Id='parent.exe' Cache='keep' CacheId='{parentBundleId}v1.0.1.0' InstallSize='34' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_parent.exe' RollbackLogPathVariable='WixBundleRollbackLog_parent.exe' BundleCode='{parentBundleId}' Version='1.0.1.0' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no'>" + | 136 | $"<BundlePackage Id='parent.exe' Cache='keep' CacheId='{parentBundleId}v1.0.1.0' InstallSize='34' Size='*' Scope='perMachine' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_parent.exe' RollbackLogPathVariable='WixBundleRollbackLog_parent.exe' BundleCode='{parentBundleId}' Version='1.0.1.0' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no'>" + |
| 137 | $"<Provides Key='{parentBundleId}' Version='1.0.1.0' DisplayName='BundlePackageBundle' Imported='yes' />" + | 137 | $"<Provides Key='{parentBundleId}' Version='1.0.1.0' DisplayName='BundlePackageBundle' Imported='yes' />" + |
| 138 | "<RelatedBundle Code='{DFEA7F84-8F9D-5330-AAAE-7D849E650215}' Action='Upgrade' />" + | 138 | "<RelatedBundle Code='{DFEA7F84-8F9D-5330-AAAE-7D849E650215}' Action='Upgrade' />" + |
| 139 | "<PayloadRef Id='parent.exe' />" + | 139 | "<PayloadRef Id='parent.exe' />" + |
| @@ -154,7 +154,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 154 | registrations = grandparentExtractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); | 154 | registrations = grandparentExtractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); |
| 155 | WixAssert.CompareLineByLine(new[] | 155 | WixAssert.CompareLineByLine(new[] |
| 156 | { | 156 | { |
| 157 | $"<Registration BundleId='WixToolsetTest.TestBundle' Code='{grandparentBundleId}' ExecutableName='grandparent.exe' PerMachine='yes' Tag='' Version='1.0.2.0' ProviderKey='{grandparentBundleId}'>" + | 157 | $"<Registration BundleId='WixToolsetTest.TestBundle' Code='{grandparentBundleId}' ExecutableName='grandparent.exe' Scope='perMachine' Tag='' Version='1.0.2.0' ProviderKey='{grandparentBundleId}'>" + |
| 158 | "<Arp DisplayName='PermanentBundlePackageBundle' DisplayVersion='1.0.2.0' Publisher='Example Corporation' />" + | 158 | "<Arp DisplayName='PermanentBundlePackageBundle' DisplayVersion='1.0.2.0' Publisher='Example Corporation' />" + |
| 159 | "</Registration>" | 159 | "</Registration>" |
| 160 | }, registrations); | 160 | }, registrations); |
| @@ -214,7 +214,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 214 | var bundlePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage", ignoreAttributesByElementName); | 214 | var bundlePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage", ignoreAttributesByElementName); |
| 215 | WixAssert.CompareLineByLine(new[] | 215 | WixAssert.CompareLineByLine(new[] |
| 216 | { | 216 | { |
| 217 | $"<BundlePackage Id='chain.exe' Cache='keep' CacheId='{chainBundleId}v1.0.0-foo.55' InstallSize='34' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_chain.exe' RollbackLogPathVariable='WixBundleRollbackLog_chain.exe' BundleCode='{chainBundleId}' Version='1.0.0-foo.55' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no'>" + | 217 | $"<BundlePackage Id='chain.exe' Cache='keep' CacheId='{chainBundleId}v1.0.0-foo.55' InstallSize='34' Size='*' Scope='perMachine' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_chain.exe' RollbackLogPathVariable='WixBundleRollbackLog_chain.exe' BundleCode='{chainBundleId}' Version='1.0.0-foo.55' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no'>" + |
| 218 | "<Provides Key='MyProviderKey,v1.0' Version='1.0.0-foo.55' DisplayName='BurnBundle' Imported='yes' />" + | 218 | "<Provides Key='MyProviderKey,v1.0' Version='1.0.0-foo.55' DisplayName='BurnBundle' Imported='yes' />" + |
| 219 | "<RelatedBundle Code='{B94478B1-E1F3-4700-9CE8-6AA090854AEC}' Action='Upgrade' />" + | 219 | "<RelatedBundle Code='{B94478B1-E1F3-4700-9CE8-6AA090854AEC}' Action='Upgrade' />" + |
| 220 | "<PayloadRef Id='chain.exe' />" + | 220 | "<PayloadRef Id='chain.exe' />" + |
| @@ -224,7 +224,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 224 | var registrations = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); | 224 | var registrations = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); |
| 225 | WixAssert.CompareLineByLine(new[] | 225 | WixAssert.CompareLineByLine(new[] |
| 226 | { | 226 | { |
| 227 | $"<Registration BundleId='WixToolsetTest.TestBundle' Code='{parentBundleId}' ExecutableName='parent.exe' PerMachine='yes' Tag='' Version='1.0.1.0' ProviderKey='{parentBundleId}'>" + | 227 | $"<Registration BundleId='WixToolsetTest.TestBundle' Code='{parentBundleId}' ExecutableName='parent.exe' Scope='perMachine' Tag='' Version='1.0.1.0' ProviderKey='{parentBundleId}'>" + |
| 228 | "<Arp DisplayName='RemoteBundlePackageBundle' DisplayVersion='1.0.1.0' Publisher='Example Corporation' />" + | 228 | "<Arp DisplayName='RemoteBundlePackageBundle' DisplayVersion='1.0.1.0' Publisher='Example Corporation' />" + |
| 229 | "</Registration>" | 229 | "</Registration>" |
| 230 | }, registrations); | 230 | }, registrations); |
| @@ -292,7 +292,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 292 | var bundlePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage", ignoreAttributesByElementName); | 292 | var bundlePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage", ignoreAttributesByElementName); |
| 293 | WixAssert.CompareLineByLine(new[] | 293 | WixAssert.CompareLineByLine(new[] |
| 294 | { | 294 | { |
| 295 | $"<BundlePackage Id='v3bundle.exe' Cache='keep' CacheId='{chainBundleId}v1.0.0.0' InstallSize='1135' Size='*' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_v3bundle.exe' RollbackLogPathVariable='WixBundleRollbackLog_v3bundle.exe' RepairCondition='0' BundleCode='{chainBundleId}' Version='1.0.0.0' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no'>" + | 295 | $"<BundlePackage Id='v3bundle.exe' Cache='keep' CacheId='{chainBundleId}v1.0.0.0' InstallSize='1135' Size='*' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_v3bundle.exe' RollbackLogPathVariable='WixBundleRollbackLog_v3bundle.exe' RepairCondition='0' BundleCode='{chainBundleId}' Version='1.0.0.0' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no'>" + |
| 296 | "<Provides Key='{215a70db-ab35-48c7-be51-d66eaac87177}' Version='1.0.0.0' DisplayName='CustomV3Theme' Imported='yes' />" + | 296 | "<Provides Key='{215a70db-ab35-48c7-be51-d66eaac87177}' Version='1.0.0.0' DisplayName='CustomV3Theme' Imported='yes' />" + |
| 297 | "<RelatedBundle Code='{2BF4C01F-C132-4E70-97AB-2BC68C7CCD10}' Action='Upgrade' />" + | 297 | "<RelatedBundle Code='{2BF4C01F-C132-4E70-97AB-2BC68C7CCD10}' Action='Upgrade' />" + |
| 298 | "<PayloadRef Id='v3bundle.exe' />" + | 298 | "<PayloadRef Id='v3bundle.exe' />" + |
| @@ -302,7 +302,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 302 | var registrations = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); | 302 | var registrations = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); |
| 303 | WixAssert.CompareLineByLine(new[] | 303 | WixAssert.CompareLineByLine(new[] |
| 304 | { | 304 | { |
| 305 | $"<Registration Code='{parentBundleId}' ExecutableName='parent.exe' PerMachine='yes' Tag='' Version='1.1.1.1' ProviderKey='{parentBundleId}'>" + | 305 | $"<Registration Code='{parentBundleId}' ExecutableName='parent.exe' Scope='perMachine' Tag='' Version='1.1.1.1' ProviderKey='{parentBundleId}'>" + |
| 306 | "<Arp DisplayName='V3BundlePackageBundle' DisplayVersion='1.1.1.1' Publisher='Example Corporation' />" + | 306 | "<Arp DisplayName='V3BundlePackageBundle' DisplayVersion='1.1.1.1' Publisher='Example Corporation' />" + |
| 307 | "</Registration>" | 307 | "</Registration>" |
| 308 | }, registrations); | 308 | }, registrations); |
| @@ -320,6 +320,103 @@ namespace WixToolsetTest.CoreIntegration | |||
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | [Fact] | 322 | [Fact] |
| 323 | public void CanBuildBundleWithPerUserOrMachineBundlePackage() | ||
| 324 | { | ||
| 325 | var folder = TestData.Get("TestData"); | ||
| 326 | |||
| 327 | using (var fs = new DisposableFileSystem()) | ||
| 328 | { | ||
| 329 | var baseFolder = fs.GetFolder(); | ||
| 330 | var dataPath = Path.Combine(folder, ".Data"); | ||
| 331 | |||
| 332 | var msiIntermediateFolder = Path.Combine(baseFolder, "obj", "msi"); | ||
| 333 | var msiBinFolder = Path.Combine(baseFolder, "bin", "msi"); | ||
| 334 | var msiPath = Path.Combine(msiBinFolder, "test.msi"); | ||
| 335 | |||
| 336 | var baFolderPath = Path.Combine(baseFolder, "extract", "ba"); | ||
| 337 | var extractFolderPath = Path.Combine(baseFolder, "extract", "files"); | ||
| 338 | |||
| 339 | var result = WixRunner.Execute(new[] | ||
| 340 | { | ||
| 341 | "build", | ||
| 342 | Path.Combine(folder, "BundlePerUserOrMachine", "PerUserOrMachinePackage.wxs"), | ||
| 343 | "-bindpath", dataPath, | ||
| 344 | "-intermediateFolder", msiIntermediateFolder, | ||
| 345 | "-o", msiPath | ||
| 346 | }); | ||
| 347 | |||
| 348 | result.AssertSuccess(); | ||
| 349 | |||
| 350 | var bundleIntermediateFolder = Path.Combine(baseFolder, "obj", "bundle"); | ||
| 351 | var bundleBinFolder = Path.Combine(baseFolder, "bin", "bundle"); | ||
| 352 | var bundlePath = Path.Combine(bundleBinFolder, "BundleWithPerUserOrMachinePackage.exe"); | ||
| 353 | var bundlePdbPath = Path.Combine(bundleBinFolder, "BundleWithPerUserOrMachinePackage.wixpdb"); | ||
| 354 | |||
| 355 | result = WixRunner.Execute(new[] | ||
| 356 | { | ||
| 357 | "build", | ||
| 358 | Path.Combine(folder, "BundlePerUserOrMachine", "BundleWithPerUserOrMachinePackage.wxs"), | ||
| 359 | "-bindpath", dataPath, | ||
| 360 | "-bindpath", msiBinFolder, | ||
| 361 | "-intermediateFolder", bundleIntermediateFolder, | ||
| 362 | "-o", bundlePath | ||
| 363 | }); | ||
| 364 | |||
| 365 | result.AssertSuccess(); | ||
| 366 | |||
| 367 | var bundleId = GetBundleCodeFromWixpdb(bundlePdbPath); | ||
| 368 | |||
| 369 | var consumingBundleIntermediateFolder = Path.Combine(baseFolder, "obj", "bundle2"); | ||
| 370 | var consumingBundleBinFolder = Path.Combine(baseFolder, "bin", "bundle2"); | ||
| 371 | var consumingBundlePath = Path.Combine(bundleBinFolder, "PerUserOrMachineBundlePackage.exe"); | ||
| 372 | var consumingBundlePdbPath = Path.Combine(bundleBinFolder, "PerUserOrMachineBundlePackage.wixpdb"); | ||
| 373 | |||
| 374 | result = WixRunner.Execute(new[] | ||
| 375 | { | ||
| 376 | "build", | ||
| 377 | Path.Combine(folder, "BundlePackage", "PerUserOrMachineBundlePackage.wxs"), | ||
| 378 | "-bindpath", dataPath, | ||
| 379 | "-bindpath", bundleBinFolder, | ||
| 380 | "-intermediateFolder", consumingBundleIntermediateFolder, | ||
| 381 | "-o", consumingBundlePath | ||
| 382 | }); | ||
| 383 | |||
| 384 | result.AssertSuccess(); | ||
| 385 | |||
| 386 | var bundle2Id = GetBundleCodeFromWixpdb(consumingBundlePdbPath); | ||
| 387 | |||
| 388 | var parentBaFolderPath = Path.Combine(baseFolder, "parentba"); | ||
| 389 | var grandparentBaFolderPath = Path.Combine(baseFolder, "grandparentba"); | ||
| 390 | |||
| 391 | var bundle2ExtractResult = BundleExtractor.ExtractBAContainer(null, consumingBundlePath, grandparentBaFolderPath, extractFolderPath); | ||
| 392 | bundle2ExtractResult.AssertSuccess(); | ||
| 393 | |||
| 394 | var ignoreAttributesByElementName = new Dictionary<string, List<string>> | ||
| 395 | { | ||
| 396 | { "BundlePackage", new List<string> { "Size" } }, | ||
| 397 | }; | ||
| 398 | var bundlePackages = bundle2ExtractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage", ignoreAttributesByElementName); | ||
| 399 | WixAssert.CompareLineByLine(new[] | ||
| 400 | { | ||
| 401 | $"<BundlePackage Id='BundleWithPerUserOrMachinePackage.exe' Cache='keep' CacheId='{bundleId}v9.9' InstallSize='28' Size='*' Scope='perUserOrMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_BundleWithPerUserOrMachinePackage.exe' RollbackLogPathVariable='WixBundleRollbackLog_BundleWithPerUserOrMachinePackage.exe' BundleCode='{bundleId}' Version='9.9' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no' HideARP='yes'>" + | ||
| 402 | $"<Provides Key='{bundleId}' Version='9.9' DisplayName='Per-user-or-machine Bundle' Imported='yes' />" + | ||
| 403 | "<RelatedBundle Code='{BC2E5008-C3FF-5746-A3F1-A5C190E3BFC3}' Action='Upgrade' />" + | ||
| 404 | "<PayloadRef Id='BundleWithPerUserOrMachinePackage.exe' />" + | ||
| 405 | "</BundlePackage>", | ||
| 406 | }, bundlePackages); | ||
| 407 | |||
| 408 | |||
| 409 | var registrations = bundle2ExtractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); | ||
| 410 | WixAssert.CompareLineByLine(new[] | ||
| 411 | { | ||
| 412 | $"<Registration BundleId='WixToolsetTest.PerUserOrMachineBundlePackage' Code='{bundle2Id}' ExecutableName='PerUserOrMachineBundlePackage.exe' Scope='perUserOrMachine' Tag='' Version='1.0.2.0' ProviderKey='{bundle2Id}'>" + | ||
| 413 | "<Arp DisplayName='PerUserOrMachineBundlePackage' DisplayVersion='1.0.2.0' Publisher='Example Corporation' />" + | ||
| 414 | "</Registration>" | ||
| 415 | }, registrations); | ||
| 416 | } | ||
| 417 | } | ||
| 418 | |||
| 419 | [Fact] | ||
| 323 | public void CanBuildBundleWithAllUsersPackage() | 420 | public void CanBuildBundleWithAllUsersPackage() |
| 324 | { | 421 | { |
| 325 | var folder = TestData.Get("TestData"); | 422 | var folder = TestData.Get("TestData"); |
| @@ -372,7 +469,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 372 | var registrations = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); | 469 | var registrations = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); |
| 373 | WixAssert.CompareLineByLine(new[] | 470 | WixAssert.CompareLineByLine(new[] |
| 374 | { | 471 | { |
| 375 | $"<Registration BundleId='WixToolsetTest.TestBundle' Code='{parentBundleId}' ExecutableName='bundle.exe' PerMachine='yes' Tag='' Version='9.9' ProviderKey='{parentBundleId}'>" + | 472 | $"<Registration BundleId='WixToolsetTest.TestBundle' Code='{parentBundleId}' ExecutableName='bundle.exe' Scope='perMachine' Tag='' Version='9.9' ProviderKey='{parentBundleId}'>" + |
| 376 | "<Arp DisplayName='All Users Bundle' DisplayVersion='9.9' Publisher='Example Corporation' />" + | 473 | "<Arp DisplayName='All Users Bundle' DisplayVersion='9.9' Publisher='Example Corporation' />" + |
| 377 | "</Registration>" | 474 | "</Registration>" |
| 378 | }, registrations); | 475 | }, registrations); |
| @@ -390,6 +487,148 @@ namespace WixToolsetTest.CoreIntegration | |||
| 390 | } | 487 | } |
| 391 | } | 488 | } |
| 392 | 489 | ||
| 490 | [Fact] | ||
| 491 | public void CanBuildBundleWithPerUserPackage() | ||
| 492 | { | ||
| 493 | var folder = TestData.Get("TestData"); | ||
| 494 | |||
| 495 | using (var fs = new DisposableFileSystem()) | ||
| 496 | { | ||
| 497 | var baseFolder = fs.GetFolder(); | ||
| 498 | var dataPath = Path.Combine(folder, ".Data"); | ||
| 499 | |||
| 500 | var msiIntermediateFolder = Path.Combine(baseFolder, "obj", "msi"); | ||
| 501 | var msiBinFolder = Path.Combine(baseFolder, "bin", "msi"); | ||
| 502 | var msiPath = Path.Combine(msiBinFolder, "test.msi"); | ||
| 503 | |||
| 504 | var bundleIntermediateFolder = Path.Combine(baseFolder, "obj", "bundle"); | ||
| 505 | var bundleBinFolder = Path.Combine(baseFolder, "bin", "bundle"); | ||
| 506 | var bundlePath = Path.Combine(bundleBinFolder, "bundle.exe"); | ||
| 507 | var bundlePdbPath = Path.Combine(bundleBinFolder, "bundle.wixpdb"); | ||
| 508 | |||
| 509 | var baFolderPath = Path.Combine(baseFolder, "extract", "ba"); | ||
| 510 | var extractFolderPath = Path.Combine(baseFolder, "extract", "files"); | ||
| 511 | |||
| 512 | var result = WixRunner.Execute(new[] | ||
| 513 | { | ||
| 514 | "build", | ||
| 515 | Path.Combine(folder, "BundlePerUser", "PerUserPackage.wxs"), | ||
| 516 | "-bindpath", dataPath, | ||
| 517 | "-intermediateFolder", msiIntermediateFolder, | ||
| 518 | "-o", msiPath | ||
| 519 | }); | ||
| 520 | |||
| 521 | result.AssertSuccess(); | ||
| 522 | |||
| 523 | result = WixRunner.Execute(new[] | ||
| 524 | { | ||
| 525 | "build", | ||
| 526 | Path.Combine(folder, "BundlePerUser", "BundleWithPerUserPackage.wxs"), | ||
| 527 | "-bindpath", dataPath, | ||
| 528 | "-bindpath", msiBinFolder, | ||
| 529 | "-intermediateFolder", bundleIntermediateFolder, | ||
| 530 | "-o", bundlePath | ||
| 531 | }); | ||
| 532 | |||
| 533 | result.AssertSuccess(); | ||
| 534 | |||
| 535 | var parentBundleId = GetBundleCodeFromWixpdb(bundlePdbPath); | ||
| 536 | |||
| 537 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); | ||
| 538 | extractResult.AssertSuccess(); | ||
| 539 | |||
| 540 | var registrations = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); | ||
| 541 | WixAssert.CompareLineByLine(new[] | ||
| 542 | { | ||
| 543 | $"<Registration BundleId='WixToolsetTest.PerUserBundle' Code='{parentBundleId}' ExecutableName='bundle.exe' Scope='perUser' Tag='' Version='9.9' ProviderKey='{parentBundleId}'>" + | ||
| 544 | "<Arp DisplayName='Per-User Bundle' DisplayVersion='9.9' Publisher='Example Corporation' />" + | ||
| 545 | "</Registration>" | ||
| 546 | }, registrations); | ||
| 547 | |||
| 548 | var ignoreAttributesByElementName = new Dictionary<string, List<string>> | ||
| 549 | { | ||
| 550 | { "WixPackageProperties", new List<string> { "DownloadSize", "PackageSize" } }, | ||
| 551 | }; | ||
| 552 | |||
| 553 | var packageElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPackageProperties", ignoreAttributesByElementName); | ||
| 554 | WixAssert.CompareLineByLine(new[] | ||
| 555 | { | ||
| 556 | "<WixPackageProperties Package='test.msi' Vital='yes' DisplayName='Per-user Package' DownloadSize='*' PackageSize='*' InstalledSize='28' PackageType='Msi' Permanent='no' LogPathVariable='WixBundleLog_test.msi' RollbackLogPathVariable='WixBundleRollbackLog_test.msi' Compressed='no' ProductCode='{33333333-3333-3333-3333-333333333333}' UpgradeCode='{EDAFA1F3-6275-5D50-B94D-D5DEBFDA1076}' Version='1.0' Cache='keep' />", | ||
| 557 | }, packageElements); | ||
| 558 | } | ||
| 559 | } | ||
| 560 | |||
| 561 | [Fact] | ||
| 562 | public void CanBuildBundleWithPerUserOrMachinePackage() | ||
| 563 | { | ||
| 564 | var folder = TestData.Get("TestData"); | ||
| 565 | |||
| 566 | using (var fs = new DisposableFileSystem()) | ||
| 567 | { | ||
| 568 | var baseFolder = fs.GetFolder(); | ||
| 569 | var dataPath = Path.Combine(folder, ".Data"); | ||
| 570 | |||
| 571 | var msiIntermediateFolder = Path.Combine(baseFolder, "obj", "msi"); | ||
| 572 | var msiBinFolder = Path.Combine(baseFolder, "bin", "msi"); | ||
| 573 | var msiPath = Path.Combine(msiBinFolder, "test.msi"); | ||
| 574 | |||
| 575 | var bundleIntermediateFolder = Path.Combine(baseFolder, "obj", "bundle"); | ||
| 576 | var bundleBinFolder = Path.Combine(baseFolder, "bin", "bundle"); | ||
| 577 | var bundlePath = Path.Combine(bundleBinFolder, "bundle.exe"); | ||
| 578 | var bundlePdbPath = Path.Combine(bundleBinFolder, "bundle.wixpdb"); | ||
| 579 | |||
| 580 | var baFolderPath = Path.Combine(baseFolder, "extract", "ba"); | ||
| 581 | var extractFolderPath = Path.Combine(baseFolder, "extract", "files"); | ||
| 582 | |||
| 583 | var result = WixRunner.Execute(new[] | ||
| 584 | { | ||
| 585 | "build", | ||
| 586 | Path.Combine(folder, "BundlePerUserOrMachine", "PerUserOrMachinePackage.wxs"), | ||
| 587 | "-bindpath", dataPath, | ||
| 588 | "-intermediateFolder", msiIntermediateFolder, | ||
| 589 | "-o", msiPath | ||
| 590 | }); | ||
| 591 | |||
| 592 | result.AssertSuccess(); | ||
| 593 | |||
| 594 | result = WixRunner.Execute(new[] | ||
| 595 | { | ||
| 596 | "build", | ||
| 597 | Path.Combine(folder, "BundlePerUserOrMachine", "BundleWithPerUserOrMachinePackage.wxs"), | ||
| 598 | "-bindpath", dataPath, | ||
| 599 | "-bindpath", msiBinFolder, | ||
| 600 | "-intermediateFolder", bundleIntermediateFolder, | ||
| 601 | "-o", bundlePath | ||
| 602 | }); | ||
| 603 | |||
| 604 | result.AssertSuccess(); | ||
| 605 | |||
| 606 | var parentBundleId = GetBundleCodeFromWixpdb(bundlePdbPath); | ||
| 607 | |||
| 608 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); | ||
| 609 | extractResult.AssertSuccess(); | ||
| 610 | |||
| 611 | var registrations = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration"); | ||
| 612 | WixAssert.CompareLineByLine(new[] | ||
| 613 | { | ||
| 614 | $"<Registration BundleId='WixToolsetTest.PerUserOrMachineBundle' Code='{parentBundleId}' ExecutableName='bundle.exe' Scope='perUserOrMachine' Tag='' Version='9.9' ProviderKey='{parentBundleId}'>" + | ||
| 615 | "<Arp DisplayName='Per-user-or-machine Bundle' DisplayVersion='9.9' Publisher='Example Corporation' />" + | ||
| 616 | "</Registration>" | ||
| 617 | }, registrations); | ||
| 618 | |||
| 619 | var ignoreAttributesByElementName = new Dictionary<string, List<string>> | ||
| 620 | { | ||
| 621 | { "WixPackageProperties", new List<string> { "DownloadSize", "PackageSize" } }, | ||
| 622 | }; | ||
| 623 | |||
| 624 | var packageElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPackageProperties", ignoreAttributesByElementName); | ||
| 625 | WixAssert.CompareLineByLine(new[] | ||
| 626 | { | ||
| 627 | "<WixPackageProperties Package='test.msi' Vital='yes' DisplayName='Per-user-or-machine Package' DownloadSize='*' PackageSize='*' InstalledSize='28' PackageType='Msi' Permanent='no' LogPathVariable='WixBundleLog_test.msi' RollbackLogPathVariable='WixBundleRollbackLog_test.msi' Compressed='no' ProductCode='{33333333-3333-3333-3333-333333333333}' UpgradeCode='{EDAFA1F3-6275-5D50-B94D-D5DEBFDA1076}' Version='1.0' Cache='keep' />", | ||
| 628 | }, packageElements); | ||
| 629 | } | ||
| 630 | } | ||
| 631 | |||
| 393 | private static string GetBundleCodeFromWixpdb(string bundlePdbPath) | 632 | private static string GetBundleCodeFromWixpdb(string bundlePdbPath) |
| 394 | { | 633 | { |
| 395 | using (var wixOutput = WixOutput.Read(bundlePdbPath)) | 634 | using (var wixOutput = WixOutput.Read(bundlePdbPath)) |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BurnRemotePayloadSubcommandFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BurnRemotePayloadSubcommandFixture.cs index c1ca14e8..c3b5598a 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BurnRemotePayloadSubcommandFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BurnRemotePayloadSubcommandFixture.cs | |||
| @@ -61,7 +61,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 61 | WixAssert.StringEqual( | 61 | WixAssert.StringEqual( |
| 62 | "<BundlePackage>" + | 62 | "<BundlePackage>" + |
| 63 | "<BundlePackagePayload Name='test.exe' ProductName='DiversePayloadsBundle' Description='DiversePayloadsBundle' Hash='*' Size='*' Version='1.0.0.0'>" + | 63 | "<BundlePackagePayload Name='test.exe' ProductName='DiversePayloadsBundle' Description='DiversePayloadsBundle' Hash='*' Size='*' Version='1.0.0.0'>" + |
| 64 | "<RemoteBundle BundleCode='*' DisplayName='DiversePayloadsBundle' EngineVersion='*' InstallSize='3790116' ManifestNamespace='http://wixtoolset.org/schemas/v4/2008/Burn' PerMachine='yes' ProviderKey='*' ProtocolVersion='1' Version='1.0.0.0' Win64='no' UpgradeCode='{FEF1D2B8-4737-4A2A-9F91-77F7294FB55B}' />" + | 64 | "<RemoteBundle BundleCode='*' DisplayName='DiversePayloadsBundle' EngineVersion='*' InstallSize='3790116' ManifestNamespace='http://wixtoolset.org/schemas/v4/2008/Burn' Scope='perMachine' ProviderKey='*' ProtocolVersion='1' Version='1.0.0.0' Win64='no' UpgradeCode='{FEF1D2B8-4737-4A2A-9F91-77F7294FB55B}' />" + |
| 65 | "</BundlePackagePayload>" + | 65 | "</BundlePackagePayload>" + |
| 66 | "</BundlePackage>", xml.GetTestXml(ignoreAttributesByElementName)); | 66 | "</BundlePackage>", xml.GetTestXml(ignoreAttributesByElementName)); |
| 67 | 67 | ||
| @@ -83,7 +83,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 83 | WixAssert.StringEqual( | 83 | WixAssert.StringEqual( |
| 84 | "<BundlePackage>" + | 84 | "<BundlePackage>" + |
| 85 | "<BundlePackagePayload Name='test.exe' ProductName='DiversePayloadsBundle' Description='DiversePayloadsBundle' Hash='*' Size='*' Version='1.0.0.0'>" + | 85 | "<BundlePackagePayload Name='test.exe' ProductName='DiversePayloadsBundle' Description='DiversePayloadsBundle' Hash='*' Size='*' Version='1.0.0.0'>" + |
| 86 | "<RemoteBundle BundleCode='*' DisplayName='DiversePayloadsBundle' EngineVersion='*' InstallSize='3790116' ManifestNamespace='http://wixtoolset.org/schemas/v4/2008/Burn' PerMachine='yes' ProviderKey='*' ProtocolVersion='1' Version='1.0.0.0' Win64='no' UpgradeCode='{FEF1D2B8-4737-4A2A-9F91-77F7294FB55B}' />" + | 86 | "<RemoteBundle BundleCode='*' DisplayName='DiversePayloadsBundle' EngineVersion='*' InstallSize='3790116' ManifestNamespace='http://wixtoolset.org/schemas/v4/2008/Burn' Scope='perMachine' ProviderKey='*' ProtocolVersion='1' Version='1.0.0.0' Win64='no' UpgradeCode='{FEF1D2B8-4737-4A2A-9F91-77F7294FB55B}' />" + |
| 87 | "</BundlePackagePayload>" + | 87 | "</BundlePackagePayload>" + |
| 88 | "<Payload Name='External.cab' Hash='*' Size='*' />" + | 88 | "<Payload Name='External.cab' Hash='*' Size='*' />" + |
| 89 | "<Payload Name='test.msi' Hash='*' Size='*' />" + | 89 | "<Payload Name='test.msi' Hash='*' Size='*' />" + |
| @@ -109,7 +109,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 109 | WixAssert.StringEqual( | 109 | WixAssert.StringEqual( |
| 110 | "<BundlePackage>" + | 110 | "<BundlePackage>" + |
| 111 | "<BundlePackagePayload Name='test.exe' ProductName='DiversePayloadsBundle' Description='DiversePayloadsBundle' Hash='*' Size='*' Version='1.0.0.0'>" + | 111 | "<BundlePackagePayload Name='test.exe' ProductName='DiversePayloadsBundle' Description='DiversePayloadsBundle' Hash='*' Size='*' Version='1.0.0.0'>" + |
| 112 | "<RemoteBundle BundleCode='*' DisplayName='DiversePayloadsBundle' EngineVersion='*' InstallSize='3790116' ManifestNamespace='http://wixtoolset.org/schemas/v4/2008/Burn' PerMachine='yes' ProviderKey='*' ProtocolVersion='1' Version='1.0.0.0' Win64='no' UpgradeCode='{FEF1D2B8-4737-4A2A-9F91-77F7294FB55B}' />" + | 112 | "<RemoteBundle BundleCode='*' DisplayName='DiversePayloadsBundle' EngineVersion='*' InstallSize='3790116' ManifestNamespace='http://wixtoolset.org/schemas/v4/2008/Burn' Scope='perMachine' ProviderKey='*' ProtocolVersion='1' Version='1.0.0.0' Win64='no' UpgradeCode='{FEF1D2B8-4737-4A2A-9F91-77F7294FB55B}' />" + |
| 113 | "</BundlePackagePayload>" + | 113 | "</BundlePackagePayload>" + |
| 114 | "<Payload Name='External.cab' Hash='*' Size='*' />" + | 114 | "<Payload Name='External.cab' Hash='*' Size='*' />" + |
| 115 | "<Payload Name='Windows8.1-KB2937592-x86.msu' Hash='*' Size='*' />" + | 115 | "<Payload Name='Windows8.1-KB2937592-x86.msu' Hash='*' Size='*' />" + |
| @@ -136,7 +136,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 136 | WixAssert.StringEqual( | 136 | WixAssert.StringEqual( |
| 137 | "<BundlePackage>" + | 137 | "<BundlePackage>" + |
| 138 | "<BundlePackagePayload Name='test.exe' ProductName='DiversePayloadsBundle' Description='DiversePayloadsBundle' Hash='*' Size='*' Version='1.0.0.0'>" + | 138 | "<BundlePackagePayload Name='test.exe' ProductName='DiversePayloadsBundle' Description='DiversePayloadsBundle' Hash='*' Size='*' Version='1.0.0.0'>" + |
| 139 | "<RemoteBundle BundleCode='*' DisplayName='DiversePayloadsBundle' EngineVersion='*' InstallSize='3790116' ManifestNamespace='http://wixtoolset.org/schemas/v4/2008/Burn' PerMachine='yes' ProviderKey='*' ProtocolVersion='1' Version='1.0.0.0' Win64='no' UpgradeCode='{FEF1D2B8-4737-4A2A-9F91-77F7294FB55B}' />" + | 139 | "<RemoteBundle BundleCode='*' DisplayName='DiversePayloadsBundle' EngineVersion='*' InstallSize='3790116' ManifestNamespace='http://wixtoolset.org/schemas/v4/2008/Burn' Scope='perMachine' ProviderKey='*' ProtocolVersion='1' Version='1.0.0.0' Win64='no' UpgradeCode='{FEF1D2B8-4737-4A2A-9F91-77F7294FB55B}' />" + |
| 140 | "</BundlePackagePayload>" + | 140 | "</BundlePackagePayload>" + |
| 141 | "<Payload Name='External.cab' Hash='*' Size='*' />" + | 141 | "<Payload Name='External.cab' Hash='*' Size='*' />" + |
| 142 | "<Payload Name='signed_bundle_engine.exe' ProductName='~TestBundle' Description='~TestBundle' Hash='*' Size='*' Version='1.0.0.0' />" + | 142 | "<Payload Name='signed_bundle_engine.exe' ProductName='~TestBundle' Description='~TestBundle' Hash='*' Size='*' Version='1.0.0.0' />" + |
| @@ -182,7 +182,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 182 | { | 182 | { |
| 183 | @"<BundlePackage Visible='yes' CacheId='{C0BA713B-9CFE-42DF-B92C-883F6846B4BA}v3.14.0.4118C95FC39334E667F3DD3D'>", | 183 | @"<BundlePackage Visible='yes' CacheId='{C0BA713B-9CFE-42DF-B92C-883F6846B4BA}v3.14.0.4118C95FC39334E667F3DD3D'>", |
| 184 | @" <BundlePackagePayload Name='signed_wix314_4118_engine.exe' ProductName='WiX Toolset v3.14.0.4118' Description='WiX Toolset v3.14.0.4118' DownloadUrl='http://wixtoolset.org/{0}' CertificatePublicKey='03169B5A32E602D436FC14EC14C435D7309945D4' CertificateThumbprint='C95FC39334E667F3DD3D82AF382E05719B88F7C1' Size='1088640' Version='3.14.0.4118'>", | 184 | @" <BundlePackagePayload Name='signed_wix314_4118_engine.exe' ProductName='WiX Toolset v3.14.0.4118' Description='WiX Toolset v3.14.0.4118' DownloadUrl='http://wixtoolset.org/{0}' CertificatePublicKey='03169B5A32E602D436FC14EC14C435D7309945D4' CertificateThumbprint='C95FC39334E667F3DD3D82AF382E05719B88F7C1' Size='1088640' Version='3.14.0.4118'>", |
| 185 | @" <RemoteBundle BundleCode='{C0BA713B-9CFE-42DF-B92C-883F6846B4BA}' DisplayName='WiX Toolset v3.14.0.4118' InstallSize='188426175' ManifestNamespace='http://schemas.microsoft.com/wix/2008/Burn' PerMachine='yes' ProviderKey='{c0ba713b-9cfe-42df-b92c-883f6846b4ba}' ProtocolVersion='1' Version='3.14.0.4118' Win64='no' UpgradeCode='{65E893AD-EDD5-4E7D-80CA-F0F50F383532}' />", | 185 | @" <RemoteBundle BundleCode='{C0BA713B-9CFE-42DF-B92C-883F6846B4BA}' DisplayName='WiX Toolset v3.14.0.4118' InstallSize='188426175' ManifestNamespace='http://schemas.microsoft.com/wix/2008/Burn' Scope='perMachine' ProviderKey='{c0ba713b-9cfe-42df-b92c-883f6846b4ba}' ProtocolVersion='1' Version='3.14.0.4118' Win64='no' UpgradeCode='{65E893AD-EDD5-4E7D-80CA-F0F50F383532}' />", |
| 186 | @" </BundlePackagePayload>", | 186 | @" </BundlePackagePayload>", |
| 187 | @"</BundlePackage>", | 187 | @"</BundlePackage>", |
| 188 | }, elements); | 188 | }, elements); |
| @@ -216,7 +216,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 216 | var msuPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage"); | 216 | var msuPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:BundlePackage"); |
| 217 | WixAssert.CompareLineByLine(new string[] | 217 | WixAssert.CompareLineByLine(new string[] |
| 218 | { | 218 | { |
| 219 | "<BundlePackage Id='signed_wix314_4118_engine.exe' Cache='keep' CacheId='{C0BA713B-9CFE-42DF-B92C-883F6846B4BA}v3.14.0.4118C95FC39334E667F3DD3D' InstallSize='188426175' Size='1088640' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_signed_wix314_4118_engine.exe' RollbackLogPathVariable='WixBundleRollbackLog_signed_wix314_4118_engine.exe' BundleCode='{C0BA713B-9CFE-42DF-B92C-883F6846B4BA}' Version='3.14.0.4118' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no'>" + | 219 | "<BundlePackage Id='signed_wix314_4118_engine.exe' Cache='keep' CacheId='{C0BA713B-9CFE-42DF-B92C-883F6846B4BA}v3.14.0.4118C95FC39334E667F3DD3D' InstallSize='188426175' Size='1088640' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_signed_wix314_4118_engine.exe' RollbackLogPathVariable='WixBundleRollbackLog_signed_wix314_4118_engine.exe' BundleCode='{C0BA713B-9CFE-42DF-B92C-883F6846B4BA}' Version='3.14.0.4118' InstallArguments='' UninstallArguments='' RepairArguments='' SupportsBurnProtocol='yes' Win64='no'>" + |
| 220 | "<Provides Key='{c0ba713b-9cfe-42df-b92c-883f6846b4ba}' Version='3.14.0.4118' DisplayName='WiX Toolset v3.14.0.4118' Imported='yes' />" + | 220 | "<Provides Key='{c0ba713b-9cfe-42df-b92c-883f6846b4ba}' Version='3.14.0.4118' DisplayName='WiX Toolset v3.14.0.4118' Imported='yes' />" + |
| 221 | "<RelatedBundle Code='{65E893AD-EDD5-4E7D-80CA-F0F50F383532}' Action='Upgrade' />" + | 221 | "<RelatedBundle Code='{65E893AD-EDD5-4E7D-80CA-F0F50F383532}' Action='Upgrade' />" + |
| 222 | "<PayloadRef Id='signed_wix314_4118_engine.exe' />" + | 222 | "<PayloadRef Id='signed_wix314_4118_engine.exe' />" + |
| @@ -253,7 +253,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 253 | { | 253 | { |
| 254 | "<BundlePackage Visible='yes'>", | 254 | "<BundlePackage Visible='yes'>", |
| 255 | " <BundlePackagePayload Name='v3bundle.exe' ProductName='CustomV3Theme' Description='CustomV3Theme' DownloadUrl='https://www.example.com/files/{0}' Hash='80739E7B8C31D75B4CDC48D60D74F5E481CB904212A3AE3FB0920365A163FBF32B0C5C175AB516D4124F107923E96200605DE1D560D362FEB47350FA727823B4' Size='648397' Version='1.0.0.0'>", | 255 | " <BundlePackagePayload Name='v3bundle.exe' ProductName='CustomV3Theme' Description='CustomV3Theme' DownloadUrl='https://www.example.com/files/{0}' Hash='80739E7B8C31D75B4CDC48D60D74F5E481CB904212A3AE3FB0920365A163FBF32B0C5C175AB516D4124F107923E96200605DE1D560D362FEB47350FA727823B4' Size='648397' Version='1.0.0.0'>", |
| 256 | " <RemoteBundle BundleCode='{215A70DB-AB35-48C7-BE51-D66EAAC87177}' DisplayName='CustomV3Theme' InstallSize='1135' ManifestNamespace='http://schemas.microsoft.com/wix/2008/Burn' PerMachine='yes' ProviderKey='{215a70db-ab35-48c7-be51-d66eaac87177}' ProtocolVersion='1' Version='1.0.0.0' Win64='no' UpgradeCode='{2BF4C01F-C132-4E70-97AB-2BC68C7CCD10}' />", | 256 | " <RemoteBundle BundleCode='{215A70DB-AB35-48C7-BE51-D66EAAC87177}' DisplayName='CustomV3Theme' InstallSize='1135' ManifestNamespace='http://schemas.microsoft.com/wix/2008/Burn' Scope='perMachine' ProviderKey='{215a70db-ab35-48c7-be51-d66eaac87177}' ProtocolVersion='1' Version='1.0.0.0' Win64='no' UpgradeCode='{2BF4C01F-C132-4E70-97AB-2BC68C7CCD10}' />", |
| 257 | " </BundlePackagePayload>", | 257 | " </BundlePackagePayload>", |
| 258 | "</BundlePackage>", | 258 | "</BundlePackage>", |
| 259 | }, elements); | 259 | }, elements); |
| @@ -391,7 +391,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 391 | var msuPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsuPackage"); | 391 | var msuPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsuPackage"); |
| 392 | WixAssert.CompareLineByLine(new string[] | 392 | WixAssert.CompareLineByLine(new string[] |
| 393 | { | 393 | { |
| 394 | "<MsuPackage Id='Windows8.1_KB2937592_x86.msu' Cache='keep' CacheId='904ADEA6AB675ACE16483138BF3F5850FD56ACB6E3A1108E2BA23632620C427C' InstallSize='309544' Size='309544' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' DetectCondition='test'>" + | 394 | "<MsuPackage Id='Windows8.1_KB2937592_x86.msu' Cache='keep' CacheId='904ADEA6AB675ACE16483138BF3F5850FD56ACB6E3A1108E2BA23632620C427C' InstallSize='309544' Size='309544' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' DetectCondition='test'>" + |
| 395 | "<PayloadRef Id='Windows8.1_KB2937592_x86.msu' />" + | 395 | "<PayloadRef Id='Windows8.1_KB2937592_x86.msu' />" + |
| 396 | "</MsuPackage>", | 396 | "</MsuPackage>", |
| 397 | }, msuPackages); | 397 | }, msuPackages); |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/ContainerFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/ContainerFixture.cs index 37035664..dac0e363 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/ContainerFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/ContainerFixture.cs | |||
| @@ -149,7 +149,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 149 | var msiPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsiPackage", ignoreAttributes); | 149 | var msiPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsiPackage", ignoreAttributes); |
| 150 | WixAssert.CompareLineByLine(new[] | 150 | WixAssert.CompareLineByLine(new[] |
| 151 | { | 151 | { |
| 152 | "<MsiPackage Id='FirstX86.msi' Cache='keep' CacheId='*' InstallSize='*' Size='*' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' LogPathVariable='WixBundleLog_FirstX86.msi' RollbackLogPathVariable='WixBundleRollbackLog_FirstX86.msi' ProductCode='*' Language='1033' Version='1.0.0.0' UpgradeCode='{C00D7E9A-1276-51ED-B782-A20AB34D4070}'>" + | 152 | "<MsiPackage Id='FirstX86.msi' Cache='keep' CacheId='*' InstallSize='*' Size='*' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' LogPathVariable='WixBundleLog_FirstX86.msi' RollbackLogPathVariable='WixBundleRollbackLog_FirstX86.msi' ProductCode='*' Language='1033' Version='1.0.0.0' UpgradeCode='{C00D7E9A-1276-51ED-B782-A20AB34D4070}'>" + |
| 153 | "<MsiProperty Id='MSIFASTINSTALL' Value='1' />" + | 153 | "<MsiProperty Id='MSIFASTINSTALL' Value='1' />" + |
| 154 | "<MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' />" + | 154 | "<MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' />" + |
| 155 | $"<Provides Key='{GetProductCodeFromMsiPdb(pdbPaths[0])}_v1.0.0.0' Version='1.0.0.0' DisplayName='MsiPackage' />" + | 155 | $"<Provides Key='{GetProductCodeFromMsiPdb(pdbPaths[0])}_v1.0.0.0' Version='1.0.0.0' DisplayName='MsiPackage' />" + |
| @@ -158,7 +158,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 158 | "<PayloadRef Id='FirstX86.msi' />" + | 158 | "<PayloadRef Id='FirstX86.msi' />" + |
| 159 | "<PayloadRef Id='fk1m38Cf9RZ2Bx_ipinRY6BftelU' />" + | 159 | "<PayloadRef Id='fk1m38Cf9RZ2Bx_ipinRY6BftelU' />" + |
| 160 | "</MsiPackage>", | 160 | "</MsiPackage>", |
| 161 | "<MsiPackage Id='FirstX64.msi' Cache='keep' CacheId='*' InstallSize='*' Size='*' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_FirstX64.msi' RollbackLogPathVariable='WixBundleRollbackLog_FirstX64.msi' ProductCode='*' Language='1033' Version='1.0.0.0' UpgradeCode='{C00D7E9A-1276-51ED-B782-A20AB34D4070}'>" + | 161 | "<MsiPackage Id='FirstX64.msi' Cache='keep' CacheId='*' InstallSize='*' Size='*' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_FirstX64.msi' RollbackLogPathVariable='WixBundleRollbackLog_FirstX64.msi' ProductCode='*' Language='1033' Version='1.0.0.0' UpgradeCode='{C00D7E9A-1276-51ED-B782-A20AB34D4070}'>" + |
| 162 | "<MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' />" + | 162 | "<MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' />" + |
| 163 | "<MsiProperty Id='MSIFASTINSTALL' Value='7' />" + | 163 | "<MsiProperty Id='MSIFASTINSTALL' Value='7' />" + |
| 164 | $"<Provides Key='{GetProductCodeFromMsiPdb(pdbPaths[1])}_v1.0.0.0' Version='1.0.0.0' DisplayName='MsiPackage' />" + | 164 | $"<Provides Key='{GetProductCodeFromMsiPdb(pdbPaths[1])}_v1.0.0.0' Version='1.0.0.0' DisplayName='MsiPackage' />" + |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs index 665ae18f..e26fda71 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs | |||
| @@ -144,7 +144,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 144 | var registration = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration", ignoreAttributesByElementName); | 144 | var registration = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Registration", ignoreAttributesByElementName); |
| 145 | WixAssert.CompareLineByLine(new string[] | 145 | WixAssert.CompareLineByLine(new string[] |
| 146 | { | 146 | { |
| 147 | "<Registration BundleId='WixToolsetTest.TestBundle' Code='*' ExecutableName='test.exe' PerMachine='yes' Tag='' Version='1.0.0.0' ProviderKey='MyProviderKey,v1.0'><Arp DisplayName='BurnBundle' DisplayVersion='1.0.0.0' Publisher='Example Corporation' /></Registration>", | 147 | "<Registration BundleId='WixToolsetTest.TestBundle' Code='*' ExecutableName='test.exe' Scope='perMachine' Tag='' Version='1.0.0.0' ProviderKey='MyProviderKey,v1.0'><Arp DisplayName='BurnBundle' DisplayVersion='1.0.0.0' Publisher='Example Corporation' /></Registration>", |
| 148 | }, registration); | 148 | }, registration); |
| 149 | } | 149 | } |
| 150 | } | 150 | } |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs index 7403f96d..e7eb0432 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/ExePackageFixture.cs | |||
| @@ -47,7 +47,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 47 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage"); | 47 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage"); |
| 48 | WixAssert.CompareLineByLine(new string[] | 48 | WixAssert.CompareLineByLine(new string[] |
| 49 | { | 49 | { |
| 50 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='F6E722518AC3AB7E31C70099368D5770788C179AA23226110DCF07319B1E1964' InstallSize='463360' Size='463360' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='-repair' Repairable='yes' DetectionType='arp' ArpId='id' ArpDisplayVersion='1.0.0.0'>" + | 50 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='F6E722518AC3AB7E31C70099368D5770788C179AA23226110DCF07319B1E1964' InstallSize='463360' Size='463360' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='-repair' Repairable='yes' DetectionType='arp' ArpId='id' ArpDisplayVersion='1.0.0.0'>" + |
| 51 | "<PayloadRef Id='burn.exe' />" + | 51 | "<PayloadRef Id='burn.exe' />" + |
| 52 | "</ExePackage>", | 52 | "</ExePackage>", |
| 53 | }, exePackages); | 53 | }, exePackages); |
| @@ -89,7 +89,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 89 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage"); | 89 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage"); |
| 90 | WixAssert.CompareLineByLine(new string[] | 90 | WixAssert.CompareLineByLine(new string[] |
| 91 | { | 91 | { |
| 92 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='F6E722518AC3AB7E31C70099368D5770788C179AA23226110DCF07319B1E1964' InstallSize='463360' Size='463360' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='-repair' Repairable='yes' DetectionType='condition' DetectCondition='detect' UninstallArguments='-uninstall' Uninstallable='yes'>" + | 92 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='F6E722518AC3AB7E31C70099368D5770788C179AA23226110DCF07319B1E1964' InstallSize='463360' Size='463360' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='-repair' Repairable='yes' DetectionType='condition' DetectCondition='detect' UninstallArguments='-uninstall' Uninstallable='yes'>" + |
| 93 | "<ExitCode Code='0' Type='2' />" + | 93 | "<ExitCode Code='0' Type='2' />" + |
| 94 | "<ExitCode Code='3' Type='3' />" + | 94 | "<ExitCode Code='3' Type='3' />" + |
| 95 | "<ExitCode Code='4' Type='4' />" + | 95 | "<ExitCode Code='4' Type='4' />" + |
| @@ -159,7 +159,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 159 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributes); | 159 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributes); |
| 160 | WixAssert.CompareLineByLine(new string[] | 160 | WixAssert.CompareLineByLine(new string[] |
| 161 | { | 161 | { |
| 162 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='*' InstallSize='463360' Size='*' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='' Repairable='no' DetectionType='arp' ArpId='id' ArpDisplayVersion='1.0.0.abc'>" + | 162 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='*' InstallSize='463360' Size='*' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='' Repairable='no' DetectionType='arp' ArpId='id' ArpDisplayVersion='1.0.0.abc'>" + |
| 163 | "<PayloadRef Id='burn.exe' />" + | 163 | "<PayloadRef Id='burn.exe' />" + |
| 164 | "</ExePackage>", | 164 | "</ExePackage>", |
| 165 | }, exePackages); | 165 | }, exePackages); |
| @@ -209,7 +209,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 209 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributes); | 209 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributes); |
| 210 | WixAssert.CompareLineByLine(new string[] | 210 | WixAssert.CompareLineByLine(new string[] |
| 211 | { | 211 | { |
| 212 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='*' InstallSize='463360' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='' Repairable='no' DetectionType='none'>" + | 212 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='*' InstallSize='463360' Size='*' Scope='perMachine' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='' Repairable='no' DetectionType='none'>" + |
| 213 | "<PayloadRef Id='burn.exe' />" + | 213 | "<PayloadRef Id='burn.exe' />" + |
| 214 | "</ExePackage>", | 214 | "</ExePackage>", |
| 215 | }, exePackages); | 215 | }, exePackages); |
| @@ -255,7 +255,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 255 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributes); | 255 | var exePackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributes); |
| 256 | WixAssert.CompareLineByLine(new string[] | 256 | WixAssert.CompareLineByLine(new string[] |
| 257 | { | 257 | { |
| 258 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='*' InstallSize='463360' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='' Repairable='no' DetectionType='none'>" + | 258 | "<ExePackage Id='burn.exe' Cache='keep' CacheId='*' InstallSize='463360' Size='*' Scope='perMachine' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_burn.exe' RollbackLogPathVariable='WixBundleRollbackLog_burn.exe' InstallArguments='-install' RepairArguments='' Repairable='no' DetectionType='none'>" + |
| 259 | "<PayloadRef Id='burn.exe' />" + | 259 | "<PayloadRef Id='burn.exe' />" + |
| 260 | "</ExePackage>", | 260 | "</ExePackage>", |
| 261 | }, exePackages); | 261 | }, exePackages); |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/MsuPackageFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/MsuPackageFixture.cs index 7284181f..8713be90 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/MsuPackageFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/MsuPackageFixture.cs | |||
| @@ -44,7 +44,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 44 | var msuPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsuPackage"); | 44 | var msuPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsuPackage"); |
| 45 | WixAssert.CompareLineByLine(new string[] | 45 | WixAssert.CompareLineByLine(new string[] |
| 46 | { | 46 | { |
| 47 | "<MsuPackage Id='test.msu' Cache='keep' CacheId='B040F02D2F90E04E9AFBDC91C00CEB5DF97D48E205D96DC0A44E10AF8870794D' InstallSize='28' Size='28' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' DetectCondition='DetectedTheMsu'>" + | 47 | "<MsuPackage Id='test.msu' Cache='keep' CacheId='B040F02D2F90E04E9AFBDC91C00CEB5DF97D48E205D96DC0A44E10AF8870794D' InstallSize='28' Size='28' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' DetectCondition='DetectedTheMsu'>" + |
| 48 | "<PayloadRef Id='test.msu' />" + | 48 | "<PayloadRef Id='test.msu' />" + |
| 49 | "</MsuPackage>", | 49 | "</MsuPackage>", |
| 50 | }, msuPackages); | 50 | }, msuPackages); |
| @@ -85,7 +85,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 85 | var msuPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsuPackage"); | 85 | var msuPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsuPackage"); |
| 86 | WixAssert.CompareLineByLine(new string[] | 86 | WixAssert.CompareLineByLine(new string[] |
| 87 | { | 87 | { |
| 88 | "<MsuPackage Id='Windows8.1_KB2937592_x86.msu' Cache='keep' CacheId='8cf75b99-13c0-4184-82ce-dbde45dcd55a' InstallSize='309544' Size='309544' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' DetectCondition='DetectedTheMsu'>" + | 88 | "<MsuPackage Id='Windows8.1_KB2937592_x86.msu' Cache='keep' CacheId='8cf75b99-13c0-4184-82ce-dbde45dcd55a' InstallSize='309544' Size='309544' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' DetectCondition='DetectedTheMsu'>" + |
| 89 | "<PayloadRef Id='Windows8.1_KB2937592_x86.msu' />" + | 89 | "<PayloadRef Id='Windows8.1_KB2937592_x86.msu' />" + |
| 90 | "</MsuPackage>", | 90 | "</MsuPackage>", |
| 91 | }, msuPackages); | 91 | }, msuPackages); |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/PackagePayloadFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/PackagePayloadFixture.cs index 1d291a7c..53b44d98 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/PackagePayloadFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/PackagePayloadFixture.cs | |||
| @@ -50,14 +50,14 @@ namespace WixToolsetTest.CoreIntegration | |||
| 50 | var msiPackageElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsiPackage", ignoreAttributesByElementName); | 50 | var msiPackageElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:MsiPackage", ignoreAttributesByElementName); |
| 51 | WixAssert.CompareLineByLine(new[] | 51 | WixAssert.CompareLineByLine(new[] |
| 52 | { | 52 | { |
| 53 | "<MsiPackage Id='MsiWithFeatures' Cache='keep' CacheId='{040011E1-F84C-4927-AD62-50A5EC19CA32}v1.0.0.0_1' InstallSize='34' Size='32803' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' LogPathVariable='WixBundleLog_MsiWithFeatures' RollbackLogPathVariable='WixBundleRollbackLog_MsiWithFeatures' ProductCode='{040011E1-F84C-4927-AD62-50A5EC19CA32}' Language='1033' Version='1.0.0.0' UpgradeCode='{047730A5-30FE-4A62-A520-DA9381B8226A}'>" + | 53 | "<MsiPackage Id='MsiWithFeatures' Cache='keep' CacheId='{040011E1-F84C-4927-AD62-50A5EC19CA32}v1.0.0.0_1' InstallSize='34' Size='32803' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' LogPathVariable='WixBundleLog_MsiWithFeatures' RollbackLogPathVariable='WixBundleRollbackLog_MsiWithFeatures' ProductCode='{040011E1-F84C-4927-AD62-50A5EC19CA32}' Language='1033' Version='1.0.0.0' UpgradeCode='{047730A5-30FE-4A62-A520-DA9381B8226A}'>" + |
| 54 | "<MsiFeature Id='ProductFeature' /><MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' /><MsiProperty Id='MSIFASTINSTALL' Value='7' /><Provides Key='{040011E1-F84C-4927-AD62-50A5EC19CA32}_v1.0.0.0' Version='1.0.0.0' DisplayName='MsiPackage' />" + | 54 | "<MsiFeature Id='ProductFeature' /><MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' /><MsiProperty Id='MSIFASTINSTALL' Value='7' /><Provides Key='{040011E1-F84C-4927-AD62-50A5EC19CA32}_v1.0.0.0' Version='1.0.0.0' DisplayName='MsiPackage' />" + |
| 55 | "<RelatedPackage Id='{047730A5-30FE-4A62-A520-DA9381B8226A}' MaxVersion='1.0.0.0' MaxInclusive='no' OnlyDetect='no' LangInclusive='yes'><Language Id='1033' /></RelatedPackage>" + | 55 | "<RelatedPackage Id='{047730A5-30FE-4A62-A520-DA9381B8226A}' MaxVersion='1.0.0.0' MaxInclusive='no' OnlyDetect='no' LangInclusive='yes'><Language Id='1033' /></RelatedPackage>" + |
| 56 | "<RelatedPackage Id='{047730A5-30FE-4A62-A520-DA9381B8226A}' MinVersion='1.0.0.0' MinInclusive='no' OnlyDetect='yes' LangInclusive='yes'><Language Id='1033' /></RelatedPackage>" + | 56 | "<RelatedPackage Id='{047730A5-30FE-4A62-A520-DA9381B8226A}' MinVersion='1.0.0.0' MinInclusive='no' OnlyDetect='yes' LangInclusive='yes'><Language Id='1033' /></RelatedPackage>" + |
| 57 | "<PayloadRef Id='test.msi' /><PayloadRef Id='fhuZsOcBDTuIX8rF96kswqI6SnuI' /><PayloadRef Id='faf_OZ741BG7SJ6ZkcIvivZ2Yzo8' />" + | 57 | "<PayloadRef Id='test.msi' /><PayloadRef Id='fhuZsOcBDTuIX8rF96kswqI6SnuI' /><PayloadRef Id='faf_OZ741BG7SJ6ZkcIvivZ2Yzo8' />" + |
| 58 | "</MsiPackage>", | 58 | "</MsiPackage>", |
| 59 | 59 | ||
| 60 | "<MsiPackage Id='MsiWithoutFeatures' Cache='keep' CacheId='{040011E1-F84C-4927-AD62-50A5EC19CA32}v1.0.0.0_2' InstallSize='34' Size='32803' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_MsiWithoutFeatures' RollbackLogPathVariable='WixBundleRollbackLog_MsiWithoutFeatures' ProductCode='{040011E1-F84C-4927-AD62-50A5EC19CA32}' Language='1033' Version='1.0.0.0' UpgradeCode='{047730A5-30FE-4A62-A520-DA9381B8226A}'>" + | 60 | "<MsiPackage Id='MsiWithoutFeatures' Cache='keep' CacheId='{040011E1-F84C-4927-AD62-50A5EC19CA32}v1.0.0.0_2' InstallSize='34' Size='32803' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_MsiWithoutFeatures' RollbackLogPathVariable='WixBundleRollbackLog_MsiWithoutFeatures' ProductCode='{040011E1-F84C-4927-AD62-50A5EC19CA32}' Language='1033' Version='1.0.0.0' UpgradeCode='{047730A5-30FE-4A62-A520-DA9381B8226A}'>" + |
| 61 | "<MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' /><MsiProperty Id='MSIFASTINSTALL' Value='7' /><Provides Key='{040011E1-F84C-4927-AD62-50A5EC19CA32}_v1.0.0.0' Version='1.0.0.0' DisplayName='MsiPackage' />" + | 61 | "<MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' /><MsiProperty Id='MSIFASTINSTALL' Value='7' /><Provides Key='{040011E1-F84C-4927-AD62-50A5EC19CA32}_v1.0.0.0' Version='1.0.0.0' DisplayName='MsiPackage' />" + |
| 62 | "<RelatedPackage Id='{047730A5-30FE-4A62-A520-DA9381B8226A}' MaxVersion='1.0.0.0' MaxInclusive='no' OnlyDetect='no' LangInclusive='yes'><Language Id='1033' /></RelatedPackage>" + | 62 | "<RelatedPackage Id='{047730A5-30FE-4A62-A520-DA9381B8226A}' MaxVersion='1.0.0.0' MaxInclusive='no' OnlyDetect='no' LangInclusive='yes'><Language Id='1033' /></RelatedPackage>" + |
| 63 | "<RelatedPackage Id='{047730A5-30FE-4A62-A520-DA9381B8226A}' MinVersion='1.0.0.0' MinInclusive='no' OnlyDetect='yes' LangInclusive='yes'><Language Id='1033' /></RelatedPackage>" + | 63 | "<RelatedPackage Id='{047730A5-30FE-4A62-A520-DA9381B8226A}' MinVersion='1.0.0.0' MinInclusive='no' OnlyDetect='yes' LangInclusive='yes'><Language Id='1033' /></RelatedPackage>" + |
| @@ -118,7 +118,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 118 | var exePackageElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributesByElementName); | 118 | var exePackageElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributesByElementName); |
| 119 | WixAssert.CompareLineByLine(new[] | 119 | WixAssert.CompareLineByLine(new[] |
| 120 | { | 120 | { |
| 121 | "<ExePackage Id='PackagePayloadInPayloadGroup' Cache='keep' CacheId='*' InstallSize='*' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_PackagePayloadInPayloadGroup' RollbackLogPathVariable='WixBundleRollbackLog_PackagePayloadInPayloadGroup' InstallArguments='' RepairArguments='' Repairable='no' DetectionType='condition' DetectCondition='none'><PayloadRef Id='burn.exe' /></ExePackage>", | 121 | "<ExePackage Id='PackagePayloadInPayloadGroup' Cache='keep' CacheId='*' InstallSize='*' Size='*' Scope='perMachine' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_PackagePayloadInPayloadGroup' RollbackLogPathVariable='WixBundleRollbackLog_PackagePayloadInPayloadGroup' InstallArguments='' RepairArguments='' Repairable='no' DetectionType='condition' DetectCondition='none'><PayloadRef Id='burn.exe' /></ExePackage>", |
| 122 | }, exePackageElements); | 122 | }, exePackageElements); |
| 123 | 123 | ||
| 124 | var payloadElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Payload[@Id='burn.exe']"); | 124 | var payloadElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Payload[@Id='burn.exe']"); |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/RollbackBoundaryFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/RollbackBoundaryFixture.cs index 54375f67..0840f358 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/RollbackBoundaryFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/RollbackBoundaryFixture.cs | |||
| @@ -124,7 +124,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 124 | var chainPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/*", ignoreAttributesByElementName); | 124 | var chainPackages = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/*", ignoreAttributesByElementName); |
| 125 | WixAssert.CompareLineByLine(new[] | 125 | WixAssert.CompareLineByLine(new[] |
| 126 | { | 126 | { |
| 127 | "<MsiPackage Id='test.msi' Cache='keep' CacheId='{040011E1-F84C-4927-AD62-50A5EC19CA32}v1.0.0.0' InstallSize='34' Size='*' PerMachine='yes' Permanent='no' Vital='yes' RollbackBoundaryForward='First' RollbackBoundaryBackward='First' LogPathVariable='WixBundleLog_test.msi' RollbackLogPathVariable='WixBundleRollbackLog_test.msi' ProductCode='{040011E1-F84C-4927-AD62-50A5EC19CA32}' Language='1033' Version='1.0.0.0' UpgradeCode='{047730A5-30FE-4A62-A520-DA9381B8226A}'>" + | 127 | "<MsiPackage Id='test.msi' Cache='keep' CacheId='{040011E1-F84C-4927-AD62-50A5EC19CA32}v1.0.0.0' InstallSize='34' Size='*' Scope='perMachine' Permanent='no' Vital='yes' RollbackBoundaryForward='First' RollbackBoundaryBackward='First' LogPathVariable='WixBundleLog_test.msi' RollbackLogPathVariable='WixBundleRollbackLog_test.msi' ProductCode='{040011E1-F84C-4927-AD62-50A5EC19CA32}' Language='1033' Version='1.0.0.0' UpgradeCode='{047730A5-30FE-4A62-A520-DA9381B8226A}'>" + |
| 128 | "<MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' />" + | 128 | "<MsiProperty Id='ARPSYSTEMCOMPONENT' Value='1' />" + |
| 129 | "<MsiProperty Id='MSIFASTINSTALL' Value='7' />" + | 129 | "<MsiProperty Id='MSIFASTINSTALL' Value='7' />" + |
| 130 | "<Provides Key='{040011E1-F84C-4927-AD62-50A5EC19CA32}_v1.0.0.0' Version='1.0.0.0' DisplayName='MsiPackage' />" + | 130 | "<Provides Key='{040011E1-F84C-4927-AD62-50A5EC19CA32}_v1.0.0.0' Version='1.0.0.0' DisplayName='MsiPackage' />" + |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePackage/PerUserOrMachineBundlePackage.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePackage/PerUserOrMachineBundlePackage.wxs new file mode 100644 index 00000000..3ea86a84 --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePackage/PerUserOrMachineBundlePackage.wxs | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Bundle Id="WixToolsetTest.PerUserOrMachineBundlePackage" Name="PerUserOrMachineBundlePackage" Version="1.0.2.0" Manufacturer="Example Corporation"> | ||
| 3 | <BootstrapperApplication SourceFile="fakeba.dll" /> | ||
| 4 | |||
| 5 | <Chain> | ||
| 6 | <BundlePackage SourceFile="BundleWithPerUserOrMachinePackage.exe" /> | ||
| 7 | </Chain> | ||
| 8 | </Bundle> | ||
| 9 | </Wix> | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePackage/RemoteBundlePackage.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePackage/RemoteBundlePackage.wxs index ecbe6bc5..2b7ed886 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePackage/RemoteBundlePackage.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePackage/RemoteBundlePackage.wxs | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | DisplayName="BurnBundle" | 13 | DisplayName="BurnBundle" |
| 14 | InstallSize="34" | 14 | InstallSize="34" |
| 15 | ManifestNamespace="http://wixtoolset.org/schemas/v4/2008/Burn" | 15 | ManifestNamespace="http://wixtoolset.org/schemas/v4/2008/Burn" |
| 16 | PerMachine="yes" | 16 | Scope="perMachine" |
| 17 | ProtocolVersion="1" | 17 | ProtocolVersion="1" |
| 18 | ProviderKey="MyProviderKey,v1.0" | 18 | ProviderKey="MyProviderKey,v1.0" |
| 19 | UpgradeCode="{B94478B1-E1F3-4700-9CE8-6AA090854AEC}" | 19 | UpgradeCode="{B94478B1-E1F3-4700-9CE8-6AA090854AEC}" |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUser/BundleWithPerUserPackage.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUser/BundleWithPerUserPackage.wxs new file mode 100644 index 00000000..a9d1039e --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUser/BundleWithPerUserPackage.wxs | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Bundle Id="WixToolsetTest.PerUserBundle" Name="Per-User Bundle" Version="9.9" Manufacturer="Example Corporation" Compressed="no"> | ||
| 3 | <BootstrapperApplication SourceFile="fakeba.dll" /> | ||
| 4 | |||
| 5 | <Chain> | ||
| 6 | <MsiPackage SourceFile="test.msi" /> | ||
| 7 | </Chain> | ||
| 8 | </Bundle> | ||
| 9 | </Wix> | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUser/PerUserPackage.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUser/PerUserPackage.wxs new file mode 100644 index 00000000..978bd04b --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUser/PerUserPackage.wxs | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="WixToolsetTest.PerUserPackage" ProductCode="33333333-3333-3333-3333-333333333333" Name="Per-user Package" Version="1.0" Manufacturer="Example Corporation" Scope="perUser"> | ||
| 3 | <File Source="test.txt" /> | ||
| 4 | </Package> | ||
| 5 | </Wix> | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUserOrMachine/BundleWithPerUserOrMachinePackage.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUserOrMachine/BundleWithPerUserOrMachinePackage.wxs new file mode 100644 index 00000000..15349663 --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUserOrMachine/BundleWithPerUserOrMachinePackage.wxs | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Bundle Id="WixToolsetTest.PerUserOrMachineBundle" Name="Per-user-or-machine Bundle" Version="9.9" Manufacturer="Example Corporation" Compressed="no"> | ||
| 3 | <BootstrapperApplication SourceFile="fakeba.dll" /> | ||
| 4 | |||
| 5 | <Chain> | ||
| 6 | <MsiPackage SourceFile="test.msi" /> | ||
| 7 | </Chain> | ||
| 8 | </Bundle> | ||
| 9 | </Wix> | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUserOrMachine/PerUserOrMachinePackage.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUserOrMachine/PerUserOrMachinePackage.wxs new file mode 100644 index 00000000..abae7c2e --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundlePerUserOrMachine/PerUserOrMachinePackage.wxs | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 2 | <Package Id="WixToolsetTest.PerUserPackage" ProductCode="33333333-3333-3333-3333-333333333333" Name="Per-user-or-machine Package" Version="1.0" Manufacturer="Example Corporation" Scope="perUserOrMachine"> | ||
| 3 | <File Source="test.txt" /> | ||
| 4 | </Package> | ||
| 5 | </Wix> | ||
