diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-05-13 20:46:08 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-05-19 12:15:13 -0500 |
commit | 2c085b3aa89150fff9a0ea6df2cde0ce56e3066d (patch) | |
tree | d5c1cfb9e6fa1cc1270c813d28a6ca3ee4f84b0b /src/api/burn/WixToolset.Mba.Core | |
parent | f88ffc7f5c1710b5e106d7e6aea7f1e32fb15dfe (diff) | |
download | wix-2c085b3aa89150fff9a0ea6df2cde0ce56e3066d.tar.gz wix-2c085b3aa89150fff9a0ea6df2cde0ce56e3066d.tar.bz2 wix-2c085b3aa89150fff9a0ea6df2cde0ce56e3066d.zip |
Add InProgressDisplayName for bundles.
#6296
Diffstat (limited to 'src/api/burn/WixToolset.Mba.Core')
3 files changed, 57 insertions, 35 deletions
diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs index 072d3ef0..d7dbf04c 100644 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
@@ -1490,12 +1490,13 @@ namespace WixToolset.Mba.Core | |||
1490 | return args.HResult; | 1490 | return args.HResult; |
1491 | } | 1491 | } |
1492 | 1492 | ||
1493 | int IBootstrapperApplication.OnRegisterBegin(ref bool fCancel) | 1493 | int IBootstrapperApplication.OnRegisterBegin(RegistrationType recommendedRegistrationType, ref bool fCancel, ref RegistrationType registrationType) |
1494 | { | 1494 | { |
1495 | RegisterBeginEventArgs args = new RegisterBeginEventArgs(fCancel); | 1495 | RegisterBeginEventArgs args = new RegisterBeginEventArgs(recommendedRegistrationType, fCancel, registrationType); |
1496 | this.OnRegisterBegin(args); | 1496 | this.OnRegisterBegin(args); |
1497 | 1497 | ||
1498 | fCancel = args.Cancel; | 1498 | fCancel = args.Cancel; |
1499 | registrationType = args.RegistrationType; | ||
1499 | return args.HResult; | 1500 | return args.HResult; |
1500 | } | 1501 | } |
1501 | 1502 | ||
@@ -1679,12 +1680,12 @@ namespace WixToolset.Mba.Core | |||
1679 | return args.HResult; | 1680 | return args.HResult; |
1680 | } | 1681 | } |
1681 | 1682 | ||
1682 | int IBootstrapperApplication.OnUnregisterBegin(bool fKeepRegistration, ref bool fForceKeepRegistration) | 1683 | int IBootstrapperApplication.OnUnregisterBegin(RegistrationType recommendedRegistrationType, ref RegistrationType registrationType) |
1683 | { | 1684 | { |
1684 | UnregisterBeginEventArgs args = new UnregisterBeginEventArgs(fKeepRegistration, fForceKeepRegistration); | 1685 | UnregisterBeginEventArgs args = new UnregisterBeginEventArgs(recommendedRegistrationType, registrationType); |
1685 | this.OnUnregisterBegin(args); | 1686 | this.OnUnregisterBegin(args); |
1686 | 1687 | ||
1687 | fForceKeepRegistration = args.ForceKeepRegistration; | 1688 | registrationType = args.RegistrationType; |
1688 | return args.HResult; | 1689 | return args.HResult; |
1689 | } | 1690 | } |
1690 | 1691 | ||
diff --git a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs index 8ef8af14..00d90c83 100644 --- a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs +++ b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs | |||
@@ -1184,22 +1184,31 @@ namespace WixToolset.Mba.Core | |||
1184 | public class RegisterBeginEventArgs : CancellableHResultEventArgs | 1184 | public class RegisterBeginEventArgs : CancellableHResultEventArgs |
1185 | { | 1185 | { |
1186 | /// <summary /> | 1186 | /// <summary /> |
1187 | public RegisterBeginEventArgs(bool cancelRecommendation) | 1187 | public RegisterBeginEventArgs(RegistrationType recommendedRegistrationType, bool cancelRecommendation, RegistrationType registrationType) |
1188 | : base(cancelRecommendation) | 1188 | : base(cancelRecommendation) |
1189 | { | 1189 | { |
1190 | this.RecommendedRegistrationType = recommendedRegistrationType; | ||
1191 | this.RegistrationType = registrationType; | ||
1190 | } | 1192 | } |
1193 | |||
1194 | /// <summary> | ||
1195 | /// Gets the recommended registration type. | ||
1196 | /// </summary> | ||
1197 | public RegistrationType RecommendedRegistrationType { get; private set; } | ||
1198 | |||
1199 | /// <summary> | ||
1200 | /// Gets or sets the registration type. | ||
1201 | /// </summary> | ||
1202 | public RegistrationType RegistrationType { get; set; } | ||
1191 | } | 1203 | } |
1192 | 1204 | ||
1193 | /// <summary> | 1205 | /// <summary> |
1194 | /// Additional arguments used when the engine has completed registering the location and visilibity of the bundle. | 1206 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.RegisterComplete"/>. |
1195 | /// </summary> | 1207 | /// </summary> |
1196 | [Serializable] | 1208 | [Serializable] |
1197 | public class RegisterCompleteEventArgs : StatusEventArgs | 1209 | public class RegisterCompleteEventArgs : StatusEventArgs |
1198 | { | 1210 | { |
1199 | /// <summary> | 1211 | /// <summary /> |
1200 | /// Creates a new instance of the <see cref="RegisterCompleteEventArgs"/> class. | ||
1201 | /// </summary> | ||
1202 | /// <param name="hrStatus">The return code of the operation.</param> | ||
1203 | public RegisterCompleteEventArgs(int hrStatus) | 1212 | public RegisterCompleteEventArgs(int hrStatus) |
1204 | : base(hrStatus) | 1213 | : base(hrStatus) |
1205 | { | 1214 | { |
@@ -1212,26 +1221,22 @@ namespace WixToolset.Mba.Core | |||
1212 | [Serializable] | 1221 | [Serializable] |
1213 | public class UnregisterBeginEventArgs : HResultEventArgs | 1222 | public class UnregisterBeginEventArgs : HResultEventArgs |
1214 | { | 1223 | { |
1215 | /// <summary> | 1224 | /// <summary /> |
1216 | /// | 1225 | public UnregisterBeginEventArgs(RegistrationType recommendedRegistrationType, RegistrationType registrationType) |
1217 | /// </summary> | ||
1218 | /// <param name="keepRegistration"></param> | ||
1219 | /// <param name="forceKeepRegistration"></param> | ||
1220 | public UnregisterBeginEventArgs(bool keepRegistration, bool forceKeepRegistration) | ||
1221 | { | 1226 | { |
1222 | this.KeepRegistration = keepRegistration; | 1227 | this.RecommendedRegistrationType = recommendedRegistrationType; |
1223 | this.ForceKeepRegistration = forceKeepRegistration; | 1228 | this.RegistrationType = registrationType; |
1224 | } | 1229 | } |
1225 | 1230 | ||
1226 | /// <summary> | 1231 | /// <summary> |
1227 | /// Indicates whether the engine will uninstall the bundle. | 1232 | /// Gets the recommended registration type. |
1228 | /// </summary> | 1233 | /// </summary> |
1229 | public bool ForceKeepRegistration { get; set; } | 1234 | public RegistrationType RecommendedRegistrationType { get; private set; } |
1230 | 1235 | ||
1231 | /// <summary> | 1236 | /// <summary> |
1232 | /// If <see cref="KeepRegistration"/> is FALSE, then this can be set to TRUE to make the engine keep the bundle installed. | 1237 | /// Gets or sets the registration type. |
1233 | /// </summary> | 1238 | /// </summary> |
1234 | public bool KeepRegistration { get; private set; } | 1239 | public RegistrationType RegistrationType { get; set; } |
1235 | } | 1240 | } |
1236 | 1241 | ||
1237 | /// <summary> | 1242 | /// <summary> |
@@ -1240,10 +1245,7 @@ namespace WixToolset.Mba.Core | |||
1240 | [Serializable] | 1245 | [Serializable] |
1241 | public class UnregisterCompleteEventArgs : StatusEventArgs | 1246 | public class UnregisterCompleteEventArgs : StatusEventArgs |
1242 | { | 1247 | { |
1243 | /// <summary> | 1248 | /// <summary /> |
1244 | /// | ||
1245 | /// </summary> | ||
1246 | /// <param name="hrStatus"></param> | ||
1247 | public UnregisterCompleteEventArgs(int hrStatus) | 1249 | public UnregisterCompleteEventArgs(int hrStatus) |
1248 | : base(hrStatus) | 1250 | : base(hrStatus) |
1249 | { | 1251 | { |
diff --git a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs index 530fb1a9..e6e03906 100644 --- a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs | |||
@@ -500,12 +500,12 @@ namespace WixToolset.Mba.Core | |||
500 | /// <summary> | 500 | /// <summary> |
501 | /// See <see cref="IDefaultBootstrapperApplication.RegisterBegin"/>. | 501 | /// See <see cref="IDefaultBootstrapperApplication.RegisterBegin"/>. |
502 | /// </summary> | 502 | /// </summary> |
503 | /// <param name="fCancel"></param> | ||
504 | /// <returns></returns> | ||
505 | [PreserveSig] | 503 | [PreserveSig] |
506 | [return: MarshalAs(UnmanagedType.I4)] | 504 | [return: MarshalAs(UnmanagedType.I4)] |
507 | int OnRegisterBegin( | 505 | int OnRegisterBegin( |
508 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | 506 | [MarshalAs(UnmanagedType.I4)] RegistrationType recommendedRegistrationType, |
507 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, | ||
508 | [MarshalAs(UnmanagedType.I4)] ref RegistrationType pRegistrationType | ||
509 | ); | 509 | ); |
510 | 510 | ||
511 | /// <summary> | 511 | /// <summary> |
@@ -820,14 +820,11 @@ namespace WixToolset.Mba.Core | |||
820 | /// <summary> | 820 | /// <summary> |
821 | /// See <see cref="IDefaultBootstrapperApplication.UnregisterBegin"/>. | 821 | /// See <see cref="IDefaultBootstrapperApplication.UnregisterBegin"/>. |
822 | /// </summary> | 822 | /// </summary> |
823 | /// <param name="fKeepRegistration"></param> | ||
824 | /// <param name="fForceKeepRegistration"></param> | ||
825 | /// <returns></returns> | ||
826 | [PreserveSig] | 823 | [PreserveSig] |
827 | [return: MarshalAs(UnmanagedType.I4)] | 824 | [return: MarshalAs(UnmanagedType.I4)] |
828 | int OnUnregisterBegin( | 825 | int OnUnregisterBegin( |
829 | [MarshalAs(UnmanagedType.Bool)] bool fKeepRegistration, | 826 | [MarshalAs(UnmanagedType.I4)] RegistrationType recommendedRegistrationType, |
830 | [MarshalAs(UnmanagedType.Bool)] ref bool fForceKeepRegistration | 827 | [MarshalAs(UnmanagedType.I4)] ref RegistrationType pRegistrationType |
831 | ); | 828 | ); |
832 | 829 | ||
833 | /// <summary> | 830 | /// <summary> |
@@ -1260,6 +1257,28 @@ namespace WixToolset.Mba.Core | |||
1260 | } | 1257 | } |
1261 | 1258 | ||
1262 | /// <summary> | 1259 | /// <summary> |
1260 | /// The display name to use when registering in Add/Remove Programs. | ||
1261 | /// </summary> | ||
1262 | public enum RegistrationType | ||
1263 | { | ||
1264 | /// <summary> | ||
1265 | /// No registration. | ||
1266 | /// The engine will ignore None if it recommended InProgress or Full. | ||
1267 | /// </summary> | ||
1268 | None, | ||
1269 | |||
1270 | /// <summary> | ||
1271 | /// The in-progress display name. | ||
1272 | /// </summary> | ||
1273 | InProgress, | ||
1274 | |||
1275 | /// <summary> | ||
1276 | /// The default display name. | ||
1277 | /// </summary> | ||
1278 | Full, | ||
1279 | } | ||
1280 | |||
1281 | /// <summary> | ||
1263 | /// Result codes (based on Dialog Box Command IDs from WinUser.h). | 1282 | /// Result codes (based on Dialog Box Command IDs from WinUser.h). |
1264 | /// </summary> | 1283 | /// </summary> |
1265 | public enum Result | 1284 | public enum Result |