From 7bdd5e9159b298e0411afa689a06c44e36e293cd Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 3 May 2021 16:05:08 -0700 Subject: Move NetFx.wixext into ext --- .editorconfig | 37 - NetFx.wixext.sln | 75 -- README.md | 2 - appveyor.cmd | 19 - appveyor.yml | 42 -- global.json | 5 - nuget.config | 19 - src/.editorconfig | 37 + src/CustomizedNativeRecommendedRules.ruleset | 8 - src/Directory.Build.props | 27 - src/Directory.Build.targets | 51 -- src/Directory.csproj.props | 13 - src/Directory.csproj.targets | 26 - src/Directory.vcxproj.props | 115 --- src/ca/caDecor.h | 13 - src/ca/cost.h | 7 - src/ca/dllmain.cpp | 26 - src/ca/netfxca.cpp | 823 --------------------- src/ca/netfxca.def | 8 - src/ca/netfxca.vcxproj | 73 -- src/ca/precomp.h | 14 - .../NetFx/CustomizedNativeRecommendedRules.ruleset | 8 + src/ext/NetFx/Directory.Build.props | 27 + src/ext/NetFx/Directory.Build.targets | 51 ++ src/ext/NetFx/Directory.csproj.props | 13 + src/ext/NetFx/Directory.csproj.targets | 26 + src/ext/NetFx/Directory.vcxproj.props | 115 +++ src/ext/NetFx/NetFx.wixext.sln | 75 ++ src/ext/NetFx/README.md | 2 + src/ext/NetFx/appveyor.cmd | 19 + src/ext/NetFx/appveyor.yml | 42 ++ src/ext/NetFx/ca/caDecor.h | 13 + src/ext/NetFx/ca/cost.h | 7 + src/ext/NetFx/ca/dllmain.cpp | 26 + src/ext/NetFx/ca/netfxca.cpp | 823 +++++++++++++++++++++ src/ext/NetFx/ca/netfxca.def | 8 + src/ext/NetFx/ca/netfxca.vcxproj | 73 ++ src/ext/NetFx/ca/precomp.h | 14 + src/ext/NetFx/nuget.config | 19 + .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 147 ++++ .../UsingDotNetCorePackages/BundleLatest.wxs | 12 + .../UsingDotNetCorePackages/BundleLatest_x64.wxs | 12 + .../TestData/UsingNativeImage/Package.en-us.wxl | 9 + .../TestData/UsingNativeImage/Package.wxs | 15 + .../UsingNativeImage/PackageComponents.wxs | 11 + .../TestData/UsingNativeImage/example.txt | 1 + .../WixToolsetTest.Netfx.csproj | 40 + .../WixToolsetTest.Netfx.v3.ncrunchproject | 5 + src/ext/NetFx/wix.snk | Bin 0 -> 596 bytes src/ext/NetFx/wixext/NetFxCompiler.cs | 163 ++++ src/ext/NetFx/wixext/NetFxDecompiler.cs | 139 ++++ src/ext/NetFx/wixext/NetFxExtensionData.cs | 25 + src/ext/NetFx/wixext/NetfxExtensionFactory.cs | 18 + src/ext/NetFx/wixext/NetfxTableDefinitions.cs | 30 + .../NetfxWindowsInstallerBackendExtension.cs | 13 + .../NetFx/wixext/Symbols/NetFxNativeImageSymbol.cs | 58 ++ .../NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs | 26 + .../NetFx/wixext/WixToolset.Netfx.wixext.csproj | 31 + .../NetFx/wixext/WixToolset.Netfx.wixext.nuspec | 25 + .../NetFx/wixext/WixToolset.Netfx.wixext.targets | 11 + .../WixToolset.Netfx.wixext.v3.ncrunchproject | 7 + src/ext/NetFx/wixlib/NetCore3.1.12_x64.wxs | 58 ++ src/ext/NetFx/wixlib/NetCore3.1.12_x86.wxs | 58 ++ src/ext/NetFx/wixlib/NetCore3.1_x64.wxs | 22 + src/ext/NetFx/wixlib/NetCore3.1_x86.wxs | 22 + src/ext/NetFx/wixlib/NetCore3_Platform.wxi | 65 ++ src/ext/NetFx/wixlib/NetCoreShared.wxs | 11 + src/ext/NetFx/wixlib/NetFx1.1.wxs | 191 +++++ src/ext/NetFx/wixlib/NetFx1.wxs | 30 + src/ext/NetFx/wixlib/NetFx2.wxs | 200 +++++ src/ext/NetFx/wixlib/NetFx3.5.wxs | 234 ++++++ src/ext/NetFx/wixlib/NetFx3.wxs | 194 +++++ src/ext/NetFx/wixlib/NetFx4.5.wxs | 198 +++++ src/ext/NetFx/wixlib/NetFx4.wxs | 416 +++++++++++ src/ext/NetFx/wixlib/NetFx451.wxs | 26 + src/ext/NetFx/wixlib/NetFx452.wxs | 69 ++ src/ext/NetFx/wixlib/NetFx46.wxs | 70 ++ src/ext/NetFx/wixlib/NetFx461.wxs | 69 ++ src/ext/NetFx/wixlib/NetFx462.wxs | 69 ++ src/ext/NetFx/wixlib/NetFx47.wxs | 20 + src/ext/NetFx/wixlib/NetFx471.wxs | 20 + src/ext/NetFx/wixlib/NetFx472.wxs | 67 ++ src/ext/NetFx/wixlib/NetFx48.wxs | 67 ++ src/ext/NetFx/wixlib/NetFxExtension.wxs | 38 + src/ext/NetFx/wixlib/NetFxExtension_Platform.wxi | 28 + src/ext/NetFx/wixlib/NetFxExtension_arm64.wxs | 7 + src/ext/NetFx/wixlib/NetFxExtension_x64.wxs | 7 + src/ext/NetFx/wixlib/NetFxExtension_x86.wxs | 7 + src/ext/NetFx/wixlib/caDecor.wxi | 39 + src/ext/NetFx/wixlib/netfx.v3.ncrunchproject | 5 + src/ext/NetFx/wixlib/netfx.wixproj | 32 + src/ext/global.json | 5 + .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 147 ---- .../UsingDotNetCorePackages/BundleLatest.wxs | 12 - .../UsingDotNetCorePackages/BundleLatest_x64.wxs | 12 - .../TestData/UsingNativeImage/Package.en-us.wxl | 9 - .../TestData/UsingNativeImage/Package.wxs | 15 - .../UsingNativeImage/PackageComponents.wxs | 11 - .../TestData/UsingNativeImage/example.txt | 1 - .../WixToolsetTest.Netfx.csproj | 40 - .../WixToolsetTest.Netfx.v3.ncrunchproject | 5 - src/version.json | 11 + src/wix.snk | Bin 596 -> 0 bytes src/wixext/NetFxCompiler.cs | 163 ---- src/wixext/NetFxDecompiler.cs | 139 ---- src/wixext/NetFxExtensionData.cs | 25 - src/wixext/NetfxExtensionFactory.cs | 18 - src/wixext/NetfxTableDefinitions.cs | 30 - .../NetfxWindowsInstallerBackendExtension.cs | 13 - src/wixext/Symbols/NetFxNativeImageSymbol.cs | 58 -- src/wixext/Symbols/NetfxSymbolDefinitions.cs | 26 - src/wixext/WixToolset.Netfx.wixext.csproj | 31 - src/wixext/WixToolset.Netfx.wixext.nuspec | 25 - src/wixext/WixToolset.Netfx.wixext.targets | 11 - .../WixToolset.Netfx.wixext.v3.ncrunchproject | 7 - src/wixlib/NetCore3.1.12_x64.wxs | 58 -- src/wixlib/NetCore3.1.12_x86.wxs | 58 -- src/wixlib/NetCore3.1_x64.wxs | 22 - src/wixlib/NetCore3.1_x86.wxs | 22 - src/wixlib/NetCore3_Platform.wxi | 65 -- src/wixlib/NetCoreShared.wxs | 11 - src/wixlib/NetFx1.1.wxs | 191 ----- src/wixlib/NetFx1.wxs | 30 - src/wixlib/NetFx2.wxs | 200 ----- src/wixlib/NetFx3.5.wxs | 234 ------ src/wixlib/NetFx3.wxs | 194 ----- src/wixlib/NetFx4.5.wxs | 198 ----- src/wixlib/NetFx4.wxs | 416 ----------- src/wixlib/NetFx451.wxs | 26 - src/wixlib/NetFx452.wxs | 69 -- src/wixlib/NetFx46.wxs | 70 -- src/wixlib/NetFx461.wxs | 69 -- src/wixlib/NetFx462.wxs | 69 -- src/wixlib/NetFx47.wxs | 20 - src/wixlib/NetFx471.wxs | 20 - src/wixlib/NetFx472.wxs | 67 -- src/wixlib/NetFx48.wxs | 67 -- src/wixlib/NetFxExtension.wxs | 38 - src/wixlib/NetFxExtension_Platform.wxi | 28 - src/wixlib/NetFxExtension_arm64.wxs | 7 - src/wixlib/NetFxExtension_x64.wxs | 7 - src/wixlib/NetFxExtension_x86.wxs | 7 - src/wixlib/caDecor.wxi | 39 - src/wixlib/netfx.v3.ncrunchproject | 5 - src/wixlib/netfx.wixproj | 32 - version.json | 11 - 146 files changed, 4551 insertions(+), 4551 deletions(-) delete mode 100644 .editorconfig delete mode 100644 NetFx.wixext.sln delete mode 100644 README.md delete mode 100644 appveyor.cmd delete mode 100644 appveyor.yml delete mode 100644 global.json delete mode 100644 nuget.config create mode 100644 src/.editorconfig delete mode 100644 src/CustomizedNativeRecommendedRules.ruleset delete mode 100644 src/Directory.Build.props delete mode 100644 src/Directory.Build.targets delete mode 100644 src/Directory.csproj.props delete mode 100644 src/Directory.csproj.targets delete mode 100644 src/Directory.vcxproj.props delete mode 100644 src/ca/caDecor.h delete mode 100644 src/ca/cost.h delete mode 100644 src/ca/dllmain.cpp delete mode 100644 src/ca/netfxca.cpp delete mode 100644 src/ca/netfxca.def delete mode 100644 src/ca/netfxca.vcxproj delete mode 100644 src/ca/precomp.h create mode 100644 src/ext/NetFx/CustomizedNativeRecommendedRules.ruleset create mode 100644 src/ext/NetFx/Directory.Build.props create mode 100644 src/ext/NetFx/Directory.Build.targets create mode 100644 src/ext/NetFx/Directory.csproj.props create mode 100644 src/ext/NetFx/Directory.csproj.targets create mode 100644 src/ext/NetFx/Directory.vcxproj.props create mode 100644 src/ext/NetFx/NetFx.wixext.sln create mode 100644 src/ext/NetFx/README.md create mode 100644 src/ext/NetFx/appveyor.cmd create mode 100644 src/ext/NetFx/appveyor.yml create mode 100644 src/ext/NetFx/ca/caDecor.h create mode 100644 src/ext/NetFx/ca/cost.h create mode 100644 src/ext/NetFx/ca/dllmain.cpp create mode 100644 src/ext/NetFx/ca/netfxca.cpp create mode 100644 src/ext/NetFx/ca/netfxca.def create mode 100644 src/ext/NetFx/ca/netfxca.vcxproj create mode 100644 src/ext/NetFx/ca/precomp.h create mode 100644 src/ext/NetFx/nuget.config create mode 100644 src/ext/NetFx/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs create mode 100644 src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs create mode 100644 src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs create mode 100644 src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl create mode 100644 src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs create mode 100644 src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs create mode 100644 src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt create mode 100644 src/ext/NetFx/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj create mode 100644 src/ext/NetFx/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject create mode 100644 src/ext/NetFx/wix.snk create mode 100644 src/ext/NetFx/wixext/NetFxCompiler.cs create mode 100644 src/ext/NetFx/wixext/NetFxDecompiler.cs create mode 100644 src/ext/NetFx/wixext/NetFxExtensionData.cs create mode 100644 src/ext/NetFx/wixext/NetfxExtensionFactory.cs create mode 100644 src/ext/NetFx/wixext/NetfxTableDefinitions.cs create mode 100644 src/ext/NetFx/wixext/NetfxWindowsInstallerBackendExtension.cs create mode 100644 src/ext/NetFx/wixext/Symbols/NetFxNativeImageSymbol.cs create mode 100644 src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs create mode 100644 src/ext/NetFx/wixext/WixToolset.Netfx.wixext.csproj create mode 100644 src/ext/NetFx/wixext/WixToolset.Netfx.wixext.nuspec create mode 100644 src/ext/NetFx/wixext/WixToolset.Netfx.wixext.targets create mode 100644 src/ext/NetFx/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject create mode 100644 src/ext/NetFx/wixlib/NetCore3.1.12_x64.wxs create mode 100644 src/ext/NetFx/wixlib/NetCore3.1.12_x86.wxs create mode 100644 src/ext/NetFx/wixlib/NetCore3.1_x64.wxs create mode 100644 src/ext/NetFx/wixlib/NetCore3.1_x86.wxs create mode 100644 src/ext/NetFx/wixlib/NetCore3_Platform.wxi create mode 100644 src/ext/NetFx/wixlib/NetCoreShared.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx1.1.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx1.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx2.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx3.5.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx3.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx4.5.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx4.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx451.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx452.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx46.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx461.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx462.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx47.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx471.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx472.wxs create mode 100644 src/ext/NetFx/wixlib/NetFx48.wxs create mode 100644 src/ext/NetFx/wixlib/NetFxExtension.wxs create mode 100644 src/ext/NetFx/wixlib/NetFxExtension_Platform.wxi create mode 100644 src/ext/NetFx/wixlib/NetFxExtension_arm64.wxs create mode 100644 src/ext/NetFx/wixlib/NetFxExtension_x64.wxs create mode 100644 src/ext/NetFx/wixlib/NetFxExtension_x86.wxs create mode 100644 src/ext/NetFx/wixlib/caDecor.wxi create mode 100644 src/ext/NetFx/wixlib/netfx.v3.ncrunchproject create mode 100644 src/ext/NetFx/wixlib/netfx.wixproj create mode 100644 src/ext/global.json delete mode 100644 src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs delete mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs delete mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs delete mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl delete mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs delete mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs delete mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt delete mode 100644 src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj delete mode 100644 src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject create mode 100644 src/version.json delete mode 100644 src/wix.snk delete mode 100644 src/wixext/NetFxCompiler.cs delete mode 100644 src/wixext/NetFxDecompiler.cs delete mode 100644 src/wixext/NetFxExtensionData.cs delete mode 100644 src/wixext/NetfxExtensionFactory.cs delete mode 100644 src/wixext/NetfxTableDefinitions.cs delete mode 100644 src/wixext/NetfxWindowsInstallerBackendExtension.cs delete mode 100644 src/wixext/Symbols/NetFxNativeImageSymbol.cs delete mode 100644 src/wixext/Symbols/NetfxSymbolDefinitions.cs delete mode 100644 src/wixext/WixToolset.Netfx.wixext.csproj delete mode 100644 src/wixext/WixToolset.Netfx.wixext.nuspec delete mode 100644 src/wixext/WixToolset.Netfx.wixext.targets delete mode 100644 src/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject delete mode 100644 src/wixlib/NetCore3.1.12_x64.wxs delete mode 100644 src/wixlib/NetCore3.1.12_x86.wxs delete mode 100644 src/wixlib/NetCore3.1_x64.wxs delete mode 100644 src/wixlib/NetCore3.1_x86.wxs delete mode 100644 src/wixlib/NetCore3_Platform.wxi delete mode 100644 src/wixlib/NetCoreShared.wxs delete mode 100644 src/wixlib/NetFx1.1.wxs delete mode 100644 src/wixlib/NetFx1.wxs delete mode 100644 src/wixlib/NetFx2.wxs delete mode 100644 src/wixlib/NetFx3.5.wxs delete mode 100644 src/wixlib/NetFx3.wxs delete mode 100644 src/wixlib/NetFx4.5.wxs delete mode 100644 src/wixlib/NetFx4.wxs delete mode 100644 src/wixlib/NetFx451.wxs delete mode 100644 src/wixlib/NetFx452.wxs delete mode 100644 src/wixlib/NetFx46.wxs delete mode 100644 src/wixlib/NetFx461.wxs delete mode 100644 src/wixlib/NetFx462.wxs delete mode 100644 src/wixlib/NetFx47.wxs delete mode 100644 src/wixlib/NetFx471.wxs delete mode 100644 src/wixlib/NetFx472.wxs delete mode 100644 src/wixlib/NetFx48.wxs delete mode 100644 src/wixlib/NetFxExtension.wxs delete mode 100644 src/wixlib/NetFxExtension_Platform.wxi delete mode 100644 src/wixlib/NetFxExtension_arm64.wxs delete mode 100644 src/wixlib/NetFxExtension_x64.wxs delete mode 100644 src/wixlib/NetFxExtension_x86.wxs delete mode 100644 src/wixlib/caDecor.wxi delete mode 100644 src/wixlib/netfx.v3.ncrunchproject delete mode 100644 src/wixlib/netfx.wixproj delete mode 100644 version.json diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 1d72e683..00000000 --- a/.editorconfig +++ /dev/null @@ -1,37 +0,0 @@ -# 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. -# -# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig -# then update all of the repos. - -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 4 -trim_trailing_whitespace = true - -[*.{cs,vb}] -dotnet_sort_system_directives_first = true - -[*.cs] -csharp_indent_case_contents = true : error -csharp_indent_switch_labels = true : error -csharp_new_line_before_open_brace = all -csharp_prefer_braces = true : error -csharp_style_expression_bodied_methods = when_on_single_line : suggestion -csharp_style_expression_bodied_constructors = when_on_single_line : suggestion -csharp_style_expression_bodied_operators = when_on_single_line : suggestion -csharp_style_expression_bodied_properties = when_on_single_line : suggestion -csharp_style_expression_bodied_indexers = when_on_single_line : suggestion -csharp_style_expression_bodied_accessors = when_on_single_line : suggestion -csharp_style_var_elsewhere = true : suggestion -csharp_style_var_for_built_in_types = true : suggestion -csharp_style_var_when_type_is_apparent = true : suggestion -dotnet_style_qualification_for_event = true : error -dotnet_style_qualification_for_field = true : error -dotnet_style_qualification_for_method = true : error -dotnet_style_qualification_for_property = true : error - -[*.targets] -indent_size = 2 diff --git a/NetFx.wixext.sln b/NetFx.wixext.sln deleted file mode 100644 index e830aeea..00000000 --- a/NetFx.wixext.sln +++ /dev/null @@ -1,75 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2010 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netfxca", "src\ca\netfxca.vcxproj", "{F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}" -EndProject -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "netfx", "src\wixlib\netfx.wixproj", "{45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Netfx.wixext", "src\wixext\WixToolset.Netfx.wixext.csproj", "{F774E291-0563-4DDD-B873-F5C31683CF4B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Netfx", "src\test\WixToolsetTest.Netfx\WixToolsetTest.Netfx.csproj", "{AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Debug|Any CPU.Build.0 = Debug|Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Debug|x64.ActiveCfg = Debug|Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Debug|x86.ActiveCfg = Debug|Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Debug|x86.Build.0 = Debug|Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Release|Any CPU.ActiveCfg = Release|Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Release|Any CPU.Build.0 = Release|Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Release|x64.ActiveCfg = Release|Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Release|x86.ActiveCfg = Release|Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Release|x86.Build.0 = Release|Win32 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|Any CPU.ActiveCfg = Debug|x86 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|Any CPU.Build.0 = Debug|x86 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|x64.ActiveCfg = Debug|x86 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|x86.ActiveCfg = Debug|x86 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|x86.Build.0 = Debug|x86 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|Any CPU.ActiveCfg = Release|x86 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|Any CPU.Build.0 = Release|x86 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|x64.ActiveCfg = Release|x86 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|x86.ActiveCfg = Release|x86 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|x86.Build.0 = Release|x86 - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|x64.ActiveCfg = Debug|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|x64.Build.0 = Debug|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|x86.ActiveCfg = Debug|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|x86.Build.0 = Debug|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|Any CPU.Build.0 = Release|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|x64.ActiveCfg = Release|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|x64.Build.0 = Release|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|x86.ActiveCfg = Release|Any CPU - {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|x86.Build.0 = Release|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|x64.ActiveCfg = Debug|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|x64.Build.0 = Debug|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|x86.ActiveCfg = Debug|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|x86.Build.0 = Debug|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|Any CPU.Build.0 = Release|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|x64.ActiveCfg = Release|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|x64.Build.0 = Release|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|x86.ActiveCfg = Release|Any CPU - {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {E4566A6B-47D0-4EA0-989A-D763AC39105D} - EndGlobalSection -EndGlobal diff --git a/README.md b/README.md deleted file mode 100644 index a31cfd1d..00000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# NetFx.wixext -WixToolset.NetFx.wixext - .NET Framework WiX Toolset Extension diff --git a/appveyor.cmd b/appveyor.cmd deleted file mode 100644 index d7e705f0..00000000 --- a/appveyor.cmd +++ /dev/null @@ -1,19 +0,0 @@ -@setlocal -@pushd %~dp0 -@set _C=Release -@if /i "%1"=="debug" set _C=Debug - -:: Restore -msbuild -p:Configuration=%_C% -t:Restore || exit /b - -:: Build -msbuild -p:Configuration=%_C% src\test\WixToolsetTest.Netfx\WixToolsetTest.Netfx.csproj || exit /b - -:: Test -dotnet test -c %_C% --no-build src\test\WixToolsetTest.Netfx || exit /b - -:: Pack -msbuild -p:Configuration=%_C% -p:NoBuild=true -t:Pack src\wixext\WixToolset.Netfx.wixext.csproj || exit /b - -@popd -@endlocal diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index c53cc9cc..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,42 +0,0 @@ -# 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. -# -# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml -# then update all of the repos. - -branches: - only: - - master - - develop - -image: Visual Studio 2019 - -version: 0.0.0.{build} -configuration: Release - -environment: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - NUGET_XMLDOC_MODE: skip - -build_script: - - appveyor.cmd - -pull_requests: - do_not_increment_build_number: true - -nuget: - disable_publish_on_pr: true - -skip_branch_with_pr: true -skip_tags: true - -artifacts: -- path: build\Release\**\*.nupkg - name: nuget -- path: build\Release\**\*.snupkg - name: snupkg - -notifications: -- provider: Slack - incoming_webhook: - secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA= diff --git a/global.json b/global.json deleted file mode 100644 index 23d7a5bd..00000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0213" - } -} diff --git a/nuget.config b/nuget.config deleted file mode 100644 index 7f258709..00000000 --- a/nuget.config +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.editorconfig b/src/.editorconfig new file mode 100644 index 00000000..1d72e683 --- /dev/null +++ b/src/.editorconfig @@ -0,0 +1,37 @@ +# 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. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig +# then update all of the repos. + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.{cs,vb}] +dotnet_sort_system_directives_first = true + +[*.cs] +csharp_indent_case_contents = true : error +csharp_indent_switch_labels = true : error +csharp_new_line_before_open_brace = all +csharp_prefer_braces = true : error +csharp_style_expression_bodied_methods = when_on_single_line : suggestion +csharp_style_expression_bodied_constructors = when_on_single_line : suggestion +csharp_style_expression_bodied_operators = when_on_single_line : suggestion +csharp_style_expression_bodied_properties = when_on_single_line : suggestion +csharp_style_expression_bodied_indexers = when_on_single_line : suggestion +csharp_style_expression_bodied_accessors = when_on_single_line : suggestion +csharp_style_var_elsewhere = true : suggestion +csharp_style_var_for_built_in_types = true : suggestion +csharp_style_var_when_type_is_apparent = true : suggestion +dotnet_style_qualification_for_event = true : error +dotnet_style_qualification_for_field = true : error +dotnet_style_qualification_for_method = true : error +dotnet_style_qualification_for_property = true : error + +[*.targets] +indent_size = 2 diff --git a/src/CustomizedNativeRecommendedRules.ruleset b/src/CustomizedNativeRecommendedRules.ruleset deleted file mode 100644 index 142b141c..00000000 --- a/src/CustomizedNativeRecommendedRules.ruleset +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props deleted file mode 100644 index b3c6287c..00000000 --- a/src/Directory.Build.props +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Debug - false - MSB3246 - - $(MSBuildProjectName) - $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) - $(BaseOutputPath)obj\$(ProjectName)\ - $(BaseOutputPath)$(Configuration)\ - - WiX Toolset Team - WiX Toolset - Copyright (c) .NET Foundation and contributors. All rights reserved. - MS-RL - WiX Toolset - - - - - diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets deleted file mode 100644 index 2fcc765a..00000000 --- a/src/Directory.Build.targets +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - true - $(SolutionPath) - $(NCrunchOriginalSolutionPath) - - - - - - - $([System.IO.File]::ReadAllText($(TheSolutionPath))) - $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) )) - (?<="[PackageName]", ")(.*)(?=", ") - - - - - - %(Identity) - $(SolutionFileContent.Contains('\%(Identity).csproj')) - - - - - $(RegexPattern.Replace('[PackageName]','%(PackageName)') ) - $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)')) - - - - - - - - - - - - - - diff --git a/src/Directory.csproj.props b/src/Directory.csproj.props deleted file mode 100644 index 81d24ad1..00000000 --- a/src/Directory.csproj.props +++ /dev/null @@ -1,13 +0,0 @@ - - - - - true - true - $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) - false - - diff --git a/src/Directory.csproj.targets b/src/Directory.csproj.targets deleted file mode 100644 index c3270426..00000000 --- a/src/Directory.csproj.targets +++ /dev/null @@ -1,26 +0,0 @@ - - - - - false - $(OutputPath)\$(AssemblyName).xml - - - - - $(PrivateRepositoryUrl.Replace('.git','')) - - $(MSBuildProjectName).nuspec - $(OutputPath)..\ - $(NuspecProperties);Id=$(PackageId);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title) - $(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl) - true - snupkg - - - - diff --git a/src/Directory.vcxproj.props b/src/Directory.vcxproj.props deleted file mode 100644 index 47c2c143..00000000 --- a/src/Directory.vcxproj.props +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - Win32 - $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ - $(OutputPath)$(Platform)\ - - - $(Company) - $(Copyright) - - win-x86;win-x64;win-arm64 - native,Version=v0.0 - - - - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - $(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset - - - - - $(DisableSpecificCompilerWarnings) - Level4 - $(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) - Use - precomp.h - StdCall - true - false - -YlprecompDefine - /Zc:threadSafeInit- %(AdditionalOptions) - true - - - $(ArmPreprocessorDefinitions);%(PreprocessorDefinitions) - $(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories) - - - $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories) - - - $(ProjectSubSystem) - $(ProjectModuleDefinitionFile) - $(ResourceOnlyDll) - true - $(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies) - $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories) - /IGNORE:4099 %(AdditionalOptions) - - - - - - NoExtensions - - - - - CDecl - - - - - OldStyle - true - true - - - - - Disabled - EnableFastChecks - _DEBUG;DEBUG;%(PreprocessorDefinitions) - MultiThreadedDebug - - - - - - MultiThreadedDebugDll - - - - - MinSpace - NDEBUG;%(PreprocessorDefinitions) - true - true - MultiThreaded - - - true - true - - - - - - MultiThreadedDll - - - - - $(LinkKeyFile) - $(LinkDelaySign) - - - diff --git a/src/ca/caDecor.h b/src/ca/caDecor.h deleted file mode 100644 index da274650..00000000 --- a/src/ca/caDecor.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -// 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. - - -#if defined(_M_ARM64) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64" -#elif defined(_M_AMD64) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64" -#elif defined(_M_ARM) -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM" -#else -#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86" -#endif diff --git a/src/ca/cost.h b/src/ca/cost.h deleted file mode 100644 index 95368eba..00000000 --- a/src/ca/cost.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once -// 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. - - -const UINT COST_NGEN_BLOCKING = 5000; -const UINT COST_NGEN_NONBLOCKING = 500; - diff --git a/src/ca/dllmain.cpp b/src/ca/dllmain.cpp deleted file mode 100644 index df53f872..00000000 --- a/src/ca/dllmain.cpp +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -#include "precomp.h" - -/******************************************************************** -DllMain - standard entry point for all WiX CustomActions - -********************************************************************/ -extern "C" BOOL WINAPI DllMain( - IN HINSTANCE hInst, - IN ULONG ulReason, - IN LPVOID) -{ - switch(ulReason) - { - case DLL_PROCESS_ATTACH: - WcaGlobalInitialize(hInst); - break; - - case DLL_PROCESS_DETACH: - WcaGlobalFinalize(); - break; - } - - return TRUE; -} diff --git a/src/ca/netfxca.cpp b/src/ca/netfxca.cpp deleted file mode 100644 index 3a71babf..00000000 --- a/src/ca/netfxca.cpp +++ /dev/null @@ -1,823 +0,0 @@ -// 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. - -#include "precomp.h" - -#define NGEN_DEBUG 0x0001 -#define NGEN_NODEP 0x0002 -#define NGEN_PROFILE 0x0004 -#define NGEN_32BIT 0x0008 -#define NGEN_64BIT 0x0010 - -#define NGEN_TIMEOUT 60000 // 60 seconds - -// If you change one of these strings, be sure to change the appropriate EmptyFormattedLength variable right below -LPCWSTR vpwzUnformattedQuotedFile = L"\"[#%s]\""; -LPCWSTR vpwzUnformattedQuotedDirectory = L"\"[%s]\\\""; - -// These represent the length of the above strings in the case that the property resolves to an empty string -const DWORD EMPTY_FORMATTED_LENGTH_QUOTED_FILE = 2; -const DWORD EMPTY_FORMATTED_LENGTH_QUOTED_DIRECTORY = 3; - -LPCWSTR vcsFileId = - L"SELECT `File` FROM `File` WHERE `File`=?"; -enum eFileId { fiFile = 1 }; - -LPCWSTR vcsNgenQuery = - L"SELECT `Wix4NetFxNativeImage`.`File_`, `Wix4NetFxNativeImage`.`Wix4NetFxNativeImage`, `Wix4NetFxNativeImage`.`Priority`, `Wix4NetFxNativeImage`.`Attributes`, `Wix4NetFxNativeImage`.`File_Application`, `Wix4NetFxNativeImage`.`Directory_ApplicationBase`, `File`.`Component_` " - L"FROM `Wix4NetFxNativeImage`, `File` WHERE `File`.`File`=`Wix4NetFxNativeImage`.`File_`"; -enum eNgenQuery { ngqFile = 1, ngqId, ngqPriority, ngqAttributes, ngqFileApp, ngqDirAppBase, ngqComponent }; - -LPCWSTR vcsNgenGac = - L"SELECT `MsiAssembly`.`File_Application` " - L"FROM `File`, `MsiAssembly` WHERE `File`.`Component_`=`MsiAssembly`.`Component_` AND `File`.`File`=?"; -enum eNgenGac { nggApplication = 1 }; - -LPCWSTR vcsNgenStrongName = - L"SELECT `Name`,`Value` FROM `MsiAssemblyName` WHERE `Component_`=?"; -enum eNgenStrongName { ngsnName = 1, ngsnValue }; - -// Searches subdirectories of the given path for the highest version of ngen.exe available -static HRESULT GetNgenVersion( - __in LPWSTR pwzParentPath, - __out LPWSTR* ppwzVersion - ) -{ - Assert(pwzParentPath); - - HRESULT hr = S_OK; - DWORD dwError = 0; - DWORD dwNgenFileFlags = 0; - - LPWSTR pwzVersionSearch = NULL; - LPWSTR pwzNgen = NULL; - LPWSTR pwzTemp = NULL; - LPWSTR pwzTempVersion = NULL; - DWORD dwMaxMajorVersion = 0; // This stores the highest major version we've seen so far - DWORD dwMaxMinorVersion = 0; // This stores the minor version of the highest major version we've seen so far - DWORD dwMajorVersion = 0; // This stores the major version of the directory we're currently considering - DWORD dwMinorVersion = 0; // This stores the minor version of the directory we're currently considering - BOOL fFound = TRUE; - WIN32_FIND_DATAW wfdVersionDirectories; - HANDLE hFind = INVALID_HANDLE_VALUE; - - hr = StrAllocFormatted(&pwzVersionSearch, L"%s*", pwzParentPath); - ExitOnFailure(hr, "failed to create outer directory search string from string %ls", pwzParentPath); - hFind = FindFirstFileW(pwzVersionSearch, &wfdVersionDirectories); - if (hFind == INVALID_HANDLE_VALUE) - { - ExitWithLastError(hr, "failed to call FindFirstFileW with string %ls", pwzVersionSearch); - } - - while (fFound) - { - pwzTempVersion = (LPWSTR)&(wfdVersionDirectories.cFileName); - - // Explicitly exclude v1.1.4322, which isn't backwards compatible and is not supported - if (wfdVersionDirectories.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - { - if (0 != lstrcmpW(L"v1.1.4322", pwzTempVersion)) - { - // A potential candidate directory was found to run ngen from - let's make sure ngen actually exists here - hr = StrAllocFormatted(&pwzNgen, L"%s%s\\ngen.exe", pwzParentPath, pwzTempVersion); - ExitOnFailure(hr, "failed to create inner ngen search string with strings %ls and %ls", pwzParentPath, pwzTempVersion); - - // If Ngen.exe does exist as a file here, then let's check the file version - if (FileExistsEx(pwzNgen, &dwNgenFileFlags) && (0 == (dwNgenFileFlags & FILE_ATTRIBUTE_DIRECTORY))) - { - hr = FileVersion(pwzNgen, &dwMajorVersion, &dwMinorVersion); - - if (FAILED(hr)) - { - WcaLog(LOGMSG_VERBOSE, "Failed to get version of %ls - continuing", pwzNgen); - } - else if (dwMajorVersion > dwMaxMajorVersion || (dwMajorVersion == dwMaxMajorVersion && dwMinorVersion > dwMaxMinorVersion)) - { - // If the version we found is the highest we've seen so far in this search, it will be our new best-so-far candidate - hr = StrAllocString(ppwzVersion, pwzTempVersion, 0); - ExitOnFailure(hr, "failed to copy temp version string %ls to version string", pwzTempVersion); - // Add one for the backslash after the directory name - WcaLog(LOGMSG_VERBOSE, "Found highest-so-far version of ngen.exe (in directory %ls, version %u.%u.%u.%u)", *ppwzVersion, (DWORD)HIWORD(dwMajorVersion), (DWORD)LOWORD(dwMajorVersion), (DWORD)HIWORD(dwMinorVersion), (DWORD)LOWORD(dwMinorVersion)); - - dwMaxMajorVersion = dwMajorVersion; - dwMaxMinorVersion = dwMinorVersion; - } - } - else - { - WcaLog(LOGMSG_VERBOSE, "Ignoring %ls because it doesn't contain the file ngen.exe", pwzTempVersion); - } - } - else - { - WcaLog(LOGMSG_VERBOSE, "Ignoring %ls because it is from .NET Framework v1.1, which is not backwards compatible with other versions of the Framework and thus is not supported by this custom action.", pwzTempVersion); - } - } - else - { - WcaLog(LOGMSG_VERBOSE, "Ignoring %ls because it isn't a directory", pwzTempVersion); - } - - fFound = FindNextFileW(hFind, &wfdVersionDirectories); - - if (!fFound) - { - dwError = ::GetLastError(); - hr = (ERROR_NO_MORE_FILES == dwError) ? ERROR_SUCCESS : HRESULT_FROM_WIN32(dwError); - ExitOnFailure(hr, "Failed to call FindNextFileW() with query %ls", pwzVersionSearch); - } - } - - if (NULL == *ppwzVersion) - { - hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); - ExitOnRootFailure(hr, "Searched through all subdirectories of %ls, but failed to find any version of ngen.exe", pwzParentPath); - } - else - { - WcaLog(LOGMSG_VERBOSE, "Using highest version of ngen found, located in this subdirectory: %ls, version %u.%u.%u.%u", *ppwzVersion, (DWORD)HIWORD(dwMajorVersion), (DWORD)LOWORD(dwMajorVersion), (DWORD)HIWORD(dwMinorVersion), (DWORD)LOWORD(dwMinorVersion)); - } - -LExit: - if (hFind != INVALID_HANDLE_VALUE) - { - if (0 == FindClose(hFind)) - { - dwError = ::GetLastError(); - hr = HRESULT_FROM_WIN32(dwError); - WcaLog(LOGMSG_STANDARD, "Failed to close handle created by outer FindFirstFile with error %x - continuing", hr); - } - hFind = INVALID_HANDLE_VALUE; - } - - ReleaseStr(pwzVersionSearch); - ReleaseStr(pwzNgen); - ReleaseStr(pwzTemp); - // Purposely don't release pwzTempVersion, because it wasn't allocated in this function, it's just a pointer to a string inside wfdVersionDirectories - - return hr; -} - -// Gets the path to ngen.exe -static HRESULT GetNgenPath( - __out LPWSTR* ppwzNgenPath, - __in BOOL f64BitFramework - ) -{ - Assert(ppwzNgenPath); - HRESULT hr = S_OK; - - LPWSTR pwzVersion = NULL; - LPWSTR pwzWindowsFolder = NULL; - - hr = WcaGetProperty(L"WindowsFolder", &pwzWindowsFolder); - ExitOnFailure(hr, "failed to get WindowsFolder property"); - - hr = StrAllocString(ppwzNgenPath, pwzWindowsFolder, 0); - ExitOnFailure(hr, "failed to copy to NgenPath windows folder: %ls", pwzWindowsFolder); - - if (f64BitFramework) - { - WcaLog(LOGMSG_VERBOSE, "Searching for ngen under 64-bit framework path"); - - hr = StrAllocConcat(ppwzNgenPath, L"Microsoft.NET\\Framework64\\", 0); - ExitOnFailure(hr, "failed to copy platform portion of ngen path"); - } - else - { - WcaLog(LOGMSG_VERBOSE, "Searching for ngen under 32-bit framework path"); - - hr = StrAllocConcat(ppwzNgenPath, L"Microsoft.NET\\Framework\\", 0); - ExitOnFailure(hr, "failed to copy platform portion of ngen path"); - } - - // We want to run the highest version of ngen possible, because they should be backwards compatible - so let's find the most appropriate directory now - hr = GetNgenVersion(*ppwzNgenPath, &pwzVersion); - ExitOnFailure(hr, "failed to search for ngen under path %ls", *ppwzNgenPath); - - hr = StrAllocConcat(ppwzNgenPath, pwzVersion, 0); - ExitOnFailure(hr, "failed to copy version portion of ngen path"); - - hr = StrAllocConcat(ppwzNgenPath, L"\\ngen.exe", 0); - ExitOnFailure(hr, "failed to copy \"\\ngen.exe\" portion of ngen path"); - -LExit: - ReleaseStr(pwzVersion); - ReleaseStr(pwzWindowsFolder); - - return hr; -} - - -static HRESULT GetStrongName( - __out LPWSTR* ppwzStrongName, - __in LPCWSTR pwzComponent - ) -{ - Assert(ppwzStrongName); - HRESULT hr = S_OK; - - PMSIHANDLE hView = NULL; - PMSIHANDLE hComponentRec = NULL; - PMSIHANDLE hRec = NULL; - - LPWSTR pwzData = NULL; - LPWSTR pwzName = NULL; - LPWSTR pwzVersion = NULL; - LPWSTR pwzCulture = NULL; - LPWSTR pwzPublicKeyToken = NULL; - - hComponentRec = ::MsiCreateRecord(1); - hr = WcaSetRecordString(hComponentRec, 1, pwzComponent); - ExitOnFailure(hr, "failed to set component value in record to: %ls", pwzComponent); - - // get the name value records for this component - hr = WcaOpenView(vcsNgenStrongName, &hView); - ExitOnFailure(hr, "failed to open view on Wix4NetFxNativeImage table"); - - hr = WcaExecuteView(hView, hComponentRec); - ExitOnFailure(hr, "failed to execute strong name view"); - - while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) - { - hr = WcaGetRecordString(hRec, ngsnName, &pwzData); - ExitOnFailure(hr, "failed to get MsiAssemblyName.Name for component: %ls", pwzComponent); - - if (0 == lstrcmpW(L"name", pwzData)) - { - hr = WcaGetRecordString(hRec, ngsnValue, &pwzName); - ExitOnFailure(hr, "failed to get MsiAssemblyName.Value for component: %ls Name: %ls", pwzComponent, pwzData); - } - else if (0 == lstrcmpW(L"version", pwzData)) - { - hr = WcaGetRecordString(hRec, ngsnValue, &pwzVersion); - ExitOnFailure(hr, "failed to get MsiAssemblyName.Value for component: %ls Name: %ls", pwzComponent, pwzData); - } - else if (0 == lstrcmpW(L"culture", pwzData)) - { - hr = WcaGetRecordString(hRec, ngsnValue, &pwzCulture); - ExitOnFailure(hr, "failed to get MsiAssemblyName.Value for component: %ls Name: %ls", pwzComponent, pwzData); - } - else if (0 == lstrcmpW(L"publicKeyToken", pwzData)) - { - hr = WcaGetRecordString(hRec, ngsnValue, &pwzPublicKeyToken); - ExitOnFailure(hr, "failed to get MsiAssemblyName.Value for component: %ls Name: %ls", pwzComponent, pwzData); - } - } - if (E_NOMOREITEMS == hr) - hr = S_OK; - ExitOnFailure(hr, "failed while looping through all names and values in MsiAssemblyName table for component: %ls", pwzComponent); - - hr = StrAllocFormatted(ppwzStrongName, L"\"%s, Version=%s, Culture=%s, PublicKeyToken=%s\"", pwzName, pwzVersion, pwzCulture, pwzPublicKeyToken); - ExitOnFailure(hr, "failed to format strong name for component: %ls", pwzComponent); - -LExit: - ReleaseStr(pwzData); - ReleaseStr(pwzName); - ReleaseStr(pwzVersion); - ReleaseStr(pwzCulture); - ReleaseStr(pwzPublicKeyToken); - - return hr; -} - -static HRESULT CreateInstallCommand( - __out LPWSTR* ppwzCommandLine, - __in LPCWSTR pwzNgenPath, - __in LPCWSTR pwzFile, - __in int iPriority, - __in int iAttributes, - __in LPCWSTR pwzFileApp, - __in LPCWSTR pwzDirAppBase - ) -{ - Assert(ppwzCommandLine && pwzNgenPath && *pwzNgenPath && pwzFile && *pwzFile&& pwzFileApp && pwzDirAppBase); - HRESULT hr = S_OK; - - LPWSTR pwzQueueString = NULL; - - hr = StrAllocFormatted(ppwzCommandLine, L"%s install %s", pwzNgenPath, pwzFile); - ExitOnFailure(hr, "failed to assemble install command line"); - - if (iPriority > 0) - { - hr = StrAllocFormatted(&pwzQueueString, L" /queue:%d", iPriority); - ExitOnFailure(hr, "failed to format queue string"); - - hr = StrAllocConcat(ppwzCommandLine, pwzQueueString, 0); - ExitOnFailure(hr, "failed to add queue string to NGEN command line"); - } - - if (NGEN_DEBUG & iAttributes) - { - hr = StrAllocConcat(ppwzCommandLine, L" /Debug", 0); - ExitOnFailure(hr, "failed to add debug to NGEN command line"); - } - - if (NGEN_PROFILE & iAttributes) - { - hr = StrAllocConcat(ppwzCommandLine, L" /Profile", 0); - ExitOnFailure(hr, "failed to add profile to NGEN command line"); - } - - if (NGEN_NODEP & iAttributes) - { - hr = StrAllocConcat(ppwzCommandLine, L" /NoDependencies", 0); - ExitOnFailure(hr, "failed to add no dependencies to NGEN command line"); - } - - // If it's more than just two quotes around an empty string - if (EMPTY_FORMATTED_LENGTH_QUOTED_FILE < lstrlenW(pwzFileApp)) - { - hr = StrAllocConcat(ppwzCommandLine, L" /ExeConfig:", 0); - ExitOnFailure(hr, "failed to add exe config to NGEN command line"); - - hr = StrAllocConcat(ppwzCommandLine, pwzFileApp, 0); - ExitOnFailure(hr, "failed to add file app to NGEN command line"); - } - - // If it's more than just two quotes around a backslash - if (EMPTY_FORMATTED_LENGTH_QUOTED_DIRECTORY < lstrlenW(pwzDirAppBase)) - { - hr = StrAllocConcat(ppwzCommandLine, L" /AppBase:", 0); - ExitOnFailure(hr, "failed to add app base to NGEN command line"); - - hr = StrAllocConcat(ppwzCommandLine, pwzDirAppBase, 0); - ExitOnFailure(hr, "failed to add dir app base to NGEN command line"); - } - -LExit: - return hr; -} - -/****************************************************************** - FileIdExists - checks if the file ID is found in the File table - - returns S_OK if the file exists; S_FALSE if not; otherwise, error -********************************************************************/ -static HRESULT FileIdExists( - __in_opt LPCWSTR wzFile - ) -{ - HRESULT hr = S_OK; - PMSIHANDLE hView = NULL; - PMSIHANDLE hRec = NULL; - - if (!wzFile) - { - hr = S_FALSE; - ExitFunction(); - } - - hRec = ::MsiCreateRecord(1); - hr = WcaSetRecordString(hRec, fiFile, wzFile); - ExitOnFailure(hr, "failed to create a record with the file: %ls", wzFile); - - hr = WcaTableExists(L"File"); - if (S_OK == hr) - { - hr = WcaOpenView(vcsFileId, &hView); - ExitOnFailure(hr, "failed to open view on File table"); - - hr = WcaExecuteView(hView, hRec); - ExitOnFailure(hr, "failed to execute view on File table"); - - // Reuse the same record; the handle will be released. - hr = WcaFetchSingleRecord(hView, &hRec); - ExitOnFailure(hr, "failed to fetch File from File table"); - } - -LExit: - - return hr; -} - -/****************************************************************** - SchedNetFx - entry point for NetFx Custom Action - -********************************************************************/ -extern "C" UINT __stdcall SchedNetFx( - __in MSIHANDLE hInstall - ) -{ - // AssertSz(FALSE, "debug SchedNetFx"); - - HRESULT hr = S_OK; - UINT er = ERROR_SUCCESS; - - LPWSTR pwzInstallCustomActionData = NULL; - LPWSTR pwzUninstallCustomActionData = NULL; - UINT uiCost = 0; - - PMSIHANDLE hView = NULL; - PMSIHANDLE hRec = NULL; - PMSIHANDLE hViewGac = NULL; - PMSIHANDLE hRecGac = NULL; - - LPWSTR pwzId = NULL; - LPWSTR pwzData = NULL; - LPWSTR pwzTemp = NULL; - LPWSTR pwzFile = NULL; - int iPriority = 0; - int iAssemblyCost = 0; - int iAttributes = 0; - LPWSTR pwzFileApp = NULL; - LPWSTR pwzDirAppBase = NULL; - LPWSTR pwzComponent = NULL; - - INSTALLSTATE isInstalled; - INSTALLSTATE isAction; - - LPWSTR pwz32Ngen = NULL; - LPWSTR pwz64Ngen = NULL; - - BOOL f32NgenExeExists = FALSE; - BOOL f64NgenExeExists = FALSE; - - BOOL fNeedInstallUpdate32 = FALSE; - BOOL fNeedUninstallUpdate32 = FALSE; - BOOL fNeedInstallUpdate64 = FALSE; - BOOL fNeedUninstallUpdate64 = FALSE; - - // initialize - hr = WcaInitialize(hInstall, "SchedNetFx"); - ExitOnFailure(hr, "failed to initialize"); - - hr = GetNgenPath(&pwz32Ngen, FALSE); - f32NgenExeExists = SUCCEEDED(hr); - if (HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) == hr || HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr) - { - hr = ERROR_SUCCESS; - WcaLog(LOGMSG_STANDARD, "Failed to find 32bit ngen. No actions will be scheduled to create native images for 32bit."); - } - ExitOnFailure(hr, "failed to get 32bit ngen.exe path"); - - hr = GetNgenPath(&pwz64Ngen, TRUE); - f64NgenExeExists = SUCCEEDED(hr); - if (HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) == hr || HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr) - { - hr = ERROR_SUCCESS; - WcaLog(LOGMSG_STANDARD, "Failed to find 64bit ngen. No actions will be scheduled to create native images for 64bit."); - } - ExitOnFailure(hr, "failed to get 64bit ngen.exe path"); - - // loop through all the NetFx records - hr = WcaOpenExecuteView(vcsNgenQuery, &hView); - ExitOnFailure(hr, "failed to open view on Wix4NetFxNativeImage table"); - - while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) - { - // Get Id - hr = WcaGetRecordString(hRec, ngqId, &pwzId); - ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Wix4NetFxNativeImage"); - - // Get File - hr = WcaGetRecordString(hRec, ngqFile, &pwzData); - ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.File_ for record: %ls", pwzId); - hr = StrAllocFormatted(&pwzTemp, vpwzUnformattedQuotedFile, pwzData); - ExitOnFailure(hr, "failed to format file string for file: %ls", pwzData); - hr = WcaGetFormattedString(pwzTemp, &pwzFile); - ExitOnFailure(hr, "failed to get formatted string for file: %ls", pwzData); - - // Get Priority - hr = WcaGetRecordInteger(hRec, ngqPriority, &iPriority); - ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Priority for record: %ls", pwzId); - - if (0 == iPriority) - iAssemblyCost = COST_NGEN_BLOCKING; - else - iAssemblyCost = COST_NGEN_NONBLOCKING; - - // Get Attributes - hr = WcaGetRecordInteger(hRec, ngqAttributes, &iAttributes); - ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Attributes for record: %ls", pwzId); - - // Get File_Application or leave pwzFileApp NULL. - hr = WcaGetRecordFormattedString(hRec, ngqFileApp, &pwzData); - ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.File_Application for record: %ls", pwzId); - - // Check if the value resolves to a valid file ID. - if (S_OK == FileIdExists(pwzData)) - { - // Resolve the file ID to a path. - hr = StrAllocFormatted(&pwzTemp, vpwzUnformattedQuotedFile, pwzData); - ExitOnFailure(hr, "failed to format file application string for file: %ls", pwzData); - - hr = WcaGetFormattedString(pwzTemp, &pwzFileApp); - ExitOnFailure(hr, "failed to get formatted string for file application: %ls", pwzData); - } - else - { - // Assume record formatted to a path already. - hr = StrAllocString(&pwzFileApp, pwzData, 0); - ExitOnFailure(hr, "failed to allocate string for file path: %ls", pwzData); - - hr = PathEnsureQuoted(&pwzFileApp, FALSE); - ExitOnFailure(hr, "failed to quote file path: %ls", pwzData); - } - - // Get Directory_ApplicationBase or leave pwzDirAppBase NULL. - hr = WcaGetRecordFormattedString(hRec, ngqDirAppBase, &pwzData); - ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Directory_ApplicationBase for record: %ls", pwzId); - - if (WcaIsUnicodePropertySet(pwzData)) - { - // Resolve the directory ID to a path. - hr = StrAllocFormatted(&pwzTemp, vpwzUnformattedQuotedDirectory, pwzData); - ExitOnFailure(hr, "failed to format directory application base string for property: %ls", pwzData); - - hr = WcaGetFormattedString(pwzTemp, &pwzDirAppBase); - ExitOnFailure(hr, "failed to get formatted string for directory application base: %ls", pwzData); - } - else - { - // Assume record formatted to a path already. - hr = StrAllocString(&pwzDirAppBase, pwzData, 0); - ExitOnFailure(hr, "failed to allocate string for directory path: %ls", pwzData); - - hr = PathEnsureQuoted(&pwzDirAppBase, TRUE); - ExitOnFailure(hr, "failed to quote and backslashify directory: %ls", pwzData); - } - - // Get Component - hr = WcaGetRecordString(hRec, ngqComponent, &pwzComponent); - ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Directory_ApplicationBase for record: %ls", pwzId); - er = ::MsiGetComponentStateW(hInstall, pwzComponent, &isInstalled, &isAction); - ExitOnWin32Error(er, hr, "failed to get install state for Component: %ls", pwzComponent); - - // - // Figure out if it's going to be GAC'd. The possibility exists that no assemblies are going to be GAC'd - // so we have to check for the MsiAssembly table first. - // - if (S_OK == WcaTableExists(L"MsiAssembly")) - { - hr = WcaOpenView(vcsNgenGac, &hViewGac); - ExitOnFailure(hr, "failed to open view on File/MsiAssembly table"); - - hr = WcaExecuteView(hViewGac, hRec); - ExitOnFailure(hr, "failed to execute view on File/MsiAssembly table"); - - hr = WcaFetchSingleRecord(hViewGac, &hRecGac); - ExitOnFailure(hr, "failed to fetch File_Assembly from File/MsiAssembly table"); - - if (S_FALSE != hr) - { - hr = WcaGetRecordString(hRecGac, nggApplication, &pwzData); - ExitOnFailure(hr, "failed to get MsiAssembly.File_Application"); - - // If it's in the GAC replace the file name with the strong name - if (L'\0' == pwzData[0]) - { - hr = GetStrongName(&pwzFile, pwzComponent); - ExitOnFailure(hr, "failed to get strong name for component: %ls", pwzData); - } - } - } - - // - // Schedule the work - // - if (!(iAttributes & NGEN_32BIT) && !(iAttributes & NGEN_64BIT)) - ExitOnFailure(hr = E_INVALIDARG, "Neither 32bit nor 64bit is specified for NGEN of file: %ls", pwzFile); - - if (WcaIsInstalling(isInstalled, isAction) || WcaIsReInstalling(isInstalled, isAction)) - { - if (iAttributes & NGEN_32BIT && f32NgenExeExists) - { - // Assemble the install command line - hr = CreateInstallCommand(&pwzData, pwz32Ngen, pwzFile, iPriority, iAttributes, pwzFileApp, pwzDirAppBase); - ExitOnFailure(hr, "failed to create install command line"); - - hr = WcaWriteStringToCaData(pwzData, &pwzInstallCustomActionData); - ExitOnFailure(hr, "failed to add install command to custom action data: %ls", pwzData); - - hr = WcaWriteIntegerToCaData(iAssemblyCost, &pwzInstallCustomActionData); - ExitOnFailure(hr, "failed to add cost to custom action data: %ls", pwzData); - - uiCost += iAssemblyCost; - - fNeedInstallUpdate32 = TRUE; - } - - if (iAttributes & NGEN_64BIT && f64NgenExeExists) - { - // Assemble the install command line - hr = CreateInstallCommand(&pwzData, pwz64Ngen, pwzFile, iPriority, iAttributes, pwzFileApp, pwzDirAppBase); - ExitOnFailure(hr, "failed to create install command line"); - - hr = WcaWriteStringToCaData(pwzData, &pwzInstallCustomActionData); // command - ExitOnFailure(hr, "failed to add install command to custom action data: %ls", pwzData); - - hr = WcaWriteIntegerToCaData(iAssemblyCost, &pwzInstallCustomActionData); // cost - ExitOnFailure(hr, "failed to add cost to custom action data: %ls", pwzData); - - uiCost += iAssemblyCost; - - fNeedInstallUpdate64 = TRUE; - } - } - else if (WcaIsUninstalling(isInstalled, isAction)) - { - if (iAttributes & NGEN_32BIT && f32NgenExeExists) - { - hr = StrAllocFormatted(&pwzData, L"%s uninstall %s", pwz32Ngen, pwzFile); - ExitOnFailure(hr, "failed to create update 32 command line"); - - hr = WcaWriteStringToCaData(pwzData, &pwzUninstallCustomActionData); // command - ExitOnFailure(hr, "failed to add install command to custom action data: %ls", pwzData); - - hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzUninstallCustomActionData); // cost - ExitOnFailure(hr, "failed to add cost to custom action data: %ls", pwzData); - - uiCost += COST_NGEN_NONBLOCKING; - - fNeedUninstallUpdate32 = TRUE; - } - - if (iAttributes & NGEN_64BIT && f64NgenExeExists) - { - hr = StrAllocFormatted(&pwzData, L"%s uninstall %s", pwz64Ngen, pwzFile); - ExitOnFailure(hr, "failed to create update 64 command line"); - - hr = WcaWriteStringToCaData(pwzData, &pwzUninstallCustomActionData); // command - ExitOnFailure(hr, "failed to add install command to custom action data: %ls", pwzData); - - hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzUninstallCustomActionData); // cost - ExitOnFailure(hr, "failed to add cost to custom action data: %ls", pwzData); - - uiCost += COST_NGEN_NONBLOCKING; - - fNeedUninstallUpdate64 = TRUE; - } - } - } - if (E_NOMOREITEMS == hr) - hr = S_OK; - ExitOnFailure(hr, "failed while looping through all files to create native images for"); - - // If we need 32 bit install update - if (fNeedInstallUpdate32) - { - hr = StrAllocFormatted(&pwzData, L"%s update /queue", pwz32Ngen); - ExitOnFailure(hr, "failed to create install update 32 command line"); - - hr = WcaWriteStringToCaData(pwzData, &pwzInstallCustomActionData); // command - ExitOnFailure(hr, "failed to add install command to install custom action data: %ls", pwzData); - - hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzInstallCustomActionData); // cost - ExitOnFailure(hr, "failed to add cost to install custom action data: %ls", pwzData); - - uiCost += COST_NGEN_NONBLOCKING; - } - - // If we need 32 bit uninstall update - if (fNeedUninstallUpdate32) - { - hr = StrAllocFormatted(&pwzData, L"%s update /queue", pwz32Ngen); - ExitOnFailure(hr, "failed to create uninstall update 32 command line"); - - hr = WcaWriteStringToCaData(pwzData, &pwzUninstallCustomActionData); // command - ExitOnFailure(hr, "failed to add install command to uninstall custom action data: %ls", pwzData); - - hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzUninstallCustomActionData); // cost - ExitOnFailure(hr, "failed to add cost to uninstall custom action data: %ls", pwzData); - - uiCost += COST_NGEN_NONBLOCKING; - } - - // If we need 64 bit install update - if (fNeedInstallUpdate64) - { - hr = StrAllocFormatted(&pwzData, L"%s update /queue", pwz64Ngen); - ExitOnFailure(hr, "failed to create install update 64 command line"); - - hr = WcaWriteStringToCaData(pwzData, &pwzInstallCustomActionData); // command - ExitOnFailure(hr, "failed to add install command to install custom action data: %ls", pwzData); - - hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzInstallCustomActionData); // cost - ExitOnFailure(hr, "failed to add cost to install custom action data: %ls", pwzData); - - uiCost += COST_NGEN_NONBLOCKING; - } - - // If we need 64 bit install update - if (fNeedUninstallUpdate64) - { - hr = StrAllocFormatted(&pwzData, L"%s update /queue", pwz64Ngen); - ExitOnFailure(hr, "failed to create uninstall update 64 command line"); - - hr = WcaWriteStringToCaData(pwzData, &pwzUninstallCustomActionData); // command - ExitOnFailure(hr, "failed to add install command to uninstall custom action data: %ls", pwzData); - - hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzUninstallCustomActionData); // cost - ExitOnFailure(hr, "failed to add cost to uninstall custom action data: %ls", pwzData); - - uiCost += COST_NGEN_NONBLOCKING; - } - - // Add to progress bar - if ((pwzInstallCustomActionData && *pwzInstallCustomActionData) || (pwzUninstallCustomActionData && *pwzUninstallCustomActionData)) - { - hr = WcaProgressMessage(uiCost, TRUE); - ExitOnFailure(hr, "failed to extend progress bar for NetFxExecuteNativeImage"); - } - - // Schedule the install custom action - if (pwzInstallCustomActionData && *pwzInstallCustomActionData) - { - hr = WcaSetProperty(L"NetFxExecuteNativeImageInstall", pwzInstallCustomActionData); - ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageInstall action"); - - hr = WcaSetProperty(L"NetFxExecuteNativeImageCommitInstall", pwzInstallCustomActionData); - ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageCommitInstall action"); - } - - // Schedule the uninstall custom action - if (pwzUninstallCustomActionData && *pwzUninstallCustomActionData) - { - hr = WcaSetProperty(L"NetFxExecuteNativeImageUninstall", pwzUninstallCustomActionData); - ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageUninstall action"); - - hr = WcaSetProperty(L"NetFxExecuteNativeImageCommitUninstall", pwzUninstallCustomActionData); - ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageCommitUninstall action"); - } - - -LExit: - ReleaseStr(pwzInstallCustomActionData); - ReleaseStr(pwzUninstallCustomActionData); - ReleaseStr(pwzId); - ReleaseStr(pwzData); - ReleaseStr(pwzTemp); - ReleaseStr(pwzFile); - ReleaseStr(pwzFileApp); - ReleaseStr(pwzDirAppBase); - ReleaseStr(pwzComponent); - ReleaseStr(pwz32Ngen); - ReleaseStr(pwz64Ngen); - - if (FAILED(hr)) - er = ERROR_INSTALL_FAILURE; - return WcaFinalize(er); -} - - -/****************************************************************** - ExecNetFx - entry point for NetFx Custom Action - -*******************************************************************/ -extern "C" UINT __stdcall ExecNetFx( - __in MSIHANDLE hInstall - ) -{ -// AssertSz(FALSE, "debug ExecNetFx"); - - HRESULT hr = S_OK; - UINT er = ERROR_SUCCESS; - - LPWSTR pwzCustomActionData = NULL; - LPWSTR pwzData = NULL; - LPWSTR pwz = NULL; - int iCost = 0; - - // initialize - hr = WcaInitialize(hInstall, "ExecNetFx"); - ExitOnFailure(hr, "failed to initialize"); - - hr = WcaGetProperty( L"CustomActionData", &pwzCustomActionData); - ExitOnFailure(hr, "failed to get CustomActionData"); - - WcaLog(LOGMSG_TRACEONLY, "CustomActionData: %ls", pwzCustomActionData); - - pwz = pwzCustomActionData; - - // loop through all the passed in data - while (pwz && *pwz) - { - hr = WcaReadStringFromCaData(&pwz, &pwzData); - ExitOnFailure(hr, "failed to read command line from custom action data"); - - hr = WcaReadIntegerFromCaData(&pwz, &iCost); - ExitOnFailure(hr, "failed to read cost from custom action data"); - - hr = QuietExec(pwzData, NGEN_TIMEOUT, TRUE, TRUE); - // If we fail here it isn't critical - keep looping through to try to act on the other assemblies on our list - if (FAILED(hr)) - { - WcaLog(LOGMSG_STANDARD, "failed to execute Ngen command (with error 0x%x): %ls, continuing anyway", hr, pwzData); - hr = S_OK; - } - - // Tick the progress bar along for this assembly - hr = WcaProgressMessage(iCost, FALSE); - ExitOnFailure(hr, "failed to tick progress bar for command line: %ls", pwzData); - } - -LExit: - ReleaseStr(pwzCustomActionData); - ReleaseStr(pwzData); - - if (FAILED(hr)) - er = ERROR_INSTALL_FAILURE; - return WcaFinalize(er); -} - diff --git a/src/ca/netfxca.def b/src/ca/netfxca.def deleted file mode 100644 index c1d01f5f..00000000 --- a/src/ca/netfxca.def +++ /dev/null @@ -1,8 +0,0 @@ -; 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. - - -LIBRARY "netfxca" - -EXPORTS - SchedNetFx - ExecNetFx diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj deleted file mode 100644 index 5e25b683..00000000 --- a/src/ca/netfxca.vcxproj +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - Debug - ARM64 - - - Release - ARM64 - - - - - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} - DynamicLibrary - netfxca - v142 - Unicode - netfxca.def - WiX Toolset .NET Framework CustomAction - - - - - - - msi.lib - - - - - Create - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ca/precomp.h b/src/ca/precomp.h deleted file mode 100644 index 4a83c164..00000000 --- a/src/ca/precomp.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once -// 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. - - -#include -#include - -#include "wcautil.h" -#include "fileutil.h" -#include "strutil.h" -#include "pathutil.h" - -#include "caDecor.h" -#include "cost.h" diff --git a/src/ext/NetFx/CustomizedNativeRecommendedRules.ruleset b/src/ext/NetFx/CustomizedNativeRecommendedRules.ruleset new file mode 100644 index 00000000..142b141c --- /dev/null +++ b/src/ext/NetFx/CustomizedNativeRecommendedRules.ruleset @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/ext/NetFx/Directory.Build.props b/src/ext/NetFx/Directory.Build.props new file mode 100644 index 00000000..b3c6287c --- /dev/null +++ b/src/ext/NetFx/Directory.Build.props @@ -0,0 +1,27 @@ + + + + + + Debug + false + MSB3246 + + $(MSBuildProjectName) + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) + $(BaseOutputPath)obj\$(ProjectName)\ + $(BaseOutputPath)$(Configuration)\ + + WiX Toolset Team + WiX Toolset + Copyright (c) .NET Foundation and contributors. All rights reserved. + MS-RL + WiX Toolset + + + + + diff --git a/src/ext/NetFx/Directory.Build.targets b/src/ext/NetFx/Directory.Build.targets new file mode 100644 index 00000000..2fcc765a --- /dev/null +++ b/src/ext/NetFx/Directory.Build.targets @@ -0,0 +1,51 @@ + + + + + + + true + $(SolutionPath) + $(NCrunchOriginalSolutionPath) + + + + + + + $([System.IO.File]::ReadAllText($(TheSolutionPath))) + $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) )) + (?<="[PackageName]", ")(.*)(?=", ") + + + + + + %(Identity) + $(SolutionFileContent.Contains('\%(Identity).csproj')) + + + + + $(RegexPattern.Replace('[PackageName]','%(PackageName)') ) + $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)')) + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/Directory.csproj.props b/src/ext/NetFx/Directory.csproj.props new file mode 100644 index 00000000..81d24ad1 --- /dev/null +++ b/src/ext/NetFx/Directory.csproj.props @@ -0,0 +1,13 @@ + + + + + true + true + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + false + + diff --git a/src/ext/NetFx/Directory.csproj.targets b/src/ext/NetFx/Directory.csproj.targets new file mode 100644 index 00000000..c3270426 --- /dev/null +++ b/src/ext/NetFx/Directory.csproj.targets @@ -0,0 +1,26 @@ + + + + + false + $(OutputPath)\$(AssemblyName).xml + + + + + $(PrivateRepositoryUrl.Replace('.git','')) + + $(MSBuildProjectName).nuspec + $(OutputPath)..\ + $(NuspecProperties);Id=$(PackageId);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title) + $(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl) + true + snupkg + + + + diff --git a/src/ext/NetFx/Directory.vcxproj.props b/src/ext/NetFx/Directory.vcxproj.props new file mode 100644 index 00000000..47c2c143 --- /dev/null +++ b/src/ext/NetFx/Directory.vcxproj.props @@ -0,0 +1,115 @@ + + + + + + Win32 + $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ + $(OutputPath)$(Platform)\ + + + $(Company) + $(Copyright) + + win-x86;win-x64;win-arm64 + native,Version=v0.0 + + + + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + + + + $(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset + + + + + $(DisableSpecificCompilerWarnings) + Level4 + $(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) + Use + precomp.h + StdCall + true + false + -YlprecompDefine + /Zc:threadSafeInit- %(AdditionalOptions) + true + + + $(ArmPreprocessorDefinitions);%(PreprocessorDefinitions) + $(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories) + + + $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories) + + + $(ProjectSubSystem) + $(ProjectModuleDefinitionFile) + $(ResourceOnlyDll) + true + $(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies) + $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories) + /IGNORE:4099 %(AdditionalOptions) + + + + + + NoExtensions + + + + + CDecl + + + + + OldStyle + true + true + + + + + Disabled + EnableFastChecks + _DEBUG;DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebug + + + + + + MultiThreadedDebugDll + + + + + MinSpace + NDEBUG;%(PreprocessorDefinitions) + true + true + MultiThreaded + + + true + true + + + + + + MultiThreadedDll + + + + + $(LinkKeyFile) + $(LinkDelaySign) + + + diff --git a/src/ext/NetFx/NetFx.wixext.sln b/src/ext/NetFx/NetFx.wixext.sln new file mode 100644 index 00000000..e830aeea --- /dev/null +++ b/src/ext/NetFx/NetFx.wixext.sln @@ -0,0 +1,75 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2010 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netfxca", "src\ca\netfxca.vcxproj", "{F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}" +EndProject +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "netfx", "src\wixlib\netfx.wixproj", "{45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Netfx.wixext", "src\wixext\WixToolset.Netfx.wixext.csproj", "{F774E291-0563-4DDD-B873-F5C31683CF4B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Netfx", "src\test\WixToolsetTest.Netfx\WixToolsetTest.Netfx.csproj", "{AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Debug|Any CPU.Build.0 = Debug|Win32 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Debug|x64.ActiveCfg = Debug|Win32 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Debug|x86.ActiveCfg = Debug|Win32 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Debug|x86.Build.0 = Debug|Win32 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Release|Any CPU.ActiveCfg = Release|Win32 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Release|Any CPU.Build.0 = Release|Win32 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Release|x64.ActiveCfg = Release|Win32 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Release|x86.ActiveCfg = Release|Win32 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981}.Release|x86.Build.0 = Release|Win32 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|Any CPU.ActiveCfg = Debug|x86 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|Any CPU.Build.0 = Debug|x86 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|x64.ActiveCfg = Debug|x86 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|x86.ActiveCfg = Debug|x86 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|x86.Build.0 = Debug|x86 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|Any CPU.ActiveCfg = Release|x86 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|Any CPU.Build.0 = Release|x86 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|x64.ActiveCfg = Release|x86 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|x86.ActiveCfg = Release|x86 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|x86.Build.0 = Release|x86 + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|x64.ActiveCfg = Debug|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|x64.Build.0 = Debug|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|x86.ActiveCfg = Debug|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Debug|x86.Build.0 = Debug|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|Any CPU.Build.0 = Release|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|x64.ActiveCfg = Release|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|x64.Build.0 = Release|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|x86.ActiveCfg = Release|Any CPU + {F774E291-0563-4DDD-B873-F5C31683CF4B}.Release|x86.Build.0 = Release|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|x64.ActiveCfg = Debug|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|x64.Build.0 = Debug|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|x86.ActiveCfg = Debug|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Debug|x86.Build.0 = Debug|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|Any CPU.Build.0 = Release|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|x64.ActiveCfg = Release|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|x64.Build.0 = Release|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|x86.ActiveCfg = Release|Any CPU + {AABEF178-D4A2-4EE1-8E00-3EBAB23A5548}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E4566A6B-47D0-4EA0-989A-D763AC39105D} + EndGlobalSection +EndGlobal diff --git a/src/ext/NetFx/README.md b/src/ext/NetFx/README.md new file mode 100644 index 00000000..a31cfd1d --- /dev/null +++ b/src/ext/NetFx/README.md @@ -0,0 +1,2 @@ +# NetFx.wixext +WixToolset.NetFx.wixext - .NET Framework WiX Toolset Extension diff --git a/src/ext/NetFx/appveyor.cmd b/src/ext/NetFx/appveyor.cmd new file mode 100644 index 00000000..d7e705f0 --- /dev/null +++ b/src/ext/NetFx/appveyor.cmd @@ -0,0 +1,19 @@ +@setlocal +@pushd %~dp0 +@set _C=Release +@if /i "%1"=="debug" set _C=Debug + +:: Restore +msbuild -p:Configuration=%_C% -t:Restore || exit /b + +:: Build +msbuild -p:Configuration=%_C% src\test\WixToolsetTest.Netfx\WixToolsetTest.Netfx.csproj || exit /b + +:: Test +dotnet test -c %_C% --no-build src\test\WixToolsetTest.Netfx || exit /b + +:: Pack +msbuild -p:Configuration=%_C% -p:NoBuild=true -t:Pack src\wixext\WixToolset.Netfx.wixext.csproj || exit /b + +@popd +@endlocal diff --git a/src/ext/NetFx/appveyor.yml b/src/ext/NetFx/appveyor.yml new file mode 100644 index 00000000..c53cc9cc --- /dev/null +++ b/src/ext/NetFx/appveyor.yml @@ -0,0 +1,42 @@ +# 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. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml +# then update all of the repos. + +branches: + only: + - master + - develop + +image: Visual Studio 2019 + +version: 0.0.0.{build} +configuration: Release + +environment: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + NUGET_XMLDOC_MODE: skip + +build_script: + - appveyor.cmd + +pull_requests: + do_not_increment_build_number: true + +nuget: + disable_publish_on_pr: true + +skip_branch_with_pr: true +skip_tags: true + +artifacts: +- path: build\Release\**\*.nupkg + name: nuget +- path: build\Release\**\*.snupkg + name: snupkg + +notifications: +- provider: Slack + incoming_webhook: + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA= diff --git a/src/ext/NetFx/ca/caDecor.h b/src/ext/NetFx/ca/caDecor.h new file mode 100644 index 00000000..da274650 --- /dev/null +++ b/src/ext/NetFx/ca/caDecor.h @@ -0,0 +1,13 @@ +#pragma once +// 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. + + +#if defined(_M_ARM64) +#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_A64" +#elif defined(_M_AMD64) +#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X64" +#elif defined(_M_ARM) +#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_ARM" +#else +#define CUSTOM_ACTION_DECORATION(f) L"Wix4" f L"_X86" +#endif diff --git a/src/ext/NetFx/ca/cost.h b/src/ext/NetFx/ca/cost.h new file mode 100644 index 00000000..95368eba --- /dev/null +++ b/src/ext/NetFx/ca/cost.h @@ -0,0 +1,7 @@ +#pragma once +// 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. + + +const UINT COST_NGEN_BLOCKING = 5000; +const UINT COST_NGEN_NONBLOCKING = 500; + diff --git a/src/ext/NetFx/ca/dllmain.cpp b/src/ext/NetFx/ca/dllmain.cpp new file mode 100644 index 00000000..df53f872 --- /dev/null +++ b/src/ext/NetFx/ca/dllmain.cpp @@ -0,0 +1,26 @@ +// 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. + +#include "precomp.h" + +/******************************************************************** +DllMain - standard entry point for all WiX CustomActions + +********************************************************************/ +extern "C" BOOL WINAPI DllMain( + IN HINSTANCE hInst, + IN ULONG ulReason, + IN LPVOID) +{ + switch(ulReason) + { + case DLL_PROCESS_ATTACH: + WcaGlobalInitialize(hInst); + break; + + case DLL_PROCESS_DETACH: + WcaGlobalFinalize(); + break; + } + + return TRUE; +} diff --git a/src/ext/NetFx/ca/netfxca.cpp b/src/ext/NetFx/ca/netfxca.cpp new file mode 100644 index 00000000..3a71babf --- /dev/null +++ b/src/ext/NetFx/ca/netfxca.cpp @@ -0,0 +1,823 @@ +// 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. + +#include "precomp.h" + +#define NGEN_DEBUG 0x0001 +#define NGEN_NODEP 0x0002 +#define NGEN_PROFILE 0x0004 +#define NGEN_32BIT 0x0008 +#define NGEN_64BIT 0x0010 + +#define NGEN_TIMEOUT 60000 // 60 seconds + +// If you change one of these strings, be sure to change the appropriate EmptyFormattedLength variable right below +LPCWSTR vpwzUnformattedQuotedFile = L"\"[#%s]\""; +LPCWSTR vpwzUnformattedQuotedDirectory = L"\"[%s]\\\""; + +// These represent the length of the above strings in the case that the property resolves to an empty string +const DWORD EMPTY_FORMATTED_LENGTH_QUOTED_FILE = 2; +const DWORD EMPTY_FORMATTED_LENGTH_QUOTED_DIRECTORY = 3; + +LPCWSTR vcsFileId = + L"SELECT `File` FROM `File` WHERE `File`=?"; +enum eFileId { fiFile = 1 }; + +LPCWSTR vcsNgenQuery = + L"SELECT `Wix4NetFxNativeImage`.`File_`, `Wix4NetFxNativeImage`.`Wix4NetFxNativeImage`, `Wix4NetFxNativeImage`.`Priority`, `Wix4NetFxNativeImage`.`Attributes`, `Wix4NetFxNativeImage`.`File_Application`, `Wix4NetFxNativeImage`.`Directory_ApplicationBase`, `File`.`Component_` " + L"FROM `Wix4NetFxNativeImage`, `File` WHERE `File`.`File`=`Wix4NetFxNativeImage`.`File_`"; +enum eNgenQuery { ngqFile = 1, ngqId, ngqPriority, ngqAttributes, ngqFileApp, ngqDirAppBase, ngqComponent }; + +LPCWSTR vcsNgenGac = + L"SELECT `MsiAssembly`.`File_Application` " + L"FROM `File`, `MsiAssembly` WHERE `File`.`Component_`=`MsiAssembly`.`Component_` AND `File`.`File`=?"; +enum eNgenGac { nggApplication = 1 }; + +LPCWSTR vcsNgenStrongName = + L"SELECT `Name`,`Value` FROM `MsiAssemblyName` WHERE `Component_`=?"; +enum eNgenStrongName { ngsnName = 1, ngsnValue }; + +// Searches subdirectories of the given path for the highest version of ngen.exe available +static HRESULT GetNgenVersion( + __in LPWSTR pwzParentPath, + __out LPWSTR* ppwzVersion + ) +{ + Assert(pwzParentPath); + + HRESULT hr = S_OK; + DWORD dwError = 0; + DWORD dwNgenFileFlags = 0; + + LPWSTR pwzVersionSearch = NULL; + LPWSTR pwzNgen = NULL; + LPWSTR pwzTemp = NULL; + LPWSTR pwzTempVersion = NULL; + DWORD dwMaxMajorVersion = 0; // This stores the highest major version we've seen so far + DWORD dwMaxMinorVersion = 0; // This stores the minor version of the highest major version we've seen so far + DWORD dwMajorVersion = 0; // This stores the major version of the directory we're currently considering + DWORD dwMinorVersion = 0; // This stores the minor version of the directory we're currently considering + BOOL fFound = TRUE; + WIN32_FIND_DATAW wfdVersionDirectories; + HANDLE hFind = INVALID_HANDLE_VALUE; + + hr = StrAllocFormatted(&pwzVersionSearch, L"%s*", pwzParentPath); + ExitOnFailure(hr, "failed to create outer directory search string from string %ls", pwzParentPath); + hFind = FindFirstFileW(pwzVersionSearch, &wfdVersionDirectories); + if (hFind == INVALID_HANDLE_VALUE) + { + ExitWithLastError(hr, "failed to call FindFirstFileW with string %ls", pwzVersionSearch); + } + + while (fFound) + { + pwzTempVersion = (LPWSTR)&(wfdVersionDirectories.cFileName); + + // Explicitly exclude v1.1.4322, which isn't backwards compatible and is not supported + if (wfdVersionDirectories.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + if (0 != lstrcmpW(L"v1.1.4322", pwzTempVersion)) + { + // A potential candidate directory was found to run ngen from - let's make sure ngen actually exists here + hr = StrAllocFormatted(&pwzNgen, L"%s%s\\ngen.exe", pwzParentPath, pwzTempVersion); + ExitOnFailure(hr, "failed to create inner ngen search string with strings %ls and %ls", pwzParentPath, pwzTempVersion); + + // If Ngen.exe does exist as a file here, then let's check the file version + if (FileExistsEx(pwzNgen, &dwNgenFileFlags) && (0 == (dwNgenFileFlags & FILE_ATTRIBUTE_DIRECTORY))) + { + hr = FileVersion(pwzNgen, &dwMajorVersion, &dwMinorVersion); + + if (FAILED(hr)) + { + WcaLog(LOGMSG_VERBOSE, "Failed to get version of %ls - continuing", pwzNgen); + } + else if (dwMajorVersion > dwMaxMajorVersion || (dwMajorVersion == dwMaxMajorVersion && dwMinorVersion > dwMaxMinorVersion)) + { + // If the version we found is the highest we've seen so far in this search, it will be our new best-so-far candidate + hr = StrAllocString(ppwzVersion, pwzTempVersion, 0); + ExitOnFailure(hr, "failed to copy temp version string %ls to version string", pwzTempVersion); + // Add one for the backslash after the directory name + WcaLog(LOGMSG_VERBOSE, "Found highest-so-far version of ngen.exe (in directory %ls, version %u.%u.%u.%u)", *ppwzVersion, (DWORD)HIWORD(dwMajorVersion), (DWORD)LOWORD(dwMajorVersion), (DWORD)HIWORD(dwMinorVersion), (DWORD)LOWORD(dwMinorVersion)); + + dwMaxMajorVersion = dwMajorVersion; + dwMaxMinorVersion = dwMinorVersion; + } + } + else + { + WcaLog(LOGMSG_VERBOSE, "Ignoring %ls because it doesn't contain the file ngen.exe", pwzTempVersion); + } + } + else + { + WcaLog(LOGMSG_VERBOSE, "Ignoring %ls because it is from .NET Framework v1.1, which is not backwards compatible with other versions of the Framework and thus is not supported by this custom action.", pwzTempVersion); + } + } + else + { + WcaLog(LOGMSG_VERBOSE, "Ignoring %ls because it isn't a directory", pwzTempVersion); + } + + fFound = FindNextFileW(hFind, &wfdVersionDirectories); + + if (!fFound) + { + dwError = ::GetLastError(); + hr = (ERROR_NO_MORE_FILES == dwError) ? ERROR_SUCCESS : HRESULT_FROM_WIN32(dwError); + ExitOnFailure(hr, "Failed to call FindNextFileW() with query %ls", pwzVersionSearch); + } + } + + if (NULL == *ppwzVersion) + { + hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + ExitOnRootFailure(hr, "Searched through all subdirectories of %ls, but failed to find any version of ngen.exe", pwzParentPath); + } + else + { + WcaLog(LOGMSG_VERBOSE, "Using highest version of ngen found, located in this subdirectory: %ls, version %u.%u.%u.%u", *ppwzVersion, (DWORD)HIWORD(dwMajorVersion), (DWORD)LOWORD(dwMajorVersion), (DWORD)HIWORD(dwMinorVersion), (DWORD)LOWORD(dwMinorVersion)); + } + +LExit: + if (hFind != INVALID_HANDLE_VALUE) + { + if (0 == FindClose(hFind)) + { + dwError = ::GetLastError(); + hr = HRESULT_FROM_WIN32(dwError); + WcaLog(LOGMSG_STANDARD, "Failed to close handle created by outer FindFirstFile with error %x - continuing", hr); + } + hFind = INVALID_HANDLE_VALUE; + } + + ReleaseStr(pwzVersionSearch); + ReleaseStr(pwzNgen); + ReleaseStr(pwzTemp); + // Purposely don't release pwzTempVersion, because it wasn't allocated in this function, it's just a pointer to a string inside wfdVersionDirectories + + return hr; +} + +// Gets the path to ngen.exe +static HRESULT GetNgenPath( + __out LPWSTR* ppwzNgenPath, + __in BOOL f64BitFramework + ) +{ + Assert(ppwzNgenPath); + HRESULT hr = S_OK; + + LPWSTR pwzVersion = NULL; + LPWSTR pwzWindowsFolder = NULL; + + hr = WcaGetProperty(L"WindowsFolder", &pwzWindowsFolder); + ExitOnFailure(hr, "failed to get WindowsFolder property"); + + hr = StrAllocString(ppwzNgenPath, pwzWindowsFolder, 0); + ExitOnFailure(hr, "failed to copy to NgenPath windows folder: %ls", pwzWindowsFolder); + + if (f64BitFramework) + { + WcaLog(LOGMSG_VERBOSE, "Searching for ngen under 64-bit framework path"); + + hr = StrAllocConcat(ppwzNgenPath, L"Microsoft.NET\\Framework64\\", 0); + ExitOnFailure(hr, "failed to copy platform portion of ngen path"); + } + else + { + WcaLog(LOGMSG_VERBOSE, "Searching for ngen under 32-bit framework path"); + + hr = StrAllocConcat(ppwzNgenPath, L"Microsoft.NET\\Framework\\", 0); + ExitOnFailure(hr, "failed to copy platform portion of ngen path"); + } + + // We want to run the highest version of ngen possible, because they should be backwards compatible - so let's find the most appropriate directory now + hr = GetNgenVersion(*ppwzNgenPath, &pwzVersion); + ExitOnFailure(hr, "failed to search for ngen under path %ls", *ppwzNgenPath); + + hr = StrAllocConcat(ppwzNgenPath, pwzVersion, 0); + ExitOnFailure(hr, "failed to copy version portion of ngen path"); + + hr = StrAllocConcat(ppwzNgenPath, L"\\ngen.exe", 0); + ExitOnFailure(hr, "failed to copy \"\\ngen.exe\" portion of ngen path"); + +LExit: + ReleaseStr(pwzVersion); + ReleaseStr(pwzWindowsFolder); + + return hr; +} + + +static HRESULT GetStrongName( + __out LPWSTR* ppwzStrongName, + __in LPCWSTR pwzComponent + ) +{ + Assert(ppwzStrongName); + HRESULT hr = S_OK; + + PMSIHANDLE hView = NULL; + PMSIHANDLE hComponentRec = NULL; + PMSIHANDLE hRec = NULL; + + LPWSTR pwzData = NULL; + LPWSTR pwzName = NULL; + LPWSTR pwzVersion = NULL; + LPWSTR pwzCulture = NULL; + LPWSTR pwzPublicKeyToken = NULL; + + hComponentRec = ::MsiCreateRecord(1); + hr = WcaSetRecordString(hComponentRec, 1, pwzComponent); + ExitOnFailure(hr, "failed to set component value in record to: %ls", pwzComponent); + + // get the name value records for this component + hr = WcaOpenView(vcsNgenStrongName, &hView); + ExitOnFailure(hr, "failed to open view on Wix4NetFxNativeImage table"); + + hr = WcaExecuteView(hView, hComponentRec); + ExitOnFailure(hr, "failed to execute strong name view"); + + while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) + { + hr = WcaGetRecordString(hRec, ngsnName, &pwzData); + ExitOnFailure(hr, "failed to get MsiAssemblyName.Name for component: %ls", pwzComponent); + + if (0 == lstrcmpW(L"name", pwzData)) + { + hr = WcaGetRecordString(hRec, ngsnValue, &pwzName); + ExitOnFailure(hr, "failed to get MsiAssemblyName.Value for component: %ls Name: %ls", pwzComponent, pwzData); + } + else if (0 == lstrcmpW(L"version", pwzData)) + { + hr = WcaGetRecordString(hRec, ngsnValue, &pwzVersion); + ExitOnFailure(hr, "failed to get MsiAssemblyName.Value for component: %ls Name: %ls", pwzComponent, pwzData); + } + else if (0 == lstrcmpW(L"culture", pwzData)) + { + hr = WcaGetRecordString(hRec, ngsnValue, &pwzCulture); + ExitOnFailure(hr, "failed to get MsiAssemblyName.Value for component: %ls Name: %ls", pwzComponent, pwzData); + } + else if (0 == lstrcmpW(L"publicKeyToken", pwzData)) + { + hr = WcaGetRecordString(hRec, ngsnValue, &pwzPublicKeyToken); + ExitOnFailure(hr, "failed to get MsiAssemblyName.Value for component: %ls Name: %ls", pwzComponent, pwzData); + } + } + if (E_NOMOREITEMS == hr) + hr = S_OK; + ExitOnFailure(hr, "failed while looping through all names and values in MsiAssemblyName table for component: %ls", pwzComponent); + + hr = StrAllocFormatted(ppwzStrongName, L"\"%s, Version=%s, Culture=%s, PublicKeyToken=%s\"", pwzName, pwzVersion, pwzCulture, pwzPublicKeyToken); + ExitOnFailure(hr, "failed to format strong name for component: %ls", pwzComponent); + +LExit: + ReleaseStr(pwzData); + ReleaseStr(pwzName); + ReleaseStr(pwzVersion); + ReleaseStr(pwzCulture); + ReleaseStr(pwzPublicKeyToken); + + return hr; +} + +static HRESULT CreateInstallCommand( + __out LPWSTR* ppwzCommandLine, + __in LPCWSTR pwzNgenPath, + __in LPCWSTR pwzFile, + __in int iPriority, + __in int iAttributes, + __in LPCWSTR pwzFileApp, + __in LPCWSTR pwzDirAppBase + ) +{ + Assert(ppwzCommandLine && pwzNgenPath && *pwzNgenPath && pwzFile && *pwzFile&& pwzFileApp && pwzDirAppBase); + HRESULT hr = S_OK; + + LPWSTR pwzQueueString = NULL; + + hr = StrAllocFormatted(ppwzCommandLine, L"%s install %s", pwzNgenPath, pwzFile); + ExitOnFailure(hr, "failed to assemble install command line"); + + if (iPriority > 0) + { + hr = StrAllocFormatted(&pwzQueueString, L" /queue:%d", iPriority); + ExitOnFailure(hr, "failed to format queue string"); + + hr = StrAllocConcat(ppwzCommandLine, pwzQueueString, 0); + ExitOnFailure(hr, "failed to add queue string to NGEN command line"); + } + + if (NGEN_DEBUG & iAttributes) + { + hr = StrAllocConcat(ppwzCommandLine, L" /Debug", 0); + ExitOnFailure(hr, "failed to add debug to NGEN command line"); + } + + if (NGEN_PROFILE & iAttributes) + { + hr = StrAllocConcat(ppwzCommandLine, L" /Profile", 0); + ExitOnFailure(hr, "failed to add profile to NGEN command line"); + } + + if (NGEN_NODEP & iAttributes) + { + hr = StrAllocConcat(ppwzCommandLine, L" /NoDependencies", 0); + ExitOnFailure(hr, "failed to add no dependencies to NGEN command line"); + } + + // If it's more than just two quotes around an empty string + if (EMPTY_FORMATTED_LENGTH_QUOTED_FILE < lstrlenW(pwzFileApp)) + { + hr = StrAllocConcat(ppwzCommandLine, L" /ExeConfig:", 0); + ExitOnFailure(hr, "failed to add exe config to NGEN command line"); + + hr = StrAllocConcat(ppwzCommandLine, pwzFileApp, 0); + ExitOnFailure(hr, "failed to add file app to NGEN command line"); + } + + // If it's more than just two quotes around a backslash + if (EMPTY_FORMATTED_LENGTH_QUOTED_DIRECTORY < lstrlenW(pwzDirAppBase)) + { + hr = StrAllocConcat(ppwzCommandLine, L" /AppBase:", 0); + ExitOnFailure(hr, "failed to add app base to NGEN command line"); + + hr = StrAllocConcat(ppwzCommandLine, pwzDirAppBase, 0); + ExitOnFailure(hr, "failed to add dir app base to NGEN command line"); + } + +LExit: + return hr; +} + +/****************************************************************** + FileIdExists - checks if the file ID is found in the File table + + returns S_OK if the file exists; S_FALSE if not; otherwise, error +********************************************************************/ +static HRESULT FileIdExists( + __in_opt LPCWSTR wzFile + ) +{ + HRESULT hr = S_OK; + PMSIHANDLE hView = NULL; + PMSIHANDLE hRec = NULL; + + if (!wzFile) + { + hr = S_FALSE; + ExitFunction(); + } + + hRec = ::MsiCreateRecord(1); + hr = WcaSetRecordString(hRec, fiFile, wzFile); + ExitOnFailure(hr, "failed to create a record with the file: %ls", wzFile); + + hr = WcaTableExists(L"File"); + if (S_OK == hr) + { + hr = WcaOpenView(vcsFileId, &hView); + ExitOnFailure(hr, "failed to open view on File table"); + + hr = WcaExecuteView(hView, hRec); + ExitOnFailure(hr, "failed to execute view on File table"); + + // Reuse the same record; the handle will be released. + hr = WcaFetchSingleRecord(hView, &hRec); + ExitOnFailure(hr, "failed to fetch File from File table"); + } + +LExit: + + return hr; +} + +/****************************************************************** + SchedNetFx - entry point for NetFx Custom Action + +********************************************************************/ +extern "C" UINT __stdcall SchedNetFx( + __in MSIHANDLE hInstall + ) +{ + // AssertSz(FALSE, "debug SchedNetFx"); + + HRESULT hr = S_OK; + UINT er = ERROR_SUCCESS; + + LPWSTR pwzInstallCustomActionData = NULL; + LPWSTR pwzUninstallCustomActionData = NULL; + UINT uiCost = 0; + + PMSIHANDLE hView = NULL; + PMSIHANDLE hRec = NULL; + PMSIHANDLE hViewGac = NULL; + PMSIHANDLE hRecGac = NULL; + + LPWSTR pwzId = NULL; + LPWSTR pwzData = NULL; + LPWSTR pwzTemp = NULL; + LPWSTR pwzFile = NULL; + int iPriority = 0; + int iAssemblyCost = 0; + int iAttributes = 0; + LPWSTR pwzFileApp = NULL; + LPWSTR pwzDirAppBase = NULL; + LPWSTR pwzComponent = NULL; + + INSTALLSTATE isInstalled; + INSTALLSTATE isAction; + + LPWSTR pwz32Ngen = NULL; + LPWSTR pwz64Ngen = NULL; + + BOOL f32NgenExeExists = FALSE; + BOOL f64NgenExeExists = FALSE; + + BOOL fNeedInstallUpdate32 = FALSE; + BOOL fNeedUninstallUpdate32 = FALSE; + BOOL fNeedInstallUpdate64 = FALSE; + BOOL fNeedUninstallUpdate64 = FALSE; + + // initialize + hr = WcaInitialize(hInstall, "SchedNetFx"); + ExitOnFailure(hr, "failed to initialize"); + + hr = GetNgenPath(&pwz32Ngen, FALSE); + f32NgenExeExists = SUCCEEDED(hr); + if (HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) == hr || HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr) + { + hr = ERROR_SUCCESS; + WcaLog(LOGMSG_STANDARD, "Failed to find 32bit ngen. No actions will be scheduled to create native images for 32bit."); + } + ExitOnFailure(hr, "failed to get 32bit ngen.exe path"); + + hr = GetNgenPath(&pwz64Ngen, TRUE); + f64NgenExeExists = SUCCEEDED(hr); + if (HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) == hr || HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) == hr) + { + hr = ERROR_SUCCESS; + WcaLog(LOGMSG_STANDARD, "Failed to find 64bit ngen. No actions will be scheduled to create native images for 64bit."); + } + ExitOnFailure(hr, "failed to get 64bit ngen.exe path"); + + // loop through all the NetFx records + hr = WcaOpenExecuteView(vcsNgenQuery, &hView); + ExitOnFailure(hr, "failed to open view on Wix4NetFxNativeImage table"); + + while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) + { + // Get Id + hr = WcaGetRecordString(hRec, ngqId, &pwzId); + ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Wix4NetFxNativeImage"); + + // Get File + hr = WcaGetRecordString(hRec, ngqFile, &pwzData); + ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.File_ for record: %ls", pwzId); + hr = StrAllocFormatted(&pwzTemp, vpwzUnformattedQuotedFile, pwzData); + ExitOnFailure(hr, "failed to format file string for file: %ls", pwzData); + hr = WcaGetFormattedString(pwzTemp, &pwzFile); + ExitOnFailure(hr, "failed to get formatted string for file: %ls", pwzData); + + // Get Priority + hr = WcaGetRecordInteger(hRec, ngqPriority, &iPriority); + ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Priority for record: %ls", pwzId); + + if (0 == iPriority) + iAssemblyCost = COST_NGEN_BLOCKING; + else + iAssemblyCost = COST_NGEN_NONBLOCKING; + + // Get Attributes + hr = WcaGetRecordInteger(hRec, ngqAttributes, &iAttributes); + ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Attributes for record: %ls", pwzId); + + // Get File_Application or leave pwzFileApp NULL. + hr = WcaGetRecordFormattedString(hRec, ngqFileApp, &pwzData); + ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.File_Application for record: %ls", pwzId); + + // Check if the value resolves to a valid file ID. + if (S_OK == FileIdExists(pwzData)) + { + // Resolve the file ID to a path. + hr = StrAllocFormatted(&pwzTemp, vpwzUnformattedQuotedFile, pwzData); + ExitOnFailure(hr, "failed to format file application string for file: %ls", pwzData); + + hr = WcaGetFormattedString(pwzTemp, &pwzFileApp); + ExitOnFailure(hr, "failed to get formatted string for file application: %ls", pwzData); + } + else + { + // Assume record formatted to a path already. + hr = StrAllocString(&pwzFileApp, pwzData, 0); + ExitOnFailure(hr, "failed to allocate string for file path: %ls", pwzData); + + hr = PathEnsureQuoted(&pwzFileApp, FALSE); + ExitOnFailure(hr, "failed to quote file path: %ls", pwzData); + } + + // Get Directory_ApplicationBase or leave pwzDirAppBase NULL. + hr = WcaGetRecordFormattedString(hRec, ngqDirAppBase, &pwzData); + ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Directory_ApplicationBase for record: %ls", pwzId); + + if (WcaIsUnicodePropertySet(pwzData)) + { + // Resolve the directory ID to a path. + hr = StrAllocFormatted(&pwzTemp, vpwzUnformattedQuotedDirectory, pwzData); + ExitOnFailure(hr, "failed to format directory application base string for property: %ls", pwzData); + + hr = WcaGetFormattedString(pwzTemp, &pwzDirAppBase); + ExitOnFailure(hr, "failed to get formatted string for directory application base: %ls", pwzData); + } + else + { + // Assume record formatted to a path already. + hr = StrAllocString(&pwzDirAppBase, pwzData, 0); + ExitOnFailure(hr, "failed to allocate string for directory path: %ls", pwzData); + + hr = PathEnsureQuoted(&pwzDirAppBase, TRUE); + ExitOnFailure(hr, "failed to quote and backslashify directory: %ls", pwzData); + } + + // Get Component + hr = WcaGetRecordString(hRec, ngqComponent, &pwzComponent); + ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Directory_ApplicationBase for record: %ls", pwzId); + er = ::MsiGetComponentStateW(hInstall, pwzComponent, &isInstalled, &isAction); + ExitOnWin32Error(er, hr, "failed to get install state for Component: %ls", pwzComponent); + + // + // Figure out if it's going to be GAC'd. The possibility exists that no assemblies are going to be GAC'd + // so we have to check for the MsiAssembly table first. + // + if (S_OK == WcaTableExists(L"MsiAssembly")) + { + hr = WcaOpenView(vcsNgenGac, &hViewGac); + ExitOnFailure(hr, "failed to open view on File/MsiAssembly table"); + + hr = WcaExecuteView(hViewGac, hRec); + ExitOnFailure(hr, "failed to execute view on File/MsiAssembly table"); + + hr = WcaFetchSingleRecord(hViewGac, &hRecGac); + ExitOnFailure(hr, "failed to fetch File_Assembly from File/MsiAssembly table"); + + if (S_FALSE != hr) + { + hr = WcaGetRecordString(hRecGac, nggApplication, &pwzData); + ExitOnFailure(hr, "failed to get MsiAssembly.File_Application"); + + // If it's in the GAC replace the file name with the strong name + if (L'\0' == pwzData[0]) + { + hr = GetStrongName(&pwzFile, pwzComponent); + ExitOnFailure(hr, "failed to get strong name for component: %ls", pwzData); + } + } + } + + // + // Schedule the work + // + if (!(iAttributes & NGEN_32BIT) && !(iAttributes & NGEN_64BIT)) + ExitOnFailure(hr = E_INVALIDARG, "Neither 32bit nor 64bit is specified for NGEN of file: %ls", pwzFile); + + if (WcaIsInstalling(isInstalled, isAction) || WcaIsReInstalling(isInstalled, isAction)) + { + if (iAttributes & NGEN_32BIT && f32NgenExeExists) + { + // Assemble the install command line + hr = CreateInstallCommand(&pwzData, pwz32Ngen, pwzFile, iPriority, iAttributes, pwzFileApp, pwzDirAppBase); + ExitOnFailure(hr, "failed to create install command line"); + + hr = WcaWriteStringToCaData(pwzData, &pwzInstallCustomActionData); + ExitOnFailure(hr, "failed to add install command to custom action data: %ls", pwzData); + + hr = WcaWriteIntegerToCaData(iAssemblyCost, &pwzInstallCustomActionData); + ExitOnFailure(hr, "failed to add cost to custom action data: %ls", pwzData); + + uiCost += iAssemblyCost; + + fNeedInstallUpdate32 = TRUE; + } + + if (iAttributes & NGEN_64BIT && f64NgenExeExists) + { + // Assemble the install command line + hr = CreateInstallCommand(&pwzData, pwz64Ngen, pwzFile, iPriority, iAttributes, pwzFileApp, pwzDirAppBase); + ExitOnFailure(hr, "failed to create install command line"); + + hr = WcaWriteStringToCaData(pwzData, &pwzInstallCustomActionData); // command + ExitOnFailure(hr, "failed to add install command to custom action data: %ls", pwzData); + + hr = WcaWriteIntegerToCaData(iAssemblyCost, &pwzInstallCustomActionData); // cost + ExitOnFailure(hr, "failed to add cost to custom action data: %ls", pwzData); + + uiCost += iAssemblyCost; + + fNeedInstallUpdate64 = TRUE; + } + } + else if (WcaIsUninstalling(isInstalled, isAction)) + { + if (iAttributes & NGEN_32BIT && f32NgenExeExists) + { + hr = StrAllocFormatted(&pwzData, L"%s uninstall %s", pwz32Ngen, pwzFile); + ExitOnFailure(hr, "failed to create update 32 command line"); + + hr = WcaWriteStringToCaData(pwzData, &pwzUninstallCustomActionData); // command + ExitOnFailure(hr, "failed to add install command to custom action data: %ls", pwzData); + + hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzUninstallCustomActionData); // cost + ExitOnFailure(hr, "failed to add cost to custom action data: %ls", pwzData); + + uiCost += COST_NGEN_NONBLOCKING; + + fNeedUninstallUpdate32 = TRUE; + } + + if (iAttributes & NGEN_64BIT && f64NgenExeExists) + { + hr = StrAllocFormatted(&pwzData, L"%s uninstall %s", pwz64Ngen, pwzFile); + ExitOnFailure(hr, "failed to create update 64 command line"); + + hr = WcaWriteStringToCaData(pwzData, &pwzUninstallCustomActionData); // command + ExitOnFailure(hr, "failed to add install command to custom action data: %ls", pwzData); + + hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzUninstallCustomActionData); // cost + ExitOnFailure(hr, "failed to add cost to custom action data: %ls", pwzData); + + uiCost += COST_NGEN_NONBLOCKING; + + fNeedUninstallUpdate64 = TRUE; + } + } + } + if (E_NOMOREITEMS == hr) + hr = S_OK; + ExitOnFailure(hr, "failed while looping through all files to create native images for"); + + // If we need 32 bit install update + if (fNeedInstallUpdate32) + { + hr = StrAllocFormatted(&pwzData, L"%s update /queue", pwz32Ngen); + ExitOnFailure(hr, "failed to create install update 32 command line"); + + hr = WcaWriteStringToCaData(pwzData, &pwzInstallCustomActionData); // command + ExitOnFailure(hr, "failed to add install command to install custom action data: %ls", pwzData); + + hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzInstallCustomActionData); // cost + ExitOnFailure(hr, "failed to add cost to install custom action data: %ls", pwzData); + + uiCost += COST_NGEN_NONBLOCKING; + } + + // If we need 32 bit uninstall update + if (fNeedUninstallUpdate32) + { + hr = StrAllocFormatted(&pwzData, L"%s update /queue", pwz32Ngen); + ExitOnFailure(hr, "failed to create uninstall update 32 command line"); + + hr = WcaWriteStringToCaData(pwzData, &pwzUninstallCustomActionData); // command + ExitOnFailure(hr, "failed to add install command to uninstall custom action data: %ls", pwzData); + + hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzUninstallCustomActionData); // cost + ExitOnFailure(hr, "failed to add cost to uninstall custom action data: %ls", pwzData); + + uiCost += COST_NGEN_NONBLOCKING; + } + + // If we need 64 bit install update + if (fNeedInstallUpdate64) + { + hr = StrAllocFormatted(&pwzData, L"%s update /queue", pwz64Ngen); + ExitOnFailure(hr, "failed to create install update 64 command line"); + + hr = WcaWriteStringToCaData(pwzData, &pwzInstallCustomActionData); // command + ExitOnFailure(hr, "failed to add install command to install custom action data: %ls", pwzData); + + hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzInstallCustomActionData); // cost + ExitOnFailure(hr, "failed to add cost to install custom action data: %ls", pwzData); + + uiCost += COST_NGEN_NONBLOCKING; + } + + // If we need 64 bit install update + if (fNeedUninstallUpdate64) + { + hr = StrAllocFormatted(&pwzData, L"%s update /queue", pwz64Ngen); + ExitOnFailure(hr, "failed to create uninstall update 64 command line"); + + hr = WcaWriteStringToCaData(pwzData, &pwzUninstallCustomActionData); // command + ExitOnFailure(hr, "failed to add install command to uninstall custom action data: %ls", pwzData); + + hr = WcaWriteIntegerToCaData(COST_NGEN_NONBLOCKING, &pwzUninstallCustomActionData); // cost + ExitOnFailure(hr, "failed to add cost to uninstall custom action data: %ls", pwzData); + + uiCost += COST_NGEN_NONBLOCKING; + } + + // Add to progress bar + if ((pwzInstallCustomActionData && *pwzInstallCustomActionData) || (pwzUninstallCustomActionData && *pwzUninstallCustomActionData)) + { + hr = WcaProgressMessage(uiCost, TRUE); + ExitOnFailure(hr, "failed to extend progress bar for NetFxExecuteNativeImage"); + } + + // Schedule the install custom action + if (pwzInstallCustomActionData && *pwzInstallCustomActionData) + { + hr = WcaSetProperty(L"NetFxExecuteNativeImageInstall", pwzInstallCustomActionData); + ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageInstall action"); + + hr = WcaSetProperty(L"NetFxExecuteNativeImageCommitInstall", pwzInstallCustomActionData); + ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageCommitInstall action"); + } + + // Schedule the uninstall custom action + if (pwzUninstallCustomActionData && *pwzUninstallCustomActionData) + { + hr = WcaSetProperty(L"NetFxExecuteNativeImageUninstall", pwzUninstallCustomActionData); + ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageUninstall action"); + + hr = WcaSetProperty(L"NetFxExecuteNativeImageCommitUninstall", pwzUninstallCustomActionData); + ExitOnFailure(hr, "failed to schedule NetFxExecuteNativeImageCommitUninstall action"); + } + + +LExit: + ReleaseStr(pwzInstallCustomActionData); + ReleaseStr(pwzUninstallCustomActionData); + ReleaseStr(pwzId); + ReleaseStr(pwzData); + ReleaseStr(pwzTemp); + ReleaseStr(pwzFile); + ReleaseStr(pwzFileApp); + ReleaseStr(pwzDirAppBase); + ReleaseStr(pwzComponent); + ReleaseStr(pwz32Ngen); + ReleaseStr(pwz64Ngen); + + if (FAILED(hr)) + er = ERROR_INSTALL_FAILURE; + return WcaFinalize(er); +} + + +/****************************************************************** + ExecNetFx - entry point for NetFx Custom Action + +*******************************************************************/ +extern "C" UINT __stdcall ExecNetFx( + __in MSIHANDLE hInstall + ) +{ +// AssertSz(FALSE, "debug ExecNetFx"); + + HRESULT hr = S_OK; + UINT er = ERROR_SUCCESS; + + LPWSTR pwzCustomActionData = NULL; + LPWSTR pwzData = NULL; + LPWSTR pwz = NULL; + int iCost = 0; + + // initialize + hr = WcaInitialize(hInstall, "ExecNetFx"); + ExitOnFailure(hr, "failed to initialize"); + + hr = WcaGetProperty( L"CustomActionData", &pwzCustomActionData); + ExitOnFailure(hr, "failed to get CustomActionData"); + + WcaLog(LOGMSG_TRACEONLY, "CustomActionData: %ls", pwzCustomActionData); + + pwz = pwzCustomActionData; + + // loop through all the passed in data + while (pwz && *pwz) + { + hr = WcaReadStringFromCaData(&pwz, &pwzData); + ExitOnFailure(hr, "failed to read command line from custom action data"); + + hr = WcaReadIntegerFromCaData(&pwz, &iCost); + ExitOnFailure(hr, "failed to read cost from custom action data"); + + hr = QuietExec(pwzData, NGEN_TIMEOUT, TRUE, TRUE); + // If we fail here it isn't critical - keep looping through to try to act on the other assemblies on our list + if (FAILED(hr)) + { + WcaLog(LOGMSG_STANDARD, "failed to execute Ngen command (with error 0x%x): %ls, continuing anyway", hr, pwzData); + hr = S_OK; + } + + // Tick the progress bar along for this assembly + hr = WcaProgressMessage(iCost, FALSE); + ExitOnFailure(hr, "failed to tick progress bar for command line: %ls", pwzData); + } + +LExit: + ReleaseStr(pwzCustomActionData); + ReleaseStr(pwzData); + + if (FAILED(hr)) + er = ERROR_INSTALL_FAILURE; + return WcaFinalize(er); +} + diff --git a/src/ext/NetFx/ca/netfxca.def b/src/ext/NetFx/ca/netfxca.def new file mode 100644 index 00000000..c1d01f5f --- /dev/null +++ b/src/ext/NetFx/ca/netfxca.def @@ -0,0 +1,8 @@ +; 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. + + +LIBRARY "netfxca" + +EXPORTS + SchedNetFx + ExecNetFx diff --git a/src/ext/NetFx/ca/netfxca.vcxproj b/src/ext/NetFx/ca/netfxca.vcxproj new file mode 100644 index 00000000..5e25b683 --- /dev/null +++ b/src/ext/NetFx/ca/netfxca.vcxproj @@ -0,0 +1,73 @@ + + + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + Debug + ARM64 + + + Release + ARM64 + + + + + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} + DynamicLibrary + netfxca + v142 + Unicode + netfxca.def + WiX Toolset .NET Framework CustomAction + + + + + + + msi.lib + + + + + Create + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/ca/precomp.h b/src/ext/NetFx/ca/precomp.h new file mode 100644 index 00000000..4a83c164 --- /dev/null +++ b/src/ext/NetFx/ca/precomp.h @@ -0,0 +1,14 @@ +#pragma once +// 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. + + +#include +#include + +#include "wcautil.h" +#include "fileutil.h" +#include "strutil.h" +#include "pathutil.h" + +#include "caDecor.h" +#include "cost.h" diff --git a/src/ext/NetFx/nuget.config b/src/ext/NetFx/nuget.config new file mode 100644 index 00000000..7f258709 --- /dev/null +++ b/src/ext/NetFx/nuget.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/ext/NetFx/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs new file mode 100644 index 00000000..72d4a682 --- /dev/null +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -0,0 +1,147 @@ +// 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. + +namespace WixToolsetTest.Netfx +{ + using System.IO; + using System.Linq; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.Netfx; + using Xunit; + + public class NetfxExtensionFixture + { + [Fact] + public void CanBuildUsingLatestDotNetCorePackages() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\UsingDotNetCorePackages"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "BundleLatest.wxs"), + "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), + "-ext", TestData.Get(@"WixToolset.Netfx.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-o", bundleFile, + }); + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + } + } + + [Fact] + public void CanBuildUsingLatestDotNetCorePackages_X64() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\UsingDotNetCorePackages"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "BundleLatest_x64.wxs"), + "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), + "-ext", TestData.Get(@"WixToolset.Netfx.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-o", bundleFile, + }); + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + } + } + + [Fact] + public void CanBuildUsingNativeImage() + { + var folder = TestData.Get(@"TestData\UsingNativeImage"); + var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(Build, "Binary", "CustomAction", "Wix4NetFxNativeImage"); + Assert.Equal(new[] + { + "Binary:Wix4NetFxCA_X86\t[Binary data]", + "CustomAction:Wix4NetFxExecuteNativeImageCommitInstall_X86\t3649\tWix4NetFxCA_X86\tExecNetFx\t", + "CustomAction:Wix4NetFxExecuteNativeImageCommitUninstall_X86\t3649\tWix4NetFxCA_X86\tExecNetFx\t", + "CustomAction:Wix4NetFxExecuteNativeImageInstall_X86\t3137\tWix4NetFxCA_X86\tExecNetFx\t", + "CustomAction:Wix4NetFxExecuteNativeImageUninstall_X86\t3137\tWix4NetFxCA_X86\tExecNetFx\t", + "CustomAction:Wix4NetFxScheduleNativeImage_X86\t1\tWix4NetFxCA_X86\tSchedNetFx\t", + "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t", + }, results.OrderBy(s => s).ToArray()); + } + + [Fact] + public void CanBuildUsingNativeImageX64() + { + var folder = TestData.Get(@"TestData\UsingNativeImage"); + var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4NetFxNativeImage"); + Assert.Equal(new[] + { + "Binary:Wix4NetFxCA_X64\t[Binary data]", + "CustomAction:Wix4NetFxExecuteNativeImageCommitInstall_X64\t3649\tWix4NetFxCA_X64\tExecNetFx\t", + "CustomAction:Wix4NetFxExecuteNativeImageCommitUninstall_X64\t3649\tWix4NetFxCA_X64\tExecNetFx\t", + "CustomAction:Wix4NetFxExecuteNativeImageInstall_X64\t3137\tWix4NetFxCA_X64\tExecNetFx\t", + "CustomAction:Wix4NetFxExecuteNativeImageUninstall_X64\t3137\tWix4NetFxCA_X64\tExecNetFx\t", + "CustomAction:Wix4NetFxScheduleNativeImage_X64\t1\tWix4NetFxCA_X64\tSchedNetFx\t", + "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t", + }, results.OrderBy(s => s).ToArray()); + } + + [Fact] + public void CanBuildUsingNativeImageARM64() + { + var folder = TestData.Get(@"TestData\UsingNativeImage"); + var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction", "Wix4NetFxNativeImage"); + Assert.Equal(new[] + { + "Binary:Wix4NetFxCA_A64\t[Binary data]", + "CustomAction:Wix4NetFxExecuteNativeImageCommitInstall_A64\t3649\tWix4NetFxCA_A64\tExecNetFx\t", + "CustomAction:Wix4NetFxExecuteNativeImageCommitUninstall_A64\t3649\tWix4NetFxCA_A64\tExecNetFx\t", + "CustomAction:Wix4NetFxExecuteNativeImageInstall_A64\t3137\tWix4NetFxCA_A64\tExecNetFx\t", + "CustomAction:Wix4NetFxExecuteNativeImageUninstall_A64\t3137\tWix4NetFxCA_A64\tExecNetFx\t", + "CustomAction:Wix4NetFxScheduleNativeImage_A64\t1\tWix4NetFxCA_A64\tSchedNetFx\t", + "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t", + }, results.OrderBy(s => s).ToArray()); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args); + result.AssertSuccess(); + } + + private static void BuildX64(string[] args) + { + var newArgs = args.ToList(); + newArgs.Add("-platform"); + newArgs.Add("x64"); + + var result = WixRunner.Execute(newArgs.ToArray()); + result.AssertSuccess(); + } + + private static void BuildARM64(string[] args) + { + var newArgs = args.ToList(); + newArgs.Add("-platform"); + newArgs.Add("arm64"); + + var result = WixRunner.Execute(newArgs.ToArray()); + result.AssertSuccess(); + } + } +} diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs new file mode 100644 index 00000000..8e3d2c30 --- /dev/null +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs new file mode 100644 index 00000000..fc42ac99 --- /dev/null +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl new file mode 100644 index 00000000..5301bb1a --- /dev/null +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl @@ -0,0 +1,9 @@ + + + + A newer version of [ProductName] is already installed. + MsiPackage + + diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs new file mode 100644 index 00000000..ace73680 --- /dev/null +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs new file mode 100644 index 00000000..a1c806d9 --- /dev/null +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt @@ -0,0 +1 @@ +This is example.txt. \ No newline at end of file diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/ext/NetFx/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj new file mode 100644 index 00000000..1c41d176 --- /dev/null +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -0,0 +1,40 @@ + + + + + + netcoreapp3.1 + embedded + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject b/src/ext/NetFx/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject new file mode 100644 index 00000000..7b5b2139 --- /dev/null +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file diff --git a/src/ext/NetFx/wix.snk b/src/ext/NetFx/wix.snk new file mode 100644 index 00000000..3908a66a Binary files /dev/null and b/src/ext/NetFx/wix.snk differ diff --git a/src/ext/NetFx/wixext/NetFxCompiler.cs b/src/ext/NetFx/wixext/NetFxCompiler.cs new file mode 100644 index 00000000..90aa8bcb --- /dev/null +++ b/src/ext/NetFx/wixext/NetFxCompiler.cs @@ -0,0 +1,163 @@ +// 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. + +namespace WixToolset.Netfx +{ + using System; + using System.Collections.Generic; + using System.Xml.Linq; + using WixToolset.Data; + using WixToolset.Extensibility; + using WixToolset.Extensibility.Data; + using WixToolset.Netfx.Symbols; + + /// + /// The compiler for the WiX Toolset .NET Framework Extension. + /// + public sealed class NetfxCompiler : BaseCompilerExtension + { + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/netfx"; + + /// + /// Processes an element for the Compiler. + /// + /// Parent element of element to process. + /// Element to process. + /// Extra information about the context in which this element is being parsed. + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context) + { + switch (parentElement.Name.LocalName) + { + case "File": + string fileId = context["FileId"]; + + switch (element.Name.LocalName) + { + case "NativeImage": + this.ParseNativeImageElement(intermediate, section, element, fileId); + break; + default: + this.ParseHelper.UnexpectedElement(parentElement, element); + break; + } + break; + default: + this.ParseHelper.UnexpectedElement(parentElement, element); + break; + } + } + + /// + /// Parses a NativeImage element. + /// + /// The element to parse. + /// The file identifier of the parent element. + private void ParseNativeImageElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) + { + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; + string appBaseDirectory = null; + string assemblyApplication = null; + int attributes = 0x8; // 32bit is on by default + int priority = 3; + + foreach (var attrib in element.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "Id": + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); + break; + case "AppBaseDirectory": + appBaseDirectory = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + + // See if a formatted value is specified. + if (-1 == appBaseDirectory.IndexOf("[", StringComparison.Ordinal)) + { + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Directory, appBaseDirectory); + } + break; + case "AssemblyApplication": + assemblyApplication = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + + // See if a formatted value is specified. + if (-1 == assemblyApplication.IndexOf("[", StringComparison.Ordinal)) + { + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, assemblyApplication); + } + break; + case "Debug": + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + { + attributes |= 0x1; + } + break; + case "Dependencies": + if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + { + attributes |= 0x2; + } + break; + case "Platform": + string platformValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + if (0 < platformValue.Length) + { + switch (platformValue) + { + case "32bit": + // 0x8 is already on by default + break; + case "64bit": + attributes &= ~0x8; + attributes |= 0x10; + break; + case "all": + attributes |= 0x10; + break; + } + } + break; + case "Priority": + priority = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 3); + break; + case "Profile": + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + { + attributes |= 0x4; + } + break; + default: + this.ParseHelper.UnexpectedAttribute(element, attrib); + break; + } + } + else + { + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); + } + } + + if (null == id) + { + id = this.ParseHelper.CreateIdentifier("nni", fileId); + } + + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); + + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "Wix4NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.ARM64 | CustomActionPlatforms.X64 | CustomActionPlatforms.X86); + + if (!this.Messaging.EncounteredError) + { + section.AddSymbol(new NetFxNativeImageSymbol(sourceLineNumbers, id) + { + FileRef = fileId, + Priority = priority, + Attributes = attributes, + ApplicationFileRef = assemblyApplication, + ApplicationBaseDirectoryRef = appBaseDirectory, + }); + } + } + } +} diff --git a/src/ext/NetFx/wixext/NetFxDecompiler.cs b/src/ext/NetFx/wixext/NetFxDecompiler.cs new file mode 100644 index 00000000..e30905d1 --- /dev/null +++ b/src/ext/NetFx/wixext/NetFxDecompiler.cs @@ -0,0 +1,139 @@ +// 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. + +namespace WixToolset.Extensions +{ +#if TODO_CONSIDER_DECOMPILER + using System; + using System.Collections; + using System.Diagnostics; + using System.Globalization; + using WixToolset.Data; + using WixToolset.Extensibility; + using NetFx = WixToolset.Extensions.Serialize.NetFx; + using Wix = WixToolset.Data.Serialize; + + /// + /// The decompiler for the WiX Toolset .NET Framework Extension. + /// + public sealed class NetFxDecompiler : DecompilerExtension + { + /// + /// Creates a decompiler for NetFx Extension. + /// + public NetFxDecompiler() + { + this.TableDefinitions = NetFxExtensionData.GetExtensionTableDefinitions(); + } + + /// + /// Get the extensions library to be removed. + /// + /// Table definitions for library. + /// Library to remove from decompiled output. + public override Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions) + { + return NetFxExtensionData.GetExtensionLibrary(tableDefinitions); + } + + /// + /// Decompiles an extension table. + /// + /// The table to decompile. + public override void DecompileTable(Table table) + { + switch (table.Name) + { + case "NetFxNativeImage": + this.DecompileNetFxNativeImageTable(table); + break; + default: + base.DecompileTable(table); + break; + } + } + + /// + /// Decompile the NetFxNativeImage table. + /// + /// The table to decompile. + private void DecompileNetFxNativeImageTable(Table table) + { + foreach (Row row in table.Rows) + { + NetFx.NativeImage nativeImage = new NetFx.NativeImage(); + + nativeImage.Id = (string)row[0]; + + switch ((int)row[2]) + { + case 0: + nativeImage.Priority = NetFx.NativeImage.PriorityType.Item0; + break; + case 1: + nativeImage.Priority = NetFx.NativeImage.PriorityType.Item1; + break; + case 2: + nativeImage.Priority = NetFx.NativeImage.PriorityType.Item2; + break; + case 3: + nativeImage.Priority = NetFx.NativeImage.PriorityType.Item3; + break; + } + + if (null != row[3]) + { + int attributes = (int)row[3]; + + if (0x1 == (attributes & 0x1)) + { + nativeImage.Debug = NetFx.YesNoType.yes; + } + + if (0x2 == (attributes & 0x2)) + { + nativeImage.Dependencies = NetFx.YesNoType.no; + } + + if (0x4 == (attributes & 0x4)) + { + nativeImage.Profile = NetFx.YesNoType.yes; + } + + if (0x8 == (attributes & 0x8) && 0x10 == (attributes & 0x10)) + { + nativeImage.Platform = NetFx.NativeImage.PlatformType.all; + } + else if (0x8 == (attributes & 0x8)) + { + nativeImage.Platform = NetFx.NativeImage.PlatformType.Item32bit; + } + else if (0x10 == (attributes & 0x10)) + { + nativeImage.Platform = NetFx.NativeImage.PlatformType.Item64bit; + } + } + + if (null != row[4]) + { + nativeImage.AssemblyApplication = (string)row[4]; + } + + if (null != row[5]) + { + nativeImage.AppBaseDirectory = (string)row[5]; + } + + Wix.File file = (Wix.File)this.Core.GetIndexedElement("File", (string)row[1]); + if (null != file) + { + file.AddChild(nativeImage); + } + else + { + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "File_", (string)row[1], "File")); + } + } + } + } +#endif +} diff --git a/src/ext/NetFx/wixext/NetFxExtensionData.cs b/src/ext/NetFx/wixext/NetFxExtensionData.cs new file mode 100644 index 00000000..0a24ef1e --- /dev/null +++ b/src/ext/NetFx/wixext/NetFxExtensionData.cs @@ -0,0 +1,25 @@ +// 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. + +namespace WixToolset.Netfx +{ + using WixToolset.Data; + using WixToolset.Extensibility; + using WixToolset.Netfx.Symbols; + + /// + /// The WiX Toolset .NET Framework Extension. + /// + public sealed class NetfxExtensionData : BaseExtensionData + { + public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) + { + symbolDefinition = (name == NetfxSymbolDefinitionNames.NetFxNativeImage) ? NetfxSymbolDefinitions.NetFxNativeImage : null; + return symbolDefinition != null; + } + + public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) + { + return Intermediate.Load(typeof(NetfxExtensionData).Assembly, "WixToolset.Netfx.netfx.wixlib", symbolDefinitions); + } + } +} diff --git a/src/ext/NetFx/wixext/NetfxExtensionFactory.cs b/src/ext/NetFx/wixext/NetfxExtensionFactory.cs new file mode 100644 index 00000000..fe618460 --- /dev/null +++ b/src/ext/NetFx/wixext/NetfxExtensionFactory.cs @@ -0,0 +1,18 @@ +// 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. + +namespace WixToolset.Netfx +{ + using System; + using System.Collections.Generic; + using WixToolset.Extensibility; + + public class NetfxExtensionFactory : BaseExtensionFactory + { + protected override IReadOnlyCollection ExtensionTypes => new[] + { + typeof(NetfxCompiler), + typeof(NetfxExtensionData), + typeof(NetfxWindowsInstallerBackendBinderExtension), + }; + } +} diff --git a/src/ext/NetFx/wixext/NetfxTableDefinitions.cs b/src/ext/NetFx/wixext/NetfxTableDefinitions.cs new file mode 100644 index 00000000..1b2a4d21 --- /dev/null +++ b/src/ext/NetFx/wixext/NetfxTableDefinitions.cs @@ -0,0 +1,30 @@ +// 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. + +namespace WixToolset.Netfx +{ + using WixToolset.Data.WindowsInstaller; + using WixToolset.Netfx.Symbols; + + public static class NetfxTableDefinitions + { + public static readonly TableDefinition NetFxNativeImage = new TableDefinition( + "Wix4NetFxNativeImage", + NetfxSymbolDefinitions.NetFxNativeImage, + new[] + { + new ColumnDefinition("Wix4NetFxNativeImage", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The primary key, a non-localized token.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("File_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "The assembly for which a native image will be generated.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Priority", ColumnType.Number, 2, primaryKey: false, nullable: false, ColumnCategory.Integer, minValue: 0, maxValue: 3, description: "The priority for generating this native image: 0 is syncronous, 1-3 represent various levels of queued generation."), + new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Integer, minValue: 0, maxValue: 2147483647, description: "Integer containing bit flags representing native image attributes."), + new ColumnDefinition("File_Application", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "The application which loads this assembly.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Directory_ApplicationBase", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "The directory containing the application which loads this assembly.", modularizeType: ColumnModularizeType.Column), + }, + symbolIdIsPrimaryKey: true + ); + + public static readonly TableDefinition[] All = new[] + { + NetFxNativeImage, + }; + } +} diff --git a/src/ext/NetFx/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/ext/NetFx/wixext/NetfxWindowsInstallerBackendExtension.cs new file mode 100644 index 00000000..7d4fe475 --- /dev/null +++ b/src/ext/NetFx/wixext/NetfxWindowsInstallerBackendExtension.cs @@ -0,0 +1,13 @@ +// 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. + +namespace WixToolset.Netfx +{ + using System.Collections.Generic; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Extensibility; + + public class NetfxWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension + { + public override IReadOnlyCollection TableDefinitions => NetfxTableDefinitions.All; + } +} diff --git a/src/ext/NetFx/wixext/Symbols/NetFxNativeImageSymbol.cs b/src/ext/NetFx/wixext/Symbols/NetFxNativeImageSymbol.cs new file mode 100644 index 00000000..3803abd6 --- /dev/null +++ b/src/ext/NetFx/wixext/Symbols/NetFxNativeImageSymbol.cs @@ -0,0 +1,58 @@ +// 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. + +namespace WixToolset.Netfx.Symbols +{ + using WixToolset.Data; + + public enum NetFxNativeImageSymbolFields + { + FileRef, + Priority, + Attributes, + ApplicationFileRef, + ApplicationBaseDirectoryRef, + } + + public class NetFxNativeImageSymbol : IntermediateSymbol + { + public NetFxNativeImageSymbol() : base(NetfxSymbolDefinitions.NetFxNativeImage, null, null) + { + } + + public NetFxNativeImageSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxSymbolDefinitions.NetFxNativeImage, sourceLineNumber, id) + { + } + + public IntermediateField this[NetFxNativeImageSymbolFields index] => this.Fields[(int)index]; + + public string FileRef + { + get => this.Fields[(int)NetFxNativeImageSymbolFields.FileRef].AsString(); + set => this.Set((int)NetFxNativeImageSymbolFields.FileRef, value); + } + + public int Priority + { + get => this.Fields[(int)NetFxNativeImageSymbolFields.Priority].AsNumber(); + set => this.Set((int)NetFxNativeImageSymbolFields.Priority, value); + } + + public int Attributes + { + get => this.Fields[(int)NetFxNativeImageSymbolFields.Attributes].AsNumber(); + set => this.Set((int)NetFxNativeImageSymbolFields.Attributes, value); + } + + public string ApplicationFileRef + { + get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationFileRef].AsString(); + set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationFileRef, value); + } + + public string ApplicationBaseDirectoryRef + { + get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef].AsString(); + set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef, value); + } + } +} \ No newline at end of file diff --git a/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs b/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs new file mode 100644 index 00000000..3c0f1176 --- /dev/null +++ b/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs @@ -0,0 +1,26 @@ +// 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. + +namespace WixToolset.Netfx.Symbols +{ + using WixToolset.Data; + + public static class NetfxSymbolDefinitionNames + { + public static string NetFxNativeImage { get; } = "NetFxNativeImage"; + } + + public static class NetfxSymbolDefinitions + { + public static readonly IntermediateSymbolDefinition NetFxNativeImage = new IntermediateSymbolDefinition( + NetfxSymbolDefinitionNames.NetFxNativeImage, + new[] + { + new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.FileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.Priority), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.ApplicationFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef), IntermediateFieldType.String), + }, + typeof(NetFxNativeImageSymbol)); + } +} diff --git a/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.csproj b/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.csproj new file mode 100644 index 00000000..7c1d55c1 --- /dev/null +++ b/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.csproj @@ -0,0 +1,31 @@ + + + + + + netstandard2.0 + embedded + WixToolset.Netfx + WiX Toolset .NET Framework Extension + WiX Toolset .NET Framework Extension + true + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.nuspec b/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.nuspec new file mode 100644 index 00000000..ba3eaade --- /dev/null +++ b/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.nuspec @@ -0,0 +1,25 @@ + + + + $id$ + $version$ + $title$ + $description$ + $authors$ + MS-RL + false + $copyright$ + $projectUrl$ + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.targets b/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.targets new file mode 100644 index 00000000..2ed9c488 --- /dev/null +++ b/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.targets @@ -0,0 +1,11 @@ + + + + + + $(MSBuildThisFileDirectory)..\tools\WixToolset.Netfx.wixext.dll + + + + + diff --git a/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject b/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject new file mode 100644 index 00000000..93e4df3d --- /dev/null +++ b/src/ext/NetFx/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject @@ -0,0 +1,7 @@ + + + + ..\..\build\Debug\netfx.wixlib + + + \ No newline at end of file diff --git a/src/ext/NetFx/wixlib/NetCore3.1.12_x64.wxs b/src/ext/NetFx/wixlib/NetCore3.1.12_x64.wxs new file mode 100644 index 00000000..990dc0bf --- /dev/null +++ b/src/ext/NetFx/wixlib/NetCore3.1.12_x64.wxs @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetCore3.1.12_x86.wxs b/src/ext/NetFx/wixlib/NetCore3.1.12_x86.wxs new file mode 100644 index 00000000..b6d5d371 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetCore3.1.12_x86.wxs @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetCore3.1_x64.wxs b/src/ext/NetFx/wixlib/NetCore3.1_x64.wxs new file mode 100644 index 00000000..60d7c27f --- /dev/null +++ b/src/ext/NetFx/wixlib/NetCore3.1_x64.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetCore3.1_x86.wxs b/src/ext/NetFx/wixlib/NetCore3.1_x86.wxs new file mode 100644 index 00000000..cfff07b3 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetCore3.1_x86.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetCore3_Platform.wxi b/src/ext/NetFx/wixlib/NetCore3_Platform.wxi new file mode 100644 index 00000000..c7aaca50 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetCore3_Platform.wxi @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetCoreShared.wxs b/src/ext/NetFx/wixlib/NetCoreShared.wxs new file mode 100644 index 00000000..0332041a --- /dev/null +++ b/src/ext/NetFx/wixlib/NetCoreShared.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx1.1.wxs b/src/ext/NetFx/wixlib/NetFx1.1.wxs new file mode 100644 index 00000000..12f0a4e3 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx1.1.wxs @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx1.wxs b/src/ext/NetFx/wixlib/NetFx1.wxs new file mode 100644 index 00000000..68d6f13d --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx1.wxs @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx2.wxs b/src/ext/NetFx/wixlib/NetFx2.wxs new file mode 100644 index 00000000..e5eef54b --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx2.wxs @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx3.5.wxs b/src/ext/NetFx/wixlib/NetFx3.5.wxs new file mode 100644 index 00000000..c1a80f50 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx3.5.wxs @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx3.wxs b/src/ext/NetFx/wixlib/NetFx3.wxs new file mode 100644 index 00000000..5fb279ea --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx3.wxs @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx4.5.wxs b/src/ext/NetFx/wixlib/NetFx4.5.wxs new file mode 100644 index 00000000..443235d4 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx4.5.wxs @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx4.wxs b/src/ext/NetFx/wixlib/NetFx4.wxs new file mode 100644 index 00000000..295d8078 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx4.wxs @@ -0,0 +1,416 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx451.wxs b/src/ext/NetFx/wixlib/NetFx451.wxs new file mode 100644 index 00000000..88363555 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx451.wxs @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx452.wxs b/src/ext/NetFx/wixlib/NetFx452.wxs new file mode 100644 index 00000000..33f79db4 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx452.wxs @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx46.wxs b/src/ext/NetFx/wixlib/NetFx46.wxs new file mode 100644 index 00000000..cb53be2e --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx46.wxs @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx461.wxs b/src/ext/NetFx/wixlib/NetFx461.wxs new file mode 100644 index 00000000..95cc2876 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx461.wxs @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx462.wxs b/src/ext/NetFx/wixlib/NetFx462.wxs new file mode 100644 index 00000000..146bae5f --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx462.wxs @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx47.wxs b/src/ext/NetFx/wixlib/NetFx47.wxs new file mode 100644 index 00000000..84f4a221 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx47.wxs @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx471.wxs b/src/ext/NetFx/wixlib/NetFx471.wxs new file mode 100644 index 00000000..b5f825ab --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx471.wxs @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx472.wxs b/src/ext/NetFx/wixlib/NetFx472.wxs new file mode 100644 index 00000000..57584a9e --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx472.wxs @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFx48.wxs b/src/ext/NetFx/wixlib/NetFx48.wxs new file mode 100644 index 00000000..bfca5092 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFx48.wxs @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFxExtension.wxs b/src/ext/NetFx/wixlib/NetFxExtension.wxs new file mode 100644 index 00000000..63c79235 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFxExtension.wxs @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFxExtension_Platform.wxi b/src/ext/NetFx/wixlib/NetFxExtension_Platform.wxi new file mode 100644 index 00000000..7bd727c5 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFxExtension_Platform.wxi @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFxExtension_arm64.wxs b/src/ext/NetFx/wixlib/NetFxExtension_arm64.wxs new file mode 100644 index 00000000..a0492fde --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFxExtension_arm64.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFxExtension_x64.wxs b/src/ext/NetFx/wixlib/NetFxExtension_x64.wxs new file mode 100644 index 00000000..81c9d768 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFxExtension_x64.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetFxExtension_x86.wxs b/src/ext/NetFx/wixlib/NetFxExtension_x86.wxs new file mode 100644 index 00000000..b8ad1927 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetFxExtension_x86.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/NetFx/wixlib/caDecor.wxi b/src/ext/NetFx/wixlib/caDecor.wxi new file mode 100644 index 00000000..b1711518 --- /dev/null +++ b/src/ext/NetFx/wixlib/caDecor.wxi @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/netfx.v3.ncrunchproject b/src/ext/NetFx/wixlib/netfx.v3.ncrunchproject new file mode 100644 index 00000000..319cd523 --- /dev/null +++ b/src/ext/NetFx/wixlib/netfx.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file diff --git a/src/ext/NetFx/wixlib/netfx.wixproj b/src/ext/NetFx/wixlib/netfx.wixproj new file mode 100644 index 00000000..937ed0d4 --- /dev/null +++ b/src/ext/NetFx/wixlib/netfx.wixproj @@ -0,0 +1,32 @@ + + + + + + + Library + true + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/global.json b/src/ext/global.json new file mode 100644 index 00000000..23d7a5bd --- /dev/null +++ b/src/ext/global.json @@ -0,0 +1,5 @@ +{ + "msbuild-sdks": { + "WixToolset.Sdk": "4.0.0-build-0213" + } +} diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs deleted file mode 100644 index 72d4a682..00000000 --- a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs +++ /dev/null @@ -1,147 +0,0 @@ -// 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. - -namespace WixToolsetTest.Netfx -{ - using System.IO; - using System.Linq; - using WixBuildTools.TestSupport; - using WixToolset.Core.TestPackage; - using WixToolset.Netfx; - using Xunit; - - public class NetfxExtensionFixture - { - [Fact] - public void CanBuildUsingLatestDotNetCorePackages() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\UsingDotNetCorePackages"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "BundleLatest.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-ext", TestData.Get(@"WixToolset.Netfx.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-o", bundleFile, - }); - compileResult.AssertSuccess(); - - Assert.True(File.Exists(bundleFile)); - } - } - - [Fact] - public void CanBuildUsingLatestDotNetCorePackages_X64() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\UsingDotNetCorePackages"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "BundleLatest_x64.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-ext", TestData.Get(@"WixToolset.Netfx.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-o", bundleFile, - }); - compileResult.AssertSuccess(); - - Assert.True(File.Exists(bundleFile)); - } - } - - [Fact] - public void CanBuildUsingNativeImage() - { - var folder = TestData.Get(@"TestData\UsingNativeImage"); - var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder }); - - var results = build.BuildAndQuery(Build, "Binary", "CustomAction", "Wix4NetFxNativeImage"); - Assert.Equal(new[] - { - "Binary:Wix4NetFxCA_X86\t[Binary data]", - "CustomAction:Wix4NetFxExecuteNativeImageCommitInstall_X86\t3649\tWix4NetFxCA_X86\tExecNetFx\t", - "CustomAction:Wix4NetFxExecuteNativeImageCommitUninstall_X86\t3649\tWix4NetFxCA_X86\tExecNetFx\t", - "CustomAction:Wix4NetFxExecuteNativeImageInstall_X86\t3137\tWix4NetFxCA_X86\tExecNetFx\t", - "CustomAction:Wix4NetFxExecuteNativeImageUninstall_X86\t3137\tWix4NetFxCA_X86\tExecNetFx\t", - "CustomAction:Wix4NetFxScheduleNativeImage_X86\t1\tWix4NetFxCA_X86\tSchedNetFx\t", - "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t", - }, results.OrderBy(s => s).ToArray()); - } - - [Fact] - public void CanBuildUsingNativeImageX64() - { - var folder = TestData.Get(@"TestData\UsingNativeImage"); - var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder }); - - var results = build.BuildAndQuery(BuildX64, "Binary", "CustomAction", "Wix4NetFxNativeImage"); - Assert.Equal(new[] - { - "Binary:Wix4NetFxCA_X64\t[Binary data]", - "CustomAction:Wix4NetFxExecuteNativeImageCommitInstall_X64\t3649\tWix4NetFxCA_X64\tExecNetFx\t", - "CustomAction:Wix4NetFxExecuteNativeImageCommitUninstall_X64\t3649\tWix4NetFxCA_X64\tExecNetFx\t", - "CustomAction:Wix4NetFxExecuteNativeImageInstall_X64\t3137\tWix4NetFxCA_X64\tExecNetFx\t", - "CustomAction:Wix4NetFxExecuteNativeImageUninstall_X64\t3137\tWix4NetFxCA_X64\tExecNetFx\t", - "CustomAction:Wix4NetFxScheduleNativeImage_X64\t1\tWix4NetFxCA_X64\tSchedNetFx\t", - "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t", - }, results.OrderBy(s => s).ToArray()); - } - - [Fact] - public void CanBuildUsingNativeImageARM64() - { - var folder = TestData.Get(@"TestData\UsingNativeImage"); - var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder }); - - var results = build.BuildAndQuery(BuildARM64, "Binary", "CustomAction", "Wix4NetFxNativeImage"); - Assert.Equal(new[] - { - "Binary:Wix4NetFxCA_A64\t[Binary data]", - "CustomAction:Wix4NetFxExecuteNativeImageCommitInstall_A64\t3649\tWix4NetFxCA_A64\tExecNetFx\t", - "CustomAction:Wix4NetFxExecuteNativeImageCommitUninstall_A64\t3649\tWix4NetFxCA_A64\tExecNetFx\t", - "CustomAction:Wix4NetFxExecuteNativeImageInstall_A64\t3137\tWix4NetFxCA_A64\tExecNetFx\t", - "CustomAction:Wix4NetFxExecuteNativeImageUninstall_A64\t3137\tWix4NetFxCA_A64\tExecNetFx\t", - "CustomAction:Wix4NetFxScheduleNativeImage_A64\t1\tWix4NetFxCA_A64\tSchedNetFx\t", - "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t", - }, results.OrderBy(s => s).ToArray()); - } - - private static void Build(string[] args) - { - var result = WixRunner.Execute(args); - result.AssertSuccess(); - } - - private static void BuildX64(string[] args) - { - var newArgs = args.ToList(); - newArgs.Add("-platform"); - newArgs.Add("x64"); - - var result = WixRunner.Execute(newArgs.ToArray()); - result.AssertSuccess(); - } - - private static void BuildARM64(string[] args) - { - var newArgs = args.ToList(); - newArgs.Add("-platform"); - newArgs.Add("arm64"); - - var result = WixRunner.Execute(newArgs.ToArray()); - result.AssertSuccess(); - } - } -} diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs deleted file mode 100644 index 8e3d2c30..00000000 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs deleted file mode 100644 index fc42ac99..00000000 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl deleted file mode 100644 index 5301bb1a..00000000 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl +++ /dev/null @@ -1,9 +0,0 @@ - - - - A newer version of [ProductName] is already installed. - MsiPackage - - diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs deleted file mode 100644 index ace73680..00000000 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs deleted file mode 100644 index a1c806d9..00000000 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt deleted file mode 100644 index 1b4ffe8a..00000000 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt +++ /dev/null @@ -1 +0,0 @@ -This is example.txt. \ No newline at end of file diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj deleted file mode 100644 index 1c41d176..00000000 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - netcoreapp3.1 - embedded - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject deleted file mode 100644 index 7b5b2139..00000000 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject +++ /dev/null @@ -1,5 +0,0 @@ - - - True - - \ No newline at end of file diff --git a/src/version.json b/src/version.json new file mode 100644 index 00000000..5f857771 --- /dev/null +++ b/src/version.json @@ -0,0 +1,11 @@ +{ + "version": "4.0", + "publicReleaseRefSpec": [ + "^refs/heads/master$" + ], + "cloudBuild": { + "buildNumber": { + "enabled": true + } + } +} diff --git a/src/wix.snk b/src/wix.snk deleted file mode 100644 index 3908a66a..00000000 Binary files a/src/wix.snk and /dev/null differ diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs deleted file mode 100644 index 90aa8bcb..00000000 --- a/src/wixext/NetFxCompiler.cs +++ /dev/null @@ -1,163 +0,0 @@ -// 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. - -namespace WixToolset.Netfx -{ - using System; - using System.Collections.Generic; - using System.Xml.Linq; - using WixToolset.Data; - using WixToolset.Extensibility; - using WixToolset.Extensibility.Data; - using WixToolset.Netfx.Symbols; - - /// - /// The compiler for the WiX Toolset .NET Framework Extension. - /// - public sealed class NetfxCompiler : BaseCompilerExtension - { - public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/netfx"; - - /// - /// Processes an element for the Compiler. - /// - /// Parent element of element to process. - /// Element to process. - /// Extra information about the context in which this element is being parsed. - public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context) - { - switch (parentElement.Name.LocalName) - { - case "File": - string fileId = context["FileId"]; - - switch (element.Name.LocalName) - { - case "NativeImage": - this.ParseNativeImageElement(intermediate, section, element, fileId); - break; - default: - this.ParseHelper.UnexpectedElement(parentElement, element); - break; - } - break; - default: - this.ParseHelper.UnexpectedElement(parentElement, element); - break; - } - } - - /// - /// Parses a NativeImage element. - /// - /// The element to parse. - /// The file identifier of the parent element. - private void ParseNativeImageElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) - { - var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - Identifier id = null; - string appBaseDirectory = null; - string assemblyApplication = null; - int attributes = 0x8; // 32bit is on by default - int priority = 3; - - foreach (var attrib in element.Attributes()) - { - if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) - { - switch (attrib.Name.LocalName) - { - case "Id": - id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); - break; - case "AppBaseDirectory": - appBaseDirectory = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - - // See if a formatted value is specified. - if (-1 == appBaseDirectory.IndexOf("[", StringComparison.Ordinal)) - { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Directory, appBaseDirectory); - } - break; - case "AssemblyApplication": - assemblyApplication = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - - // See if a formatted value is specified. - if (-1 == assemblyApplication.IndexOf("[", StringComparison.Ordinal)) - { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, assemblyApplication); - } - break; - case "Debug": - if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) - { - attributes |= 0x1; - } - break; - case "Dependencies": - if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) - { - attributes |= 0x2; - } - break; - case "Platform": - string platformValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - if (0 < platformValue.Length) - { - switch (platformValue) - { - case "32bit": - // 0x8 is already on by default - break; - case "64bit": - attributes &= ~0x8; - attributes |= 0x10; - break; - case "all": - attributes |= 0x10; - break; - } - } - break; - case "Priority": - priority = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 3); - break; - case "Profile": - if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) - { - attributes |= 0x4; - } - break; - default: - this.ParseHelper.UnexpectedAttribute(element, attrib); - break; - } - } - else - { - this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); - } - } - - if (null == id) - { - id = this.ParseHelper.CreateIdentifier("nni", fileId); - } - - this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "Wix4NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.ARM64 | CustomActionPlatforms.X64 | CustomActionPlatforms.X86); - - if (!this.Messaging.EncounteredError) - { - section.AddSymbol(new NetFxNativeImageSymbol(sourceLineNumbers, id) - { - FileRef = fileId, - Priority = priority, - Attributes = attributes, - ApplicationFileRef = assemblyApplication, - ApplicationBaseDirectoryRef = appBaseDirectory, - }); - } - } - } -} diff --git a/src/wixext/NetFxDecompiler.cs b/src/wixext/NetFxDecompiler.cs deleted file mode 100644 index e30905d1..00000000 --- a/src/wixext/NetFxDecompiler.cs +++ /dev/null @@ -1,139 +0,0 @@ -// 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. - -namespace WixToolset.Extensions -{ -#if TODO_CONSIDER_DECOMPILER - using System; - using System.Collections; - using System.Diagnostics; - using System.Globalization; - using WixToolset.Data; - using WixToolset.Extensibility; - using NetFx = WixToolset.Extensions.Serialize.NetFx; - using Wix = WixToolset.Data.Serialize; - - /// - /// The decompiler for the WiX Toolset .NET Framework Extension. - /// - public sealed class NetFxDecompiler : DecompilerExtension - { - /// - /// Creates a decompiler for NetFx Extension. - /// - public NetFxDecompiler() - { - this.TableDefinitions = NetFxExtensionData.GetExtensionTableDefinitions(); - } - - /// - /// Get the extensions library to be removed. - /// - /// Table definitions for library. - /// Library to remove from decompiled output. - public override Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions) - { - return NetFxExtensionData.GetExtensionLibrary(tableDefinitions); - } - - /// - /// Decompiles an extension table. - /// - /// The table to decompile. - public override void DecompileTable(Table table) - { - switch (table.Name) - { - case "NetFxNativeImage": - this.DecompileNetFxNativeImageTable(table); - break; - default: - base.DecompileTable(table); - break; - } - } - - /// - /// Decompile the NetFxNativeImage table. - /// - /// The table to decompile. - private void DecompileNetFxNativeImageTable(Table table) - { - foreach (Row row in table.Rows) - { - NetFx.NativeImage nativeImage = new NetFx.NativeImage(); - - nativeImage.Id = (string)row[0]; - - switch ((int)row[2]) - { - case 0: - nativeImage.Priority = NetFx.NativeImage.PriorityType.Item0; - break; - case 1: - nativeImage.Priority = NetFx.NativeImage.PriorityType.Item1; - break; - case 2: - nativeImage.Priority = NetFx.NativeImage.PriorityType.Item2; - break; - case 3: - nativeImage.Priority = NetFx.NativeImage.PriorityType.Item3; - break; - } - - if (null != row[3]) - { - int attributes = (int)row[3]; - - if (0x1 == (attributes & 0x1)) - { - nativeImage.Debug = NetFx.YesNoType.yes; - } - - if (0x2 == (attributes & 0x2)) - { - nativeImage.Dependencies = NetFx.YesNoType.no; - } - - if (0x4 == (attributes & 0x4)) - { - nativeImage.Profile = NetFx.YesNoType.yes; - } - - if (0x8 == (attributes & 0x8) && 0x10 == (attributes & 0x10)) - { - nativeImage.Platform = NetFx.NativeImage.PlatformType.all; - } - else if (0x8 == (attributes & 0x8)) - { - nativeImage.Platform = NetFx.NativeImage.PlatformType.Item32bit; - } - else if (0x10 == (attributes & 0x10)) - { - nativeImage.Platform = NetFx.NativeImage.PlatformType.Item64bit; - } - } - - if (null != row[4]) - { - nativeImage.AssemblyApplication = (string)row[4]; - } - - if (null != row[5]) - { - nativeImage.AppBaseDirectory = (string)row[5]; - } - - Wix.File file = (Wix.File)this.Core.GetIndexedElement("File", (string)row[1]); - if (null != file) - { - file.AddChild(nativeImage); - } - else - { - this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "File_", (string)row[1], "File")); - } - } - } - } -#endif -} diff --git a/src/wixext/NetFxExtensionData.cs b/src/wixext/NetFxExtensionData.cs deleted file mode 100644 index 0a24ef1e..00000000 --- a/src/wixext/NetFxExtensionData.cs +++ /dev/null @@ -1,25 +0,0 @@ -// 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. - -namespace WixToolset.Netfx -{ - using WixToolset.Data; - using WixToolset.Extensibility; - using WixToolset.Netfx.Symbols; - - /// - /// The WiX Toolset .NET Framework Extension. - /// - public sealed class NetfxExtensionData : BaseExtensionData - { - public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) - { - symbolDefinition = (name == NetfxSymbolDefinitionNames.NetFxNativeImage) ? NetfxSymbolDefinitions.NetFxNativeImage : null; - return symbolDefinition != null; - } - - public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) - { - return Intermediate.Load(typeof(NetfxExtensionData).Assembly, "WixToolset.Netfx.netfx.wixlib", symbolDefinitions); - } - } -} diff --git a/src/wixext/NetfxExtensionFactory.cs b/src/wixext/NetfxExtensionFactory.cs deleted file mode 100644 index fe618460..00000000 --- a/src/wixext/NetfxExtensionFactory.cs +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -namespace WixToolset.Netfx -{ - using System; - using System.Collections.Generic; - using WixToolset.Extensibility; - - public class NetfxExtensionFactory : BaseExtensionFactory - { - protected override IReadOnlyCollection ExtensionTypes => new[] - { - typeof(NetfxCompiler), - typeof(NetfxExtensionData), - typeof(NetfxWindowsInstallerBackendBinderExtension), - }; - } -} diff --git a/src/wixext/NetfxTableDefinitions.cs b/src/wixext/NetfxTableDefinitions.cs deleted file mode 100644 index 1b2a4d21..00000000 --- a/src/wixext/NetfxTableDefinitions.cs +++ /dev/null @@ -1,30 +0,0 @@ -// 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. - -namespace WixToolset.Netfx -{ - using WixToolset.Data.WindowsInstaller; - using WixToolset.Netfx.Symbols; - - public static class NetfxTableDefinitions - { - public static readonly TableDefinition NetFxNativeImage = new TableDefinition( - "Wix4NetFxNativeImage", - NetfxSymbolDefinitions.NetFxNativeImage, - new[] - { - new ColumnDefinition("Wix4NetFxNativeImage", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The primary key, a non-localized token.", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("File_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "The assembly for which a native image will be generated.", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("Priority", ColumnType.Number, 2, primaryKey: false, nullable: false, ColumnCategory.Integer, minValue: 0, maxValue: 3, description: "The priority for generating this native image: 0 is syncronous, 1-3 represent various levels of queued generation."), - new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Integer, minValue: 0, maxValue: 2147483647, description: "Integer containing bit flags representing native image attributes."), - new ColumnDefinition("File_Application", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "The application which loads this assembly.", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("Directory_ApplicationBase", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "The directory containing the application which loads this assembly.", modularizeType: ColumnModularizeType.Column), - }, - symbolIdIsPrimaryKey: true - ); - - public static readonly TableDefinition[] All = new[] - { - NetFxNativeImage, - }; - } -} diff --git a/src/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/wixext/NetfxWindowsInstallerBackendExtension.cs deleted file mode 100644 index 7d4fe475..00000000 --- a/src/wixext/NetfxWindowsInstallerBackendExtension.cs +++ /dev/null @@ -1,13 +0,0 @@ -// 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. - -namespace WixToolset.Netfx -{ - using System.Collections.Generic; - using WixToolset.Data.WindowsInstaller; - using WixToolset.Extensibility; - - public class NetfxWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension - { - public override IReadOnlyCollection TableDefinitions => NetfxTableDefinitions.All; - } -} diff --git a/src/wixext/Symbols/NetFxNativeImageSymbol.cs b/src/wixext/Symbols/NetFxNativeImageSymbol.cs deleted file mode 100644 index 3803abd6..00000000 --- a/src/wixext/Symbols/NetFxNativeImageSymbol.cs +++ /dev/null @@ -1,58 +0,0 @@ -// 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. - -namespace WixToolset.Netfx.Symbols -{ - using WixToolset.Data; - - public enum NetFxNativeImageSymbolFields - { - FileRef, - Priority, - Attributes, - ApplicationFileRef, - ApplicationBaseDirectoryRef, - } - - public class NetFxNativeImageSymbol : IntermediateSymbol - { - public NetFxNativeImageSymbol() : base(NetfxSymbolDefinitions.NetFxNativeImage, null, null) - { - } - - public NetFxNativeImageSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxSymbolDefinitions.NetFxNativeImage, sourceLineNumber, id) - { - } - - public IntermediateField this[NetFxNativeImageSymbolFields index] => this.Fields[(int)index]; - - public string FileRef - { - get => this.Fields[(int)NetFxNativeImageSymbolFields.FileRef].AsString(); - set => this.Set((int)NetFxNativeImageSymbolFields.FileRef, value); - } - - public int Priority - { - get => this.Fields[(int)NetFxNativeImageSymbolFields.Priority].AsNumber(); - set => this.Set((int)NetFxNativeImageSymbolFields.Priority, value); - } - - public int Attributes - { - get => this.Fields[(int)NetFxNativeImageSymbolFields.Attributes].AsNumber(); - set => this.Set((int)NetFxNativeImageSymbolFields.Attributes, value); - } - - public string ApplicationFileRef - { - get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationFileRef].AsString(); - set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationFileRef, value); - } - - public string ApplicationBaseDirectoryRef - { - get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef].AsString(); - set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef, value); - } - } -} \ No newline at end of file diff --git a/src/wixext/Symbols/NetfxSymbolDefinitions.cs b/src/wixext/Symbols/NetfxSymbolDefinitions.cs deleted file mode 100644 index 3c0f1176..00000000 --- a/src/wixext/Symbols/NetfxSymbolDefinitions.cs +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -namespace WixToolset.Netfx.Symbols -{ - using WixToolset.Data; - - public static class NetfxSymbolDefinitionNames - { - public static string NetFxNativeImage { get; } = "NetFxNativeImage"; - } - - public static class NetfxSymbolDefinitions - { - public static readonly IntermediateSymbolDefinition NetFxNativeImage = new IntermediateSymbolDefinition( - NetfxSymbolDefinitionNames.NetFxNativeImage, - new[] - { - new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.FileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.Priority), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.Attributes), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.ApplicationFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(NetFxNativeImageSymbolFields.ApplicationBaseDirectoryRef), IntermediateFieldType.String), - }, - typeof(NetFxNativeImageSymbol)); - } -} diff --git a/src/wixext/WixToolset.Netfx.wixext.csproj b/src/wixext/WixToolset.Netfx.wixext.csproj deleted file mode 100644 index 7c1d55c1..00000000 --- a/src/wixext/WixToolset.Netfx.wixext.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - netstandard2.0 - embedded - WixToolset.Netfx - WiX Toolset .NET Framework Extension - WiX Toolset .NET Framework Extension - true - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixext/WixToolset.Netfx.wixext.nuspec b/src/wixext/WixToolset.Netfx.wixext.nuspec deleted file mode 100644 index ba3eaade..00000000 --- a/src/wixext/WixToolset.Netfx.wixext.nuspec +++ /dev/null @@ -1,25 +0,0 @@ - - - - $id$ - $version$ - $title$ - $description$ - $authors$ - MS-RL - false - $copyright$ - $projectUrl$ - - - - - - - - - - - - - diff --git a/src/wixext/WixToolset.Netfx.wixext.targets b/src/wixext/WixToolset.Netfx.wixext.targets deleted file mode 100644 index 2ed9c488..00000000 --- a/src/wixext/WixToolset.Netfx.wixext.targets +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - $(MSBuildThisFileDirectory)..\tools\WixToolset.Netfx.wixext.dll - - - - - diff --git a/src/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject b/src/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject deleted file mode 100644 index 93e4df3d..00000000 --- a/src/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject +++ /dev/null @@ -1,7 +0,0 @@ - - - - ..\..\build\Debug\netfx.wixlib - - - \ No newline at end of file diff --git a/src/wixlib/NetCore3.1.12_x64.wxs b/src/wixlib/NetCore3.1.12_x64.wxs deleted file mode 100644 index 990dc0bf..00000000 --- a/src/wixlib/NetCore3.1.12_x64.wxs +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.12_x86.wxs b/src/wixlib/NetCore3.1.12_x86.wxs deleted file mode 100644 index b6d5d371..00000000 --- a/src/wixlib/NetCore3.1.12_x86.wxs +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1_x64.wxs b/src/wixlib/NetCore3.1_x64.wxs deleted file mode 100644 index 60d7c27f..00000000 --- a/src/wixlib/NetCore3.1_x64.wxs +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1_x86.wxs b/src/wixlib/NetCore3.1_x86.wxs deleted file mode 100644 index cfff07b3..00000000 --- a/src/wixlib/NetCore3.1_x86.wxs +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3_Platform.wxi b/src/wixlib/NetCore3_Platform.wxi deleted file mode 100644 index c7aaca50..00000000 --- a/src/wixlib/NetCore3_Platform.wxi +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCoreShared.wxs b/src/wixlib/NetCoreShared.wxs deleted file mode 100644 index 0332041a..00000000 --- a/src/wixlib/NetCoreShared.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/wixlib/NetFx1.1.wxs b/src/wixlib/NetFx1.1.wxs deleted file mode 100644 index 12f0a4e3..00000000 --- a/src/wixlib/NetFx1.1.wxs +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx1.wxs b/src/wixlib/NetFx1.wxs deleted file mode 100644 index 68d6f13d..00000000 --- a/src/wixlib/NetFx1.wxs +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx2.wxs b/src/wixlib/NetFx2.wxs deleted file mode 100644 index e5eef54b..00000000 --- a/src/wixlib/NetFx2.wxs +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx3.5.wxs b/src/wixlib/NetFx3.5.wxs deleted file mode 100644 index c1a80f50..00000000 --- a/src/wixlib/NetFx3.5.wxs +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx3.wxs b/src/wixlib/NetFx3.wxs deleted file mode 100644 index 5fb279ea..00000000 --- a/src/wixlib/NetFx3.wxs +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx4.5.wxs b/src/wixlib/NetFx4.5.wxs deleted file mode 100644 index 443235d4..00000000 --- a/src/wixlib/NetFx4.5.wxs +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx4.wxs b/src/wixlib/NetFx4.wxs deleted file mode 100644 index 295d8078..00000000 --- a/src/wixlib/NetFx4.wxs +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx451.wxs b/src/wixlib/NetFx451.wxs deleted file mode 100644 index 88363555..00000000 --- a/src/wixlib/NetFx451.wxs +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx452.wxs b/src/wixlib/NetFx452.wxs deleted file mode 100644 index 33f79db4..00000000 --- a/src/wixlib/NetFx452.wxs +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx46.wxs b/src/wixlib/NetFx46.wxs deleted file mode 100644 index cb53be2e..00000000 --- a/src/wixlib/NetFx46.wxs +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx461.wxs b/src/wixlib/NetFx461.wxs deleted file mode 100644 index 95cc2876..00000000 --- a/src/wixlib/NetFx461.wxs +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx462.wxs b/src/wixlib/NetFx462.wxs deleted file mode 100644 index 146bae5f..00000000 --- a/src/wixlib/NetFx462.wxs +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx47.wxs b/src/wixlib/NetFx47.wxs deleted file mode 100644 index 84f4a221..00000000 --- a/src/wixlib/NetFx47.wxs +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx471.wxs b/src/wixlib/NetFx471.wxs deleted file mode 100644 index b5f825ab..00000000 --- a/src/wixlib/NetFx471.wxs +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx472.wxs b/src/wixlib/NetFx472.wxs deleted file mode 100644 index 57584a9e..00000000 --- a/src/wixlib/NetFx472.wxs +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFx48.wxs b/src/wixlib/NetFx48.wxs deleted file mode 100644 index bfca5092..00000000 --- a/src/wixlib/NetFx48.wxs +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFxExtension.wxs b/src/wixlib/NetFxExtension.wxs deleted file mode 100644 index 63c79235..00000000 --- a/src/wixlib/NetFxExtension.wxs +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFxExtension_Platform.wxi b/src/wixlib/NetFxExtension_Platform.wxi deleted file mode 100644 index 7bd727c5..00000000 --- a/src/wixlib/NetFxExtension_Platform.wxi +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetFxExtension_arm64.wxs b/src/wixlib/NetFxExtension_arm64.wxs deleted file mode 100644 index a0492fde..00000000 --- a/src/wixlib/NetFxExtension_arm64.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/wixlib/NetFxExtension_x64.wxs b/src/wixlib/NetFxExtension_x64.wxs deleted file mode 100644 index 81c9d768..00000000 --- a/src/wixlib/NetFxExtension_x64.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/wixlib/NetFxExtension_x86.wxs b/src/wixlib/NetFxExtension_x86.wxs deleted file mode 100644 index b8ad1927..00000000 --- a/src/wixlib/NetFxExtension_x86.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/wixlib/caDecor.wxi b/src/wixlib/caDecor.wxi deleted file mode 100644 index b1711518..00000000 --- a/src/wixlib/caDecor.wxi +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/netfx.v3.ncrunchproject b/src/wixlib/netfx.v3.ncrunchproject deleted file mode 100644 index 319cd523..00000000 --- a/src/wixlib/netfx.v3.ncrunchproject +++ /dev/null @@ -1,5 +0,0 @@ - - - True - - \ No newline at end of file diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj deleted file mode 100644 index 937ed0d4..00000000 --- a/src/wixlib/netfx.wixproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - Library - true - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/version.json b/version.json deleted file mode 100644 index 5f857771..00000000 --- a/version.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "4.0", - "publicReleaseRefSpec": [ - "^refs/heads/master$" - ], - "cloudBuild": { - "buildNumber": { - "enabled": true - } - } -} -- cgit v1.2.3-55-g6feb