aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ca/caDecor.h13
-rw-r--r--src/ca/precomp.h1
-rw-r--r--src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs4
-rw-r--r--src/wixext/NetFxCompiler.cs3
-rw-r--r--src/wixext/NetfxWindowsInstallerBackendExtension.cs9
-rw-r--r--src/wixlib/NetFxExtension_Platform.wxi25
-rw-r--r--src/wixlib/caDecor.wxi40
-rw-r--r--src/wixlib/caSuffix.wxi28
-rw-r--r--src/wixlib/netfx.wixproj8
-rw-r--r--src/wixlib/packages.config4
10 files changed, 85 insertions, 50 deletions
diff --git a/src/ca/caDecor.h b/src/ca/caDecor.h
new file mode 100644
index 00000000..da274650
--- /dev/null
+++ b/src/ca/caDecor.h
@@ -0,0 +1,13 @@
1#pragma once
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.
3
4
5#if defined(_M_ARM64)
6#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64"
7#elif defined(_M_AMD64)
8#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64"
9#elif defined(_M_ARM)
10#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM"
11#else
12#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86"
13#endif
diff --git a/src/ca/precomp.h b/src/ca/precomp.h
index 5caedb16..4a83c164 100644
--- a/src/ca/precomp.h
+++ b/src/ca/precomp.h
@@ -10,4 +10,5 @@
10#include "strutil.h" 10#include "strutil.h"
11#include "pathutil.h" 11#include "pathutil.h"
12 12
13#include "caDecor.h"
13#include "cost.h" 14#include "cost.h"
diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs
index 3032d99d..38724481 100644
--- a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs
+++ b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs
@@ -16,10 +16,10 @@ namespace WixToolsetTest.Netfx
16 var folder = TestData.Get(@"TestData\UsingNativeImage"); 16 var folder = TestData.Get(@"TestData\UsingNativeImage");
17 var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder }); 17 var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder });
18 18
19 var results = build.BuildAndQuery(Build, "NetFxNativeImage"); 19 var results = build.BuildAndQuery(Build, "Wix4NetFxNativeImage");
20 Assert.Equal(new[] 20 Assert.Equal(new[]
21 { 21 {
22 "NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t", 22 "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t",
23 }, results.OrderBy(s => s).ToArray()); 23 }, results.OrderBy(s => s).ToArray());
24 } 24 }
25 25
diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs
index 06d48fe7..4916994e 100644
--- a/src/wixext/NetFxCompiler.cs
+++ b/src/wixext/NetFxCompiler.cs
@@ -7,6 +7,7 @@ namespace WixToolset.Netfx
7 using System.Xml.Linq; 7 using System.Xml.Linq;
8 using WixToolset.Data; 8 using WixToolset.Data;
9 using WixToolset.Extensibility; 9 using WixToolset.Extensibility;
10 using WixToolset.Extensibility.Data;
10 using WixToolset.Netfx.Tuples; 11 using WixToolset.Netfx.Tuples;
11 12
12 /// <summary> 13 /// <summary>
@@ -144,7 +145,7 @@ namespace WixToolset.Netfx
144 145
145 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); 146 this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
146 147
147 this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "NetFxScheduleNativeImage"); 148 this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.X86);
148 149
149 if (!this.Messaging.EncounteredError) 150 if (!this.Messaging.EncounteredError)
150 { 151 {
diff --git a/src/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/wixext/NetfxWindowsInstallerBackendExtension.cs
index df4e9839..1c7ce9b8 100644
--- a/src/wixext/NetfxWindowsInstallerBackendExtension.cs
+++ b/src/wixext/NetfxWindowsInstallerBackendExtension.cs
@@ -11,10 +11,11 @@ namespace WixToolset.Netfx
11 { 11 {
12 private static readonly TableDefinition[] Tables = new[] { 12 private static readonly TableDefinition[] Tables = new[] {
13 new TableDefinition( 13 new TableDefinition(
14 "Wix4NetFxNativeImage",
14 "NetFxNativeImage", 15 "NetFxNativeImage",
15 new[] 16 new[]
16 { 17 {
17 new ColumnDefinition("NetFxNativeImage", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "The primary key, a non-localized token."), 18 new ColumnDefinition("Wix4NetFxNativeImage", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "The primary key, a non-localized token."),
18 new ColumnDefinition("File_", ColumnType.String, 0, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "The assembly for which a native image will be generated."), 19 new ColumnDefinition("File_", ColumnType.String, 0, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "The assembly for which a native image will be generated."),
19 new ColumnDefinition("Priority", ColumnType.Number, 2, false, false, ColumnCategory.Integer, maxValue: 3, description: "The priority for generating this native image: 0 is syncronous, 1-3 represent various levels of queued generation."), 20 new ColumnDefinition("Priority", ColumnType.Number, 2, false, false, ColumnCategory.Integer, maxValue: 3, description: "The priority for generating this native image: 0 is syncronous, 1-3 represent various levels of queued generation."),
20 new ColumnDefinition("Attributes", ColumnType.Number, 4, false, false, ColumnCategory.Integer, maxValue: 2147483647, description: "Integer containing bit flags representing native image attributes."), 21 new ColumnDefinition("Attributes", ColumnType.Number, 4, false, false, ColumnCategory.Integer, maxValue: 2147483647, description: "Integer containing bit flags representing native image attributes."),
@@ -25,5 +26,11 @@ namespace WixToolset.Netfx
25 }; 26 };
26 27
27 public override IEnumerable<TableDefinition> TableDefinitions { get => Tables; } 28 public override IEnumerable<TableDefinition> TableDefinitions { get => Tables; }
29
30 public override bool TryAddTupleToOutput(IntermediateTuple tuple, WindowsInstallerData output)
31 {
32 var columnZeroIsId = tuple.Id != null;
33 return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, this.TableDefinitions, columnZeroIsId);
34 }
28 } 35 }
29} 36}
diff --git a/src/wixlib/NetFxExtension_Platform.wxi b/src/wixlib/NetFxExtension_Platform.wxi
index 9236f316..92b13dad 100644
--- a/src/wixlib/NetFxExtension_Platform.wxi
+++ b/src/wixlib/NetFxExtension_Platform.wxi
@@ -4,25 +4,26 @@
4 4
5<Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> 5<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
6 6
7 <?include caSuffix.wxi ?> 7 <?include caDecor.wxi ?>
8
8 <Fragment> 9 <Fragment>
9 <CustomAction Id="NetFxScheduleNativeImage$(var.Suffix)" BinaryKey="NetFxCA$(var.Suffix)" DllEntry="SchedNetFx" Execute="immediate" Return="check" SuppressModularization="yes" /> 10 <CustomAction Id="$(var.Prefix)NetFxScheduleNativeImage$(var.Suffix)" BinaryKey="$(var.Prefix)NetFxCA$(var.Suffix)" DllEntry="SchedNetFx" Execute="immediate" Return="check" SuppressModularization="yes" />
10 <CustomAction Id="NetFxExecuteNativeImageInstall$(var.DeferredSuffix)" BinaryKey="NetFxCA$(var.Suffix)" DllEntry="ExecNetFx" Execute="deferred" Impersonate="no" Return="ignore" SuppressModularization="yes" /> 11 <CustomAction Id="$(var.Prefix)NetFxExecuteNativeImageInstall$(var.Suffix)" BinaryKey="$(var.Prefix)NetFxCA$(var.Suffix)" DllEntry="ExecNetFx" Execute="deferred" Impersonate="no" Return="ignore" SuppressModularization="yes" />
11 <CustomAction Id="NetFxExecuteNativeImageCommitInstall$(var.DeferredSuffix)" BinaryKey="NetFxCA$(var.Suffix)" DllEntry="ExecNetFx" Execute="commit" Impersonate="no" Return="ignore" SuppressModularization="yes" /> 12 <CustomAction Id="$(var.Prefix)NetFxExecuteNativeImageCommitInstall$(var.Suffix)" BinaryKey="$(var.Prefix)NetFxCA$(var.Suffix)" DllEntry="ExecNetFx" Execute="commit" Impersonate="no" Return="ignore" SuppressModularization="yes" />
12 <CustomAction Id="NetFxExecuteNativeImageUninstall$(var.DeferredSuffix)" BinaryKey="NetFxCA$(var.Suffix)" DllEntry="ExecNetFx" Execute="deferred" Impersonate="no" Return="ignore" SuppressModularization="yes" /> 13 <CustomAction Id="$(var.Prefix)NetFxExecuteNativeImageUninstall$(var.Suffix)" BinaryKey="$(var.Prefix)NetFxCA$(var.Suffix)" DllEntry="ExecNetFx" Execute="deferred" Impersonate="no" Return="ignore" SuppressModularization="yes" />
13 <CustomAction Id="NetFxExecuteNativeImageCommitUninstall$(var.DeferredSuffix)" BinaryKey="NetFxCA$(var.Suffix)" DllEntry="ExecNetFx" Execute="commit" Impersonate="no" Return="ignore" SuppressModularization="yes" /> 14 <CustomAction Id="$(var.Prefix)NetFxExecuteNativeImageCommitUninstall$(var.Suffix)" BinaryKey="$(var.Prefix)NetFxCA$(var.Suffix)" DllEntry="ExecNetFx" Execute="commit" Impersonate="no" Return="ignore" SuppressModularization="yes" />
14 15
15 <InstallExecuteSequence> 16 <InstallExecuteSequence>
16 <Custom Action="NetFxScheduleNativeImage$(var.Suffix)" Before="InstallFiles" Overridable="yes" /> 17 <Custom Action="$(var.Prefix)NetFxScheduleNativeImage$(var.Suffix)" Before="InstallFiles" Overridable="yes" />
17 <Custom Action="NetFxExecuteNativeImageCommitUninstall$(var.DeferredSuffix)" After="MsiPublishAssemblies" Overridable="yes">RollbackDisabled &lt;&gt; 1</Custom> 18 <Custom Action="$(var.Prefix)NetFxExecuteNativeImageCommitUninstall$(var.Suffix)" After="MsiPublishAssemblies" Overridable="yes">RollbackDisabled &lt;&gt; 1</Custom>
18 <Custom Action="NetFxExecuteNativeImageUninstall$(var.DeferredSuffix)" After="NetFxExecuteNativeImageCommitUninstall$(var.DeferredSuffix)" Overridable="yes">RollbackDisabled = 1</Custom> 19 <Custom Action="$(var.Prefix)NetFxExecuteNativeImageUninstall$(var.Suffix)" After="$(var.Prefix)NetFxExecuteNativeImageCommitUninstall$(var.Suffix)" Overridable="yes">RollbackDisabled = 1</Custom>
19 <Custom Action="NetFxExecuteNativeImageCommitInstall$(var.DeferredSuffix)" After="NetFxExecuteNativeImageUninstall$(var.DeferredSuffix)" Overridable="yes">RollbackDisabled &lt;&gt; 1</Custom> 20 <Custom Action="$(var.Prefix)NetFxExecuteNativeImageCommitInstall$(var.Suffix)" After="$(var.Prefix)NetFxExecuteNativeImageUninstall$(var.Suffix)" Overridable="yes">RollbackDisabled &lt;&gt; 1</Custom>
20 <Custom Action="NetFxExecuteNativeImageInstall$(var.DeferredSuffix)" After="NetFxExecuteNativeImageCommitInstall$(var.DeferredSuffix)" Overridable="yes">RollbackDisabled = 1</Custom> 21 <Custom Action="$(var.Prefix)NetFxExecuteNativeImageInstall$(var.Suffix)" After="$(var.Prefix)NetFxExecuteNativeImageCommitInstall$(var.Suffix)" Overridable="yes">RollbackDisabled = 1</Custom>
21 </InstallExecuteSequence> 22 </InstallExecuteSequence>
22 </Fragment> 23 </Fragment>
23 24
24 <!-- NetFx Custom Action DLL Definitions --> 25 <!-- NetFx Custom Action DLL Definitions -->
25 <Fragment> 26 <Fragment>
26 <Binary Id="NetFxCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))netfxca.dll" /> 27 <Binary Id="$(var.Prefix)NetFxCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))netfxca.dll" />
27 </Fragment> 28 </Fragment>
28</Include> 29</Include>
diff --git a/src/wixlib/caDecor.wxi b/src/wixlib/caDecor.wxi
new file mode 100644
index 00000000..1d00df8f
--- /dev/null
+++ b/src/wixlib/caDecor.wxi
@@ -0,0 +1,40 @@
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. -->
3
4
5<Include xmlns="http://schemas.microsoft.com/wix/2006/wi">
6 <?ifdef Prefix ?>
7 <?undef Prefix ?>
8 <?endif ?>
9
10 <?define Prefix="Wix4" ?>
11
12 <?ifndef platform ?>
13 <?define platform="x86" ?>
14 <?endif ?>
15
16 <?if $(var.platform)="" ?>
17 <?undef platform ?>
18 <?define platform="x86" ?>
19 <?endif ?>
20
21 <?ifdef Suffix ?>
22 <?undef Suffix ?>
23 <?endif ?>
24
25 <?if $(var.platform)~="x86" ?>
26 <?define Suffix="_X86" ?>
27 <?endif ?>
28
29 <?if $(var.platform)~="x64" ?>
30 <?define Suffix="_X64" ?>
31 <?endif ?>
32
33 <?if $(var.platform)~="arm" ?>
34 <?define Suffix="_A32" ?>
35 <?endif ?>
36
37 <?if $(var.platform)~="arm64" ?>
38 <?define Suffix="_A64" ?>
39 <?endif ?>
40</Include>
diff --git a/src/wixlib/caSuffix.wxi b/src/wixlib/caSuffix.wxi
deleted file mode 100644
index a56a2393..00000000
--- a/src/wixlib/caSuffix.wxi
+++ /dev/null
@@ -1,28 +0,0 @@
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. -->
3
4<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 <?ifndef platform ?>
6 <?error Required value "platform" not defined in include caSuffix.wxi ?>
7 <?endif ?>
8
9 <?ifdef Suffix ?>
10 <?undef Suffix ?>
11 <?undef DeferredSuffix ?>
12 <?endif ?>
13
14 <?if $(var.platform)="x86" ?>
15 <?define Suffix="" ?>
16 <?define DeferredSuffix="" ?>
17 <?endif ?>
18
19 <?if $(var.platform)="x64" ?>
20 <?define Suffix="_x64" ?>
21 <?define DeferredSuffix="_64" ?>
22 <?endif ?>
23
24 <?if $(var.platform)="arm" ?>
25 <?define Suffix="_ARM" ?>
26 <?define DeferredSuffix="_ARM" ?>
27 <?endif ?>
28</Include>
diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj
index d890a911..71a6488e 100644
--- a/src/wixlib/netfx.wixproj
+++ b/src/wixlib/netfx.wixproj
@@ -1,7 +1,7 @@
1<?xml version="1.0" encoding="utf-8"?> 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. --> 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. -->
3<Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0"> 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-0063\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0063\build\WixToolset.MSBuild.props')" /> 4 <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0073\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0073\build\WixToolset.MSBuild.props')" />
5 <Import Project="..\FindLocalWix.props" /> 5 <Import Project="..\FindLocalWix.props" />
6 <PropertyGroup> 6 <PropertyGroup>
7 <ProjectGuid>{45e4a6ac-3190-4e17-83f0-9935ffa5dc2b}</ProjectGuid> 7 <ProjectGuid>{45e4a6ac-3190-4e17-83f0-9935ffa5dc2b}</ProjectGuid>
@@ -45,9 +45,9 @@
45 <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> 45 <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>
46 </PropertyGroup> 46 </PropertyGroup>
47 <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'))" /> 47 <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'))" />
48 <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0063\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0063\build\WixToolset.MSBuild.props'))" /> 48 <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0073\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0073\build\WixToolset.MSBuild.props'))" />
49 <Error Condition="!Exists('..\..\packages\WixToolset.Util.wixext.4.0.16\build\WixToolset.Util.wixext.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Util.wixext.4.0.16\build\WixToolset.Util.wixext.targets'))" /> 49 <Error Condition="!Exists('..\..\packages\WixToolset.Util.wixext.4.0.22\build\WixToolset.Util.wixext.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.Util.wixext.4.0.22\build\WixToolset.Util.wixext.targets'))" />
50 </Target> 50 </Target>
51 <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" /> 51 <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
52 <Import Project="..\..\packages\WixToolset.Util.wixext.4.0.16\build\WixToolset.Util.wixext.targets" Condition="Exists('..\..\packages\WixToolset.Util.wixext.4.0.16\build\WixToolset.Util.wixext.targets')" /> 52 <Import Project="..\..\packages\WixToolset.Util.wixext.4.0.22\build\WixToolset.Util.wixext.targets" Condition="Exists('..\..\packages\WixToolset.Util.wixext.4.0.22\build\WixToolset.Util.wixext.targets')" />
53</Project> \ No newline at end of file 53</Project> \ No newline at end of file
diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config
index 15e9aaaa..01c05df7 100644
--- a/src/wixlib/packages.config
+++ b/src/wixlib/packages.config
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<packages> 2<packages>
3 <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" /> 3 <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" />
4 <package id="WixToolset.MSBuild" version="4.0.0-build-0063" developmentDependency="true" targetFramework="net40" /> 4 <package id="WixToolset.MSBuild" version="4.0.0-build-0073" developmentDependency="true" targetFramework="net40" />
5 <package id="WixToolset.Util.wixext" version="4.0.16" targetFramework="net40" /> 5 <package id="WixToolset.Util.wixext" version="4.0.22" targetFramework="net40" />
6</packages> \ No newline at end of file 6</packages> \ No newline at end of file