diff options
author | Bob Arnson <bob@firegiant.com> | 2022-01-30 17:02:13 -0500 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2022-01-30 17:50:26 -0500 |
commit | bfe5ab76b5ecc1a21078534e6fba90d12cfd3c00 (patch) | |
tree | d05102b0868f2b375d7692c5a47cd0b541d31524 | |
parent | 7ce477c6863c74ef0a50d117d8c28b2f19971b42 (diff) | |
download | wix-bfe5ab76b5ecc1a21078534e6fba90d12cfd3c00.tar.gz wix-bfe5ab76b5ecc1a21078534e6fba90d12cfd3c00.tar.bz2 wix-bfe5ab76b5ecc1a21078534e6fba90d12cfd3c00.zip |
Add platform-specific CAs and compiler extension.
https://github.com/wixtoolset/issues/issues/5933
16 files changed, 195 insertions, 140 deletions
diff --git a/src/ext/DirectX/ca/directx.def b/src/ext/DirectX/ca/directx.def index 8f46f9a8..48ca4d24 100644 --- a/src/ext/DirectX/ca/directx.def +++ b/src/ext/DirectX/ca/directx.def | |||
@@ -1,7 +1,7 @@ | |||
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. | 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. |
2 | 2 | ||
3 | 3 | ||
4 | LIBRARY "directxca" | 4 | LIBRARY "dxca" |
5 | 5 | ||
6 | EXPORTS | 6 | EXPORTS |
7 | WixQueryDirectXCaps | 7 | WixQueryDirectXCaps |
diff --git a/src/ext/DirectX/ca/directxca.vcxproj b/src/ext/DirectX/ca/directxca.vcxproj index e2baa46a..54837271 100644 --- a/src/ext/DirectX/ca/directxca.vcxproj +++ b/src/ext/DirectX/ca/directxca.vcxproj | |||
@@ -33,7 +33,7 @@ | |||
33 | <ProjectGuid>{76542B28-0FFD-47D3-AD6A-D0F20FA875AC}</ProjectGuid> | 33 | <ProjectGuid>{76542B28-0FFD-47D3-AD6A-D0F20FA875AC}</ProjectGuid> |
34 | <ConfigurationType>DynamicLibrary</ConfigurationType> | 34 | <ConfigurationType>DynamicLibrary</ConfigurationType> |
35 | <CharacterSet>Unicode</CharacterSet> | 35 | <CharacterSet>Unicode</CharacterSet> |
36 | <TargetName>directxca</TargetName> | 36 | <TargetName>dxca</TargetName> |
37 | <ProjectModuleDefinitionFile>directx.def</ProjectModuleDefinitionFile> | 37 | <ProjectModuleDefinitionFile>directx.def</ProjectModuleDefinitionFile> |
38 | <Description>WiX Toolset DirectX CustomAction</Description> | 38 | <Description>WiX Toolset DirectX CustomAction</Description> |
39 | </PropertyGroup> | 39 | </PropertyGroup> |
diff --git a/src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs b/src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs index ae8bbbf0..f936cdfe 100644 --- a/src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs +++ b/src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs | |||
@@ -16,10 +16,11 @@ namespace WixToolsetTest.DirectX | |||
16 | var folder = TestData.Get(@"TestData\UsingPixelShaderVersion"); | 16 | var folder = TestData.Get(@"TestData\UsingPixelShaderVersion"); |
17 | var build = new Builder(folder, typeof(DirectXExtensionFactory), new[] { folder }); | 17 | var build = new Builder(folder, typeof(DirectXExtensionFactory), new[] { folder }); |
18 | 18 | ||
19 | var results = build.BuildAndQuery(Build, "CustomAction"); | 19 | var results = build.BuildAndQuery(Build, "CustomAction", "Binary"); |
20 | WixAssert.CompareLineByLine(new[] | 20 | WixAssert.CompareLineByLine(new[] |
21 | { | 21 | { |
22 | "CustomAction:WixQueryDirectXCaps\t65\tDirectXCA\tWixQueryDirectXCaps\t", | 22 | "Binary:Wix4DXCA_X86\t[Binary data]", |
23 | "CustomAction:Wix4QueryDirectXCaps_X86\t65\tWix4DXCA_X86\tWixQueryDirectXCaps\t", | ||
23 | }, results); | 24 | }, results); |
24 | } | 25 | } |
25 | 26 | ||
diff --git a/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs index bd31e81f..411893bc 100644 --- a/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs +++ b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs | |||
@@ -1,5 +1,5 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 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" InstallerVersion="200"> | 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)" /> | 3 | <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> |
4 | 4 | ||
5 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> | 5 | <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)"> |
diff --git a/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs index f3a2ae92..de1288b3 100644 --- a/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs +++ b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs | |||
@@ -1,7 +1,8 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:directx="http://wixtoolset.org/schemas/v4/wxs/directx"> |
3 | <Fragment> | 3 | <Fragment> |
4 | <PropertyRef Id="WIX_DIRECTX_PIXELSHADERVERSION" /> | 4 | <directx:GetCapabilities /> |
5 | |||
5 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | 6 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> |
6 | <Component> | 7 | <Component> |
7 | <File Source="example.txt" /> | 8 | <File Source="example.txt" /> |
diff --git a/src/ext/DirectX/wixext/DirectXCompiler.cs b/src/ext/DirectX/wixext/DirectXCompiler.cs new file mode 100644 index 00000000..968683bd --- /dev/null +++ b/src/ext/DirectX/wixext/DirectXCompiler.cs | |||
@@ -0,0 +1,70 @@ | |||
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. | ||
2 | |||
3 | namespace WixToolset.DirectX | ||
4 | { | ||
5 | using System; | ||
6 | using System.Collections.Generic; | ||
7 | using System.Xml.Linq; | ||
8 | using WixToolset.Data; | ||
9 | using WixToolset.Extensibility; | ||
10 | using WixToolset.Extensibility.Data; | ||
11 | |||
12 | /// <summary> | ||
13 | /// The compiler for the WiX Toolset DirectX Extension. | ||
14 | /// </summary> | ||
15 | public sealed class DirectXCompiler : BaseCompilerExtension | ||
16 | { | ||
17 | public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/directx"; | ||
18 | |||
19 | /// <summary> | ||
20 | /// Processes an element for the Compiler. | ||
21 | /// </summary> | ||
22 | /// <param name="parentElement">Parent element of element to process.</param> | ||
23 | /// <param name="element">Element to process.</param> | ||
24 | /// <param name="context">Extra information about the context in which this element is being parsed.</param> | ||
25 | public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | ||
26 | { | ||
27 | switch (parentElement.Name.LocalName) | ||
28 | { | ||
29 | case "Fragment": | ||
30 | case "Module": | ||
31 | case "Package": | ||
32 | case "UI": | ||
33 | this.AddCustomActionReference(intermediate, section, element, parentElement); | ||
34 | break; | ||
35 | default: | ||
36 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
37 | break; | ||
38 | } | ||
39 | } | ||
40 | |||
41 | private void AddCustomActionReference(Intermediate intermediate, IntermediateSection section, XElement element, XElement parentElement) | ||
42 | { | ||
43 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | ||
44 | |||
45 | switch (element.Name.LocalName) | ||
46 | { | ||
47 | case "GetCapabilities": | ||
48 | this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "Wix4QueryDirectXCaps", this.Context.Platform, CustomActionPlatforms.X86 | CustomActionPlatforms.X64 | CustomActionPlatforms.ARM64); | ||
49 | break; | ||
50 | default: | ||
51 | this.ParseHelper.UnexpectedElement(parentElement, element); | ||
52 | break; | ||
53 | } | ||
54 | |||
55 | foreach (var attrib in element.Attributes()) | ||
56 | { | ||
57 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
58 | { | ||
59 | // no attributes today | ||
60 | } | ||
61 | else | ||
62 | { | ||
63 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | ||
68 | } | ||
69 | } | ||
70 | } | ||
diff --git a/src/ext/DirectX/wixext/DirectXExtensionFactory.cs b/src/ext/DirectX/wixext/DirectXExtensionFactory.cs index fb7f84aa..790725fd 100644 --- a/src/ext/DirectX/wixext/DirectXExtensionFactory.cs +++ b/src/ext/DirectX/wixext/DirectXExtensionFactory.cs | |||
@@ -11,6 +11,7 @@ namespace WixToolset.DirectX | |||
11 | protected override IReadOnlyCollection<Type> ExtensionTypes => new[] | 11 | protected override IReadOnlyCollection<Type> ExtensionTypes => new[] |
12 | { | 12 | { |
13 | typeof(DirectXExtensionData), | 13 | typeof(DirectXExtensionData), |
14 | typeof(DirectXCompiler), | ||
14 | }; | 15 | }; |
15 | } | 16 | } |
16 | } | 17 | } |
diff --git a/src/ext/DirectX/wixlib/DirectXExtension.wxs b/src/ext/DirectX/wixlib/DirectXExtension.wxs deleted file mode 100644 index b83dc98d..00000000 --- a/src/ext/DirectX/wixlib/DirectXExtension.wxs +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
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. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <?include caerr.wxi ?> | ||
6 | |||
7 | <!-- DirectX Custom Action DLL Definitions --> | ||
8 | <Fragment> | ||
9 | <Binary Id="DirectXCA" SourceFile="directxca.dll" /> | ||
10 | </Fragment> | ||
11 | |||
12 | <Fragment> | ||
13 | <CustomAction Id="WixQueryDirectXCaps" DllEntry="WixQueryDirectXCaps" Return="ignore" BinaryRef="DirectXCA" /> | ||
14 | |||
15 | <InstallUISequence> | ||
16 | <Custom Action="WixQueryDirectXCaps" Before="LaunchConditions" Overridable="yes" Condition="VersionNT > 400" /> | ||
17 | </InstallUISequence> | ||
18 | |||
19 | <InstallExecuteSequence> | ||
20 | <Custom Action="WixQueryDirectXCaps" Before="LaunchConditions" Overridable="yes" Condition="VersionNT > 400" /> | ||
21 | </InstallExecuteSequence> | ||
22 | </Fragment> | ||
23 | |||
24 | <Fragment> | ||
25 | <Property Id="WIX_DIRECTX_VERTEXSHADERVERSION" Secure="yes" Value="NotSet" /> | ||
26 | <CustomActionRef Id="WixQueryDirectXCaps" /> | ||
27 | </Fragment> | ||
28 | |||
29 | <Fragment> | ||
30 | <Property Id="WIX_DIRECTX_PIXELSHADERVERSION" Secure="yes" Value="NotSet" /> | ||
31 | <CustomActionRef Id="WixQueryDirectXCaps" /> | ||
32 | </Fragment> | ||
33 | </Wix> | ||
diff --git a/src/ext/DirectX/wixlib/DirectXExtension_Platform.wxi b/src/ext/DirectX/wixlib/DirectXExtension_Platform.wxi new file mode 100644 index 00000000..317e75d4 --- /dev/null +++ b/src/ext/DirectX/wixlib/DirectXExtension_Platform.wxi | |||
@@ -0,0 +1,23 @@ | |||
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. --> | ||
2 | |||
3 | |||
4 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <?include ..\..\caDecor.wxi ?> | ||
6 | |||
7 | <!-- DirectX Custom Action DLL Definitions --> | ||
8 | <Fragment> | ||
9 | <Binary Id="$(var.Prefix)DXCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))dxca.dll" /> | ||
10 | </Fragment> | ||
11 | |||
12 | <Fragment> | ||
13 | <CustomAction Id="$(var.Prefix)QueryDirectXCaps$(var.Suffix)" DllEntry="WixQueryDirectXCaps" Return="ignore" BinaryRef="$(var.Prefix)DXCA$(var.Suffix)" /> | ||
14 | |||
15 | <InstallUISequence> | ||
16 | <Custom Action="$(var.Prefix)QueryDirectXCaps$(var.Suffix)" Before="LaunchConditions" Overridable="yes" /> | ||
17 | </InstallUISequence> | ||
18 | |||
19 | <InstallExecuteSequence> | ||
20 | <Custom Action="$(var.Prefix)QueryDirectXCaps$(var.Suffix)" Before="LaunchConditions" Overridable="yes" /> | ||
21 | </InstallExecuteSequence> | ||
22 | </Fragment> | ||
23 | </Include> | ||
diff --git a/src/ext/DirectX/wixlib/DirectXExtension_arm64.wxs b/src/ext/DirectX/wixlib/DirectXExtension_arm64.wxs new file mode 100644 index 00000000..b3172384 --- /dev/null +++ b/src/ext/DirectX/wixlib/DirectXExtension_arm64.wxs | |||
@@ -0,0 +1,7 @@ | |||
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. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <?define platform=arm64 ?> | ||
6 | <?include DirectXExtension_Platform.wxi ?> | ||
7 | </Wix> | ||
diff --git a/src/ext/DirectX/wixlib/DirectXExtension_x64.wxs b/src/ext/DirectX/wixlib/DirectXExtension_x64.wxs new file mode 100644 index 00000000..31646944 --- /dev/null +++ b/src/ext/DirectX/wixlib/DirectXExtension_x64.wxs | |||
@@ -0,0 +1,7 @@ | |||
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. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <?define platform=x64 ?> | ||
6 | <?include DirectXExtension_Platform.wxi ?> | ||
7 | </Wix> | ||
diff --git a/src/ext/DirectX/wixlib/DirectXExtension_x86.wxs b/src/ext/DirectX/wixlib/DirectXExtension_x86.wxs new file mode 100644 index 00000000..5381957c --- /dev/null +++ b/src/ext/DirectX/wixlib/DirectXExtension_x86.wxs | |||
@@ -0,0 +1,7 @@ | |||
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. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <?define platform=x86 ?> | ||
6 | <?include DirectXExtension_Platform.wxi ?> | ||
7 | </Wix> | ||
diff --git a/src/ext/DirectX/wixlib/caerr.wxi b/src/ext/DirectX/wixlib/caerr.wxi deleted file mode 100644 index ff7ec121..00000000 --- a/src/ext/DirectX/wixlib/caerr.wxi +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
2 | <?define msierrSecureObjectsFailedCreateSD = 25520?> | ||
3 | <?define msierrSecureObjectsFailedSet = 25521?> | ||
4 | <?define msierrSecureObjectsUnknownType = 25522?> | ||
5 | <?define msierrXmlFileFailedRead = 25530?> | ||
6 | <?define msierrXmlFileFailedOpen = 25531?> | ||
7 | <?define msierrXmlFileFailedSelect = 25532?> | ||
8 | <?define msierrXmlFileFailedSave = 25533?> | ||
9 | <?define msierrXmlConfigFailedRead = 25540?> | ||
10 | <?define msierrXmlConfigFailedOpen = 25541?> | ||
11 | <?define msierrXmlConfigFailedSelect = 25542?> | ||
12 | <?define msierrXmlConfigFailedSave = 25543?> | ||
13 | <?define msierrFirewallCannotConnect = 25580?> | ||
14 | <?define msierrIISCannotConnect = 26001?> | ||
15 | <?define msierrIISFailedReadWebSite = 26002?> | ||
16 | <?define msierrIISFailedReadWebDirs = 26003?> | ||
17 | <?define msierrIISFailedReadVDirs = 26004?> | ||
18 | <?define msierrIISFailedReadFilters = 26005?> | ||
19 | <?define msierrIISFailedReadAppPool = 26006?> | ||
20 | <?define msierrIISFailedReadMimeMap = 26007?> | ||
21 | <?define msierrIISFailedReadProp = 26008?> | ||
22 | <?define msierrIISFailedReadWebSvcExt = 26009?> | ||
23 | <?define msierrIISFailedReadWebError = 26010?> | ||
24 | <?define msierrIISFailedReadHttpHeader = 26011?> | ||
25 | <?define msierrIISFailedSchedTransaction = 26031?> | ||
26 | <?define msierrIISFailedSchedInstallWebs = 26032?> | ||
27 | <?define msierrIISFailedSchedInstallWebDirs = 26033?> | ||
28 | <?define msierrIISFailedSchedInstallVDirs = 26034?> | ||
29 | <?define msierrIISFailedSchedInstallFilters = 26035?> | ||
30 | <?define msierrIISFailedSchedInstallAppPool = 26036?> | ||
31 | <?define msierrIISFailedSchedInstallProp = 26037?> | ||
32 | <?define msierrIISFailedSchedInstallWebSvcExt = 26038?> | ||
33 | <?define msierrIISFailedSchedUninstallWebs = 26051?> | ||
34 | <?define msierrIISFailedSchedUninstallWebDirs = 26052?> | ||
35 | <?define msierrIISFailedSchedUninstallVDirs = 26053?> | ||
36 | <?define msierrIISFailedSchedUninstallFilters = 26054?> | ||
37 | <?define msierrIISFailedSchedUninstallAppPool = 26055?> | ||
38 | <?define msierrIISFailedSchedUninstallProp = 26056?> | ||
39 | <?define msierrIISFailedSchedUninstallWebSvcExt = 26057?> | ||
40 | <?define msierrIISFailedStartTransaction = 26101?> | ||
41 | <?define msierrIISFailedOpenKey = 26102?> | ||
42 | <?define msierrIISFailedCreateKey = 26103?> | ||
43 | <?define msierrIISFailedWriteData = 26104?> | ||
44 | <?define msierrIISFailedCreateApp = 26105?> | ||
45 | <?define msierrIISFailedDeleteKey = 26106?> | ||
46 | <?define msierrIISFailedDeleteApp = 26107?> | ||
47 | <?define msierrIISFailedDeleteValue = 26108?> | ||
48 | <?define msierrIISFailedCommitInUse = 26109?> | ||
49 | <?define msierrSQLFailedCreateDatabase = 26201?> | ||
50 | <?define msierrSQLFailedDropDatabase = 26202?> | ||
51 | <?define msierrSQLFailedConnectDatabase = 26203?> | ||
52 | <?define msierrSQLFailedExecString = 26204?> | ||
53 | <?define msierrSQLDatabaseAlreadyExists = 26205?> | ||
54 | <?define msierrPERFMONFailedRegisterDLL = 26251?> | ||
55 | <?define msierrPERFMONFailedUnregisterDLL = 26252?> | ||
56 | <?define msierrInstallPerfCounterData = 26253?> | ||
57 | <?define msierrUninstallPerfCounterData = 26254?> | ||
58 | <?define msierrSMBFailedCreate = 26301?> | ||
59 | <?define msierrSMBFailedDrop = 26302?> | ||
60 | <?define msierrCERTFailedOpen = 26351?> | ||
61 | <?define msierrCERTFailedAdd = 26352?> | ||
62 | <?define msierrUSRFailedUserCreate = 26401?> | ||
63 | <?define msierrUSRFailedUserCreatePswd = 26402?> | ||
64 | <?define msierrUSRFailedUserGroupAdd = 26403?> | ||
65 | <?define msierrUSRFailedUserCreateExists = 26404?> | ||
66 | <?define msierrUSRFailedGrantLogonAsService = 26405?> | ||
67 | <?define msierrDependencyMissingDependencies = 26451?> | ||
68 | <?define msierrDependencyHasDependents = 26452?> | ||
69 | <?define msierrDotNetRuntimeRequired = 27000?> | ||
70 | <?define msierrComPlusCannotConnect = 28001?> | ||
71 | <?define msierrComPlusPartitionReadFailed = 28002?> | ||
72 | <?define msierrComPlusPartitionRoleReadFailed = 28003?> | ||
73 | <?define msierrComPlusUserInPartitionRoleReadFailed = 28004?> | ||
74 | <?define msierrComPlusPartitionUserReadFailed = 28005?> | ||
75 | <?define msierrComPlusApplicationReadFailed = 28006?> | ||
76 | <?define msierrComPlusApplicationRoleReadFailed = 28007?> | ||
77 | <?define msierrComPlusUserInApplicationRoleReadFailed = 28008?> | ||
78 | <?define msierrComPlusAssembliesReadFailed = 28009?> | ||
79 | <?define msierrComPlusSubscriptionReadFailed = 28010?> | ||
80 | <?define msierrComPlusPartitionDependency = 28011?> | ||
81 | <?define msierrComPlusPartitionNotFound = 28012?> | ||
82 | <?define msierrComPlusPartitionIdConflict = 28013?> | ||
83 | <?define msierrComPlusPartitionNameConflict = 28014?> | ||
84 | <?define msierrComPlusApplicationDependency = 28015?> | ||
85 | <?define msierrComPlusApplicationNotFound = 28016?> | ||
86 | <?define msierrComPlusApplicationIdConflict = 28017?> | ||
87 | <?define msierrComPlusApplicationNameConflict = 28018?> | ||
88 | <?define msierrComPlusApplicationRoleDependency = 28019?> | ||
89 | <?define msierrComPlusApplicationRoleNotFound = 28020?> | ||
90 | <?define msierrComPlusApplicationRoleConflict = 28021?> | ||
91 | <?define msierrComPlusAssemblyDependency = 28022?> | ||
92 | <?define msierrComPlusSubscriptionIdConflict = 28023?> | ||
93 | <?define msierrComPlusSubscriptionNameConflict = 28024?> | ||
94 | <?define msierrComPlusFailedLookupNames = 28025?> | ||
95 | <?define msierrMsmqCannotConnect = 28101?> | ||
96 | </Include> \ No newline at end of file | ||
diff --git a/src/ext/DirectX/wixlib/directx.wixproj b/src/ext/DirectX/wixlib/directx.wixproj index a7281dd0..ea0f3330 100644 --- a/src/ext/DirectX/wixlib/directx.wixproj +++ b/src/ext/DirectX/wixlib/directx.wixproj | |||
@@ -6,7 +6,15 @@ | |||
6 | </PropertyGroup> | 6 | </PropertyGroup> |
7 | 7 | ||
8 | <ItemGroup> | 8 | <ItemGroup> |
9 | <ProjectReference Include="..\ca\directxca.vcxproj" ReferenceOutputAssembly="false" /> | 9 | <BindInputPaths Include="$(OutputPath)x86" BindName='x86' /> |
10 | <BindInputPaths Include="$(OutputPath)x64" BindName='x64' /> | ||
11 | <BindInputPaths Include="$(OutputPath)arm64" BindName='arm64' /> | ||
12 | </ItemGroup> | ||
13 | |||
14 | <ItemGroup> | ||
15 | <ProjectReference Include="..\ca\directxca.vcxproj" Properties="Platform=x86" /> | ||
16 | <ProjectReference Include="..\ca\directxca.vcxproj" Properties="Platform=x64" /> | ||
17 | <ProjectReference Include="..\ca\directxca.vcxproj" Properties="Platform=ARM64" /> | ||
10 | </ItemGroup> | 18 | </ItemGroup> |
11 | 19 | ||
12 | <ItemGroup> | 20 | <ItemGroup> |
diff --git a/src/wix/WixToolset.Converters/WixConverter.cs b/src/wix/WixToolset.Converters/WixConverter.cs index b8a83326..5dae29b7 100644 --- a/src/wix/WixToolset.Converters/WixConverter.cs +++ b/src/wix/WixToolset.Converters/WixConverter.cs | |||
@@ -56,6 +56,7 @@ namespace WixToolset.Converters | |||
56 | private static readonly XNamespace Wix3Namespace = "http://schemas.microsoft.com/wix/2006/wi"; | 56 | private static readonly XNamespace Wix3Namespace = "http://schemas.microsoft.com/wix/2006/wi"; |
57 | private static readonly XNamespace WixBalNamespace = "http://wixtoolset.org/schemas/v4/wxs/bal"; | 57 | private static readonly XNamespace WixBalNamespace = "http://wixtoolset.org/schemas/v4/wxs/bal"; |
58 | private static readonly XNamespace WixDependencyNamespace = "http://wixtoolset.org/schemas/v4/wxs/dependency"; | 58 | private static readonly XNamespace WixDependencyNamespace = "http://wixtoolset.org/schemas/v4/wxs/dependency"; |
59 | private static readonly XNamespace WixDirectXNamespace = "http://wixtoolset.org/schemas/v4/wxs/directx"; | ||
59 | private static readonly XNamespace WixFirewallNamespace = "http://wixtoolset.org/schemas/v4/wxs/firewall"; | 60 | private static readonly XNamespace WixFirewallNamespace = "http://wixtoolset.org/schemas/v4/wxs/firewall"; |
60 | private static readonly XNamespace WixUiNamespace = "http://wixtoolset.org/schemas/v4/wxs/ui"; | 61 | private static readonly XNamespace WixUiNamespace = "http://wixtoolset.org/schemas/v4/wxs/ui"; |
61 | private static readonly XNamespace WixUtilNamespace = "http://wixtoolset.org/schemas/v4/wxs/util"; | 62 | private static readonly XNamespace WixUtilNamespace = "http://wixtoolset.org/schemas/v4/wxs/util"; |
@@ -94,6 +95,7 @@ namespace WixToolset.Converters | |||
94 | private static readonly XName FileElementName = WixNamespace + "File"; | 95 | private static readonly XName FileElementName = WixNamespace + "File"; |
95 | private static readonly XName FragmentElementName = WixNamespace + "Fragment"; | 96 | private static readonly XName FragmentElementName = WixNamespace + "Fragment"; |
96 | private static readonly XName FirewallRemoteAddressElementName = WixFirewallNamespace + "RemoteAddress"; | 97 | private static readonly XName FirewallRemoteAddressElementName = WixFirewallNamespace + "RemoteAddress"; |
98 | private static readonly XName GetCapabilitiesElementName = WixFirewallNamespace + "GetCapabilities"; | ||
97 | private static readonly XName LaunchElementName = WixNamespace + "Launch"; | 99 | private static readonly XName LaunchElementName = WixNamespace + "Launch"; |
98 | private static readonly XName LevelElementName = WixNamespace + "Level"; | 100 | private static readonly XName LevelElementName = WixNamespace + "Level"; |
99 | private static readonly XName ExePackageElementName = WixNamespace + "ExePackage"; | 101 | private static readonly XName ExePackageElementName = WixNamespace + "ExePackage"; |
@@ -455,11 +457,11 @@ namespace WixToolset.Converters | |||
455 | { | 457 | { |
456 | text.Value = text.Value.Trim(); | 458 | text.Value = text.Value.Trim(); |
457 | } | 459 | } |
458 | else if (node.NextNode is XCData cdata) | 460 | else if (node.NextNode is XCData) |
459 | { | 461 | { |
460 | this.EnsurePrecedingWhitespaceRemoved(text, node, ConverterTestType.WhitespacePrecedingNodeWrong); | 462 | this.EnsurePrecedingWhitespaceRemoved(text, node, ConverterTestType.WhitespacePrecedingNodeWrong); |
461 | } | 463 | } |
462 | else if (node.NextNode is XElement element) | 464 | else if (node.NextNode is XElement) |
463 | { | 465 | { |
464 | this.EnsurePrecedingWhitespaceCorrect(text, node, level, ConverterTestType.WhitespacePrecedingNodeWrong); | 466 | this.EnsurePrecedingWhitespaceCorrect(text, node, level, ConverterTestType.WhitespacePrecedingNodeWrong); |
465 | } | 467 | } |
@@ -503,7 +505,7 @@ namespace WixToolset.Converters | |||
503 | { | 505 | { |
504 | newValue = this.DeprecatedPrefixRegex.Replace(value, "!"); | 506 | newValue = this.DeprecatedPrefixRegex.Replace(value, "!"); |
505 | 507 | ||
506 | if (object.ReferenceEquals(newValue, value)) | 508 | if (Object.ReferenceEquals(newValue, value)) |
507 | { | 509 | { |
508 | return false; | 510 | return false; |
509 | } | 511 | } |
@@ -1439,6 +1441,12 @@ namespace WixToolset.Converters | |||
1439 | newNamespaceName = "vs"; | 1441 | newNamespaceName = "vs"; |
1440 | replace = false; | 1442 | replace = false; |
1441 | break; | 1443 | break; |
1444 | case "WIX_DIRECTX_PIXELSHADERVERSION": | ||
1445 | case "WIX_DIRECTX_VERTEXSHADERVERSION": | ||
1446 | newElementName = "GetCapabilities"; | ||
1447 | newNamespace = WixDirectXNamespace; | ||
1448 | newNamespaceName = "directx"; | ||
1449 | break; | ||
1442 | } | 1450 | } |
1443 | 1451 | ||
1444 | if (!String.IsNullOrEmpty(newElementName) | 1452 | if (!String.IsNullOrEmpty(newElementName) |
diff --git a/src/wix/test/WixToolsetTest.Converters/DirectXExtensionFixture.cs b/src/wix/test/WixToolsetTest.Converters/DirectXExtensionFixture.cs new file mode 100644 index 00000000..f72a4a23 --- /dev/null +++ b/src/wix/test/WixToolsetTest.Converters/DirectXExtensionFixture.cs | |||
@@ -0,0 +1,51 @@ | |||
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. | ||
2 | |||
3 | namespace WixToolsetTest.Converters | ||
4 | { | ||
5 | using System; | ||
6 | using System.Xml.Linq; | ||
7 | using WixBuildTools.TestSupport; | ||
8 | using WixToolset.Converters; | ||
9 | using WixToolsetTest.Converters.Mocks; | ||
10 | using Xunit; | ||
11 | |||
12 | public class DirectXExtensionFixture : BaseConverterFixture | ||
13 | { | ||
14 | [Fact] | ||
15 | public void FixUIRefs() | ||
16 | { | ||
17 | var parse = String.Join(Environment.NewLine, | ||
18 | "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>", | ||
19 | " <Fragment>", | ||
20 | " <PropertyRef Id=\"WIX_DIRECTX_PIXELSHADERVERSION\" />", | ||
21 | " <UI>", | ||
22 | " <PropertyRef Id=\"WIX_DIRECTX_VERTEXSHADERVERSION\" />", | ||
23 | " </UI>", | ||
24 | " </Fragment>", | ||
25 | "</Wix>"); | ||
26 | |||
27 | var expected = new[] | ||
28 | { | ||
29 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\" xmlns:directx=\"http://wixtoolset.org/schemas/v4/wxs/directx\">", | ||
30 | " <Fragment>", | ||
31 | " <directx:GetCapabilities />", | ||
32 | " <UI>", | ||
33 | " <directx:GetCapabilities />", | ||
34 | " </UI>", | ||
35 | " </Fragment>", | ||
36 | "</Wix>" | ||
37 | }; | ||
38 | |||
39 | var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); | ||
40 | |||
41 | var messaging = new MockMessaging(); | ||
42 | var converter = new WixConverter(messaging, 2, null, null); | ||
43 | |||
44 | var errors = converter.ConvertDocument(document); | ||
45 | Assert.Equal(3, errors); | ||
46 | |||
47 | var actualLines = UnformattedDocumentLines(document); | ||
48 | WixAssert.CompareLineByLine(expected, actualLines); | ||
49 | } | ||
50 | } | ||
51 | } | ||