@joebigelow / wix-1 / commits / 0bee971c

Update project for Package/SummaryInformation change (and many others).

Bob Arnson committed Oct 27, 2020 at 18:08 UTC 0bee971ca12ea73d0c4e69da4f0836ab62c43e17
7 files changed +31 -59
PowerShell.wixext.sln
+2 -2
@@ -1,7 +1,7 @@
1 
2 Microsoft Visual Studio Solution File, Format Version 12.00
3 -# Visual Studio 15
4 -VisualStudioVersion = 15.0.27130.2003
3 +# Visual Studio Version 16
4 +VisualStudioVersion = 16.0.30611.23
5 MinimumVisualStudioVersion = 15.0.26124.0
6 Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "powershell", "src\wixlib\powershell.wixproj", "{9D4CCDFC-840C-4D4E-A9B0-3D6015480645}"
7 EndProject
global.json new
+5
@@ -0,0 +1,5 @@
1 +{
2 + "msbuild-sdks": {
3 + "WixToolset.Sdk": "4.0.0-build-0162"
4 + }
5 +}
src/test/WixToolsetTest.PowerShell/TestData/TypesFile/Package.wxs
+3 -7
@@ -1,15 +1,11 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
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 -
1 +<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 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7 - <MediaTemplate />
4
5 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
6 <ComponentGroupRef Id="ProductComponents" />
7 </Feature>
12 - </Product>
8 + </Package>
9
10 <Fragment>
11 <Directory Id="TARGETDIR" Name="SourceDir">
src/wixext/PSCompiler.cs
+14 -14
@@ -7,7 +7,7 @@ namespace WixToolset.PowerShell
7 using System.Globalization;
8 using System.Xml.Linq;
9 using WixToolset.Data;
10 - using WixToolset.Data.Tuples;
10 + using WixToolset.Data.Symbols;
11 using WixToolset.Extensibility;
12
13 /// <summary>
@@ -176,7 +176,7 @@ namespace WixToolset.PowerShell
176 var major = (2 == requiredPowerShellVersion.Major) ? 1 : requiredPowerShellVersion.Major;
177
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 {
181 Value = major.ToString(CultureInfo.InvariantCulture),
182 Overridable = false,
@@ -185,46 +185,46 @@ namespace WixToolset.PowerShell
185 var registryRoot = RegistryRootType.LocalMachine; // HKLM
186 var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, major, id);
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
190 // set the assembly name automatically when binding.
191 // processorArchitecture is not handled correctly by PowerShell v1.0
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);
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
196 if (null != customSnapInType)
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 }
200
201 if (null != description)
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 }
205
206 if (null != descriptionIndirect)
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 }
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
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
215 if (null != vendor)
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 }
219
220 if (null != vendorIndirect)
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 }
224
225 if (null != version)
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 }
229 }
230
@@ -278,8 +278,8 @@ namespace WixToolset.PowerShell
278 var registryRoot = RegistryRootType.LocalMachine; // HKLM
279 var registryKey = String.Format(CultureInfo.InvariantCulture, KeyFormat, String.Format(CultureInfo.InvariantCulture, "!(wix.{0}_{1})", VarPrefix, snapIn), snapIn);
280
281 - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, fileId);
282 - this.ParseHelper.CreateRegistryTuple(section, sourceLineNumbers, registryRoot, registryKey, valueName, String.Format(CultureInfo.InvariantCulture, "[~][#{0}]", fileId), componentId, false);
281 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, fileId);
282 + this.ParseHelper.CreateRegistrySymbol(section, sourceLineNumbers, registryRoot, registryKey, valueName, String.Format(CultureInfo.InvariantCulture, "[~][#{0}]", fileId), componentId, false);
283 }
284 }
285 }
src/wixext/PSExtensionData.cs
+5 -5
@@ -16,15 +16,15 @@ namespace WixToolset.PowerShell
16 /// <value>The default culture.</value>
17 public override string DefaultCulture => "en-US";
18
19 - public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
19 + public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions)
20 {
21 - tupleDefinition = null;
22 - return tupleDefinition != null;
21 + return Intermediate.Load(typeof(PSExtensionData).Assembly, "WixToolset.PowerShell.powershell.wixlib", symbolDefinitions);
22 }
23
25 - public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
24 + public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition)
25 {
27 - return Intermediate.Load(typeof(PSExtensionData).Assembly, "WixToolset.PowerShell.powershell.wixlib", tupleDefinitions);
26 + symbolDefinition = null;
27 + return symbolDefinition != null;
28 }
29 }
30 }
src/wixlib/packages.config deleted
-5
@@ -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
src/wixlib/powershell.wixproj
+2 -26
@@ -1,35 +1,11 @@
1 -<?xml version="1.0" encoding="utf-8" ?>
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">
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" />
2 +<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup>
7 - <ProjectGuid>{9d4ccdfc-840c-4d4e-a9b0-3d6015480645}</ProjectGuid>
8 - <OutputName>powershell</OutputName>
4 <OutputType>Library</OutputType>
5 <BindFiles>true</BindFiles>
11 - <Pedantic>true</Pedantic>
6 </PropertyGroup>
7
8 <ItemGroup>
15 - <Compile Include="PSExtension.wxs" />
9 + <PackageReference Include="Nerdbank.GitVersioning" Version="3.1.91" PrivateAssets="All" />
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')" />
11 </Project>