diff options
author | Bob Arnson <bob@firegiant.com> | 2020-10-27 18:08:31 -0400 |
---|---|---|
committer | Bob Arnson <bob@firegiant.com> | 2020-10-27 18:10:36 -0400 |
commit | 0bee971ca12ea73d0c4e69da4f0836ab62c43e17 (patch) | |
tree | a176c269737a4984a0e1ec834a1c76e286496011 | |
parent | 7f4b7ee0038faf7099450d89a0ab7b1ef29e3f15 (diff) | |
download | wix-0bee971ca12ea73d0c4e69da4f0836ab62c43e17.tar.gz wix-0bee971ca12ea73d0c4e69da4f0836ab62c43e17.tar.bz2 wix-0bee971ca12ea73d0c4e69da4f0836ab62c43e17.zip |
Update project for Package/SummaryInformation change (and many others).
-rw-r--r-- | PowerShell.wixext.sln | 4 | ||||
-rw-r--r-- | global.json | 5 | ||||
-rw-r--r-- | src/test/WixToolsetTest.PowerShell/TestData/TypesFile/Package.wxs | 10 | ||||
-rw-r--r-- | src/wixext/PSCompiler.cs | 28 | ||||
-rw-r--r-- | src/wixext/PSExtensionData.cs | 10 | ||||
-rw-r--r-- | src/wixlib/packages.config | 5 | ||||
-rw-r--r-- | src/wixlib/powershell.wixproj | 28 |
7 files changed, 31 insertions, 59 deletions
diff --git a/PowerShell.wixext.sln b/PowerShell.wixext.sln index 24be219a..a036d47e 100644 --- a/PowerShell.wixext.sln +++ b/PowerShell.wixext.sln | |||
@@ -1,7 +1,7 @@ | |||
1 | | 1 | |
2 | Microsoft Visual Studio Solution File, Format Version 12.00 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 |
3 | # Visual Studio 15 | 3 | # Visual Studio Version 16 |
4 | VisualStudioVersion = 15.0.27130.2003 | 4 | VisualStudioVersion = 16.0.30611.23 |
5 | MinimumVisualStudioVersion = 15.0.26124.0 | 5 | MinimumVisualStudioVersion = 15.0.26124.0 |
6 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "powershell", "src\wixlib\powershell.wixproj", "{9D4CCDFC-840C-4D4E-A9B0-3D6015480645}" | 6 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "powershell", "src\wixlib\powershell.wixproj", "{9D4CCDFC-840C-4D4E-A9B0-3D6015480645}" |
7 | EndProject | 7 | EndProject |
diff --git a/global.json b/global.json new file mode 100644 index 00000000..f94ab6df --- /dev/null +++ b/global.json | |||
@@ -0,0 +1,5 @@ | |||
1 | { | ||
2 | "msbuild-sdks": { | ||
3 | "WixToolset.Sdk": "4.0.0-build-0162" | ||
4 | } | ||
5 | } | ||
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 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 2 | <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> |
3 | <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
4 | <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" /> | ||
5 | |||
6 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> | 3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> |
7 | <MediaTemplate /> | ||
8 | 4 | ||
9 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | 5 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> |
10 | <ComponentGroupRef Id="ProductComponents" /> | 6 | <ComponentGroupRef Id="ProductComponents" /> |
11 | </Feature> | 7 | </Feature> |
12 | </Product> | 8 | </Package> |
13 | 9 | ||
14 | <Fragment> | 10 | <Fragment> |
15 | <Directory Id="TARGETDIR" Name="SourceDir"> | 11 | <Directory Id="TARGETDIR" Name="SourceDir"> |
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 | } |
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 | |||
16 | /// <value>The default culture.</value> | 16 | /// <value>The default culture.</value> |
17 | public override string DefaultCulture => "en-US"; | 17 | public override string DefaultCulture => "en-US"; |
18 | 18 | ||
19 | public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) | 19 | public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) |
20 | { | 20 | { |
21 | tupleDefinition = null; | 21 | return Intermediate.Load(typeof(PSExtensionData).Assembly, "WixToolset.PowerShell.powershell.wixlib", symbolDefinitions); |
22 | return tupleDefinition != null; | ||
23 | } | 22 | } |
24 | 23 | ||
25 | public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) | 24 | public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) |
26 | { | 25 | { |
27 | return Intermediate.Load(typeof(PSExtensionData).Assembly, "WixToolset.PowerShell.powershell.wixlib", tupleDefinitions); | 26 | symbolDefinition = null; |
27 | return symbolDefinition != null; | ||
28 | } | 28 | } |
29 | } | 29 | } |
30 | } | 30 | } |
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 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <packages> | ||
3 | <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" /> | ||
4 | <package id="WixToolset.MSBuild" version="4.0.0-build-0086" developmentDependency="true" targetFramework="net40" /> | ||
5 | </packages> \ 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 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | <Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0"> | 2 | <Project Sdk="WixToolset.Sdk"> |
4 | <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0086\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0086\build\WixToolset.MSBuild.props')" /> | ||
5 | <Import Project="..\FindLocalWix.props" /> | ||
6 | <PropertyGroup> | 3 | <PropertyGroup> |
7 | <ProjectGuid>{9d4ccdfc-840c-4d4e-a9b0-3d6015480645}</ProjectGuid> | ||
8 | <OutputName>powershell</OutputName> | ||
9 | <OutputType>Library</OutputType> | 4 | <OutputType>Library</OutputType> |
10 | <BindFiles>true</BindFiles> | 5 | <BindFiles>true</BindFiles> |
11 | <Pedantic>true</Pedantic> | ||
12 | </PropertyGroup> | 6 | </PropertyGroup> |
13 | 7 | ||
14 | <ItemGroup> | 8 | <ItemGroup> |
15 | <Compile Include="PSExtension.wxs" /> | 9 | <PackageReference Include="Nerdbank.GitVersioning" Version="3.1.91" PrivateAssets="All" /> |
16 | </ItemGroup> | 10 | </ItemGroup> |
17 | |||
18 | <ItemGroup> | ||
19 | <None Include="packages.config" /> | ||
20 | </ItemGroup> | ||
21 | |||
22 | <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " /> | ||
23 | <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " /> | ||
24 | <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> | ||
25 | <Error Text="WiX Toolset build tools (v4.0 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." /> | ||
26 | </Target> | ||
27 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
28 | <PropertyGroup> | ||
29 | <ErrorText>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}.</ErrorText> | ||
30 | </PropertyGroup> | ||
31 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> | ||
32 | <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0086\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0086\build\WixToolset.MSBuild.props'))" /> | ||
33 | </Target> | ||
34 | <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" /> | ||
35 | </Project> | 11 | </Project> |