From 0bee971ca12ea73d0c4e69da4f0836ab62c43e17 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 27 Oct 2020 18:08:31 -0400 Subject: Update project for Package/SummaryInformation change (and many others). --- .../TestData/TypesFile/Package.wxs | 10 +++----- src/wixext/PSCompiler.cs | 28 +++++++++++----------- src/wixext/PSExtensionData.cs | 10 ++++---- src/wixlib/packages.config | 5 ---- src/wixlib/powershell.wixproj | 28 ++-------------------- 5 files changed, 24 insertions(+), 57 deletions(-) delete mode 100644 src/wixlib/packages.config (limited to 'src') diff --git a/src/test/WixToolsetTest.PowerShell/TestData/TypesFile/Package.wxs b/src/test/WixToolsetTest.PowerShell/TestData/TypesFile/Package.wxs index cdc323ec..082ac4cc 100644 --- a/src/test/WixToolsetTest.PowerShell/TestData/TypesFile/Package.wxs +++ b/src/test/WixToolsetTest.PowerShell/TestData/TypesFile/Package.wxs @@ -1,15 +1,11 @@ - - - - - + + - - + 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 using System.Globalization; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Extensibility; /// @@ -176,7 +176,7 @@ namespace WixToolset.PowerShell var major = (2 == requiredPowerShellVersion.Major) ? 1 : requiredPowerShellVersion.Major; var variableId = new Identifier(AccessModifier.Public, String.Format(CultureInfo.InvariantCulture, "{0}_{1}", VarPrefix, id)); - section.AddTuple(new WixVariableTuple(sourceLineNumbers, variableId) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, variableId) { Value = major.ToString(CultureInfo.InvariantCulture), Overridable = false, @@ -185,46 +185,46 @@ namespace WixToolset.PowerShell var registryRoot = RegistryRootType.LocalMachine; // HKLM var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, major, id); - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "ApplicationBase", String.Format(CultureInfo.InvariantCulture, "[${0}]", componentId), componentId, false); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "ApplicationBase", String.Format(CultureInfo.InvariantCulture, "[${0}]", componentId), componentId, false); // set the assembly name automatically when binding. // processorArchitecture is not handled correctly by PowerShell v1.0 // so format the assembly name explicitly. var assemblyName = String.Format(CultureInfo.InvariantCulture, "!(bind.assemblyName.{0}), Version=!(bind.assemblyVersion.{0}), Culture=!(bind.assemblyCulture.{0}), PublicKeyToken=!(bind.assemblyPublicKeyToken.{0})", fileId); - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "AssemblyName", assemblyName, componentId, false); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "AssemblyName", assemblyName, componentId, false); if (null != customSnapInType) { - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "CustomPSSnapInType", customSnapInType, componentId, false); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "CustomPSSnapInType", customSnapInType, componentId, false); } if (null != description) { - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "Description", description, componentId, false); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Description", description, componentId, false); } if (null != descriptionIndirect) { - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "DescriptionIndirect", descriptionIndirect, componentId, false); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "DescriptionIndirect", descriptionIndirect, componentId, false); } - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "ModuleName", String.Format(CultureInfo.InvariantCulture, "[#{0}]", fileId), componentId, false); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "ModuleName", String.Format(CultureInfo.InvariantCulture, "[#{0}]", fileId), componentId, false); - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "PowerShellVersion", requiredPowerShellVersion.ToString(2), componentId, false); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "PowerShellVersion", requiredPowerShellVersion.ToString(2), componentId, false); if (null != vendor) { - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "Vendor", vendor, componentId, false); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Vendor", vendor, componentId, false); } if (null != vendorIndirect) { - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "VendorIndirect", vendorIndirect, componentId, false); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "VendorIndirect", vendorIndirect, componentId, false); } if (null != version) { - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, "Version", version, componentId, false); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, "Version", version, componentId, false); } } @@ -278,8 +278,8 @@ namespace WixToolset.PowerShell var registryRoot = RegistryRootType.LocalMachine; // HKLM var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, String.Format(CultureInfo.InvariantCulture, "!(wix.{0}_{1})", VarPrefix, snapIn), snapIn); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, fileId); - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, valueName, String.Format(CultureInfo.InvariantCulture, "[~][#{0}]", fileId), componentId, false); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, fileId); + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, valueName, String.Format(CultureInfo.InvariantCulture, "[~][#{0}]", fileId), componentId, false); } } } diff --git a/src/wixext/PSExtensionData.cs b/src/wixext/PSExtensionData.cs index d9a2d2e7..66627942 100644 --- a/src/wixext/PSExtensionData.cs +++ b/src/wixext/PSExtensionData.cs @@ -16,15 +16,15 @@ namespace WixToolset.PowerShell /// The default culture. public override string DefaultCulture => "en-US"; - public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) + public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) { - tupleDefinition = null; - return tupleDefinition != null; + return Intermediate.Load(typeof(PSExtensionData).Assembly, "WixToolset.PowerShell.powershell.wixlib", symbolDefinitions); } - public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) + public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) { - return Intermediate.Load(typeof(PSExtensionData).Assembly, "WixToolset.PowerShell.powershell.wixlib", tupleDefinitions); + symbolDefinition = null; + return symbolDefinition != null; } } } diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config deleted file mode 100644 index 1e5a9850..00000000 --- a/src/wixlib/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/wixlib/powershell.wixproj b/src/wixlib/powershell.wixproj index 9506edf7..d841de4f 100644 --- a/src/wixlib/powershell.wixproj +++ b/src/wixlib/powershell.wixproj @@ -1,35 +1,11 @@ - - - - + - {9d4ccdfc-840c-4d4e-a9b0-3d6015480645} - powershell Library true - true - + - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - -- cgit v1.2.3-55-g6feb