aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2026-02-04 20:47:04 -0500
committerBob Arnson <bob@firegiant.com>2026-02-04 20:47:04 -0500
commitedccb203c421d2bd820062024088c6698424d9ee (patch)
tree6b47c3eb5ca53bd9f79f3d032dc1a596d411bf38 /src/api
parenta3d3963f806117ce123d95e8b77e73e1c1545b25 (diff)
downloadwix-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
Diffstat (limited to '')
-rw-r--r--src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperCommand.cs7
-rw-r--r--src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs20
-rw-r--r--src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperCommand.cs5
-rw-r--r--src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs27
-rw-r--r--src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs3
-rw-r--r--src/api/burn/balutil/BalBootstrapperEngine.cpp13
-rw-r--r--src/api/burn/balutil/inc/BootstrapperApplicationBase.h14
-rw-r--r--src/api/burn/balutil/inc/IBootstrapperEngine.h3
-rw-r--r--src/api/burn/inc/BootstrapperApplicationTypes.h11
-rw-r--r--src/api/burn/inc/BootstrapperEngineTypes.h10
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs19
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedMsiPackageSymbol.cs8
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs32
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs56
14 files changed, 168 insertions, 60 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
16public: // IUnknown 16public: // 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" {
10const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_API_VERSION = L"burn.ba.apiver"; 10const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_API_VERSION = L"burn.ba.apiver";
11const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_PIPE_NAME = L"burn.ba.pipe"; 11const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_PIPE_NAME = L"burn.ba.pipe";
12const DWORD WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION = 5; 12const DWORD WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION = 5;
13const DWORD WIX_7_BOOTSTRAPPER_APPLICATION_API_VERSION = 7;
13 14
14enum BOOTSTRAPPER_DISPLAY 15enum 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
31enum 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
30enum BOOTSTRAPPER_RESUME_TYPE 40enum 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
33enum BOOTSTRAPPER_SCOPE
34{
35 BOOTSTRAPPER_SCOPE_DEFAULT,
36 BOOTSTRAPPER_SCOPE_PER_MACHINE,
37 BOOTSTRAPPER_SCOPE_PER_USER,
38};
39
33enum BOOTSTRAPPER_ACTION_STATE 40enum 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
311typedef struct _BAENGINE_PLAN_RESULTS 319typedef 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
42namespace WixToolset.Data.Symbols 43namespace 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}