diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-04-13 10:13:10 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-04-13 13:13:48 -0500 |
| commit | be43682720cf9c238aa1efba5940b8e2279c5bc4 (patch) | |
| tree | bec1c31030fdd961e5dfd8f0954e6b8d3274bee6 /src/api | |
| parent | 866413ec39c573a50b7ec0753f643918a1939dee (diff) | |
| download | wix-be43682720cf9c238aa1efba5940b8e2279c5bc4.tar.gz wix-be43682720cf9c238aa1efba5940b8e2279c5bc4.tar.bz2 wix-be43682720cf9c238aa1efba5940b8e2279c5bc4.zip | |
Try to improve fields of bundle symbols.
Diffstat (limited to 'src/api')
20 files changed, 709 insertions, 126 deletions
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixApprovedExeForElevationSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixApprovedExeForElevationSymbol.cs index 04c6e712..1813ce5a 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixApprovedExeForElevationSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixApprovedExeForElevationSymbol.cs | |||
| @@ -66,6 +66,20 @@ namespace WixToolset.Data.Symbols | |||
| 66 | set => this.Set((int)WixApprovedExeForElevationSymbolFields.Attributes, (int)value); | 66 | set => this.Set((int)WixApprovedExeForElevationSymbolFields.Attributes, (int)value); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | public bool Win64 => (this.Attributes & WixApprovedExeForElevationAttributes.Win64) == WixApprovedExeForElevationAttributes.Win64; | 69 | public bool Win64 |
| 70 | { | ||
| 71 | get { return this.Attributes.HasFlag(WixApprovedExeForElevationAttributes.Win64); } | ||
| 72 | set | ||
| 73 | { | ||
| 74 | if (value) | ||
| 75 | { | ||
| 76 | this.Attributes |= WixApprovedExeForElevationAttributes.Win64; | ||
| 77 | } | ||
| 78 | else | ||
| 79 | { | ||
| 80 | this.Attributes &= ~WixApprovedExeForElevationAttributes.Win64; | ||
| 81 | } | ||
| 82 | } | ||
| 83 | } | ||
| 70 | } | 84 | } |
| 71 | } | 85 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs index dcf59e28..24e63881 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs | |||
| @@ -40,7 +40,6 @@ namespace WixToolset.Data.Symbols | |||
| 40 | { | 40 | { |
| 41 | None = 0, | 41 | None = 0, |
| 42 | SupportsBurnProtocol = 1, | 42 | SupportsBurnProtocol = 1, |
| 43 | Win64 = 2, | ||
| 44 | } | 43 | } |
| 45 | 44 | ||
| 46 | public class WixBundleBundlePackageSymbol : IntermediateSymbol | 45 | public class WixBundleBundlePackageSymbol : IntermediateSymbol |
| @@ -106,21 +105,5 @@ namespace WixToolset.Data.Symbols | |||
| 106 | } | 105 | } |
| 107 | } | 106 | } |
| 108 | } | 107 | } |
| 109 | |||
| 110 | public bool Win64 | ||
| 111 | { | ||
| 112 | get { return this.Attributes.HasFlag(WixBundleBundlePackageAttributes.Win64); } | ||
| 113 | set | ||
| 114 | { | ||
| 115 | if (value) | ||
| 116 | { | ||
| 117 | this.Attributes |= WixBundleBundlePackageAttributes.Win64; | ||
| 118 | } | ||
| 119 | else | ||
| 120 | { | ||
| 121 | this.Attributes &= ~WixBundleBundlePackageAttributes.Win64; | ||
| 122 | } | ||
| 123 | } | ||
| 124 | } | ||
| 125 | } | 108 | } |
| 126 | } | 109 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleExePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleExePackageSymbol.cs index fc891f13..6cf200c2 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleExePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleExePackageSymbol.cs | |||
| @@ -90,7 +90,21 @@ namespace WixToolset.Data.Symbols | |||
| 90 | set => this.Set((int)WixBundleExePackageSymbolFields.ExeProtocol, value); | 90 | set => this.Set((int)WixBundleExePackageSymbolFields.ExeProtocol, value); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | public bool IsBundle => this.Attributes.HasFlag(WixBundleExePackageAttributes.Bundle); | 93 | public bool IsBundle |
| 94 | { | ||
| 95 | get { return this.Attributes.HasFlag(WixBundleExePackageAttributes.Bundle); } | ||
| 96 | set | ||
| 97 | { | ||
| 98 | if (value) | ||
| 99 | { | ||
| 100 | this.Attributes |= WixBundleExePackageAttributes.Bundle; | ||
| 101 | } | ||
| 102 | else | ||
| 103 | { | ||
| 104 | this.Attributes &= ~WixBundleExePackageAttributes.Bundle; | ||
| 105 | } | ||
| 106 | } | ||
| 107 | } | ||
| 94 | 108 | ||
| 95 | public bool Repairable => this.RepairCommand != null; | 109 | public bool Repairable => this.RepairCommand != null; |
| 96 | 110 | ||
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleMsiFeatureSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleMsiFeatureSymbol.cs index f81da5b8..829e81c0 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleMsiFeatureSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleMsiFeatureSymbol.cs | |||
| @@ -107,6 +107,7 @@ namespace WixToolset.Data.Symbols | |||
| 107 | set => this.Set((int)WixBundleMsiFeatureSymbolFields.Directory, value); | 107 | set => this.Set((int)WixBundleMsiFeatureSymbolFields.Directory, value); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | // Passthrough for Attributes column of Feature table. | ||
| 110 | public int Attributes | 111 | public int Attributes |
| 111 | { | 112 | { |
| 112 | get => (int)this.Fields[(int)WixBundleMsiFeatureSymbolFields.Attributes]; | 113 | get => (int)this.Fields[(int)WixBundleMsiFeatureSymbolFields.Attributes]; |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleMsiPackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleMsiPackageSymbol.cs index 21735f64..74d39c6c 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleMsiPackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleMsiPackageSymbol.cs | |||
| @@ -40,7 +40,8 @@ namespace WixToolset.Data.Symbols | |||
| 40 | [Flags] | 40 | [Flags] |
| 41 | public enum WixBundleMsiPackageAttributes | 41 | public enum WixBundleMsiPackageAttributes |
| 42 | { | 42 | { |
| 43 | EnableFeatureSelection = 0x4, | 43 | None = 0x0, |
| 44 | EnableFeatureSelection = 0x1, | ||
| 44 | ForcePerMachine = 0x2, | 45 | ForcePerMachine = 0x2, |
| 45 | } | 46 | } |
| 46 | 47 | ||
| @@ -98,8 +99,36 @@ namespace WixToolset.Data.Symbols | |||
| 98 | set => this.Set((int)WixBundleMsiPackageSymbolFields.Manufacturer, value); | 99 | set => this.Set((int)WixBundleMsiPackageSymbolFields.Manufacturer, value); |
| 99 | } | 100 | } |
| 100 | 101 | ||
| 101 | public bool EnableFeatureSelection => (this.Attributes & WixBundleMsiPackageAttributes.EnableFeatureSelection) == WixBundleMsiPackageAttributes.EnableFeatureSelection; | 102 | public bool EnableFeatureSelection |
| 103 | { | ||
| 104 | get { return this.Attributes.HasFlag(WixBundleMsiPackageAttributes.EnableFeatureSelection); } | ||
| 105 | set | ||
| 106 | { | ||
| 107 | if (value) | ||
| 108 | { | ||
| 109 | this.Attributes |= WixBundleMsiPackageAttributes.EnableFeatureSelection; | ||
| 110 | } | ||
| 111 | else | ||
| 112 | { | ||
| 113 | this.Attributes &= ~WixBundleMsiPackageAttributes.EnableFeatureSelection; | ||
| 114 | } | ||
| 115 | } | ||
| 116 | } | ||
| 102 | 117 | ||
| 103 | public bool ForcePerMachine => (this.Attributes & WixBundleMsiPackageAttributes.ForcePerMachine) == WixBundleMsiPackageAttributes.ForcePerMachine; | 118 | public bool ForcePerMachine |
| 119 | { | ||
| 120 | get { return this.Attributes.HasFlag(WixBundleMsiPackageAttributes.ForcePerMachine); } | ||
| 121 | set | ||
| 122 | { | ||
| 123 | if (value) | ||
| 124 | { | ||
| 125 | this.Attributes |= WixBundleMsiPackageAttributes.ForcePerMachine; | ||
| 126 | } | ||
| 127 | else | ||
| 128 | { | ||
| 129 | this.Attributes &= ~WixBundleMsiPackageAttributes.ForcePerMachine; | ||
| 130 | } | ||
| 131 | } | ||
| 132 | } | ||
| 104 | } | 133 | } |
| 105 | } \ No newline at end of file | 134 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleMspPackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleMspPackageSymbol.cs index 3784c2ff..46d604a8 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleMspPackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleMspPackageSymbol.cs | |||
| @@ -34,8 +34,8 @@ namespace WixToolset.Data.Symbols | |||
| 34 | [Flags] | 34 | [Flags] |
| 35 | public enum WixBundleMspPackageAttributes | 35 | public enum WixBundleMspPackageAttributes |
| 36 | { | 36 | { |
| 37 | Slipstream = 0x2, | 37 | None = 0x0, |
| 38 | TargetUnspecified = 0x4, | 38 | Slipstream = 0x1, |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | public class WixBundleMspPackageSymbol : IntermediateSymbol | 41 | public class WixBundleMspPackageSymbol : IntermediateSymbol |
| @@ -74,8 +74,20 @@ namespace WixToolset.Data.Symbols | |||
| 74 | set => this.Set((int)WixBundleMspPackageSymbolFields.PatchXml, value); | 74 | set => this.Set((int)WixBundleMspPackageSymbolFields.PatchXml, value); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | public bool Slipstream => (this.Attributes & WixBundleMspPackageAttributes.Slipstream) == WixBundleMspPackageAttributes.Slipstream; | 77 | public bool Slipstream |
| 78 | 78 | { | |
| 79 | public bool TargetUnspecified => (this.Attributes & WixBundleMspPackageAttributes.TargetUnspecified) == WixBundleMspPackageAttributes.TargetUnspecified; | 79 | get { return this.Attributes.HasFlag(WixBundleMspPackageAttributes.Slipstream); } |
| 80 | set | ||
| 81 | { | ||
| 82 | if (value) | ||
| 83 | { | ||
| 84 | this.Attributes |= WixBundleMspPackageAttributes.Slipstream; | ||
| 85 | } | ||
| 86 | else | ||
| 87 | { | ||
| 88 | this.Attributes &= ~WixBundleMspPackageAttributes.Slipstream; | ||
| 89 | } | ||
| 90 | } | ||
| 91 | } | ||
| 80 | } | 92 | } |
| 81 | } \ No newline at end of file | 93 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs index e68a9d09..6afe657e 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs | |||
| @@ -16,8 +16,7 @@ namespace WixToolset.Data | |||
| 16 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.InstallCondition), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.InstallCondition), IntermediateFieldType.String), |
| 17 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Cache), IntermediateFieldType.String), | 17 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Cache), IntermediateFieldType.String), |
| 18 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.CacheId), IntermediateFieldType.String), | 18 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.CacheId), IntermediateFieldType.String), |
| 19 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Vital), IntermediateFieldType.Bool), | 19 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.PerMachine), IntermediateFieldType.Bool), |
| 20 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.PerMachine), IntermediateFieldType.String), | ||
| 21 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.LogPathVariable), IntermediateFieldType.String), | 20 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.LogPathVariable), IntermediateFieldType.String), |
| 22 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.RollbackLogPathVariable), IntermediateFieldType.String), | 21 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.RollbackLogPathVariable), IntermediateFieldType.String), |
| 23 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Size), IntermediateFieldType.LargeNumber), | 22 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Size), IntermediateFieldType.LargeNumber), |
| @@ -28,7 +27,6 @@ namespace WixToolset.Data | |||
| 28 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Description), IntermediateFieldType.String), | 27 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Description), IntermediateFieldType.String), |
| 29 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.RollbackBoundaryRef), IntermediateFieldType.String), | 28 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.RollbackBoundaryRef), IntermediateFieldType.String), |
| 30 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.RollbackBoundaryBackwardRef), IntermediateFieldType.String), | 29 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.RollbackBoundaryBackwardRef), IntermediateFieldType.String), |
| 31 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.Win64), IntermediateFieldType.Bool), | ||
| 32 | }, | 30 | }, |
| 33 | typeof(WixBundlePackageSymbol)); | 31 | typeof(WixBundlePackageSymbol)); |
| 34 | } | 32 | } |
| @@ -46,7 +44,6 @@ namespace WixToolset.Data.Symbols | |||
| 46 | InstallCondition, | 44 | InstallCondition, |
| 47 | Cache, | 45 | Cache, |
| 48 | CacheId, | 46 | CacheId, |
| 49 | Vital, | ||
| 50 | PerMachine, | 47 | PerMachine, |
| 51 | LogPathVariable, | 48 | LogPathVariable, |
| 52 | RollbackLogPathVariable, | 49 | RollbackLogPathVariable, |
| @@ -58,7 +55,6 @@ namespace WixToolset.Data.Symbols | |||
| 58 | Description, | 55 | Description, |
| 59 | RollbackBoundaryRef, | 56 | RollbackBoundaryRef, |
| 60 | RollbackBoundaryBackwardRef, | 57 | RollbackBoundaryBackwardRef, |
| 61 | Win64, | ||
| 62 | } | 58 | } |
| 63 | 59 | ||
| 64 | /// <summary> | 60 | /// <summary> |
| @@ -66,6 +62,7 @@ namespace WixToolset.Data.Symbols | |||
| 66 | /// </summary> | 62 | /// </summary> |
| 67 | public enum WixBundlePackageType | 63 | public enum WixBundlePackageType |
| 68 | { | 64 | { |
| 65 | NotSet = -1, | ||
| 69 | Bundle, | 66 | Bundle, |
| 70 | Exe, | 67 | Exe, |
| 71 | Msi, | 68 | Msi, |
| @@ -76,10 +73,11 @@ namespace WixToolset.Data.Symbols | |||
| 76 | [Flags] | 73 | [Flags] |
| 77 | public enum WixBundlePackageAttributes | 74 | public enum WixBundlePackageAttributes |
| 78 | { | 75 | { |
| 76 | None = 0x0, | ||
| 79 | Permanent = 0x1, | 77 | Permanent = 0x1, |
| 80 | Visible = 0x2, | 78 | Visible = 0x2, |
| 81 | PerMachine = 0x4, | 79 | Win64 = 0x4, |
| 82 | Win64 = 0x8, | 80 | Vital = 0x8, |
| 83 | } | 81 | } |
| 84 | 82 | ||
| 85 | public class WixBundlePackageSymbol : IntermediateSymbol | 83 | public class WixBundlePackageSymbol : IntermediateSymbol |
| @@ -96,7 +94,15 @@ namespace WixToolset.Data.Symbols | |||
| 96 | 94 | ||
| 97 | public WixBundlePackageType Type | 95 | public WixBundlePackageType Type |
| 98 | { | 96 | { |
| 99 | get => (WixBundlePackageType)Enum.Parse(typeof(WixBundlePackageType), (string)this.Fields[(int)WixBundlePackageSymbolFields.Type], true); | 97 | get |
| 98 | { | ||
| 99 | if (Enum.TryParse((string)this.Fields[(int)WixBundlePackageSymbolFields.Type], true, out WixBundlePackageType value)) | ||
| 100 | { | ||
| 101 | return value; | ||
| 102 | } | ||
| 103 | |||
| 104 | return WixBundlePackageType.NotSet; | ||
| 105 | } | ||
| 100 | set => this.Set((int)WixBundlePackageSymbolFields.Type, value.ToString()); | 106 | set => this.Set((int)WixBundlePackageSymbolFields.Type, value.ToString()); |
| 101 | } | 107 | } |
| 102 | 108 | ||
| @@ -130,16 +136,10 @@ namespace WixToolset.Data.Symbols | |||
| 130 | set => this.Set((int)WixBundlePackageSymbolFields.CacheId, value); | 136 | set => this.Set((int)WixBundlePackageSymbolFields.CacheId, value); |
| 131 | } | 137 | } |
| 132 | 138 | ||
| 133 | public bool? Vital | 139 | public bool? PerMachine |
| 134 | { | ||
| 135 | get => (bool?)this.Fields[(int)WixBundlePackageSymbolFields.Vital]; | ||
| 136 | set => this.Set((int)WixBundlePackageSymbolFields.Vital, value); | ||
| 137 | } | ||
| 138 | |||
| 139 | public YesNoDefaultType PerMachine | ||
| 140 | { | 140 | { |
| 141 | get => Enum.TryParse((string)this.Fields[(int)WixBundlePackageSymbolFields.PerMachine], true, out YesNoDefaultType value) ? value : YesNoDefaultType.NotSet; | 141 | get => (bool?)this.Fields[(int)WixBundlePackageSymbolFields.PerMachine]; |
| 142 | set => this.Set((int)WixBundlePackageSymbolFields.PerMachine, value.ToString().ToLowerInvariant()); | 142 | set => this.Set((int)WixBundlePackageSymbolFields.PerMachine, value); |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | public string LogPathVariable | 145 | public string LogPathVariable |
| @@ -202,12 +202,68 @@ namespace WixToolset.Data.Symbols | |||
| 202 | set => this.Set((int)WixBundlePackageSymbolFields.RollbackBoundaryBackwardRef, value); | 202 | set => this.Set((int)WixBundlePackageSymbolFields.RollbackBoundaryBackwardRef, value); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | public bool Permanent | ||
| 206 | { | ||
| 207 | get { return this.Attributes.HasFlag(WixBundlePackageAttributes.Permanent); } | ||
| 208 | set | ||
| 209 | { | ||
| 210 | if (value) | ||
| 211 | { | ||
| 212 | this.Attributes |= WixBundlePackageAttributes.Permanent; | ||
| 213 | } | ||
| 214 | else | ||
| 215 | { | ||
| 216 | this.Attributes &= ~WixBundlePackageAttributes.Permanent; | ||
| 217 | } | ||
| 218 | } | ||
| 219 | } | ||
| 220 | |||
| 221 | public bool Visible | ||
| 222 | { | ||
| 223 | get { return this.Attributes.HasFlag(WixBundlePackageAttributes.Visible); } | ||
| 224 | set | ||
| 225 | { | ||
| 226 | if (value) | ||
| 227 | { | ||
| 228 | this.Attributes |= WixBundlePackageAttributes.Visible; | ||
| 229 | } | ||
| 230 | else | ||
| 231 | { | ||
| 232 | this.Attributes &= ~WixBundlePackageAttributes.Visible; | ||
| 233 | } | ||
| 234 | } | ||
| 235 | } | ||
| 236 | |||
| 205 | public bool Win64 | 237 | public bool Win64 |
| 206 | { | 238 | { |
| 207 | get => (bool)this.Fields[(int)WixBundlePackageSymbolFields.Win64]; | 239 | get { return this.Attributes.HasFlag(WixBundlePackageAttributes.Win64); } |
| 208 | set => this.Set((int)WixBundlePackageSymbolFields.Win64, value); | 240 | set |
| 241 | { | ||
| 242 | if (value) | ||
| 243 | { | ||
| 244 | this.Attributes |= WixBundlePackageAttributes.Win64; | ||
| 245 | } | ||
| 246 | else | ||
| 247 | { | ||
| 248 | this.Attributes &= ~WixBundlePackageAttributes.Win64; | ||
| 249 | } | ||
| 250 | } | ||
| 209 | } | 251 | } |
| 210 | 252 | ||
| 211 | public bool Permanent => (this.Attributes & WixBundlePackageAttributes.Permanent) == WixBundlePackageAttributes.Permanent; | 253 | public bool Vital |
| 254 | { | ||
| 255 | get { return this.Attributes.HasFlag(WixBundlePackageAttributes.Vital); } | ||
| 256 | set | ||
| 257 | { | ||
| 258 | if (value) | ||
| 259 | { | ||
| 260 | this.Attributes |= WixBundlePackageAttributes.Vital; | ||
| 261 | } | ||
| 262 | else | ||
| 263 | { | ||
| 264 | this.Attributes &= ~WixBundlePackageAttributes.Vital; | ||
| 265 | } | ||
| 266 | } | ||
| 267 | } | ||
| 212 | } | 268 | } |
| 213 | } | 269 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundlePatchTargetCodeSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundlePatchTargetCodeSymbol.cs index b1aa9c77..85f50602 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundlePatchTargetCodeSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundlePatchTargetCodeSymbol.cs | |||
| @@ -13,6 +13,7 @@ namespace WixToolset.Data | |||
| 13 | new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.PackageRef), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.PackageRef), IntermediateFieldType.String), |
| 14 | new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.TargetCode), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.TargetCode), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.Attributes), IntermediateFieldType.Number), | 15 | new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.Attributes), IntermediateFieldType.Number), |
| 16 | new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeSymbolFields.Type), IntermediateFieldType.Number), | ||
| 16 | }, | 17 | }, |
| 17 | typeof(WixBundlePatchTargetCodeSymbol)); | 18 | typeof(WixBundlePatchTargetCodeSymbol)); |
| 18 | } | 19 | } |
| @@ -27,22 +28,31 @@ namespace WixToolset.Data.Symbols | |||
| 27 | PackageRef, | 28 | PackageRef, |
| 28 | TargetCode, | 29 | TargetCode, |
| 29 | Attributes, | 30 | Attributes, |
| 31 | Type, | ||
| 30 | } | 32 | } |
| 31 | 33 | ||
| 32 | [Flags] | 34 | [Flags] |
| 33 | public enum WixBundlePatchTargetCodeAttributes : int | 35 | public enum WixBundlePatchTargetCodeAttributes : int |
| 34 | { | 36 | { |
| 35 | None = 0, | 37 | None = 0, |
| 38 | } | ||
| 39 | |||
| 40 | public enum WixBundlePatchTargetCodeType | ||
| 41 | { | ||
| 42 | /// <summary> | ||
| 43 | /// The transform has no specific target. | ||
| 44 | /// </summary> | ||
| 45 | Unspecified, | ||
| 36 | 46 | ||
| 37 | /// <summary> | 47 | /// <summary> |
| 38 | /// The transform targets a specific ProductCode. | 48 | /// The transform targets a specific ProductCode. |
| 39 | /// </summary> | 49 | /// </summary> |
| 40 | TargetsProductCode = 1, | 50 | ProductCode, |
| 41 | 51 | ||
| 42 | /// <summary> | 52 | /// <summary> |
| 43 | /// The transform targets a specific UpgradeCode. | 53 | /// The transform targets a specific UpgradeCode. |
| 44 | /// </summary> | 54 | /// </summary> |
| 45 | TargetsUpgradeCode = 2, | 55 | UpgradeCode, |
| 46 | } | 56 | } |
| 47 | 57 | ||
| 48 | public class WixBundlePatchTargetCodeSymbol : IntermediateSymbol | 58 | public class WixBundlePatchTargetCodeSymbol : IntermediateSymbol |
| @@ -75,8 +85,10 @@ namespace WixToolset.Data.Symbols | |||
| 75 | set => this.Set((int)WixBundlePatchTargetCodeSymbolFields.Attributes, (int)value); | 85 | set => this.Set((int)WixBundlePatchTargetCodeSymbolFields.Attributes, (int)value); |
| 76 | } | 86 | } |
| 77 | 87 | ||
| 78 | public bool TargetsProductCode => (this.Attributes & WixBundlePatchTargetCodeAttributes.TargetsProductCode) == WixBundlePatchTargetCodeAttributes.TargetsProductCode; | 88 | public WixBundlePatchTargetCodeType Type |
| 79 | 89 | { | |
| 80 | public bool TargetsUpgradeCode => (this.Attributes & WixBundlePatchTargetCodeAttributes.TargetsUpgradeCode) == WixBundlePatchTargetCodeAttributes.TargetsUpgradeCode; | 90 | get => (WixBundlePatchTargetCodeType)this.Fields[(int)WixBundlePatchTargetCodeSymbolFields.Type].AsNumber(); |
| 91 | set => this.Set((int)WixBundlePatchTargetCodeSymbolFields.Type, (int)value); | ||
| 92 | } | ||
| 81 | } | 93 | } |
| 82 | } | 94 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundlePayloadSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundlePayloadSymbol.cs index be581fb3..ed2060b3 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundlePayloadSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundlePayloadSymbol.cs | |||
| @@ -10,6 +10,7 @@ namespace WixToolset.Data | |||
| 10 | SymbolDefinitionType.WixBundlePayload, | 10 | SymbolDefinitionType.WixBundlePayload, |
| 11 | new[] | 11 | new[] |
| 12 | { | 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.Attributes), IntermediateFieldType.Number), | ||
| 13 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.Name), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.Name), IntermediateFieldType.String), |
| 14 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.SourceFile), IntermediateFieldType.Path), | 15 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.SourceFile), IntermediateFieldType.Path), |
| 15 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.DownloadUrl), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.DownloadUrl), IntermediateFieldType.String), |
| @@ -21,7 +22,6 @@ namespace WixToolset.Data | |||
| 21 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.Version), IntermediateFieldType.String), | 22 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.Version), IntermediateFieldType.String), |
| 22 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.Hash), IntermediateFieldType.String), | 23 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.Hash), IntermediateFieldType.String), |
| 23 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.ContainerRef), IntermediateFieldType.String), | 24 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.ContainerRef), IntermediateFieldType.String), |
| 24 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.ContentFile), IntermediateFieldType.Bool), | ||
| 25 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.EmbeddedId), IntermediateFieldType.String), | 25 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.EmbeddedId), IntermediateFieldType.String), |
| 26 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.LayoutOnly), IntermediateFieldType.Bool), | 26 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.LayoutOnly), IntermediateFieldType.Bool), |
| 27 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.Packaging), IntermediateFieldType.Number), | 27 | new IntermediateFieldDefinition(nameof(WixBundlePayloadSymbolFields.Packaging), IntermediateFieldType.Number), |
| @@ -39,6 +39,7 @@ namespace WixToolset.Data.Symbols | |||
| 39 | 39 | ||
| 40 | public enum WixBundlePayloadSymbolFields | 40 | public enum WixBundlePayloadSymbolFields |
| 41 | { | 41 | { |
| 42 | Attributes, | ||
| 42 | Name, | 43 | Name, |
| 43 | SourceFile, | 44 | SourceFile, |
| 44 | DownloadUrl, | 45 | DownloadUrl, |
| @@ -50,7 +51,6 @@ namespace WixToolset.Data.Symbols | |||
| 50 | Version, | 51 | Version, |
| 51 | Hash, | 52 | Hash, |
| 52 | ContainerRef, | 53 | ContainerRef, |
| 53 | ContentFile, | ||
| 54 | EmbeddedId, | 54 | EmbeddedId, |
| 55 | LayoutOnly, | 55 | LayoutOnly, |
| 56 | Packaging, | 56 | Packaging, |
| @@ -59,6 +59,13 @@ namespace WixToolset.Data.Symbols | |||
| 59 | CertificateThumbprint, | 59 | CertificateThumbprint, |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | [Flags] | ||
| 63 | public enum WixBundlePayloadAttributes | ||
| 64 | { | ||
| 65 | None = 0x0, | ||
| 66 | ContentFile = 0x1, | ||
| 67 | } | ||
| 68 | |||
| 62 | public class WixBundlePayloadSymbol : IntermediateSymbol | 69 | public class WixBundlePayloadSymbol : IntermediateSymbol |
| 63 | { | 70 | { |
| 64 | public WixBundlePayloadSymbol() : base(SymbolDefinitions.WixBundlePayload, null, null) | 71 | public WixBundlePayloadSymbol() : base(SymbolDefinitions.WixBundlePayload, null, null) |
| @@ -71,6 +78,12 @@ namespace WixToolset.Data.Symbols | |||
| 71 | 78 | ||
| 72 | public IntermediateField this[WixBundlePayloadSymbolFields index] => this.Fields[(int)index]; | 79 | public IntermediateField this[WixBundlePayloadSymbolFields index] => this.Fields[(int)index]; |
| 73 | 80 | ||
| 81 | public WixBundlePayloadAttributes Attributes | ||
| 82 | { | ||
| 83 | get => (WixBundlePayloadAttributes)this.Fields[(int)WixBundlePayloadSymbolFields.Attributes].AsNumber(); | ||
| 84 | set => this.Set((int)WixBundlePayloadSymbolFields.Attributes, (int)value); | ||
| 85 | } | ||
| 86 | |||
| 74 | public string Name | 87 | public string Name |
| 75 | { | 88 | { |
| 76 | get => (string)this.Fields[(int)WixBundlePayloadSymbolFields.Name]; | 89 | get => (string)this.Fields[(int)WixBundlePayloadSymbolFields.Name]; |
| @@ -137,12 +150,6 @@ namespace WixToolset.Data.Symbols | |||
| 137 | set => this.Set((int)WixBundlePayloadSymbolFields.ContainerRef, value); | 150 | set => this.Set((int)WixBundlePayloadSymbolFields.ContainerRef, value); |
| 138 | } | 151 | } |
| 139 | 152 | ||
| 140 | public bool ContentFile | ||
| 141 | { | ||
| 142 | get => (bool)this.Fields[(int)WixBundlePayloadSymbolFields.ContentFile]; | ||
| 143 | set => this.Set((int)WixBundlePayloadSymbolFields.ContentFile, value); | ||
| 144 | } | ||
| 145 | |||
| 146 | public string EmbeddedId | 153 | public string EmbeddedId |
| 147 | { | 154 | { |
| 148 | get => (string)this.Fields[(int)WixBundlePayloadSymbolFields.EmbeddedId]; | 155 | get => (string)this.Fields[(int)WixBundlePayloadSymbolFields.EmbeddedId]; |
| @@ -178,5 +185,21 @@ namespace WixToolset.Data.Symbols | |||
| 178 | get => (string)this.Fields[(int)WixBundlePayloadSymbolFields.CertificateThumbprint]; | 185 | get => (string)this.Fields[(int)WixBundlePayloadSymbolFields.CertificateThumbprint]; |
| 179 | set => this.Set((int)WixBundlePayloadSymbolFields.CertificateThumbprint, value); | 186 | set => this.Set((int)WixBundlePayloadSymbolFields.CertificateThumbprint, value); |
| 180 | } | 187 | } |
| 188 | |||
| 189 | public bool ContentFile | ||
| 190 | { | ||
| 191 | get { return this.Attributes.HasFlag(WixBundlePayloadAttributes.ContentFile); } | ||
| 192 | set | ||
| 193 | { | ||
| 194 | if (value) | ||
| 195 | { | ||
| 196 | this.Attributes |= WixBundlePayloadAttributes.ContentFile; | ||
| 197 | } | ||
| 198 | else | ||
| 199 | { | ||
| 200 | this.Attributes &= ~WixBundlePayloadAttributes.ContentFile; | ||
| 201 | } | ||
| 202 | } | ||
| 203 | } | ||
| 181 | } | 204 | } |
| 182 | } | 205 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleRelatedPackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleRelatedPackageSymbol.cs index 7bd67b7f..77789048 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleRelatedPackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleRelatedPackageSymbol.cs | |||
| @@ -93,12 +93,68 @@ namespace WixToolset.Data.Symbols | |||
| 93 | set => this.Set((int)WixBundleRelatedPackageSymbolFields.Attributes, (int)value); | 93 | set => this.Set((int)WixBundleRelatedPackageSymbolFields.Attributes, (int)value); |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | public bool MinInclusive => (this.Attributes & WixBundleRelatedPackageAttributes.MinInclusive) == WixBundleRelatedPackageAttributes.MinInclusive; | 96 | public bool MinInclusive |
| 97 | { | ||
| 98 | get { return this.Attributes.HasFlag(WixBundleRelatedPackageAttributes.MinInclusive); } | ||
| 99 | set | ||
| 100 | { | ||
| 101 | if (value) | ||
| 102 | { | ||
| 103 | this.Attributes |= WixBundleRelatedPackageAttributes.MinInclusive; | ||
| 104 | } | ||
| 105 | else | ||
| 106 | { | ||
| 107 | this.Attributes &= ~WixBundleRelatedPackageAttributes.MinInclusive; | ||
| 108 | } | ||
| 109 | } | ||
| 110 | } | ||
| 97 | 111 | ||
| 98 | public bool MaxInclusive => (this.Attributes & WixBundleRelatedPackageAttributes.MaxInclusive) == WixBundleRelatedPackageAttributes.MaxInclusive; | 112 | public bool MaxInclusive |
| 113 | { | ||
| 114 | get { return this.Attributes.HasFlag(WixBundleRelatedPackageAttributes.MaxInclusive); } | ||
| 115 | set | ||
| 116 | { | ||
| 117 | if (value) | ||
| 118 | { | ||
| 119 | this.Attributes |= WixBundleRelatedPackageAttributes.MaxInclusive; | ||
| 120 | } | ||
| 121 | else | ||
| 122 | { | ||
| 123 | this.Attributes &= ~WixBundleRelatedPackageAttributes.MaxInclusive; | ||
| 124 | } | ||
| 125 | } | ||
| 126 | } | ||
| 99 | 127 | ||
| 100 | public bool OnlyDetect => (this.Attributes & WixBundleRelatedPackageAttributes.OnlyDetect) == WixBundleRelatedPackageAttributes.OnlyDetect; | 128 | public bool OnlyDetect |
| 129 | { | ||
| 130 | get { return this.Attributes.HasFlag(WixBundleRelatedPackageAttributes.OnlyDetect); } | ||
| 131 | set | ||
| 132 | { | ||
| 133 | if (value) | ||
| 134 | { | ||
| 135 | this.Attributes |= WixBundleRelatedPackageAttributes.OnlyDetect; | ||
| 136 | } | ||
| 137 | else | ||
| 138 | { | ||
| 139 | this.Attributes &= ~WixBundleRelatedPackageAttributes.OnlyDetect; | ||
| 140 | } | ||
| 141 | } | ||
| 142 | } | ||
| 101 | 143 | ||
| 102 | public bool LangInclusive => (this.Attributes & WixBundleRelatedPackageAttributes.LangInclusive) == WixBundleRelatedPackageAttributes.LangInclusive; | 144 | public bool LangInclusive |
| 145 | { | ||
| 146 | get { return this.Attributes.HasFlag(WixBundleRelatedPackageAttributes.LangInclusive); } | ||
| 147 | set | ||
| 148 | { | ||
| 149 | if (value) | ||
| 150 | { | ||
| 151 | this.Attributes |= WixBundleRelatedPackageAttributes.LangInclusive; | ||
| 152 | } | ||
| 153 | else | ||
| 154 | { | ||
| 155 | this.Attributes &= ~WixBundleRelatedPackageAttributes.LangInclusive; | ||
| 156 | } | ||
| 157 | } | ||
| 158 | } | ||
| 103 | } | 159 | } |
| 104 | } | 160 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleRollbackBoundarySymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleRollbackBoundarySymbol.cs index 1f91cef2..a75e388b 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleRollbackBoundarySymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleRollbackBoundarySymbol.cs | |||
| @@ -10,8 +10,7 @@ namespace WixToolset.Data | |||
| 10 | SymbolDefinitionType.WixBundleRollbackBoundary, | 10 | SymbolDefinitionType.WixBundleRollbackBoundary, |
| 11 | new[] | 11 | new[] |
| 12 | { | 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(WixBundleRollbackBoundarySymbolFields.Vital), IntermediateFieldType.Number), | 13 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.Attributes), IntermediateFieldType.Number), |
| 14 | new IntermediateFieldDefinition(nameof(WixBundleRollbackBoundarySymbolFields.Transaction), IntermediateFieldType.Number), | ||
| 15 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.LogPathVariable), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixBundlePackageSymbolFields.LogPathVariable), IntermediateFieldType.String), |
| 16 | }, | 15 | }, |
| 17 | typeof(WixBundleRollbackBoundarySymbol)); | 16 | typeof(WixBundleRollbackBoundarySymbol)); |
| @@ -20,13 +19,22 @@ namespace WixToolset.Data | |||
| 20 | 19 | ||
| 21 | namespace WixToolset.Data.Symbols | 20 | namespace WixToolset.Data.Symbols |
| 22 | { | 21 | { |
| 22 | using System; | ||
| 23 | |||
| 23 | public enum WixBundleRollbackBoundarySymbolFields | 24 | public enum WixBundleRollbackBoundarySymbolFields |
| 24 | { | 25 | { |
| 25 | Vital, | 26 | Attributes, |
| 26 | Transaction, | ||
| 27 | LogPathVariable, | 27 | LogPathVariable, |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | [Flags] | ||
| 31 | public enum WixBundleRollbackBoundaryAttributes | ||
| 32 | { | ||
| 33 | None = 0x0, | ||
| 34 | Vital = 0x1, | ||
| 35 | Transaction = 0x2, | ||
| 36 | } | ||
| 37 | |||
| 30 | public class WixBundleRollbackBoundarySymbol : IntermediateSymbol | 38 | public class WixBundleRollbackBoundarySymbol : IntermediateSymbol |
| 31 | { | 39 | { |
| 32 | public WixBundleRollbackBoundarySymbol() : base(SymbolDefinitions.WixBundleRollbackBoundary, null, null) | 40 | public WixBundleRollbackBoundarySymbol() : base(SymbolDefinitions.WixBundleRollbackBoundary, null, null) |
| @@ -39,16 +47,10 @@ namespace WixToolset.Data.Symbols | |||
| 39 | 47 | ||
| 40 | public IntermediateField this[WixBundleRollbackBoundarySymbolFields index] => this.Fields[(int)index]; | 48 | public IntermediateField this[WixBundleRollbackBoundarySymbolFields index] => this.Fields[(int)index]; |
| 41 | 49 | ||
| 42 | public bool? Vital | 50 | public WixBundleRollbackBoundaryAttributes Attributes |
| 43 | { | 51 | { |
| 44 | get => (bool?)this.Fields[(int)WixBundleRollbackBoundarySymbolFields.Vital]; | 52 | get => (WixBundleRollbackBoundaryAttributes)this.Fields[(int)WixBundleRollbackBoundarySymbolFields.Attributes].AsNumber(); |
| 45 | set => this.Set((int)WixBundleRollbackBoundarySymbolFields.Vital, value); | 53 | set => this.Set((int)WixBundleRollbackBoundarySymbolFields.Attributes, (int)value); |
| 46 | } | ||
| 47 | |||
| 48 | public bool? Transaction | ||
| 49 | { | ||
| 50 | get => (bool?)this.Fields[(int)WixBundleRollbackBoundarySymbolFields.Transaction]; | ||
| 51 | set => this.Set((int)WixBundleRollbackBoundarySymbolFields.Transaction, value); | ||
| 52 | } | 54 | } |
| 53 | 55 | ||
| 54 | public string LogPathVariable | 56 | public string LogPathVariable |
| @@ -56,5 +58,37 @@ namespace WixToolset.Data.Symbols | |||
| 56 | get => (string)this.Fields[(int)WixBundleRollbackBoundarySymbolFields.LogPathVariable]; | 58 | get => (string)this.Fields[(int)WixBundleRollbackBoundarySymbolFields.LogPathVariable]; |
| 57 | set => this.Set((int)WixBundleRollbackBoundarySymbolFields.LogPathVariable, value); | 59 | set => this.Set((int)WixBundleRollbackBoundarySymbolFields.LogPathVariable, value); |
| 58 | } | 60 | } |
| 61 | |||
| 62 | public bool Vital | ||
| 63 | { | ||
| 64 | get { return this.Attributes.HasFlag(WixBundleRollbackBoundaryAttributes.Vital); } | ||
| 65 | set | ||
| 66 | { | ||
| 67 | if (value) | ||
| 68 | { | ||
| 69 | this.Attributes |= WixBundleRollbackBoundaryAttributes.Vital; | ||
| 70 | } | ||
| 71 | else | ||
| 72 | { | ||
| 73 | this.Attributes &= ~WixBundleRollbackBoundaryAttributes.Vital; | ||
| 74 | } | ||
| 75 | } | ||
| 76 | } | ||
| 77 | |||
| 78 | public bool Transaction | ||
| 79 | { | ||
| 80 | get { return this.Attributes.HasFlag(WixBundleRollbackBoundaryAttributes.Transaction); } | ||
| 81 | set | ||
| 82 | { | ||
| 83 | if (value) | ||
| 84 | { | ||
| 85 | this.Attributes |= WixBundleRollbackBoundaryAttributes.Transaction; | ||
| 86 | } | ||
| 87 | else | ||
| 88 | { | ||
| 89 | this.Attributes &= ~WixBundleRollbackBoundaryAttributes.Transaction; | ||
| 90 | } | ||
| 91 | } | ||
| 92 | } | ||
| 59 | } | 93 | } |
| 60 | } \ No newline at end of file | 94 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs index 72192c15..c4db0c21 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleSymbol.cs | |||
| @@ -34,6 +34,7 @@ namespace WixToolset.Data | |||
| 34 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.ProviderKey), IntermediateFieldType.String), | 34 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.ProviderKey), IntermediateFieldType.String), |
| 35 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.InProgressName), IntermediateFieldType.String), | 35 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.InProgressName), IntermediateFieldType.String), |
| 36 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.CommandLineVariables), IntermediateFieldType.String), | 36 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.CommandLineVariables), IntermediateFieldType.String), |
| 37 | new IntermediateFieldDefinition(nameof(WixBundleSymbolFields.DisableModify), IntermediateFieldType.String), | ||
| 37 | }, | 38 | }, |
| 38 | typeof(WixBundleSymbol)); | 39 | typeof(WixBundleSymbol)); |
| 39 | } | 40 | } |
| @@ -69,16 +70,15 @@ namespace WixToolset.Data.Symbols | |||
| 69 | ProviderKey, | 70 | ProviderKey, |
| 70 | InProgressName, | 71 | InProgressName, |
| 71 | CommandLineVariables, | 72 | CommandLineVariables, |
| 73 | DisableModify, | ||
| 72 | } | 74 | } |
| 73 | 75 | ||
| 74 | [Flags] | 76 | [Flags] |
| 75 | public enum WixBundleAttributes | 77 | public enum WixBundleAttributes |
| 76 | { | 78 | { |
| 77 | None = 0x0, | 79 | None = 0x0, |
| 78 | DisableModify = 0x1, | 80 | DisableRemove = 0x1, |
| 79 | DisableRemove = 0x2, | 81 | PerMachine = 0x2, |
| 80 | SingleChangeUninstallButton = 0x4, | ||
| 81 | PerMachine = 0x8, | ||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | public enum WixBundleCommandLineVariables | 84 | public enum WixBundleCommandLineVariables |
| @@ -87,6 +87,13 @@ namespace WixToolset.Data.Symbols | |||
| 87 | CaseSensitive, | 87 | CaseSensitive, |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | public enum WixBundleModifyType | ||
| 91 | { | ||
| 92 | Allowed = 0, | ||
| 93 | Disabled = 1, | ||
| 94 | SingleChangeUninstallButton = 2, | ||
| 95 | } | ||
| 96 | |||
| 90 | public class WixBundleSymbol : IntermediateSymbol | 97 | public class WixBundleSymbol : IntermediateSymbol |
| 91 | { | 98 | { |
| 92 | public WixBundleSymbol() : base(SymbolDefinitions.WixBundle, null, null) | 99 | public WixBundleSymbol() : base(SymbolDefinitions.WixBundle, null, null) |
| @@ -243,14 +250,52 @@ namespace WixToolset.Data.Symbols | |||
| 243 | set => this.Set((int)WixBundleSymbolFields.CommandLineVariables, (int)value); | 250 | set => this.Set((int)WixBundleSymbolFields.CommandLineVariables, (int)value); |
| 244 | } | 251 | } |
| 245 | 252 | ||
| 246 | public PackagingType DefaultPackagingType => (this.Compressed.HasValue && !this.Compressed.Value) ? PackagingType.External : PackagingType.Embedded; | 253 | public WixBundleModifyType DisableModify |
| 247 | 254 | { | |
| 248 | public bool DisableModify => (this.Attributes & WixBundleAttributes.DisableModify) == WixBundleAttributes.DisableModify; | 255 | get |
| 256 | { | ||
| 257 | if (Enum.TryParse((string)this.Fields[(int)WixBundleSymbolFields.DisableModify], true, out WixBundleModifyType value)) | ||
| 258 | { | ||
| 259 | return value; | ||
| 260 | } | ||
| 261 | |||
| 262 | return WixBundleModifyType.Allowed; | ||
| 263 | } | ||
| 264 | set => this.Set((int)WixBundleSymbolFields.DisableModify, value.ToString().ToLowerInvariant()); | ||
| 265 | } | ||
| 249 | 266 | ||
| 250 | public bool DisableRemove => (this.Attributes & WixBundleAttributes.DisableRemove) == WixBundleAttributes.DisableRemove; | 267 | public PackagingType DefaultPackagingType => (this.Compressed.HasValue && !this.Compressed.Value) ? PackagingType.External : PackagingType.Embedded; |
| 251 | 268 | ||
| 252 | public bool PerMachine => (this.Attributes & WixBundleAttributes.PerMachine) == WixBundleAttributes.PerMachine; | 269 | public bool DisableRemove |
| 270 | { | ||
| 271 | get { return this.Attributes.HasFlag(WixBundleAttributes.DisableRemove); } | ||
| 272 | set | ||
| 273 | { | ||
| 274 | if (value) | ||
| 275 | { | ||
| 276 | this.Attributes |= WixBundleAttributes.DisableRemove; | ||
| 277 | } | ||
| 278 | else | ||
| 279 | { | ||
| 280 | this.Attributes &= ~WixBundleAttributes.DisableRemove; | ||
| 281 | } | ||
| 282 | } | ||
| 283 | } | ||
| 253 | 284 | ||
| 254 | public bool SingleChangeUninstallButton => (this.Attributes & WixBundleAttributes.SingleChangeUninstallButton) == WixBundleAttributes.SingleChangeUninstallButton; | 285 | public bool PerMachine |
| 286 | { | ||
| 287 | get { return this.Attributes.HasFlag(WixBundleAttributes.PerMachine); } | ||
| 288 | set | ||
| 289 | { | ||
| 290 | if (value) | ||
| 291 | { | ||
| 292 | this.Attributes |= WixBundleAttributes.PerMachine; | ||
| 293 | } | ||
| 294 | else | ||
| 295 | { | ||
| 296 | this.Attributes &= ~WixBundleAttributes.PerMachine; | ||
| 297 | } | ||
| 298 | } | ||
| 299 | } | ||
| 255 | } | 300 | } |
| 256 | } | 301 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleTagSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleTagSymbol.cs index d550dae0..590484e0 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleTagSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleTagSymbol.cs | |||
| @@ -23,6 +23,8 @@ namespace WixToolset.Data | |||
| 23 | 23 | ||
| 24 | namespace WixToolset.Data.Symbols | 24 | namespace WixToolset.Data.Symbols |
| 25 | { | 25 | { |
| 26 | using System; | ||
| 27 | |||
| 26 | public enum WixBundleTagSymbolFields | 28 | public enum WixBundleTagSymbolFields |
| 27 | { | 29 | { |
| 28 | Filename, | 30 | Filename, |
| @@ -33,6 +35,12 @@ namespace WixToolset.Data.Symbols | |||
| 33 | Xml, | 35 | Xml, |
| 34 | } | 36 | } |
| 35 | 37 | ||
| 38 | [Flags] | ||
| 39 | public enum WixBundleTagAttributes | ||
| 40 | { | ||
| 41 | None = 0x0, | ||
| 42 | } | ||
| 43 | |||
| 36 | public class WixBundleTagSymbol : IntermediateSymbol | 44 | public class WixBundleTagSymbol : IntermediateSymbol |
| 37 | { | 45 | { |
| 38 | public WixBundleTagSymbol() : base(SymbolDefinitions.WixBundleTag, null, null) | 46 | public WixBundleTagSymbol() : base(SymbolDefinitions.WixBundleTag, null, null) |
| @@ -69,10 +77,10 @@ namespace WixToolset.Data.Symbols | |||
| 69 | set => this.Set((int)WixBundleTagSymbolFields.InstallPath, value); | 77 | set => this.Set((int)WixBundleTagSymbolFields.InstallPath, value); |
| 70 | } | 78 | } |
| 71 | 79 | ||
| 72 | public int Attributes | 80 | public WixBundleTagAttributes Attributes |
| 73 | { | 81 | { |
| 74 | get => this.Fields[(int)WixBundleTagSymbolFields.Attributes].AsNumber(); | 82 | get => (WixBundleTagAttributes)this.Fields[(int)WixBundleTagSymbolFields.Attributes].AsNumber(); |
| 75 | set => this.Set((int)WixBundleTagSymbolFields.Attributes, value); | 83 | set => this.Set((int)WixBundleTagSymbolFields.Attributes, (int)value); |
| 76 | } | 84 | } |
| 77 | 85 | ||
| 78 | public string Xml | 86 | public string Xml |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleUpdateSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleUpdateSymbol.cs index d27bbc32..514f9e6c 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleUpdateSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleUpdateSymbol.cs | |||
| @@ -19,12 +19,20 @@ namespace WixToolset.Data | |||
| 19 | 19 | ||
| 20 | namespace WixToolset.Data.Symbols | 20 | namespace WixToolset.Data.Symbols |
| 21 | { | 21 | { |
| 22 | using System; | ||
| 23 | |||
| 22 | public enum WixBundleUpdateSymbolFields | 24 | public enum WixBundleUpdateSymbolFields |
| 23 | { | 25 | { |
| 24 | Location, | 26 | Location, |
| 25 | Attributes, | 27 | Attributes, |
| 26 | } | 28 | } |
| 27 | 29 | ||
| 30 | [Flags] | ||
| 31 | public enum WixBundleUpdateAttributes | ||
| 32 | { | ||
| 33 | None = 0x0, | ||
| 34 | } | ||
| 35 | |||
| 28 | public class WixBundleUpdateSymbol : IntermediateSymbol | 36 | public class WixBundleUpdateSymbol : IntermediateSymbol |
| 29 | { | 37 | { |
| 30 | public WixBundleUpdateSymbol() : base(SymbolDefinitions.WixBundleUpdate, null, null) | 38 | public WixBundleUpdateSymbol() : base(SymbolDefinitions.WixBundleUpdate, null, null) |
| @@ -43,10 +51,10 @@ namespace WixToolset.Data.Symbols | |||
| 43 | set => this.Set((int)WixBundleUpdateSymbolFields.Location, value); | 51 | set => this.Set((int)WixBundleUpdateSymbolFields.Location, value); |
| 44 | } | 52 | } |
| 45 | 53 | ||
| 46 | public int Attributes | 54 | public WixBundleUpdateAttributes Attributes |
| 47 | { | 55 | { |
| 48 | get => (int)this.Fields[(int)WixBundleUpdateSymbolFields.Attributes]; | 56 | get => (WixBundleUpdateAttributes)this.Fields[(int)WixBundleUpdateSymbolFields.Attributes].AsNumber(); |
| 49 | set => this.Set((int)WixBundleUpdateSymbolFields.Attributes, value); | 57 | set => this.Set((int)WixBundleUpdateSymbolFields.Attributes, (int)value); |
| 50 | } | 58 | } |
| 51 | } | 59 | } |
| 52 | } \ No newline at end of file | 60 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleVariableSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleVariableSymbol.cs index d68ac682..b8a1923d 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleVariableSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleVariableSymbol.cs | |||
| @@ -10,10 +10,9 @@ namespace WixToolset.Data | |||
| 10 | SymbolDefinitionType.WixBundleVariable, | 10 | SymbolDefinitionType.WixBundleVariable, |
| 11 | new[] | 11 | new[] |
| 12 | { | 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(WixBundleVariableSymbolFields.Attributes), IntermediateFieldType.Number), | ||
| 13 | new IntermediateFieldDefinition(nameof(WixBundleVariableSymbolFields.Value), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixBundleVariableSymbolFields.Value), IntermediateFieldType.String), |
| 14 | new IntermediateFieldDefinition(nameof(WixBundleVariableSymbolFields.Type), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(WixBundleVariableSymbolFields.Type), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(WixBundleVariableSymbolFields.Hidden), IntermediateFieldType.Bool), | ||
| 16 | new IntermediateFieldDefinition(nameof(WixBundleVariableSymbolFields.Persisted), IntermediateFieldType.Bool), | ||
| 17 | }, | 16 | }, |
| 18 | typeof(WixBundleVariableSymbol)); | 17 | typeof(WixBundleVariableSymbol)); |
| 19 | } | 18 | } |
| @@ -25,10 +24,17 @@ namespace WixToolset.Data.Symbols | |||
| 25 | 24 | ||
| 26 | public enum WixBundleVariableSymbolFields | 25 | public enum WixBundleVariableSymbolFields |
| 27 | { | 26 | { |
| 27 | Attributes, | ||
| 28 | Value, | 28 | Value, |
| 29 | Type, | 29 | Type, |
| 30 | Hidden, | 30 | } |
| 31 | Persisted, | 31 | |
| 32 | [Flags] | ||
| 33 | public enum WixBundleVariableAttributes | ||
| 34 | { | ||
| 35 | None = 0x0, | ||
| 36 | Hidden = 0x1, | ||
| 37 | Persisted = 0x2, | ||
| 32 | } | 38 | } |
| 33 | 39 | ||
| 34 | public enum WixBundleVariableType | 40 | public enum WixBundleVariableType |
| @@ -52,6 +58,12 @@ namespace WixToolset.Data.Symbols | |||
| 52 | 58 | ||
| 53 | public IntermediateField this[WixBundleVariableSymbolFields index] => this.Fields[(int)index]; | 59 | public IntermediateField this[WixBundleVariableSymbolFields index] => this.Fields[(int)index]; |
| 54 | 60 | ||
| 61 | public WixBundleVariableAttributes Attributes | ||
| 62 | { | ||
| 63 | get => (WixBundleVariableAttributes)this.Fields[(int)WixBundleVariableSymbolFields.Attributes].AsNumber(); | ||
| 64 | set => this.Set((int)WixBundleVariableSymbolFields.Attributes, (int)value); | ||
| 65 | } | ||
| 66 | |||
| 55 | public string Value | 67 | public string Value |
| 56 | { | 68 | { |
| 57 | get => (string)this.Fields[(int)WixBundleVariableSymbolFields.Value]; | 69 | get => (string)this.Fields[(int)WixBundleVariableSymbolFields.Value]; |
| @@ -66,14 +78,34 @@ namespace WixToolset.Data.Symbols | |||
| 66 | 78 | ||
| 67 | public bool Hidden | 79 | public bool Hidden |
| 68 | { | 80 | { |
| 69 | get => (bool)this.Fields[(int)WixBundleVariableSymbolFields.Hidden]; | 81 | get { return this.Attributes.HasFlag(WixBundleVariableAttributes.Hidden); } |
| 70 | set => this.Set((int)WixBundleVariableSymbolFields.Hidden, value); | 82 | set |
| 83 | { | ||
| 84 | if (value) | ||
| 85 | { | ||
| 86 | this.Attributes |= WixBundleVariableAttributes.Hidden; | ||
| 87 | } | ||
| 88 | else | ||
| 89 | { | ||
| 90 | this.Attributes &= ~WixBundleVariableAttributes.Hidden; | ||
| 91 | } | ||
| 92 | } | ||
| 71 | } | 93 | } |
| 72 | 94 | ||
| 73 | public bool Persisted | 95 | public bool Persisted |
| 74 | { | 96 | { |
| 75 | get => (bool)this.Fields[(int)WixBundleVariableSymbolFields.Persisted]; | 97 | get { return this.Attributes.HasFlag(WixBundleVariableAttributes.Persisted); } |
| 76 | set => this.Set((int)WixBundleVariableSymbolFields.Persisted, value); | 98 | set |
| 99 | { | ||
| 100 | if (value) | ||
| 101 | { | ||
| 102 | this.Attributes |= WixBundleVariableAttributes.Persisted; | ||
| 103 | } | ||
| 104 | else | ||
| 105 | { | ||
| 106 | this.Attributes &= ~WixBundleVariableAttributes.Persisted; | ||
| 107 | } | ||
| 108 | } | ||
| 77 | } | 109 | } |
| 78 | } | 110 | } |
| 79 | } | 111 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixChainSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixChainSymbol.cs index 8ec5fc63..2ca1d512 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixChainSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixChainSymbol.cs | |||
| @@ -52,10 +52,52 @@ namespace WixToolset.Data.Symbols | |||
| 52 | set => this.Set((int)WixChainSymbolFields.Attributes, (int)value); | 52 | set => this.Set((int)WixChainSymbolFields.Attributes, (int)value); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | public bool DisableRollback => (this.Attributes & WixChainAttributes.DisableRollback) == WixChainAttributes.DisableRollback; | 55 | public bool DisableRollback |
| 56 | { | ||
| 57 | get { return this.Attributes.HasFlag(WixChainAttributes.DisableRollback); } | ||
| 58 | set | ||
| 59 | { | ||
| 60 | if (value) | ||
| 61 | { | ||
| 62 | this.Attributes |= WixChainAttributes.DisableRollback; | ||
| 63 | } | ||
| 64 | else | ||
| 65 | { | ||
| 66 | this.Attributes &= ~WixChainAttributes.DisableRollback; | ||
| 67 | } | ||
| 68 | } | ||
| 69 | } | ||
| 56 | 70 | ||
| 57 | public bool DisableSystemRestore => (this.Attributes & WixChainAttributes.DisableSystemRestore) == WixChainAttributes.DisableSystemRestore; | 71 | public bool DisableSystemRestore |
| 72 | { | ||
| 73 | get { return this.Attributes.HasFlag(WixChainAttributes.DisableSystemRestore); } | ||
| 74 | set | ||
| 75 | { | ||
| 76 | if (value) | ||
| 77 | { | ||
| 78 | this.Attributes |= WixChainAttributes.DisableSystemRestore; | ||
| 79 | } | ||
| 80 | else | ||
| 81 | { | ||
| 82 | this.Attributes &= ~WixChainAttributes.DisableSystemRestore; | ||
| 83 | } | ||
| 84 | } | ||
| 85 | } | ||
| 58 | 86 | ||
| 59 | public bool ParallelCache => (this.Attributes & WixChainAttributes.ParallelCache) == WixChainAttributes.ParallelCache; | 87 | public bool ParallelCache |
| 88 | { | ||
| 89 | get { return this.Attributes.HasFlag(WixChainAttributes.ParallelCache); } | ||
| 90 | set | ||
| 91 | { | ||
| 92 | if (value) | ||
| 93 | { | ||
| 94 | this.Attributes |= WixChainAttributes.ParallelCache; | ||
| 95 | } | ||
| 96 | else | ||
| 97 | { | ||
| 98 | this.Attributes &= ~WixChainAttributes.ParallelCache; | ||
| 99 | } | ||
| 100 | } | ||
| 101 | } | ||
| 60 | } | 102 | } |
| 61 | } | 103 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixComponentSearchSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixComponentSearchSymbol.cs index 63f7179f..1a930c4e 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixComponentSearchSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixComponentSearchSymbol.cs | |||
| @@ -13,6 +13,7 @@ namespace WixToolset.Data | |||
| 13 | new IntermediateFieldDefinition(nameof(WixComponentSearchSymbolFields.Guid), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(WixComponentSearchSymbolFields.Guid), IntermediateFieldType.String), |
| 14 | new IntermediateFieldDefinition(nameof(WixComponentSearchSymbolFields.ProductCode), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixComponentSearchSymbolFields.ProductCode), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(WixComponentSearchSymbolFields.Attributes), IntermediateFieldType.Number), | 15 | new IntermediateFieldDefinition(nameof(WixComponentSearchSymbolFields.Attributes), IntermediateFieldType.Number), |
| 16 | new IntermediateFieldDefinition(nameof(WixComponentSearchSymbolFields.Type), IntermediateFieldType.Number), | ||
| 16 | }, | 17 | }, |
| 17 | typeof(WixComponentSearchSymbol)); | 18 | typeof(WixComponentSearchSymbol)); |
| 18 | } | 19 | } |
| @@ -27,14 +28,20 @@ namespace WixToolset.Data.Symbols | |||
| 27 | Guid, | 28 | Guid, |
| 28 | ProductCode, | 29 | ProductCode, |
| 29 | Attributes, | 30 | Attributes, |
| 31 | Type, | ||
| 30 | } | 32 | } |
| 31 | 33 | ||
| 32 | [Flags] | 34 | [Flags] |
| 33 | public enum WixComponentSearchAttributes | 35 | public enum WixComponentSearchAttributes |
| 34 | { | 36 | { |
| 35 | KeyPath = 0x1, | 37 | None = 0x0, |
| 36 | State = 0x2, | 38 | } |
| 37 | WantDirectory = 0x4, | 39 | |
| 40 | public enum WixComponentSearchType | ||
| 41 | { | ||
| 42 | KeyPath, | ||
| 43 | State, | ||
| 44 | WantDirectory, | ||
| 38 | } | 45 | } |
| 39 | 46 | ||
| 40 | public class WixComponentSearchSymbol : IntermediateSymbol | 47 | public class WixComponentSearchSymbol : IntermediateSymbol |
| @@ -66,5 +73,11 @@ namespace WixToolset.Data.Symbols | |||
| 66 | get => (WixComponentSearchAttributes)this.Fields[(int)WixComponentSearchSymbolFields.Attributes].AsNumber(); | 73 | get => (WixComponentSearchAttributes)this.Fields[(int)WixComponentSearchSymbolFields.Attributes].AsNumber(); |
| 67 | set => this.Set((int)WixComponentSearchSymbolFields.Attributes, (int)value); | 74 | set => this.Set((int)WixComponentSearchSymbolFields.Attributes, (int)value); |
| 68 | } | 75 | } |
| 76 | |||
| 77 | public WixComponentSearchType Type | ||
| 78 | { | ||
| 79 | get => (WixComponentSearchType)this.Fields[(int)WixComponentSearchSymbolFields.Type].AsNumber(); | ||
| 80 | set => this.Set((int)WixComponentSearchSymbolFields.Type, (int)value); | ||
| 81 | } | ||
| 69 | } | 82 | } |
| 70 | } | 83 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixFileSearchSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixFileSearchSymbol.cs index 027605c7..4f8a370e 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixFileSearchSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixFileSearchSymbol.cs | |||
| @@ -19,6 +19,7 @@ namespace WixToolset.Data | |||
| 19 | new IntermediateFieldDefinition(nameof(WixFileSearchSymbolFields.MaxDate), IntermediateFieldType.Number), | 19 | new IntermediateFieldDefinition(nameof(WixFileSearchSymbolFields.MaxDate), IntermediateFieldType.Number), |
| 20 | new IntermediateFieldDefinition(nameof(WixFileSearchSymbolFields.Languages), IntermediateFieldType.String), | 20 | new IntermediateFieldDefinition(nameof(WixFileSearchSymbolFields.Languages), IntermediateFieldType.String), |
| 21 | new IntermediateFieldDefinition(nameof(WixFileSearchSymbolFields.Attributes), IntermediateFieldType.Number), | 21 | new IntermediateFieldDefinition(nameof(WixFileSearchSymbolFields.Attributes), IntermediateFieldType.Number), |
| 22 | new IntermediateFieldDefinition(nameof(WixFileSearchSymbolFields.Type), IntermediateFieldType.Number), | ||
| 22 | }, | 23 | }, |
| 23 | typeof(WixFileSearchSymbol)); | 24 | typeof(WixFileSearchSymbol)); |
| 24 | } | 25 | } |
| @@ -39,21 +40,27 @@ namespace WixToolset.Data.Symbols | |||
| 39 | MaxDate, | 40 | MaxDate, |
| 40 | Languages, | 41 | Languages, |
| 41 | Attributes, | 42 | Attributes, |
| 43 | Type, | ||
| 42 | } | 44 | } |
| 43 | 45 | ||
| 44 | [Flags] | 46 | [Flags] |
| 45 | public enum WixFileSearchAttributes | 47 | public enum WixFileSearchAttributes |
| 46 | { | 48 | { |
| 47 | Default = 0x001, | 49 | None = 0x000, |
| 50 | IsDirectory = 0x001, | ||
| 48 | MinVersionInclusive = 0x002, | 51 | MinVersionInclusive = 0x002, |
| 49 | MaxVersionInclusive = 0x004, | 52 | MaxVersionInclusive = 0x004, |
| 50 | MinSizeInclusive = 0x008, | 53 | MinSizeInclusive = 0x008, |
| 51 | MaxSizeInclusive = 0x010, | 54 | MaxSizeInclusive = 0x010, |
| 52 | MinDateInclusive = 0x020, | 55 | MinDateInclusive = 0x020, |
| 53 | MaxDateInclusive = 0x040, | 56 | MaxDateInclusive = 0x040, |
| 54 | WantVersion = 0x080, | 57 | } |
| 55 | WantExists = 0x100, | 58 | |
| 56 | IsDirectory = 0x200, | 59 | public enum WixFileSearchType |
| 60 | { | ||
| 61 | Path, | ||
| 62 | Version, | ||
| 63 | Exists, | ||
| 57 | } | 64 | } |
| 58 | 65 | ||
| 59 | public class WixFileSearchSymbol : IntermediateSymbol | 66 | public class WixFileSearchSymbol : IntermediateSymbol |
| @@ -121,5 +128,123 @@ namespace WixToolset.Data.Symbols | |||
| 121 | get => (WixFileSearchAttributes)this.Fields[(int)WixFileSearchSymbolFields.Attributes].AsNumber(); | 128 | get => (WixFileSearchAttributes)this.Fields[(int)WixFileSearchSymbolFields.Attributes].AsNumber(); |
| 122 | set => this.Set((int)WixFileSearchSymbolFields.Attributes, (int)value); | 129 | set => this.Set((int)WixFileSearchSymbolFields.Attributes, (int)value); |
| 123 | } | 130 | } |
| 131 | |||
| 132 | public WixFileSearchType Type | ||
| 133 | { | ||
| 134 | get => (WixFileSearchType)this.Fields[(int)WixFileSearchSymbolFields.Type].AsNumber(); | ||
| 135 | set => this.Set((int)WixFileSearchSymbolFields.Type, (int)value); | ||
| 136 | } | ||
| 137 | |||
| 138 | public bool IsDirectory | ||
| 139 | { | ||
| 140 | get { return this.Attributes.HasFlag(WixFileSearchAttributes.IsDirectory); } | ||
| 141 | set | ||
| 142 | { | ||
| 143 | if (value) | ||
| 144 | { | ||
| 145 | this.Attributes |= WixFileSearchAttributes.IsDirectory; | ||
| 146 | } | ||
| 147 | else | ||
| 148 | { | ||
| 149 | this.Attributes &= ~WixFileSearchAttributes.IsDirectory; | ||
| 150 | } | ||
| 151 | } | ||
| 152 | } | ||
| 153 | |||
| 154 | public bool MinVersionInclusive | ||
| 155 | { | ||
| 156 | get { return this.Attributes.HasFlag(WixFileSearchAttributes.MinVersionInclusive); } | ||
| 157 | set | ||
| 158 | { | ||
| 159 | if (value) | ||
| 160 | { | ||
| 161 | this.Attributes |= WixFileSearchAttributes.MinVersionInclusive; | ||
| 162 | } | ||
| 163 | else | ||
| 164 | { | ||
| 165 | this.Attributes &= ~WixFileSearchAttributes.MinVersionInclusive; | ||
| 166 | } | ||
| 167 | } | ||
| 168 | } | ||
| 169 | |||
| 170 | public bool MaxVersionInclusive | ||
| 171 | { | ||
| 172 | get { return this.Attributes.HasFlag(WixFileSearchAttributes.MaxVersionInclusive); } | ||
| 173 | set | ||
| 174 | { | ||
| 175 | if (value) | ||
| 176 | { | ||
| 177 | this.Attributes |= WixFileSearchAttributes.MaxVersionInclusive; | ||
| 178 | } | ||
| 179 | else | ||
| 180 | { | ||
| 181 | this.Attributes &= ~WixFileSearchAttributes.MaxVersionInclusive; | ||
| 182 | } | ||
| 183 | } | ||
| 184 | } | ||
| 185 | |||
| 186 | public bool MinSizeInclusive | ||
| 187 | { | ||
| 188 | get { return this.Attributes.HasFlag(WixFileSearchAttributes.MinSizeInclusive); } | ||
| 189 | set | ||
| 190 | { | ||
| 191 | if (value) | ||
| 192 | { | ||
| 193 | this.Attributes |= WixFileSearchAttributes.MinSizeInclusive; | ||
| 194 | } | ||
| 195 | else | ||
| 196 | { | ||
| 197 | this.Attributes &= ~WixFileSearchAttributes.MinSizeInclusive; | ||
| 198 | } | ||
| 199 | } | ||
| 200 | } | ||
| 201 | |||
| 202 | public bool MaxSizeInclusive | ||
| 203 | { | ||
| 204 | get { return this.Attributes.HasFlag(WixFileSearchAttributes.MaxSizeInclusive); } | ||
| 205 | set | ||
| 206 | { | ||
| 207 | if (value) | ||
| 208 | { | ||
| 209 | this.Attributes |= WixFileSearchAttributes.MaxSizeInclusive; | ||
| 210 | } | ||
| 211 | else | ||
| 212 | { | ||
| 213 | this.Attributes &= ~WixFileSearchAttributes.MaxSizeInclusive; | ||
| 214 | } | ||
| 215 | } | ||
| 216 | } | ||
| 217 | |||
| 218 | public bool MinDateInclusive | ||
| 219 | { | ||
| 220 | get { return this.Attributes.HasFlag(WixFileSearchAttributes.MinDateInclusive); } | ||
| 221 | set | ||
| 222 | { | ||
| 223 | if (value) | ||
| 224 | { | ||
| 225 | this.Attributes |= WixFileSearchAttributes.MinDateInclusive; | ||
| 226 | } | ||
| 227 | else | ||
| 228 | { | ||
| 229 | this.Attributes &= ~WixFileSearchAttributes.MinDateInclusive; | ||
| 230 | } | ||
| 231 | } | ||
| 232 | } | ||
| 233 | |||
| 234 | public bool MaxDateInclusive | ||
| 235 | { | ||
| 236 | get { return this.Attributes.HasFlag(WixFileSearchAttributes.MaxDateInclusive); } | ||
| 237 | set | ||
| 238 | { | ||
| 239 | if (value) | ||
| 240 | { | ||
| 241 | this.Attributes |= WixFileSearchAttributes.MaxDateInclusive; | ||
| 242 | } | ||
| 243 | else | ||
| 244 | { | ||
| 245 | this.Attributes &= ~WixFileSearchAttributes.MaxDateInclusive; | ||
| 246 | } | ||
| 247 | } | ||
| 248 | } | ||
| 124 | } | 249 | } |
| 125 | } | 250 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixProductSearchSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixProductSearchSymbol.cs index f8a17b64..99360da5 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixProductSearchSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixProductSearchSymbol.cs | |||
| @@ -12,6 +12,7 @@ namespace WixToolset.Data | |||
| 12 | { | 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(WixProductSearchSymbolFields.Guid), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(WixProductSearchSymbolFields.Guid), IntermediateFieldType.String), |
| 14 | new IntermediateFieldDefinition(nameof(WixProductSearchSymbolFields.Attributes), IntermediateFieldType.Number), | 14 | new IntermediateFieldDefinition(nameof(WixProductSearchSymbolFields.Attributes), IntermediateFieldType.Number), |
| 15 | new IntermediateFieldDefinition(nameof(WixProductSearchSymbolFields.Type), IntermediateFieldType.Number), | ||
| 15 | }, | 16 | }, |
| 16 | typeof(WixProductSearchSymbol)); | 17 | typeof(WixProductSearchSymbol)); |
| 17 | } | 18 | } |
| @@ -25,16 +26,26 @@ namespace WixToolset.Data.Symbols | |||
| 25 | { | 26 | { |
| 26 | Guid, | 27 | Guid, |
| 27 | Attributes, | 28 | Attributes, |
| 29 | Type, | ||
| 28 | } | 30 | } |
| 29 | 31 | ||
| 30 | [Flags] | 32 | [Flags] |
| 31 | public enum WixProductSearchAttributes | 33 | public enum WixProductSearchAttributes |
| 32 | { | 34 | { |
| 33 | Version = 0x1, | 35 | None = 0x0, |
| 34 | Language = 0x2, | 36 | |
| 35 | State = 0x4, | 37 | /// <summary> |
| 36 | Assignment = 0x8, | 38 | /// Guid contains the UpgradeCode. If not set, it contains the ProductCode. |
| 37 | UpgradeCode = 0x10, | 39 | /// </summary> |
| 40 | UpgradeCode = 0x1, | ||
| 41 | } | ||
| 42 | |||
| 43 | public enum WixProductSearchType | ||
| 44 | { | ||
| 45 | Version, | ||
| 46 | Language, | ||
| 47 | State, | ||
| 48 | Assignment, | ||
| 38 | } | 49 | } |
| 39 | 50 | ||
| 40 | public class WixProductSearchSymbol : IntermediateSymbol | 51 | public class WixProductSearchSymbol : IntermediateSymbol |
| @@ -60,5 +71,27 @@ namespace WixToolset.Data.Symbols | |||
| 60 | get => (WixProductSearchAttributes)this.Fields[(int)WixProductSearchSymbolFields.Attributes].AsNumber(); | 71 | get => (WixProductSearchAttributes)this.Fields[(int)WixProductSearchSymbolFields.Attributes].AsNumber(); |
| 61 | set => this.Set((int)WixProductSearchSymbolFields.Attributes, (int)value); | 72 | set => this.Set((int)WixProductSearchSymbolFields.Attributes, (int)value); |
| 62 | } | 73 | } |
| 74 | |||
| 75 | public WixProductSearchType Type | ||
| 76 | { | ||
| 77 | get => (WixProductSearchType)this.Fields[(int)WixProductSearchSymbolFields.Type].AsNumber(); | ||
| 78 | set => this.Set((int)WixProductSearchSymbolFields.Type, (int)value); | ||
| 79 | } | ||
| 80 | |||
| 81 | public bool IsUpgradeCode | ||
| 82 | { | ||
| 83 | get { return this.Attributes.HasFlag(WixProductSearchAttributes.UpgradeCode); } | ||
| 84 | set | ||
| 85 | { | ||
| 86 | if (value) | ||
| 87 | { | ||
| 88 | this.Attributes |= WixProductSearchAttributes.UpgradeCode; | ||
| 89 | } | ||
| 90 | else | ||
| 91 | { | ||
| 92 | this.Attributes &= ~WixProductSearchAttributes.UpgradeCode; | ||
| 93 | } | ||
| 94 | } | ||
| 95 | } | ||
| 63 | } | 96 | } |
| 64 | } | 97 | } |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixRegistrySearchSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixRegistrySearchSymbol.cs index dffa8410..f1da962b 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixRegistrySearchSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixRegistrySearchSymbol.cs | |||
| @@ -14,6 +14,7 @@ namespace WixToolset.Data | |||
| 14 | new IntermediateFieldDefinition(nameof(WixRegistrySearchSymbolFields.Key), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixRegistrySearchSymbolFields.Key), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(WixRegistrySearchSymbolFields.Value), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(WixRegistrySearchSymbolFields.Value), IntermediateFieldType.String), |
| 16 | new IntermediateFieldDefinition(nameof(WixRegistrySearchSymbolFields.Attributes), IntermediateFieldType.Number), | 16 | new IntermediateFieldDefinition(nameof(WixRegistrySearchSymbolFields.Attributes), IntermediateFieldType.Number), |
| 17 | new IntermediateFieldDefinition(nameof(WixRegistrySearchSymbolFields.Type), IntermediateFieldType.Number), | ||
| 17 | }, | 18 | }, |
| 18 | typeof(WixRegistrySearchSymbol)); | 19 | typeof(WixRegistrySearchSymbol)); |
| 19 | } | 20 | } |
| @@ -29,17 +30,21 @@ namespace WixToolset.Data.Symbols | |||
| 29 | Key, | 30 | Key, |
| 30 | Value, | 31 | Value, |
| 31 | Attributes, | 32 | Attributes, |
| 33 | Type, | ||
| 32 | } | 34 | } |
| 33 | 35 | ||
| 34 | [Flags] | 36 | [Flags] |
| 35 | public enum WixRegistrySearchAttributes | 37 | public enum WixRegistrySearchAttributes |
| 36 | { | 38 | { |
| 37 | Raw = 0x01, | 39 | None = 0x0, |
| 38 | Compatible = 0x02, | 40 | ExpandEnvironmentVariables = 0x01, |
| 39 | ExpandEnvironmentVariables = 0x04, | 41 | Win64 = 0x2, |
| 40 | WantValue = 0x08, | 42 | } |
| 41 | WantExists = 0x10, | 43 | |
| 42 | Win64 = 0x20, | 44 | public enum WixRegistrySearchType |
| 45 | { | ||
| 46 | Value, | ||
| 47 | Exists, | ||
| 43 | } | 48 | } |
| 44 | 49 | ||
| 45 | public class WixRegistrySearchSymbol : IntermediateSymbol | 50 | public class WixRegistrySearchSymbol : IntermediateSymbol |
| @@ -77,5 +82,43 @@ namespace WixToolset.Data.Symbols | |||
| 77 | get => (WixRegistrySearchAttributes)this.Fields[(int)WixRegistrySearchSymbolFields.Attributes].AsNumber(); | 82 | get => (WixRegistrySearchAttributes)this.Fields[(int)WixRegistrySearchSymbolFields.Attributes].AsNumber(); |
| 78 | set => this.Set((int)WixRegistrySearchSymbolFields.Attributes, (int)value); | 83 | set => this.Set((int)WixRegistrySearchSymbolFields.Attributes, (int)value); |
| 79 | } | 84 | } |
| 85 | |||
| 86 | public WixRegistrySearchType Type | ||
| 87 | { | ||
| 88 | get => (WixRegistrySearchType)this.Fields[(int)WixRegistrySearchSymbolFields.Type].AsNumber(); | ||
| 89 | set => this.Set((int)WixRegistrySearchSymbolFields.Type, (int)value); | ||
| 90 | } | ||
| 91 | |||
| 92 | public bool ExpandEnvironmentVariables | ||
| 93 | { | ||
| 94 | get { return this.Attributes.HasFlag(WixRegistrySearchAttributes.ExpandEnvironmentVariables); } | ||
| 95 | set | ||
| 96 | { | ||
| 97 | if (value) | ||
| 98 | { | ||
| 99 | this.Attributes |= WixRegistrySearchAttributes.ExpandEnvironmentVariables; | ||
| 100 | } | ||
| 101 | else | ||
| 102 | { | ||
| 103 | this.Attributes &= ~WixRegistrySearchAttributes.ExpandEnvironmentVariables; | ||
| 104 | } | ||
| 105 | } | ||
| 106 | } | ||
| 107 | |||
| 108 | public bool Win64 | ||
| 109 | { | ||
| 110 | get { return this.Attributes.HasFlag(WixRegistrySearchAttributes.Win64); } | ||
| 111 | set | ||
| 112 | { | ||
| 113 | if (value) | ||
| 114 | { | ||
| 115 | this.Attributes |= WixRegistrySearchAttributes.Win64; | ||
| 116 | } | ||
| 117 | else | ||
| 118 | { | ||
| 119 | this.Attributes &= ~WixRegistrySearchAttributes.Win64; | ||
| 120 | } | ||
| 121 | } | ||
| 122 | } | ||
| 80 | } | 123 | } |
| 81 | } | 124 | } |
