diff options
Diffstat (limited to 'src/api')
17 files changed, 270 insertions, 96 deletions
diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h index 943f5ead..fbbd10ee 100644 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h +++ b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h | |||
@@ -226,6 +226,7 @@ enum BOOTSTRAPPER_APPLICATION_MESSAGE | |||
226 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, | 226 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, |
227 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE, | 227 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE, |
228 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL, | 228 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL, |
229 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE, | ||
229 | }; | 230 | }; |
230 | 231 | ||
231 | enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION | 232 | enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION |
@@ -793,6 +794,22 @@ struct BA_ONDETECTRELATEDBUNDLE_RESULTS | |||
793 | BOOL fCancel; | 794 | BOOL fCancel; |
794 | }; | 795 | }; |
795 | 796 | ||
797 | struct BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS | ||
798 | { | ||
799 | DWORD cbSize; | ||
800 | LPCWSTR wzPackageId; | ||
801 | LPCWSTR wzBundleId; | ||
802 | BOOTSTRAPPER_RELATION_TYPE relationType; | ||
803 | BOOL fPerMachine; | ||
804 | LPCWSTR wzVersion; | ||
805 | }; | ||
806 | |||
807 | struct BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS | ||
808 | { | ||
809 | DWORD cbSize; | ||
810 | BOOL fCancel; | ||
811 | }; | ||
812 | |||
796 | struct BA_ONDETECTRELATEDMSIPACKAGE_ARGS | 813 | struct BA_ONDETECTRELATEDMSIPACKAGE_ARGS |
797 | { | 814 | { |
798 | DWORD cbSize; | 815 | DWORD cbSize; |
diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs index 5ed064fa..41738bf6 100644 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
@@ -283,6 +283,9 @@ namespace WixToolset.Mba.Core | |||
283 | /// <inheritdoc/> | 283 | /// <inheritdoc/> |
284 | public event EventHandler<ExecuteProcessCancelEventArgs> ExecuteProcessCancel; | 284 | public event EventHandler<ExecuteProcessCancelEventArgs> ExecuteProcessCancel; |
285 | 285 | ||
286 | /// <inheritdoc/> | ||
287 | public event EventHandler<DetectRelatedBundlePackageEventArgs> DetectRelatedBundlePackage; | ||
288 | |||
286 | /// <summary> | 289 | /// <summary> |
287 | /// Entry point that is called when the bootstrapper application is ready to run. | 290 | /// Entry point that is called when the bootstrapper application is ready to run. |
288 | /// </summary> | 291 | /// </summary> |
@@ -1385,6 +1388,19 @@ namespace WixToolset.Mba.Core | |||
1385 | } | 1388 | } |
1386 | } | 1389 | } |
1387 | 1390 | ||
1391 | /// <summary> | ||
1392 | /// Called by the engine, raises the <see cref="DetectRelatedBundlePackage"/> event. | ||
1393 | /// </summary> | ||
1394 | /// <param name="args">Additional arguments for this event.</param> | ||
1395 | protected virtual void OnDetectRelatedBundlePackage(DetectRelatedBundlePackageEventArgs args) | ||
1396 | { | ||
1397 | EventHandler<DetectRelatedBundlePackageEventArgs> handler = this.DetectRelatedBundlePackage; | ||
1398 | if (null != handler) | ||
1399 | { | ||
1400 | handler(this, args); | ||
1401 | } | ||
1402 | } | ||
1403 | |||
1388 | #region IBootstrapperApplication Members | 1404 | #region IBootstrapperApplication Members |
1389 | 1405 | ||
1390 | int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) | 1406 | int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) |
@@ -2144,6 +2160,15 @@ namespace WixToolset.Mba.Core | |||
2144 | return args.HResult; | 2160 | return args.HResult; |
2145 | } | 2161 | } |
2146 | 2162 | ||
2163 | int IBootstrapperApplication.OnDetectRelatedBundlePackage(string wzPackageId, string wzProductCode, RelationType relationType, bool fPerMachine, string wzVersion, ref bool fCancel) | ||
2164 | { | ||
2165 | DetectRelatedBundlePackageEventArgs args = new DetectRelatedBundlePackageEventArgs(wzPackageId, wzProductCode, relationType, fPerMachine, wzVersion, fCancel); | ||
2166 | this.OnDetectRelatedBundlePackage(args); | ||
2167 | |||
2168 | fCancel = args.Cancel; | ||
2169 | return args.HResult; | ||
2170 | } | ||
2171 | |||
2147 | #endregion | 2172 | #endregion |
2148 | } | 2173 | } |
2149 | } | 2174 | } |
diff --git a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs index c2c73067..07b14b3d 100644 --- a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs +++ b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs | |||
@@ -2030,10 +2030,7 @@ namespace WixToolset.Mba.Core | |||
2030 | [Serializable] | 2030 | [Serializable] |
2031 | public class LaunchApprovedExeBeginEventArgs : CancellableHResultEventArgs | 2031 | public class LaunchApprovedExeBeginEventArgs : CancellableHResultEventArgs |
2032 | { | 2032 | { |
2033 | /// <summary> | 2033 | /// <summary /> |
2034 | /// | ||
2035 | /// </summary> | ||
2036 | /// <param name="cancelRecommendation"></param> | ||
2037 | public LaunchApprovedExeBeginEventArgs(bool cancelRecommendation) | 2034 | public LaunchApprovedExeBeginEventArgs(bool cancelRecommendation) |
2038 | : base(cancelRecommendation) | 2035 | : base(cancelRecommendation) |
2039 | { | 2036 | { |
@@ -2046,27 +2043,18 @@ namespace WixToolset.Mba.Core | |||
2046 | [Serializable] | 2043 | [Serializable] |
2047 | public class LaunchApprovedExeCompleteEventArgs : StatusEventArgs | 2044 | public class LaunchApprovedExeCompleteEventArgs : StatusEventArgs |
2048 | { | 2045 | { |
2049 | private int processId; | 2046 | /// <summary /> |
2050 | |||
2051 | /// <summary> | ||
2052 | /// | ||
2053 | /// </summary> | ||
2054 | /// <param name="hrStatus"></param> | ||
2055 | /// <param name="processId"></param> | ||
2056 | public LaunchApprovedExeCompleteEventArgs(int hrStatus, int processId) | 2047 | public LaunchApprovedExeCompleteEventArgs(int hrStatus, int processId) |
2057 | : base(hrStatus) | 2048 | : base(hrStatus) |
2058 | { | 2049 | { |
2059 | this.processId = processId; | 2050 | this.ProcessId = processId; |
2060 | } | 2051 | } |
2061 | 2052 | ||
2062 | /// <summary> | 2053 | /// <summary> |
2063 | /// Gets the ProcessId of the process that was launched. | 2054 | /// Gets the ProcessId of the process that was launched. |
2064 | /// This is only valid if the status reports success. | 2055 | /// This is only valid if the status reports success. |
2065 | /// </summary> | 2056 | /// </summary> |
2066 | public int ProcessId | 2057 | public int ProcessId { get; private set; } |
2067 | { | ||
2068 | get { return this.processId; } | ||
2069 | } | ||
2070 | } | 2058 | } |
2071 | 2059 | ||
2072 | /// <summary> | 2060 | /// <summary> |
@@ -2075,26 +2063,17 @@ namespace WixToolset.Mba.Core | |||
2075 | [Serializable] | 2063 | [Serializable] |
2076 | public class BeginMsiTransactionBeginEventArgs : CancellableHResultEventArgs | 2064 | public class BeginMsiTransactionBeginEventArgs : CancellableHResultEventArgs |
2077 | { | 2065 | { |
2078 | private string transactionId; | 2066 | /// <summary /> |
2079 | |||
2080 | /// <summary> | ||
2081 | /// | ||
2082 | /// </summary> | ||
2083 | /// <param name="transactionId"></param> | ||
2084 | /// <param name="cancelRecommendation"></param> | ||
2085 | public BeginMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation) | 2067 | public BeginMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation) |
2086 | : base(cancelRecommendation) | 2068 | : base(cancelRecommendation) |
2087 | { | 2069 | { |
2088 | this.transactionId = transactionId; | 2070 | this.TransactionId = transactionId; |
2089 | } | 2071 | } |
2090 | 2072 | ||
2091 | /// <summary> | 2073 | /// <summary> |
2092 | /// Gets the MSI transaction Id. | 2074 | /// Gets the MSI transaction Id. |
2093 | /// </summary> | 2075 | /// </summary> |
2094 | public string TransactionId | 2076 | public string TransactionId { get; private set; } |
2095 | { | ||
2096 | get { return this.transactionId; } | ||
2097 | } | ||
2098 | } | 2077 | } |
2099 | 2078 | ||
2100 | /// <summary> | 2079 | /// <summary> |
@@ -2103,26 +2082,17 @@ namespace WixToolset.Mba.Core | |||
2103 | [Serializable] | 2082 | [Serializable] |
2104 | public class BeginMsiTransactionCompleteEventArgs : StatusEventArgs | 2083 | public class BeginMsiTransactionCompleteEventArgs : StatusEventArgs |
2105 | { | 2084 | { |
2106 | private string transactionId; | 2085 | /// <summary /> |
2107 | |||
2108 | /// <summary> | ||
2109 | /// | ||
2110 | /// </summary> | ||
2111 | /// <param name="transactionId"></param> | ||
2112 | /// <param name="hrStatus"></param> | ||
2113 | public BeginMsiTransactionCompleteEventArgs(string transactionId, int hrStatus) | 2086 | public BeginMsiTransactionCompleteEventArgs(string transactionId, int hrStatus) |
2114 | : base(hrStatus) | 2087 | : base(hrStatus) |
2115 | { | 2088 | { |
2116 | this.transactionId = transactionId; | 2089 | this.TransactionId = transactionId; |
2117 | } | 2090 | } |
2118 | 2091 | ||
2119 | /// <summary> | 2092 | /// <summary> |
2120 | /// Gets the MSI transaction Id. | 2093 | /// Gets the MSI transaction Id. |
2121 | /// </summary> | 2094 | /// </summary> |
2122 | public string TransactionId | 2095 | public string TransactionId { get; private set; } |
2123 | { | ||
2124 | get { return this.transactionId; } | ||
2125 | } | ||
2126 | } | 2096 | } |
2127 | 2097 | ||
2128 | /// <summary> | 2098 | /// <summary> |
@@ -2131,26 +2101,17 @@ namespace WixToolset.Mba.Core | |||
2131 | [Serializable] | 2101 | [Serializable] |
2132 | public class CommitMsiTransactionBeginEventArgs : CancellableHResultEventArgs | 2102 | public class CommitMsiTransactionBeginEventArgs : CancellableHResultEventArgs |
2133 | { | 2103 | { |
2134 | private string transactionId; | 2104 | /// <summary /> |
2135 | |||
2136 | /// <summary> | ||
2137 | /// | ||
2138 | /// </summary> | ||
2139 | /// <param name="transactionId"></param> | ||
2140 | /// <param name="cancelRecommendation"></param> | ||
2141 | public CommitMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation) | 2105 | public CommitMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation) |
2142 | : base(cancelRecommendation) | 2106 | : base(cancelRecommendation) |
2143 | { | 2107 | { |
2144 | this.transactionId = transactionId; | 2108 | this.TransactionId = transactionId; |
2145 | } | 2109 | } |
2146 | 2110 | ||
2147 | /// <summary> | 2111 | /// <summary> |
2148 | /// Gets the MSI transaction Id. | 2112 | /// Gets the MSI transaction Id. |
2149 | /// </summary> | 2113 | /// </summary> |
2150 | public string TransactionId | 2114 | public string TransactionId { get; private set; } |
2151 | { | ||
2152 | get { return this.transactionId; } | ||
2153 | } | ||
2154 | } | 2115 | } |
2155 | 2116 | ||
2156 | /// <summary> | 2117 | /// <summary> |
@@ -2159,26 +2120,17 @@ namespace WixToolset.Mba.Core | |||
2159 | [Serializable] | 2120 | [Serializable] |
2160 | public class CommitMsiTransactionCompleteEventArgs : StatusEventArgs | 2121 | public class CommitMsiTransactionCompleteEventArgs : StatusEventArgs |
2161 | { | 2122 | { |
2162 | private string transactionId; | 2123 | /// <summary /> |
2163 | |||
2164 | /// <summary> | ||
2165 | /// | ||
2166 | /// </summary> | ||
2167 | /// <param name="transactionId"></param> | ||
2168 | /// <param name="hrStatus"></param> | ||
2169 | public CommitMsiTransactionCompleteEventArgs(string transactionId, int hrStatus) | 2124 | public CommitMsiTransactionCompleteEventArgs(string transactionId, int hrStatus) |
2170 | : base(hrStatus) | 2125 | : base(hrStatus) |
2171 | { | 2126 | { |
2172 | this.transactionId = transactionId; | 2127 | this.TransactionId = transactionId; |
2173 | } | 2128 | } |
2174 | 2129 | ||
2175 | /// <summary> | 2130 | /// <summary> |
2176 | /// Gets the MSI transaction Id. | 2131 | /// Gets the MSI transaction Id. |
2177 | /// </summary> | 2132 | /// </summary> |
2178 | public string TransactionId | 2133 | public string TransactionId { get; private set; } |
2179 | { | ||
2180 | get { return this.transactionId; } | ||
2181 | } | ||
2182 | } | 2134 | } |
2183 | 2135 | ||
2184 | /// <summary> | 2136 | /// <summary> |
@@ -2187,24 +2139,16 @@ namespace WixToolset.Mba.Core | |||
2187 | [Serializable] | 2139 | [Serializable] |
2188 | public class RollbackMsiTransactionBeginEventArgs : HResultEventArgs | 2140 | public class RollbackMsiTransactionBeginEventArgs : HResultEventArgs |
2189 | { | 2141 | { |
2190 | private string transactionId; | 2142 | /// <summary /> |
2191 | |||
2192 | /// <summary> | ||
2193 | /// | ||
2194 | /// </summary> | ||
2195 | /// <param name="transactionId"></param> | ||
2196 | public RollbackMsiTransactionBeginEventArgs(string transactionId) | 2143 | public RollbackMsiTransactionBeginEventArgs(string transactionId) |
2197 | { | 2144 | { |
2198 | this.transactionId = transactionId; | 2145 | this.TransactionId = transactionId; |
2199 | } | 2146 | } |
2200 | 2147 | ||
2201 | /// <summary> | 2148 | /// <summary> |
2202 | /// Gets the MSI transaction Id. | 2149 | /// Gets the MSI transaction Id. |
2203 | /// </summary> | 2150 | /// </summary> |
2204 | public string TransactionId | 2151 | public string TransactionId { get; private set; } |
2205 | { | ||
2206 | get { return this.transactionId; } | ||
2207 | } | ||
2208 | } | 2152 | } |
2209 | 2153 | ||
2210 | /// <summary> | 2154 | /// <summary> |
@@ -2213,26 +2157,17 @@ namespace WixToolset.Mba.Core | |||
2213 | [Serializable] | 2157 | [Serializable] |
2214 | public class RollbackMsiTransactionCompleteEventArgs : StatusEventArgs | 2158 | public class RollbackMsiTransactionCompleteEventArgs : StatusEventArgs |
2215 | { | 2159 | { |
2216 | private string transactionId; | 2160 | /// <summary /> |
2217 | |||
2218 | /// <summary> | ||
2219 | /// | ||
2220 | /// </summary> | ||
2221 | /// <param name="transactionId"></param> | ||
2222 | /// <param name="hrStatus"></param> | ||
2223 | public RollbackMsiTransactionCompleteEventArgs(string transactionId, int hrStatus) | 2161 | public RollbackMsiTransactionCompleteEventArgs(string transactionId, int hrStatus) |
2224 | : base(hrStatus) | 2162 | : base(hrStatus) |
2225 | { | 2163 | { |
2226 | this.transactionId = transactionId; | 2164 | this.TransactionId = transactionId; |
2227 | } | 2165 | } |
2228 | 2166 | ||
2229 | /// <summary> | 2167 | /// <summary> |
2230 | /// Gets the MSI transaction Id. | 2168 | /// Gets the MSI transaction Id. |
2231 | /// </summary> | 2169 | /// </summary> |
2232 | public string TransactionId | 2170 | public string TransactionId { get; private set; } |
2233 | { | ||
2234 | get { return this.transactionId; } | ||
2235 | } | ||
2236 | } | 2171 | } |
2237 | 2172 | ||
2238 | /// <summary> | 2173 | /// <summary> |
@@ -2524,4 +2459,47 @@ namespace WixToolset.Mba.Core | |||
2524 | /// </summary> | 2459 | /// </summary> |
2525 | public BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION Action { get; set; } | 2460 | public BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION Action { get; set; } |
2526 | } | 2461 | } |
2462 | |||
2463 | /// <summary> | ||
2464 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectRelatedBundlePackage"/> | ||
2465 | /// </summary> | ||
2466 | [Serializable] | ||
2467 | public class DetectRelatedBundlePackageEventArgs : CancellableHResultEventArgs | ||
2468 | { | ||
2469 | /// <summary /> | ||
2470 | public DetectRelatedBundlePackageEventArgs(string packageId, string productCode, RelationType relationType, bool perMachine, string version, bool cancelRecommendation) | ||
2471 | : base(cancelRecommendation) | ||
2472 | { | ||
2473 | this.PackageId = packageId; | ||
2474 | this.ProductCode = productCode; | ||
2475 | this.RelationType = relationType; | ||
2476 | this.PerMachine = perMachine; | ||
2477 | this.Version = version; | ||
2478 | } | ||
2479 | |||
2480 | /// <summary> | ||
2481 | /// Gets the identity of the product's package detected. | ||
2482 | /// </summary> | ||
2483 | public string PackageId { get; private set; } | ||
2484 | |||
2485 | /// <summary> | ||
2486 | /// Gets the identity of the related bundle detected. | ||
2487 | /// </summary> | ||
2488 | public string ProductCode { get; private set; } | ||
2489 | |||
2490 | /// <summary> | ||
2491 | /// Gets the relationship type of the related bundle. | ||
2492 | /// </summary> | ||
2493 | public RelationType RelationType { get; private set; } | ||
2494 | |||
2495 | /// <summary> | ||
2496 | /// Gets whether the detected bundle is per machine. | ||
2497 | /// </summary> | ||
2498 | public bool PerMachine { get; private set; } | ||
2499 | |||
2500 | /// <summary> | ||
2501 | /// Gets the version of the related bundle detected. | ||
2502 | /// </summary> | ||
2503 | public string Version { get; private set; } | ||
2504 | } | ||
2527 | } | 2505 | } |
diff --git a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs index 7cf0957a..ae642474 100644 --- a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs | |||
@@ -1182,6 +1182,20 @@ namespace WixToolset.Mba.Core | |||
1182 | [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, | 1182 | [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, |
1183 | [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION pAction | 1183 | [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION pAction |
1184 | ); | 1184 | ); |
1185 | |||
1186 | /// <summary> | ||
1187 | /// See <see cref="IDefaultBootstrapperApplication.DetectRelatedBundlePackage"/>. | ||
1188 | /// </summary> | ||
1189 | [PreserveSig] | ||
1190 | [return: MarshalAs(UnmanagedType.I4)] | ||
1191 | int OnDetectRelatedBundlePackage( | ||
1192 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
1193 | [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, | ||
1194 | [MarshalAs(UnmanagedType.U4)] RelationType relationType, | ||
1195 | [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, | ||
1196 | [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, | ||
1197 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
1198 | ); | ||
1185 | } | 1199 | } |
1186 | 1200 | ||
1187 | /// <summary> | 1201 | /// <summary> |
diff --git a/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs index 21d99b32..77089e83 100644 --- a/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs | |||
@@ -36,15 +36,15 @@ namespace WixToolset.Mba.Core | |||
36 | 36 | ||
37 | /// <summary> | 37 | /// <summary> |
38 | /// Fired when the engine has begun acquiring the payload or container. | 38 | /// Fired when the engine has begun acquiring the payload or container. |
39 | /// The BA can change the source using <see cref="IEngine.SetLocalSource(string, string, string)"/> | 39 | /// The BA can change the source using <see cref="IEngine.SetLocalSource(String, String, String)"/> |
40 | /// or <see cref="IEngine.SetDownloadSource(string, string, string, string, string)"/>. | 40 | /// or <see cref="IEngine.SetDownloadSource(String, String, String, String, String)"/>. |
41 | /// </summary> | 41 | /// </summary> |
42 | event EventHandler<CacheAcquireBeginEventArgs> CacheAcquireBegin; | 42 | event EventHandler<CacheAcquireBeginEventArgs> CacheAcquireBegin; |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
45 | /// Fired when the engine has completed the acquisition of the payload or container. | 45 | /// Fired when the engine has completed the acquisition of the payload or container. |
46 | /// The BA can change the source using <see cref="IEngine.SetLocalSource(string, string, string)"/> | 46 | /// The BA can change the source using <see cref="IEngine.SetLocalSource(String, String, String)"/> |
47 | /// or <see cref="IEngine.SetDownloadSource(string, string, string, string, string)"/>. | 47 | /// or <see cref="IEngine.SetDownloadSource(String, String, String, String, String)"/>. |
48 | /// </summary> | 48 | /// </summary> |
49 | event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete; | 49 | event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete; |
50 | 50 | ||
@@ -179,6 +179,11 @@ namespace WixToolset.Mba.Core | |||
179 | event EventHandler<DetectRelatedBundleEventArgs> DetectRelatedBundle; | 179 | event EventHandler<DetectRelatedBundleEventArgs> DetectRelatedBundle; |
180 | 180 | ||
181 | /// <summary> | 181 | /// <summary> |
182 | /// Fired when a related bundle has been detected for a bundle package. | ||
183 | /// </summary> | ||
184 | event EventHandler<DetectRelatedBundlePackageEventArgs> DetectRelatedBundlePackage; | ||
185 | |||
186 | /// <summary> | ||
182 | /// Fired when a related MSI package has been detected for a package. | 187 | /// Fired when a related MSI package has been detected for a package. |
183 | /// </summary> | 188 | /// </summary> |
184 | event EventHandler<DetectRelatedMsiPackageEventArgs> DetectRelatedMsiPackage; | 189 | event EventHandler<DetectRelatedMsiPackageEventArgs> DetectRelatedMsiPackage; |
diff --git a/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs b/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs index 3681a497..39fe4d73 100644 --- a/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs +++ b/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs | |||
@@ -56,6 +56,11 @@ namespace WixToolset.Mba.Core | |||
56 | /// | 56 | /// |
57 | /// </summary> | 57 | /// </summary> |
58 | UpdateBundle, | 58 | UpdateBundle, |
59 | |||
60 | /// <summary> | ||
61 | /// | ||
62 | /// </summary> | ||
63 | ChainBundle, | ||
59 | } | 64 | } |
60 | 65 | ||
61 | /// <summary> | 66 | /// <summary> |
@@ -220,7 +225,11 @@ namespace WixToolset.Mba.Core | |||
220 | return null; | 225 | return null; |
221 | } | 226 | } |
222 | 227 | ||
223 | if (attributeValue.Equals("Exe", StringComparison.InvariantCulture)) | 228 | if (attributeValue.Equals("Bundle", StringComparison.InvariantCulture)) |
229 | { | ||
230 | return PackageType.ChainBundle; | ||
231 | } | ||
232 | else if (attributeValue.Equals("Exe", StringComparison.InvariantCulture)) | ||
224 | { | 233 | { |
225 | return PackageType.Exe; | 234 | return PackageType.Exe; |
226 | } | 235 | } |
@@ -268,7 +277,7 @@ namespace WixToolset.Mba.Core | |||
268 | package.Type = PackageType.UpgradeBundle; | 277 | package.Type = PackageType.UpgradeBundle; |
269 | break; | 278 | break; |
270 | default: | 279 | default: |
271 | throw new Exception(string.Format("Unknown related bundle type: {0}", relationType)); | 280 | throw new Exception(String.Format("Unknown related bundle type: {0}", relationType)); |
272 | } | 281 | } |
273 | 282 | ||
274 | return package; | 283 | return package; |
@@ -302,7 +311,7 @@ namespace WixToolset.Mba.Core | |||
302 | 311 | ||
303 | if (!packagesById.TryGetValue(id, out var ipackage)) | 312 | if (!packagesById.TryGetValue(id, out var ipackage)) |
304 | { | 313 | { |
305 | throw new Exception(string.Format("Failed to find package specified in WixBalPackageInfo: {0}", id)); | 314 | throw new Exception(String.Format("Failed to find package specified in WixBalPackageInfo: {0}", id)); |
306 | } | 315 | } |
307 | 316 | ||
308 | var package = (PackageInfo)ipackage; | 317 | var package = (PackageInfo)ipackage; |
@@ -322,7 +331,7 @@ namespace WixToolset.Mba.Core | |||
322 | 331 | ||
323 | if (!packagesById.TryGetValue(id, out var ipackage)) | 332 | if (!packagesById.TryGetValue(id, out var ipackage)) |
324 | { | 333 | { |
325 | throw new Exception(string.Format("Failed to find package specified in WixMbaPrereqInformation: {0}", id)); | 334 | throw new Exception(String.Format("Failed to find package specified in WixMbaPrereqInformation: {0}", id)); |
326 | } | 335 | } |
327 | 336 | ||
328 | var package = (PackageInfo)ipackage; | 337 | var package = (PackageInfo)ipackage; |
diff --git a/src/api/burn/balutil/balinfo.cpp b/src/api/burn/balutil/balinfo.cpp index d9cc9b76..f0eb9904 100644 --- a/src/api/burn/balutil/balinfo.cpp +++ b/src/api/burn/balutil/balinfo.cpp | |||
@@ -433,7 +433,11 @@ static HRESULT ParsePackagesFromXml( | |||
433 | hr = XmlGetAttributeEx(pNode, L"PackageType", &scz); | 433 | hr = XmlGetAttributeEx(pNode, L"PackageType", &scz); |
434 | ExitOnFailure(hr, "Failed to get package type for package."); | 434 | ExitOnFailure(hr, "Failed to get package type for package."); |
435 | 435 | ||
436 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Exe", -1, scz, -1)) | 436 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Bundle", -1, scz, -1)) |
437 | { | ||
438 | prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_BUNDLE_CHAIN; | ||
439 | } | ||
440 | else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Exe", -1, scz, -1)) | ||
437 | { | 441 | { |
438 | prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_EXE; | 442 | prgPackages[iPackage].type = BAL_INFO_PACKAGE_TYPE_EXE; |
439 | } | 443 | } |
diff --git a/src/api/burn/balutil/inc/BAFunctions.h b/src/api/burn/balutil/inc/BAFunctions.h index 158e65b5..9be3f62f 100644 --- a/src/api/burn/balutil/inc/BAFunctions.h +++ b/src/api/burn/balutil/inc/BAFunctions.h | |||
@@ -92,6 +92,7 @@ enum BA_FUNCTIONS_MESSAGE | |||
92 | BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, | 92 | BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, |
93 | BA_FUNCTIONS_MESSAGE_ONAPPLYDOWNGRADE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE, | 93 | BA_FUNCTIONS_MESSAGE_ONAPPLYDOWNGRADE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE, |
94 | BA_FUNCTIONS_MESSAGE_ONEXECUTEPROCESSCANCEL = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL, | 94 | BA_FUNCTIONS_MESSAGE_ONEXECUTEPROCESSCANCEL = BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL, |
95 | BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE, | ||
95 | 96 | ||
96 | BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, | 97 | BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024, |
97 | BA_FUNCTIONS_MESSAGE_WNDPROC, | 98 | BA_FUNCTIONS_MESSAGE_WNDPROC, |
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctions.h b/src/api/burn/balutil/inc/BalBaseBAFunctions.h index 614d4bcf..6bde05d2 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctions.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctions.h | |||
@@ -887,6 +887,18 @@ public: // IBootstrapperApplication | |||
887 | return S_OK; | 887 | return S_OK; |
888 | } | 888 | } |
889 | 889 | ||
890 | virtual STDMETHODIMP OnDetectRelatedBundlePackage( | ||
891 | __in_z LPCWSTR /*wzPackageId*/, | ||
892 | __in_z LPCWSTR /*wzBundleId*/, | ||
893 | __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, | ||
894 | __in BOOL /*fPerMachine*/, | ||
895 | __in LPCWSTR /*wzVersion*/, | ||
896 | __inout BOOL* /*pfCancel*/ | ||
897 | ) | ||
898 | { | ||
899 | return S_OK; | ||
900 | } | ||
901 | |||
890 | public: // IBAFunctions | 902 | public: // IBAFunctions |
891 | virtual STDMETHODIMP OnPlan( | 903 | virtual STDMETHODIMP OnPlan( |
892 | ) | 904 | ) |
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h index b96a180c..4564ad0c 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h | |||
@@ -163,6 +163,7 @@ static HRESULT WINAPI BalBaseBAFunctionsProc( | |||
163 | case BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE: | 163 | case BA_FUNCTIONS_MESSAGE_ONPLANRELATEDBUNDLETYPE: |
164 | case BA_FUNCTIONS_MESSAGE_ONAPPLYDOWNGRADE: | 164 | case BA_FUNCTIONS_MESSAGE_ONAPPLYDOWNGRADE: |
165 | case BA_FUNCTIONS_MESSAGE_ONEXECUTEPROCESSCANCEL: | 165 | case BA_FUNCTIONS_MESSAGE_ONEXECUTEPROCESSCANCEL: |
166 | case BA_FUNCTIONS_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE: | ||
166 | hr = BalBaseBootstrapperApplicationProc((BOOTSTRAPPER_APPLICATION_MESSAGE)message, pvArgs, pvResults, pvContext); | 167 | hr = BalBaseBootstrapperApplicationProc((BOOTSTRAPPER_APPLICATION_MESSAGE)message, pvArgs, pvResults, pvContext); |
167 | break; | 168 | break; |
168 | case BA_FUNCTIONS_MESSAGE_ONTHEMELOADED: | 169 | case BA_FUNCTIONS_MESSAGE_ONTHEMELOADED: |
diff --git a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h index 25570ffd..b661c7c9 100644 --- a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h +++ b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h | |||
@@ -1087,6 +1087,19 @@ public: // IBootstrapperApplication | |||
1087 | return S_OK; | 1087 | return S_OK; |
1088 | } | 1088 | } |
1089 | 1089 | ||
1090 | virtual STDMETHODIMP OnDetectRelatedBundlePackage( | ||
1091 | __in_z LPCWSTR /*wzPackageId*/, | ||
1092 | __in_z LPCWSTR /*wzBundleId*/, | ||
1093 | __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/, | ||
1094 | __in BOOL /*fPerMachine*/, | ||
1095 | __in LPCWSTR /*wzVersion*/, | ||
1096 | __inout BOOL* pfCancel | ||
1097 | ) | ||
1098 | { | ||
1099 | *pfCancel |= CheckCanceled(); | ||
1100 | return S_OK; | ||
1101 | } | ||
1102 | |||
1090 | public: //CBalBaseBootstrapperApplication | 1103 | public: //CBalBaseBootstrapperApplication |
1091 | virtual STDMETHODIMP Initialize( | 1104 | virtual STDMETHODIMP Initialize( |
1092 | __in const BOOTSTRAPPER_CREATE_ARGS* pCreateArgs | 1105 | __in const BOOTSTRAPPER_CREATE_ARGS* pCreateArgs |
diff --git a/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h b/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h index b196d183..4ef7bac5 100644 --- a/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h +++ b/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h | |||
@@ -756,6 +756,15 @@ static HRESULT BalBaseBAProcOnApplyDowngrade( | |||
756 | return pBA->OnApplyDowngrade(pArgs->hrRecommended, &pResults->hrStatus); | 756 | return pBA->OnApplyDowngrade(pArgs->hrRecommended, &pResults->hrStatus); |
757 | } | 757 | } |
758 | 758 | ||
759 | static HRESULT BalBaseBAProcOnDetectRelatedBundlePackage( | ||
760 | __in IBootstrapperApplication* pBA, | ||
761 | __in BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS* pArgs, | ||
762 | __inout BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS* pResults | ||
763 | ) | ||
764 | { | ||
765 | return pBA->OnDetectRelatedBundlePackage(pArgs->wzPackageId, pArgs->wzBundleId, pArgs->relationType, pArgs->fPerMachine, pArgs->wzVersion, &pResults->fCancel); | ||
766 | } | ||
767 | |||
759 | /******************************************************************* | 768 | /******************************************************************* |
760 | BalBaseBootstrapperApplicationProc - requires pvContext to be of type IBootstrapperApplication. | 769 | BalBaseBootstrapperApplicationProc - requires pvContext to be of type IBootstrapperApplication. |
761 | Provides a default mapping between the new message based BA interface and | 770 | Provides a default mapping between the new message based BA interface and |
@@ -1024,6 +1033,9 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc( | |||
1024 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL: | 1033 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL: |
1025 | hr = BalBaseBAProcOnExecuteProcessCancel(pBA, reinterpret_cast<BA_ONEXECUTEPROCESSCANCEL_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPROCESSCANCEL_RESULTS*>(pvResults)); | 1034 | hr = BalBaseBAProcOnExecuteProcessCancel(pBA, reinterpret_cast<BA_ONEXECUTEPROCESSCANCEL_ARGS*>(pvArgs), reinterpret_cast<BA_ONEXECUTEPROCESSCANCEL_RESULTS*>(pvResults)); |
1026 | break; | 1035 | break; |
1036 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE: | ||
1037 | hr = BalBaseBAProcOnDetectRelatedBundlePackage(pBA, reinterpret_cast<BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS*>(pvResults)); | ||
1038 | break; | ||
1027 | } | 1039 | } |
1028 | } | 1040 | } |
1029 | 1041 | ||
diff --git a/src/api/burn/balutil/inc/IBootstrapperApplication.h b/src/api/burn/balutil/inc/IBootstrapperApplication.h index 6174c290..a4840228 100644 --- a/src/api/burn/balutil/inc/IBootstrapperApplication.h +++ b/src/api/burn/balutil/inc/IBootstrapperApplication.h | |||
@@ -723,4 +723,14 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
723 | __in BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, | 723 | __in BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, |
724 | __inout BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION* pAction | 724 | __inout BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION* pAction |
725 | ) = 0; | 725 | ) = 0; |
726 | |||
727 | // OnDetectRelatedBundlePackage - called when the engine detects a related bundle for a BundlePackage. | ||
728 | STDMETHOD(OnDetectRelatedBundlePackage)( | ||
729 | __in_z LPCWSTR wzPackageId, | ||
730 | __in_z LPCWSTR wzBundleId, | ||
731 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | ||
732 | __in BOOL fPerMachine, | ||
733 | __in_z LPCWSTR wzVersion, | ||
734 | __inout BOOL* pfCancel | ||
735 | ) = 0; | ||
726 | }; | 736 | }; |
diff --git a/src/api/burn/balutil/inc/balinfo.h b/src/api/burn/balutil/inc/balinfo.h index 8f61685f..0c7a5b93 100644 --- a/src/api/burn/balutil/inc/balinfo.h +++ b/src/api/burn/balutil/inc/balinfo.h | |||
@@ -17,6 +17,7 @@ typedef enum BAL_INFO_PACKAGE_TYPE | |||
17 | BAL_INFO_PACKAGE_TYPE_BUNDLE_ADDON, | 17 | BAL_INFO_PACKAGE_TYPE_BUNDLE_ADDON, |
18 | BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH, | 18 | BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH, |
19 | BAL_INFO_PACKAGE_TYPE_BUNDLE_UPDATE, | 19 | BAL_INFO_PACKAGE_TYPE_BUNDLE_UPDATE, |
20 | BAL_INFO_PACKAGE_TYPE_BUNDLE_CHAIN, | ||
20 | } BAL_INFO_PACKAGE_TYPE; | 21 | } BAL_INFO_PACKAGE_TYPE; |
21 | 22 | ||
22 | typedef enum _BAL_INFO_RESTART | 23 | typedef enum _BAL_INFO_RESTART |
diff --git a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs index d4a91343..1fd8ded1 100644 --- a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs +++ b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs | |||
@@ -142,6 +142,7 @@ namespace WixToolset.Data | |||
142 | WixBundlePackageCommandLine, | 142 | WixBundlePackageCommandLine, |
143 | WixBundlePackageExitCode, | 143 | WixBundlePackageExitCode, |
144 | WixBundlePackageGroup, | 144 | WixBundlePackageGroup, |
145 | WixBundlePackageRelatedBundle, | ||
145 | WixBundlePatchTargetCode, | 146 | WixBundlePatchTargetCode, |
146 | WixBundlePayload, | 147 | WixBundlePayload, |
147 | WixBundlePayloadGroup, | 148 | WixBundlePayloadGroup, |
@@ -618,6 +619,9 @@ namespace WixToolset.Data | |||
618 | case SymbolDefinitionType.WixBundlePackageGroup: | 619 | case SymbolDefinitionType.WixBundlePackageGroup: |
619 | return SymbolDefinitions.WixBundlePackageGroup; | 620 | return SymbolDefinitions.WixBundlePackageGroup; |
620 | 621 | ||
622 | case SymbolDefinitionType.WixBundlePackageRelatedBundle: | ||
623 | return SymbolDefinitions.WixBundlePackageRelatedBundle; | ||
624 | |||
621 | case SymbolDefinitionType.WixBundlePatchTargetCode: | 625 | case SymbolDefinitionType.WixBundlePatchTargetCode: |
622 | return SymbolDefinitions.WixBundlePatchTargetCode; | 626 | return SymbolDefinitions.WixBundlePatchTargetCode; |
623 | 627 | ||
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs index 36b9eb67..dcf59e28 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs | |||
@@ -12,6 +12,7 @@ namespace WixToolset.Data | |||
12 | { | 12 | { |
13 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.Attributes), IntermediateFieldType.Number), | 13 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.Attributes), IntermediateFieldType.Number), |
14 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.BundleId), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.BundleId), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.Version), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.InstallCommand), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.InstallCommand), IntermediateFieldType.String), |
16 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.RepairCommand), IntermediateFieldType.String), | 17 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.RepairCommand), IntermediateFieldType.String), |
17 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.UninstallCommand), IntermediateFieldType.String), | 18 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.UninstallCommand), IntermediateFieldType.String), |
@@ -28,6 +29,7 @@ namespace WixToolset.Data.Symbols | |||
28 | { | 29 | { |
29 | Attributes, | 30 | Attributes, |
30 | BundleId, | 31 | BundleId, |
32 | Version, | ||
31 | InstallCommand, | 33 | InstallCommand, |
32 | RepairCommand, | 34 | RepairCommand, |
33 | UninstallCommand, | 35 | UninstallCommand, |
@@ -65,6 +67,12 @@ namespace WixToolset.Data.Symbols | |||
65 | set => this.Set((int)WixBundleBundlePackageSymbolFields.BundleId, value); | 67 | set => this.Set((int)WixBundleBundlePackageSymbolFields.BundleId, value); |
66 | } | 68 | } |
67 | 69 | ||
70 | public string Version | ||
71 | { | ||
72 | get => (string)this.Fields[(int)WixBundleBundlePackageSymbolFields.Version]; | ||
73 | set => this.Set((int)WixBundleBundlePackageSymbolFields.Version, value); | ||
74 | } | ||
75 | |||
68 | public string InstallCommand | 76 | public string InstallCommand |
69 | { | 77 | { |
70 | get => (string)this.Fields[(int)WixBundleBundlePackageSymbolFields.InstallCommand]; | 78 | get => (string)this.Fields[(int)WixBundleBundlePackageSymbolFields.InstallCommand]; |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageRelatedBundleSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageRelatedBundleSymbol.cs new file mode 100644 index 00000000..dfb48714 --- /dev/null +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageRelatedBundleSymbol.cs | |||
@@ -0,0 +1,60 @@ | |||
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 WixToolset.Data | ||
4 | { | ||
5 | using WixToolset.Data.Symbols; | ||
6 | |||
7 | public static partial class SymbolDefinitions | ||
8 | { | ||
9 | public static readonly IntermediateSymbolDefinition WixBundlePackageRelatedBundle = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.WixBundlePackageRelatedBundle, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixBundlePackageRelatedBundleSymbolFields.PackageRef), IntermediateFieldType.String), | ||
14 | new IntermediateFieldDefinition(nameof(WixBundlePackageRelatedBundleSymbolFields.BundleId), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixBundlePackageRelatedBundleSymbolFields.Action), IntermediateFieldType.Number), | ||
16 | }, | ||
17 | typeof(WixBundlePackageRelatedBundleSymbol)); | ||
18 | } | ||
19 | } | ||
20 | |||
21 | namespace WixToolset.Data.Symbols | ||
22 | { | ||
23 | public enum WixBundlePackageRelatedBundleSymbolFields | ||
24 | { | ||
25 | PackageRef, | ||
26 | BundleId, | ||
27 | Action, | ||
28 | } | ||
29 | |||
30 | public class WixBundlePackageRelatedBundleSymbol : IntermediateSymbol | ||
31 | { | ||
32 | public WixBundlePackageRelatedBundleSymbol() : base(SymbolDefinitions.WixBundlePackageRelatedBundle, null, null) | ||
33 | { | ||
34 | } | ||
35 | |||
36 | public WixBundlePackageRelatedBundleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundlePackageRelatedBundle, sourceLineNumber, id) | ||
37 | { | ||
38 | } | ||
39 | |||
40 | public IntermediateField this[WixBundlePackageRelatedBundleSymbolFields index] => this.Fields[(int)index]; | ||
41 | |||
42 | public string PackageRef | ||
43 | { | ||
44 | get => (string)this.Fields[(int)WixBundlePackageRelatedBundleSymbolFields.PackageRef]; | ||
45 | set => this.Set((int)WixBundlePackageRelatedBundleSymbolFields.PackageRef, value); | ||
46 | } | ||
47 | |||
48 | public string BundleId | ||
49 | { | ||
50 | get => (string)this.Fields[(int)WixBundlePackageRelatedBundleSymbolFields.BundleId]; | ||
51 | set => this.Set((int)WixBundlePackageRelatedBundleSymbolFields.BundleId, value); | ||
52 | } | ||
53 | |||
54 | public RelatedBundleActionType Action | ||
55 | { | ||
56 | get => (RelatedBundleActionType)this.Fields[(int)WixBundlePackageRelatedBundleSymbolFields.Action].AsNumber(); | ||
57 | set => this.Set((int)WixBundlePackageRelatedBundleSymbolFields.Action, (int)value); | ||
58 | } | ||
59 | } | ||
60 | } | ||