diff options
Diffstat (limited to 'src/wixext/PSCompiler.cs')
| -rw-r--r-- | src/wixext/PSCompiler.cs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/wixext/PSCompiler.cs b/src/wixext/PSCompiler.cs index 2a384231..3b09897a 100644 --- a/src/wixext/PSCompiler.cs +++ b/src/wixext/PSCompiler.cs | |||
| @@ -7,7 +7,7 @@ namespace WixToolset.PowerShell | |||
| 7 | using System.Globalization; | 7 | using System.Globalization; |
| 8 | using System.Xml.Linq; | 8 | using System.Xml.Linq; |
| 9 | using WixToolset.Data; | 9 | using WixToolset.Data; |
| 10 | using WixToolset.Data.Tuples; | 10 | using WixToolset.Data.Symbols; |
| 11 | using WixToolset.Extensibility; | 11 | using WixToolset.Extensibility; |
| 12 | 12 | ||
| 13 | /// <summary> | 13 | /// <summary> |
| @@ -176,7 +176,7 @@ namespace WixToolset.PowerShell | |||
| 176 | var major = (2 == requiredPowerShellVersion.Major) ? 1 : requiredPowerShellVersion.Major; | 176 | var major = (2 == requiredPowerShellVersion.Major) ? 1 : requiredPowerShellVersion.Major; |
| 177 | 177 | ||
| 178 | var variableId = new Identifier(AccessModifier.Public, String.Format(CultureInfo.InvariantCulture, "{0}_{1}", VarPrefix, id)); | 178 | var variableId = new Identifier(AccessModifier.Public, String.Format(CultureInfo.InvariantCulture, "{0}_{1}", VarPrefix, id)); |
| 179 | section.AddTuple(new WixVariableTuple(sourceLineNumbers, variableId) | 179 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, variableId) |
| 180 | { | 180 | { |
| 181 | Value = major.ToString(CultureInfo.InvariantCulture), | 181 | Value = major.ToString(CultureInfo.InvariantCulture), |
| 182 | Overridable = false, | 182 | Overridable = false, |
| @@ -185,46 +185,46 @@ namespace WixToolset.PowerShell | |||
| 185 | var registryRoot = RegistryRootType.LocalMachine; // HKLM | 185 | var registryRoot = RegistryRootType.LocalMachine; // HKLM |
| 186 | var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, major, id); | 186 | var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, major, id); |
| 187 | 187 | ||
| 188 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "ApplicationBase", String.Format(CultureInfo.InvariantCulture, "[${0}]", componentId), componentId, false); | 188 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "ApplicationBase", String.Format(CultureInfo.InvariantCulture, "[${0}]", componentId), componentId, false); |
| 189 | 189 | ||
| 190 | // set the assembly name automatically when binding. | 190 | // set the assembly name automatically when binding. |
| 191 | // processorArchitecture is not handled correctly by PowerShell v1.0 | 191 | // processorArchitecture is not handled correctly by PowerShell v1.0 |
| 192 | // so format the assembly name explicitly. | 192 | // so format the assembly name explicitly. |
| 193 | var assemblyName = String.Format(CultureInfo.InvariantCulture, "!(bind.assemblyName.{0}), Version=!(bind.assemblyVersion.{0}), Culture=!(bind.assemblyCulture.{0}), PublicKeyToken=!(bind.assemblyPublicKeyToken.{0})", fileId); | 193 | var assemblyName = String.Format(CultureInfo.InvariantCulture, "!(bind.assemblyName.{0}), Version=!(bind.assemblyVersion.{0}), Culture=!(bind.assemblyCulture.{0}), PublicKeyToken=!(bind.assemblyPublicKeyToken.{0})", fileId); |
| 194 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "AssemblyName", assemblyName, componentId, false); | 194 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "AssemblyName", assemblyName, componentId, false); |
| 195 | 195 | ||
| 196 | if (null != customSnapInType) | 196 | if (null != customSnapInType) |
| 197 | { | 197 | { |
| 198 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "CustomPSSnapInType", customSnapInType, componentId, false); | 198 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "CustomPSSnapInType", customSnapInType, componentId, false); |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | if (null != description) | 201 | if (null != description) |
| 202 | { | 202 | { |
| 203 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "Description", description, componentId, false); | 203 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Description", description, componentId, false); |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | if (null != descriptionIndirect) | 206 | if (null != descriptionIndirect) |
| 207 | { | 207 | { |
| 208 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "DescriptionIndirect", descriptionIndirect, componentId, false); | 208 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "DescriptionIndirect", descriptionIndirect, componentId, false); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "ModuleName", String.Format(CultureInfo.InvariantCulture, "[#{0}]", fileId), componentId, false); | 211 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "ModuleName", String.Format(CultureInfo.InvariantCulture, "[#{0}]", fileId), componentId, false); |
| 212 | 212 | ||
| 213 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "PowerShellVersion", requiredPowerShellVersion.ToString(2), componentId, false); | 213 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "PowerShellVersion", requiredPowerShellVersion.ToString(2), componentId, false); |
| 214 | 214 | ||
| 215 | if (null != vendor) | 215 | if (null != vendor) |
| 216 | { | 216 | { |
| 217 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "Vendor", vendor, componentId, false); | 217 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Vendor", vendor, componentId, false); |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | if (null != vendorIndirect) | 220 | if (null != vendorIndirect) |
| 221 | { | 221 | { |
| 222 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "VendorIndirect", vendorIndirect, componentId, false); | 222 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "VendorIndirect", vendorIndirect, componentId, false); |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | if (null != version) | 225 | if (null != version) |
| 226 | { | 226 | { |
| 227 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "Version", version, componentId, false); | 227 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Version", version, componentId, false); |
| 228 | } | 228 | } |
| 229 | } | 229 | } |
| 230 | 230 | ||
| @@ -278,8 +278,8 @@ namespace WixToolset.PowerShell | |||
| 278 | var registryRoot = RegistryRootType.LocalMachine; // HKLM | 278 | var registryRoot = RegistryRootType.LocalMachine; // HKLM |
| 279 | var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, String.Format(CultureInfo.InvariantCulture, "!(wix.{0}_{1})", VarPrefix, snapIn), snapIn); | 279 | var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, String.Format(CultureInfo.InvariantCulture, "!(wix.{0}_{1})", VarPrefix, snapIn), snapIn); |
| 280 | 280 | ||
| 281 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, fileId); | 281 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, fileId); |
| 282 | this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, valueName, String.Format(CultureInfo.InvariantCulture, "[~][#{0}]", fileId), componentId, false); | 282 | this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, valueName, String.Format(CultureInfo.InvariantCulture, "[~][#{0}]", fileId), componentId, false); |
| 283 | } | 283 | } |
| 284 | } | 284 | } |
| 285 | } | 285 | } |
