From 07746ac83f915b9ae83ecf9c9e9836eb2721da8c Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 1 Jan 2018 10:21:52 -0800 Subject: Initial commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..a31cfd1d --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# NetFx.wixext +WixToolset.NetFx.wixext - .NET Framework WiX Toolset Extension -- cgit v1.2.3-55-g6feb From 9c66865ab3e4b3c4cbcb721e22fd668dd4350afa Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 1 Jan 2018 10:22:17 -0800 Subject: Initialize repo --- .gitattributes | 2 + .gitignore | 295 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE.TXT | 28 ++++++ 3 files changed, 325 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE.TXT diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..dfe07704 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3c6208a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,295 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Typescript v1 declaration files +typings/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs \ No newline at end of file diff --git a/LICENSE.TXT b/LICENSE.TXT new file mode 100644 index 00000000..d4d316ef --- /dev/null +++ b/LICENSE.TXT @@ -0,0 +1,28 @@ +Copyright (c) .NET Foundation and contributors. +This software is released under the Microsoft Reciprocal License (MS-RL) (the "License"); you may not use the software except in compliance with the License. + +The text of the Microsoft Reciprocal License (MS-RL) can be found online at: + http://opensource.org/licenses/ms-rl + + +Microsoft Reciprocal License (MS-RL) + +This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. + +1. Definitions + The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. + A "contribution" is the original software, or any additions or changes to the software. + A "contributor" is any person that distributes its contribution under this license. + "Licensed patents" are a contributor's patent claims that read directly on its contribution. + +2. Grant of Rights + (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. + (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. + +3. Conditions and Limitations + (A) Reciprocal Grants- For any file you distribute that contains code from the software (in source code or binary format), you must provide recipients the source code to that file along with a copy of this license, which license will govern that file. You may license other files that are entirely your own work and do not contain code from the software under any terms you choose. + (B) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. + (C) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. + (D) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. + (E) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. + (F) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. -- cgit v1.2.3-55-g6feb From 60d7baefb4e87bf0ddaae58a653faee0be0429f6 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 1 Jan 2018 10:30:42 -0800 Subject: Initial code commit --- NetFx.wixext.sln | 59 ++ appveyor.cmd | 13 + appveyor.yml | 29 + nuget.config | 16 + src/Cpp.Build.props | 101 +++ src/Directory.Build.props | 22 + src/FindLocalWix.props | 10 + src/ca/cost.h | 7 + src/ca/dllmain.cpp | 26 + src/ca/netfxca.cpp | 823 +++++++++++++++++++++ src/ca/netfxca.def | 8 + src/ca/netfxca.vcxproj | 70 ++ src/ca/packages.config | 6 + src/ca/precomp.h | 13 + .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 33 + .../TestData/UsingNativeImage/Package.en-us.wxl | 11 + .../TestData/UsingNativeImage/Package.wxs | 22 + .../UsingNativeImage/PackageComponents.wxs | 13 + .../TestData/UsingNativeImage/example.txt | 1 + .../WixToolsetTest.Netfx.csproj | 40 + src/wixext/NetFxCompiler.cs | 159 ++++ src/wixext/NetFxDecompiler.cs | 139 ++++ src/wixext/NetFxExtensionData.cs | 25 + src/wixext/NetfxExtensionFactory.cs | 18 + .../NetfxWindowsInstallerBackendExtension.cs | 27 + src/wixext/Tuples/NetFxNativeImageTuple.cs | 65 ++ src/wixext/Tuples/NetfxTupleDefinitions.cs | 27 + src/wixext/WixToolset.Netfx.wixext.csproj | 35 + src/wixext/WixToolset.Netfx.wixext.targets | 11 + src/wixext/netfx.xsd | 235 ++++++ src/wixlib/NetFx1.1.wxs | 192 +++++ src/wixlib/NetFx1.wxs | 31 + src/wixlib/NetFx2.wxs | 201 +++++ src/wixlib/NetFx3.5.wxs | 241 ++++++ src/wixlib/NetFx3.wxs | 195 +++++ src/wixlib/NetFx4.5.wxs | 274 +++++++ src/wixlib/NetFx4.wxs | 543 ++++++++++++++ src/wixlib/NetFx451.wxs | 96 +++ src/wixlib/NetFx452.wxs | 95 +++ src/wixlib/NetFx46.wxs | 96 +++ src/wixlib/NetFx461.wxs | 95 +++ src/wixlib/NetFx462.wxs | 95 +++ src/wixlib/NetFxExtension.wxs | 39 + src/wixlib/NetFxExtension_Platform.wxi | 28 + src/wixlib/NetFxExtension_x86.wxs | 8 + src/wixlib/caSuffix.wxi | 28 + src/wixlib/netfx.wixproj | 53 ++ src/wixlib/packages.config | 6 + version.json | 11 + 49 files changed, 4391 insertions(+) create mode 100644 NetFx.wixext.sln create mode 100644 appveyor.cmd create mode 100644 appveyor.yml create mode 100644 nuget.config create mode 100644 src/Cpp.Build.props create mode 100644 src/Directory.Build.props create mode 100644 src/FindLocalWix.props create mode 100644 src/ca/cost.h create mode 100644 src/ca/dllmain.cpp create mode 100644 src/ca/netfxca.cpp create mode 100644 src/ca/netfxca.def create mode 100644 src/ca/netfxca.vcxproj create mode 100644 src/ca/packages.config create mode 100644 src/ca/precomp.h create mode 100644 src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs create mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl create mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs create mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs create mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt create mode 100644 src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj create mode 100644 src/wixext/NetFxCompiler.cs create mode 100644 src/wixext/NetFxDecompiler.cs create mode 100644 src/wixext/NetFxExtensionData.cs create mode 100644 src/wixext/NetfxExtensionFactory.cs create mode 100644 src/wixext/NetfxWindowsInstallerBackendExtension.cs create mode 100644 src/wixext/Tuples/NetFxNativeImageTuple.cs create mode 100644 src/wixext/Tuples/NetfxTupleDefinitions.cs create mode 100644 src/wixext/WixToolset.Netfx.wixext.csproj create mode 100644 src/wixext/WixToolset.Netfx.wixext.targets create mode 100644 src/wixext/netfx.xsd create mode 100644 src/wixlib/NetFx1.1.wxs create mode 100644 src/wixlib/NetFx1.wxs create mode 100644 src/wixlib/NetFx2.wxs create mode 100644 src/wixlib/NetFx3.5.wxs create mode 100644 src/wixlib/NetFx3.wxs create mode 100644 src/wixlib/NetFx4.5.wxs create mode 100644 src/wixlib/NetFx4.wxs create mode 100644 src/wixlib/NetFx451.wxs create mode 100644 src/wixlib/NetFx452.wxs create mode 100644 src/wixlib/NetFx46.wxs create mode 100644 src/wixlib/NetFx461.wxs create mode 100644 src/wixlib/NetFx462.wxs create mode 100644 src/wixlib/NetFxExtension.wxs create mode 100644 src/wixlib/NetFxExtension_Platform.wxi create mode 100644 src/wixlib/NetFxExtension_x86.wxs create mode 100644 src/wixlib/caSuffix.wxi create mode 100644 src/wixlib/netfx.wixproj create mode 100644 src/wixlib/packages.config create mode 100644 version.json diff --git a/NetFx.wixext.sln b/NetFx.wixext.sln new file mode 100644 index 00000000..58578847 --- /dev/null +++ b/NetFx.wixext.sln @@ -0,0 +1,59 @@ + +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 +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|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|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|x64.ActiveCfg = Debug|x64 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|x64.Build.0 = Debug|x64 + {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|x64.ActiveCfg = Release|x64 + {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|x64.Build.0 = Release|x64 + {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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E4566A6B-47D0-4EA0-989A-D763AC39105D} + EndGlobalSection +EndGlobal diff --git a/appveyor.cmd b/appveyor.cmd new file mode 100644 index 00000000..ff940a49 --- /dev/null +++ b/appveyor.cmd @@ -0,0 +1,13 @@ +@setlocal +@pushd %~dp0 + +nuget restore + +msbuild -p:Configuration=Release -t:Restore + +msbuild -p:Configuration=Release src\test\WixToolsetTest.NetFx\WixToolsetTest.NetFx.csproj + +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.NetFx.wixext.csproj + +@popd +@endlocal \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..0c74d54b --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,29 @@ +image: Visual Studio 2017 + +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_tags: true + +artifacts: +- path: build\Release\**\*.nupkg + name: nuget + +notifications: +- provider: Slack + incoming_webhook: + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA= diff --git a/nuget.config b/nuget.config new file mode 100644 index 00000000..8841528e --- /dev/null +++ b/nuget.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props new file mode 100644 index 00000000..453aa442 --- /dev/null +++ b/src/Cpp.Build.props @@ -0,0 +1,101 @@ + + + + + + Win32 + $(OutputPath) + $(BaseIntermediateOutputPath)$(Platform)\ + $(OutputPath)$(Platform)\ + + + + + $(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/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..63ad5d6e --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,22 @@ + + + + + + Debug + AnyCPU + $(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\ + $(MSBuildThisFileDirectory)..\build\$(Configuration)\ + + WiX Toolset Team + WiX Toolset + Copyright (c) .NET Foundation and contributors. All rights reserved. + + + + $(MSBuildThisFileDirectory)..\..\ + + + + + diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props new file mode 100644 index 00000000..c33939ea --- /dev/null +++ b/src/FindLocalWix.props @@ -0,0 +1,10 @@ + + + + + + $(MSBuildThisFileDirectory)..\..\Core\build\Debug\net461\wix.targets + + $(MSBuildThisFileDirectory)..\..\Util.wixext\build\Debug\netstandard2.0\WixToolset.Util.wixext.dll + + diff --git a/src/ca/cost.h b/src/ca/cost.h new file mode 100644 index 00000000..95368eba --- /dev/null +++ b/src/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/ca/dllmain.cpp b/src/ca/dllmain.cpp new file mode 100644 index 00000000..df53f872 --- /dev/null +++ b/src/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/ca/netfxca.cpp b/src/ca/netfxca.cpp new file mode 100644 index 00000000..15802f2b --- /dev/null +++ b/src/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 `NetFxNativeImage`.`File_`, `NetFxNativeImage`.`NetFxNativeImage`, `NetFxNativeImage`.`Priority`, `NetFxNativeImage`.`Attributes`, `NetFxNativeImage`.`File_Application`, `NetFxNativeImage`.`Directory_ApplicationBase`, `File`.`Component_` " + L"FROM `NetFxNativeImage`, `File` WHERE `File`.`File`=`NetFxNativeImage`.`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 NetFxNativeImage 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 NetFxNativeImage table"); + + while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) + { + // Get Id + hr = WcaGetRecordString(hRec, ngqId, &pwzId); + ExitOnFailure(hr, "failed to get NetFxNativeImage.NetFxNativeImage"); + + // Get File + hr = WcaGetRecordString(hRec, ngqFile, &pwzData); + ExitOnFailure(hr, "failed to get NetFxNativeImage.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 NetFxNativeImage.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 NetFxNativeImage.Attributes for record: %ls", pwzId); + + // Get File_Application or leave pwzFileApp NULL. + hr = WcaGetRecordFormattedString(hRec, ngqFileApp, &pwzData); + ExitOnFailure(hr, "failed to get NetFxNativeImage.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 NetFxNativeImage.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 NetFxNativeImage.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 new file mode 100644 index 00000000..c1d01f5f --- /dev/null +++ b/src/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/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj new file mode 100644 index 00000000..98b7352b --- /dev/null +++ b/src/ca/netfxca.vcxproj @@ -0,0 +1,70 @@ + + + + + + + + + + Debug + Win32 + + + Release + Win32 + + + + + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} + DynamicLibrary + netfxca + v141 + Unicode + netfxca.def + WiX Toolset .NET Framework CustomAction + + + + + + + + + + + + + + msi.lib + + + + + Create + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + \ No newline at end of file diff --git a/src/ca/packages.config b/src/ca/packages.config new file mode 100644 index 00000000..b74ff5d0 --- /dev/null +++ b/src/ca/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/ca/precomp.h b/src/ca/precomp.h new file mode 100644 index 00000000..5caedb16 --- /dev/null +++ b/src/ca/precomp.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. + + +#include +#include + +#include "wcautil.h" +#include "fileutil.h" +#include "strutil.h" +#include "pathutil.h" + +#include "cost.h" diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs new file mode 100644 index 00000000..a9428d7c --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -0,0 +1,33 @@ +// 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.Linq; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.Netfx; + using Xunit; + + public class NetfxExtensionFixture + { + [Fact] + public void CanBuildUsingNativeImage() + { + var folder = TestData.Get(@"TestData\UsingNativeImage"); + var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(Build, "NetFxNativeImage"); + Assert.Equal(new[] + { + "NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t", + }, results.OrderBy(s => s).ToArray()); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args, out var messages); + Assert.Equal(0, result); + Assert.Empty(messages); + } + } +} diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl @@ -0,0 +1,11 @@ + + + + + + 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 new file mode 100644 index 00000000..68ff98fd --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs new file mode 100644 index 00000000..21c92f26 --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/example.txt @@ -0,0 +1 @@ +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 new file mode 100644 index 00000000..45429574 --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -0,0 +1,40 @@ + + + + + + netcoreapp2.0 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs new file mode 100644 index 00000000..55db4297 --- /dev/null +++ b/src/wixext/NetFxCompiler.cs @@ -0,0 +1,159 @@ +// 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; + + /// + /// 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) + { + SourceLineNumber 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 (XAttribute 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, "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, "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) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + } + + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); + + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "NetFxScheduleNativeImage"); + + if (!this.Messaging.EncounteredError) + { + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "NetFxNativeImage", id); + row.Set(1, fileId); + row.Set(2, priority); + row.Set(3, attributes); + row.Set(4, assemblyApplication); + row.Set(5, appBaseDirectory); + } + } + } +} diff --git a/src/wixext/NetFxDecompiler.cs b/src/wixext/NetFxDecompiler.cs new file mode 100644 index 00000000..e30905d1 --- /dev/null +++ b/src/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/wixext/NetFxExtensionData.cs b/src/wixext/NetFxExtensionData.cs new file mode 100644 index 00000000..b68741fd --- /dev/null +++ b/src/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.Tuples; + + /// + /// The WiX Toolset .NET Framework Extension. + /// + public sealed class NetfxExtensionData : BaseExtensionData + { + public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) + { + tupleDefinition = (name == NetfxTupleDefinitionNames.NetFxNativeImage) ? NetfxTupleDefinitions.NetFxNativeImage : null; + return tupleDefinition != null; + } + + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) + { + return Intermediate.Load(typeof(NetfxExtensionData).Assembly, "WixToolset.Netfx.netfx.wixlib", tupleDefinitions); + } + } +} diff --git a/src/wixext/NetfxExtensionFactory.cs b/src/wixext/NetfxExtensionFactory.cs new file mode 100644 index 00000000..756d1b2a --- /dev/null +++ b/src/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 IEnumerable ExtensionTypes => new[] + { + typeof(NetfxCompiler), + typeof(NetfxExtensionData), + typeof(NetfxWindowsInstallerBackendExtension), + }; + } +} diff --git a/src/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/wixext/NetfxWindowsInstallerBackendExtension.cs new file mode 100644 index 00000000..50266ef4 --- /dev/null +++ b/src/wixext/NetfxWindowsInstallerBackendExtension.cs @@ -0,0 +1,27 @@ +// 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.Extensibility; + + public class NetfxWindowsInstallerBackendExtension : BaseWindowsInstallerBackendExtension + { + private static readonly TableDefinition[] Tables = new[] { + new TableDefinition( + "NetFxNativeImage", + new[] + { + new ColumnDefinition("NetFxNativeImage", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "The primary key, a non-localized token."), + new ColumnDefinition("File_", ColumnType.String, 0, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "The assembly for which a native image will be generated."), + new ColumnDefinition("Priority", ColumnType.Number, 2, false, false, ColumnCategory.Integer, maxValue: 3, description: "The priority for generating this native image: 0 is syncronous, 1-3 represent various levels of queued generation."), + new ColumnDefinition("Attributes", ColumnType.Number, 4, false, false, ColumnCategory.Integer, maxValue: 2147483647, description: "Integer containing bit flags representing native image attributes."), + new ColumnDefinition("File_Application", ColumnType.String, 72, false, true, ColumnCategory.Formatted, description: "The application which loads this assembly."), + new ColumnDefinition("Directory_ApplicationBase", ColumnType.String, 72, false, true, ColumnCategory.Formatted, description: "The directory containing the application which loads this assembly."), + } + ), + }; + + protected override TableDefinition[] TableDefinitionsForTuples => Tables; + } +} diff --git a/src/wixext/Tuples/NetFxNativeImageTuple.cs b/src/wixext/Tuples/NetFxNativeImageTuple.cs new file mode 100644 index 00000000..af507137 --- /dev/null +++ b/src/wixext/Tuples/NetFxNativeImageTuple.cs @@ -0,0 +1,65 @@ +// 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.Tuples +{ + using WixToolset.Data; + + public enum NetFxNativeImageTupleFields + { + NetFxNativeImage, + File_, + Priority, + Attributes, + File_Application, + Directory_ApplicationBase, + } + + public class NetFxNativeImageTuple : IntermediateTuple + { + public NetFxNativeImageTuple() : base(NetfxTupleDefinitions.NetFxNativeImage, null, null) + { + } + + public NetFxNativeImageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxTupleDefinitions.NetFxNativeImage, sourceLineNumber, id) + { + } + + public IntermediateField this[NetFxNativeImageTupleFields index] => this.Fields[(int)index]; + + public string NetFxNativeImage + { + get => this.Fields[(int)NetFxNativeImageTupleFields.NetFxNativeImage].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.NetFxNativeImage, value); + } + + public string File_ + { + get => this.Fields[(int)NetFxNativeImageTupleFields.File_].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.File_, value); + } + + public int Priority + { + get => this.Fields[(int)NetFxNativeImageTupleFields.Priority].AsNumber(); + set => this.Set((int)NetFxNativeImageTupleFields.Priority, value); + } + + public int Attributes + { + get => this.Fields[(int)NetFxNativeImageTupleFields.Attributes].AsNumber(); + set => this.Set((int)NetFxNativeImageTupleFields.Attributes, value); + } + + public string File_Application + { + get => this.Fields[(int)NetFxNativeImageTupleFields.File_Application].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.File_Application, value); + } + + public string Directory_ApplicationBase + { + get => this.Fields[(int)NetFxNativeImageTupleFields.Directory_ApplicationBase].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.Directory_ApplicationBase, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/NetfxTupleDefinitions.cs b/src/wixext/Tuples/NetfxTupleDefinitions.cs new file mode 100644 index 00000000..aa584b38 --- /dev/null +++ b/src/wixext/Tuples/NetfxTupleDefinitions.cs @@ -0,0 +1,27 @@ +// 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.Tuples +{ + using WixToolset.Data; + + public static class NetfxTupleDefinitionNames + { + public static string NetFxNativeImage { get; } = "NetFxNativeImage"; + } + + public static class NetfxTupleDefinitions + { + public static readonly IntermediateTupleDefinition NetFxNativeImage = new IntermediateTupleDefinition( + NetfxTupleDefinitionNames.NetFxNativeImage, + new[] + { + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.NetFxNativeImage), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Priority), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_Application), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Directory_ApplicationBase), IntermediateFieldType.String), + }, + typeof(NetFxNativeImageTuple)); + } +} diff --git a/src/wixext/WixToolset.Netfx.wixext.csproj b/src/wixext/WixToolset.Netfx.wixext.csproj new file mode 100644 index 00000000..d925e348 --- /dev/null +++ b/src/wixext/WixToolset.Netfx.wixext.csproj @@ -0,0 +1,35 @@ + + + + + + netstandard2.0 + WixToolset.Netfx + WiX Toolset .NET Framework Extension + WiX Toolset .NET Framework Extension + true + build + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/WixToolset.Netfx.wixext.targets b/src/wixext/WixToolset.Netfx.wixext.targets new file mode 100644 index 00000000..17312abf --- /dev/null +++ b/src/wixext/WixToolset.Netfx.wixext.targets @@ -0,0 +1,11 @@ + + + + + + $(MSBuildThisFileDirectory)..\tools\WixToolset.Netfx.wixext.dll" + + + + + diff --git a/src/wixext/netfx.xsd b/src/wixext/netfx.xsd new file mode 100644 index 00000000..6ef4e9b6 --- /dev/null +++ b/src/wixext/netfx.xsd @@ -0,0 +1,235 @@ + + + + + + + + The source code schema for the WiX Toolset .NET Framework Extension. + + + + + + + Improves the performance of managed applications by creating native images. + Requires the .NET Framework 2.0 or newer to be installed on the target machine since + it runs NGen. + + + + + + Native images are files containing compiled processor-specific machine code, which + are installed into the native image cache on the local computer. The runtime + can use native images from the cache instead using the just-in-time (JIT) + compiler to compile the original assembly. + + + The native image custom actions are configured to ignore failures so that failing + to generate or remove a native image will not cause setup to fail and roll back. + + + Note for patches: if you built your target, or baseline, MSI with + previous versions 3.0 or 3.5 of this extension and want to upgrade to formattable + values for @AssemblyApplication or @AppBaseDirectory you must also include a + BinaryRef to "NetFxCA" to pull in necessary changes. If you do use formattable + values and do not include the binary changes ngen.exe will not optimize your + native images for the specified application. + + + This should be a rare occurrence, however. Because you cannot remove components + in a patch - and pyro does validate you do not - it is not practical to switch + from using identifiers to formattable values in a patch. One practical possibility + is if you wanted to use a different application to optimize your native images + and that application is not already installed with the MSI to be updated. + + + + + + + + + The identifier for this NativeImage. + + + + + + + + The directory to use for locating dependent assemblies. + For DLL assemblies and assemblies installed to the Global Assembly Cache (GAC), + this attribute should be set to the directory of the application which loads this + assembly. For EXE assemblies, this attribute does not need to be set because NGen + will use the directory of the assembly file by default. + + + The value can be in the form of a directory identifier, or a formatted string + that resolves to either a directory identifier or a full path to a directory. + + + + + + + + + The application which will load this assembly. + For DLL assemblies which are loaded via reflection, this attribute should + be set to indicate the application which will load this assembly. + The configuration of the application (usually specified via an exe.config file) will be used + to determine how to resolve dependencies for this assembly. + + + The value can be in the form of a file identifier, or a formatted string + that resolves to either a file identifier or a full path to a file. + + + When a shared component is loaded at run time, using the Load method, the + application's configuration file determines the dependencies that are loaded + for the shared component — for example, the version of a dependency that is loaded. + This attribute gives guidance on which dependencies would be loaded at run time in order + to figure out which dependency assemblies will also need to have native images generated + (assuming the Dependency attribute is not set to "no"). + + + This attribute cannot be set if the AssemblyApplication attribute is set on the parent + File element (please note that these attributes both refer to the same application + assembly but do very different things: specifiying File/@AssemblyApplication will force + an assembly to install to a private location next to the indicated application, whereas + this AssemblyApplication attribute will be used to help resolve dependent assemblies + while generating native images for this assembly). + + + + + + + + Set to "yes" to generate native images that can be used under a debugger. + The default value is "no". + + + + + + + Set to "no" to generate the minimum number of native images. + The default value is "yes". + + + + + + + Sets the platform(s) for which native images will be generated. + + + + + + + + Attempt to generate native images only for the 32-bit version of the .NET Framework + on the target machine. If the 32-bit version of the .NET Framework 2.0 or newer is not + present on the target machine, native image custom actions will not be scheduled. + This is the default value. + + + + + + + Attempt to generate native images only for the 64-bit version of the .NET Framework + on the target machine. If a 64-bit version of the .NET Framework 2.0 or newer is not + present on the target machine, native image custom actions will not be scheduled. + + + + + + + Attempt to generate native images for the 32-bit and 64-bit versions of the .NET Framework + on the target machine. If a version of the .NET Framework 2.0 or newer is not present on the + target machine for a processor architecture, native image custom actions will not be + scheduled for that processor architecture. + + + + + + + + + + Sets the priority of generating the native images for this assembly. + + + + + + + + This is the highest priority, it means that image generation occurs syncronously + during the setup process. This option will slow down setup performance. + + + + + + + This will queue image generation to the NGen service to occur immediately. + This option will slow down setup performance. + + + + + + + This will queue image generation to the NGen service to occur after all priority 1 + assemblies have completed. + This option will slow down setup performance. + + + + + + + This is the lowest priority, it will queue image generation to occur when the + machine is idle. + This option should not slow down setup performance. + This is the default value. + + + + + + + + + + Set to "yes" to generate native images that can be used under a profiler. + The default value is "no". + + + + + + + + + Values of this type will either be "yes" or "no". + + + + + + + + diff --git a/src/wixlib/NetFx1.1.wxs b/src/wixlib/NetFx1.1.wxs new file mode 100644 index 00000000..406aef3f --- /dev/null +++ b/src/wixlib/NetFx1.1.wxs @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx1.wxs b/src/wixlib/NetFx1.wxs new file mode 100644 index 00000000..c1b266e8 --- /dev/null +++ b/src/wixlib/NetFx1.wxs @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx2.wxs b/src/wixlib/NetFx2.wxs new file mode 100644 index 00000000..92386b02 --- /dev/null +++ b/src/wixlib/NetFx2.wxs @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx3.5.wxs b/src/wixlib/NetFx3.5.wxs new file mode 100644 index 00000000..422608da --- /dev/null +++ b/src/wixlib/NetFx3.5.wxs @@ -0,0 +1,241 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx3.wxs b/src/wixlib/NetFx3.wxs new file mode 100644 index 00000000..12d51750 --- /dev/null +++ b/src/wixlib/NetFx3.wxs @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx4.5.wxs b/src/wixlib/NetFx4.5.wxs new file mode 100644 index 00000000..f2ddd051 --- /dev/null +++ b/src/wixlib/NetFx4.5.wxs @@ -0,0 +1,274 @@ + + + + + + + + + + + + + + + + + WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx45MinRelease)" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx4.wxs b/src/wixlib/NetFx4.wxs new file mode 100644 index 00000000..fa26435f --- /dev/null +++ b/src/wixlib/NetFx4.wxs @@ -0,0 +1,543 @@ + + + + + + + + + + + + + + + + + + NETFRAMEWORK40FULL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx451.wxs b/src/wixlib/NetFx451.wxs new file mode 100644 index 00000000..7feff124 --- /dev/null +++ b/src/wixlib/NetFx451.wxs @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx451MinRelease)" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx452.wxs b/src/wixlib/NetFx452.wxs new file mode 100644 index 00000000..16c55aac --- /dev/null +++ b/src/wixlib/NetFx452.wxs @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx452MinRelease)" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx46.wxs b/src/wixlib/NetFx46.wxs new file mode 100644 index 00000000..c4120e90 --- /dev/null +++ b/src/wixlib/NetFx46.wxs @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx46MinRelease)" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx461.wxs b/src/wixlib/NetFx461.wxs new file mode 100644 index 00000000..907c2a35 --- /dev/null +++ b/src/wixlib/NetFx461.wxs @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx461MinRelease)" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx462.wxs b/src/wixlib/NetFx462.wxs new file mode 100644 index 00000000..08f5bd53 --- /dev/null +++ b/src/wixlib/NetFx462.wxs @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx462MinRelease)" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFxExtension.wxs b/src/wixlib/NetFxExtension.wxs new file mode 100644 index 00000000..b64dc004 --- /dev/null +++ b/src/wixlib/NetFxExtension.wxs @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFxExtension_Platform.wxi b/src/wixlib/NetFxExtension_Platform.wxi new file mode 100644 index 00000000..9236f316 --- /dev/null +++ b/src/wixlib/NetFxExtension_Platform.wxi @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + RollbackDisabled <> 1 + RollbackDisabled = 1 + RollbackDisabled <> 1 + RollbackDisabled = 1 + + + + + + + + diff --git a/src/wixlib/NetFxExtension_x86.wxs b/src/wixlib/NetFxExtension_x86.wxs new file mode 100644 index 00000000..7245a4dd --- /dev/null +++ b/src/wixlib/NetFxExtension_x86.wxs @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/wixlib/caSuffix.wxi b/src/wixlib/caSuffix.wxi new file mode 100644 index 00000000..a56a2393 --- /dev/null +++ b/src/wixlib/caSuffix.wxi @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj new file mode 100644 index 00000000..8a734c84 --- /dev/null +++ b/src/wixlib/netfx.wixproj @@ -0,0 +1,53 @@ + + + + + + + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} + netfx + Library + true + true + + + + + + + + + + + + + + + + + + + + + + + netfxca + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config new file mode 100644 index 00000000..ba130574 --- /dev/null +++ b/src/wixlib/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/version.json b/version.json new file mode 100644 index 00000000..5f857771 --- /dev/null +++ b/version.json @@ -0,0 +1,11 @@ +{ + "version": "4.0", + "publicReleaseRefSpec": [ + "^refs/heads/master$" + ], + "cloudBuild": { + "buildNumber": { + "enabled": true + } + } +} -- cgit v1.2.3-55-g6feb From 3f5a5717ac1ea7232d65122af22ba2a09032486b Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 1 Jan 2018 23:05:17 -0800 Subject: Update to fixes in latest Util.wixext --- src/wixlib/netfx.wixproj | 4 ++-- src/wixlib/packages.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 8a734c84..dd33150d 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -45,9 +45,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + - + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index ba130574..c2f8d8f7 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -2,5 +2,5 @@ - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 7f55b5b680f9b52da60354263af3493f0a4c5c79 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 23 Jul 2018 21:03:25 -0700 Subject: Integrate Core to Tools repro and Extensibility.Data namespace changes --- NetFx.wixext.sln | 14 ++++++++++++++ nuget.config | 1 + src/FindLocalWix.props | 4 ++-- .../WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj | 16 +++++++++------- src/wixext/WixToolset.Netfx.wixext.csproj | 2 +- src/wixlib/netfx.wixproj | 18 +++++++++--------- src/wixlib/packages.config | 6 +++--- 7 files changed, 39 insertions(+), 22 deletions(-) diff --git a/NetFx.wixext.sln b/NetFx.wixext.sln index 58578847..52bf7a83 100644 --- a/NetFx.wixext.sln +++ b/NetFx.wixext.sln @@ -9,6 +9,8 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "netfx", "src\wixlib\netfx.w 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 @@ -49,6 +51,18 @@ Global {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 diff --git a/nuget.config b/nuget.config index 8841528e..37377ba2 100644 --- a/nuget.config +++ b/nuget.config @@ -9,6 +9,7 @@ + diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props index c33939ea..ed0112ce 100644 --- a/src/FindLocalWix.props +++ b/src/FindLocalWix.props @@ -3,8 +3,8 @@ - $(MSBuildThisFileDirectory)..\..\Core\build\Debug\net461\wix.targets + $(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets - $(MSBuildThisFileDirectory)..\..\Util.wixext\build\Debug\netstandard2.0\WixToolset.Util.wixext.dll + $(MSBuildThisFileDirectory)..\..\Util.wixext\build\Debug\netstandard2.0\WixToolset.Util.wixext.dll diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index 45429574..ec9f79b6 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -1,9 +1,9 @@ - + - netcoreapp2.0 + netcoreapp2.1 false @@ -23,9 +23,11 @@ - - + + + + @@ -33,8 +35,8 @@ - - - + + + diff --git a/src/wixext/WixToolset.Netfx.wixext.csproj b/src/wixext/WixToolset.Netfx.wixext.csproj index d925e348..f18de385 100644 --- a/src/wixext/WixToolset.Netfx.wixext.csproj +++ b/src/wixext/WixToolset.Netfx.wixext.csproj @@ -30,6 +30,6 @@ - + diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index dd33150d..2f7c2d0c 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - - + + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -38,16 +38,16 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + - - - \ No newline at end of file + + + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index c2f8d8f7..e781f56c 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - - - + + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 37095bd1195a75c0bbd84b2151aee6ba62900d2f Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 16 Aug 2018 17:43:07 -0400 Subject: Update to latest MSBuild & Util nupkgs and Windows 10 SDK for CA --- src/ca/netfxca.vcxproj | 1 + src/wixlib/netfx.wixproj | 8 ++++---- src/wixlib/packages.config | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index 98b7352b..012df1ea 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -24,6 +24,7 @@ Unicode netfxca.def WiX Toolset .NET Framework CustomAction + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 2f7c2d0c..baf7b7da 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -45,9 +45,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + - + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index e781f56c..c85370f1 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 3cd1a2930f0003761b2ba7ed885edf0559ef2c79 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 2 Oct 2018 15:25:17 -0700 Subject: Enable NCrunch support --- NetFx.wixext.sln | 8 ++++---- src/Cpp.Build.props | 5 ++--- src/Directory.Build.props | 15 +++++++++++---- src/wixext/WixToolset.Netfx.wixext.csproj | 2 +- src/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject | 7 +++++++ src/wixlib/netfx.v3.ncrunchproject | 5 +++++ 6 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 src/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject create mode 100644 src/wixlib/netfx.v3.ncrunchproject diff --git a/NetFx.wixext.sln b/NetFx.wixext.sln index 52bf7a83..94047f8d 100644 --- a/NetFx.wixext.sln +++ b/NetFx.wixext.sln @@ -22,6 +22,7 @@ Global 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 @@ -30,13 +31,12 @@ Global {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|x64.ActiveCfg = Debug|x64 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Debug|x64.Build.0 = Debug|x64 + {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|x64.ActiveCfg = Release|x64 - {45E4A6AC-3190-4E17-83F0-9935FFA5DC2B}.Release|x64.Build.0 = Release|x64 + {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 diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 453aa442..296b36ca 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -3,9 +3,8 @@ - Win32 - $(OutputPath) - $(BaseIntermediateOutputPath)$(Platform)\ + Win32 + $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ $(OutputPath)$(Platform)\ diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 63ad5d6e..9eacf3f5 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,16 +1,23 @@ - + Debug - AnyCPU - $(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\ - $(MSBuildThisFileDirectory)..\build\$(Configuration)\ + false + + $(MSBuildProjectName) + $(MSBuildThisFileDirectory)..\build\ + $(BaseOutputPath)obj\$(ProjectName)\ + $(BaseOutputPath)$(Configuration)\ WiX Toolset Team WiX Toolset Copyright (c) .NET Foundation and contributors. All rights reserved. + WiX Toolset diff --git a/src/wixext/WixToolset.Netfx.wixext.csproj b/src/wixext/WixToolset.Netfx.wixext.csproj index f18de385..effdb666 100644 --- a/src/wixext/WixToolset.Netfx.wixext.csproj +++ b/src/wixext/WixToolset.Netfx.wixext.csproj @@ -26,7 +26,7 @@ - + diff --git a/src/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject b/src/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject new file mode 100644 index 00000000..93e4df3d --- /dev/null +++ b/src/wixext/WixToolset.Netfx.wixext.v3.ncrunchproject @@ -0,0 +1,7 @@ + + + + ..\..\build\Debug\netfx.wixlib + + + \ No newline at end of file diff --git a/src/wixlib/netfx.v3.ncrunchproject b/src/wixlib/netfx.v3.ncrunchproject new file mode 100644 index 00000000..319cd523 --- /dev/null +++ b/src/wixlib/netfx.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 6c33f1b726802fe229a65c9745187c2144459edc Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 3 Oct 2018 22:37:13 -0700 Subject: Adopt new WixRunner execution --- src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs index a9428d7c..3032d99d 100644 --- a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs +++ b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -25,9 +25,8 @@ namespace WixToolsetTest.Netfx private static void Build(string[] args) { - var result = WixRunner.Execute(args, out var messages); - Assert.Equal(0, result); - Assert.Empty(messages); + var result = WixRunner.Execute(args) + .AssertSuccess(); } } } -- cgit v1.2.3-55-g6feb From dfce808e85a052f9ad963bba7672b47a23970928 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 3 Oct 2018 22:50:50 -0700 Subject: Update to latest Util.wixext --- src/wixlib/netfx.wixproj | 6 +++--- src/wixlib/packages.config | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index baf7b7da..302e5a1f 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -46,8 +46,8 @@ - + - - + + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index c85370f1..00328b08 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -2,5 +2,5 @@ - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 5dcbba93d4c1b9934d86b4e12e91c3118c5fb79e Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 29 Nov 2018 14:08:31 -0500 Subject: Update extension for latest changes in WixToolset.Extensibility. --- src/wixext/NetfxExtensionFactory.cs | 2 +- src/wixext/NetfxWindowsInstallerBackendExtension.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wixext/NetfxExtensionFactory.cs b/src/wixext/NetfxExtensionFactory.cs index 756d1b2a..910c1ac1 100644 --- a/src/wixext/NetfxExtensionFactory.cs +++ b/src/wixext/NetfxExtensionFactory.cs @@ -12,7 +12,7 @@ namespace WixToolset.Netfx { typeof(NetfxCompiler), typeof(NetfxExtensionData), - typeof(NetfxWindowsInstallerBackendExtension), + typeof(NetfxWindowsInstallerBackendBinderExtension), }; } } diff --git a/src/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/wixext/NetfxWindowsInstallerBackendExtension.cs index 50266ef4..5ca554b8 100644 --- a/src/wixext/NetfxWindowsInstallerBackendExtension.cs +++ b/src/wixext/NetfxWindowsInstallerBackendExtension.cs @@ -5,7 +5,7 @@ namespace WixToolset.Netfx using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; - public class NetfxWindowsInstallerBackendExtension : BaseWindowsInstallerBackendExtension + public class NetfxWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension { private static readonly TableDefinition[] Tables = new[] { new TableDefinition( -- cgit v1.2.3-55-g6feb From b357dfffdb89ab43f091a0910ca0bef157f79ffb Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 23 Dec 2018 09:05:20 -0800 Subject: Update to latest Home\repo-template --- .editorconfig | 37 +++++++++++ .gitignore | 72 ++++++++++++++++++---- appveyor.yml | 6 ++ src/Directory.Build.props | 9 +-- src/Directory.Build.targets | 48 +++++++++++++++ .../WixToolsetTest.Netfx.csproj | 6 +- src/wixext/WixToolset.Netfx.wixext.csproj | 7 +-- 7 files changed, 156 insertions(+), 29 deletions(-) create mode 100644 .editorconfig create mode 100644 src/Directory.Build.targets diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..1d72e683 --- /dev/null +++ b/.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/.gitignore b/.gitignore index 3c6208a8..3e8a1553 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files +*.rsuser *.suo *.user *.userosscache @@ -19,16 +20,21 @@ [Rr]eleases/ x64/ x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ -# Visual Studio 2015 cache/options directory +# Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ +# Visual Studio 2017 auto generated files +Generated\ Files/ + # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* @@ -49,16 +55,21 @@ BenchmarkDotNet.Artifacts/ project.lock.json project.fragment.lock.json artifacts/ -**/Properties/launchSettings.json +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio *_i.c *_p.c -*_i.h +*_h.h *.ilk *.meta *.obj +*.iobj *.pch *.pdb +*.ipdb *.pgc *.pgd *.rsp @@ -68,6 +79,7 @@ artifacts/ *.tlh *.tmp *.tmp_proj +*_wpftmp.csproj *.log *.vspscc *.vssscc @@ -96,6 +108,9 @@ ipch/ *.vspx *.sap +# Visual Studio Trace Files +*.e2e + # TFS 2012 Local Workspace $tf/ @@ -116,6 +131,10 @@ _TeamCity* # DotCover is a Code Coverage Tool *.dotCover +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + # Visual Studio code coverage results *.coverage *.coveragexml @@ -164,11 +183,11 @@ PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore -**/packages/* +**/[Pp]ackages/* # except build/, which is used as an MSBuild target. -!**/packages/build/ +!**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config +#!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets @@ -192,7 +211,7 @@ _pkginfo.txt # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache -!*.[Cc]ache/ +!?*.[Cc]ache/ # Others ClientBin/ @@ -205,9 +224,15 @@ ClientBin/ *.publishsettings orleans.codegen.cs +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ +# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true +**/wwwroot/lib/ # RIA/Silverlight projects Generated_Code/ @@ -219,6 +244,8 @@ _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak # SQL Server files *.mdf @@ -229,6 +256,7 @@ UpgradeLog*.htm *.rdl.data *.bim.layout *.bim_*.settings +*.rptproj.rsuser # Microsoft Fakes FakesAssemblies/ @@ -240,9 +268,6 @@ FakesAssemblies/ .ntvs_analysis.dat node_modules/ -# Typescript v1 declaration files -typings/ - # Visual Studio 6 build log *.plg @@ -271,8 +296,8 @@ paket-files/ .idea/ *.sln.iml -# CodeRush -.cr/ +# CodeRush personal settings +.cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ @@ -292,4 +317,25 @@ __pycache__/ *.btp.cs *.btm.cs *.odx.cs -*.xsd.cs \ No newline at end of file +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb diff --git a/appveyor.yml b/appveyor.yml index 0c74d54b..d55322da 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +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. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml +# then update all of the repos. + image: Visual Studio 2017 version: 0.0.0.{build} @@ -17,6 +22,7 @@ pull_requests: nuget: disable_publish_on_pr: true +skip_branch_with_pr: true skip_tags: true artifacts: diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 9eacf3f5..e853e22d 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,7 @@ @@ -10,20 +10,17 @@ false $(MSBuildProjectName) - $(MSBuildThisFileDirectory)..\build\ + $([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 - - $(MSBuildThisFileDirectory)..\..\ - - diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..dac7452a --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,48 @@ + + + + + + + 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/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index ec9f79b6..7fe2dcff 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -23,11 +23,7 @@ - - - - - + diff --git a/src/wixext/WixToolset.Netfx.wixext.csproj b/src/wixext/WixToolset.Netfx.wixext.csproj index effdb666..5f02a850 100644 --- a/src/wixext/WixToolset.Netfx.wixext.csproj +++ b/src/wixext/WixToolset.Netfx.wixext.csproj @@ -18,11 +18,8 @@ - - - - - + + -- cgit v1.2.3-55-g6feb From 5ab9ec85e0f5c403631e3f054645ba8c7dcc058d Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 13 Jan 2019 19:16:29 -0600 Subject: Update to latest Cpp.Build.props for locating latest Win10 SDK. Remove unused Microsoft.VisualStudio.Setup.Configuration.Native package. --- src/Cpp.Build.props | 6 +++++- src/ca/netfxca.vcxproj | 9 --------- src/ca/packages.config | 1 - 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 296b36ca..0e00132b 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -8,6 +8,10 @@ $(OutputPath)$(Platform)\ + + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + + $(DisableSpecificCompilerWarnings) @@ -16,7 +20,7 @@ WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) Use precomp.h - StdCall + StdCall true false -YlprecompDefine diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index 012df1ea..8be3a0ea 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -24,19 +24,11 @@ Unicode netfxca.def WiX Toolset .NET Framework CustomAction - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - - - - msi.lib @@ -64,7 +56,6 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - diff --git a/src/ca/packages.config b/src/ca/packages.config index b74ff5d0..b87f9ab4 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,6 +1,5 @@  - \ No newline at end of file -- cgit v1.2.3-55-g6feb From 014bc7918c05f01f819c07fac6e502e0f542a222 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 24 Oct 2019 17:16:31 -0400 Subject: Modernize tuples; update to latest dependencies. --- src/Cpp.Build.props | 2 +- src/ca/netfxca.vcxproj | 20 ++++---------- src/ca/packages.config | 4 +-- .../WixToolsetTest.Netfx.csproj | 11 +++++--- src/wixext/NetFxCompiler.cs | 15 ++++++----- src/wixext/Tuples/NetFxNativeImageTuple.cs | 31 +++++++++------------- src/wixext/Tuples/NetfxTupleDefinitions.cs | 9 +++---- src/wixlib/netfx.wixproj | 8 +++--- src/wixlib/packages.config | 4 +-- 9 files changed, 46 insertions(+), 58 deletions(-) diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 0e00132b..44a042c7 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -8,7 +8,7 @@ $(OutputPath)$(Platform)\ - + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index 8be3a0ea..3f525e58 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -1,10 +1,8 @@ - - - - + + Debug @@ -15,7 +13,6 @@ Win32 - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} DynamicLibrary @@ -25,38 +22,31 @@ netfxca.def WiX Toolset .NET Framework CustomAction - - msi.lib - Create - - - + - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + \ No newline at end of file diff --git a/src/ca/packages.config b/src/ca/packages.config index b87f9ab4..4e9403bf 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index 7fe2dcff..3f04fea5 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -1,4 +1,4 @@ - + @@ -31,8 +31,11 @@ - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs index 55db4297..8a5d02f5 100644 --- a/src/wixext/NetFxCompiler.cs +++ b/src/wixext/NetFxCompiler.cs @@ -7,6 +7,7 @@ namespace WixToolset.Netfx using System.Xml.Linq; using WixToolset.Data; using WixToolset.Extensibility; + using WixToolset.Netfx.Tuples; /// /// The compiler for the WiX Toolset .NET Framework Extension. @@ -147,12 +148,14 @@ namespace WixToolset.Netfx if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "NetFxNativeImage", id); - row.Set(1, fileId); - row.Set(2, priority); - row.Set(3, attributes); - row.Set(4, assemblyApplication); - row.Set(5, appBaseDirectory); + section.Tuples.Add(new NetFxNativeImageTuple(sourceLineNumbers, id) + { + FileRef=fileId, + Priority=priority, + Attributes=attributes, + ApplicationFileRef=assemblyApplication, + ApplicationBaseDirectoryRef=appBaseDirectory, + }); } } } diff --git a/src/wixext/Tuples/NetFxNativeImageTuple.cs b/src/wixext/Tuples/NetFxNativeImageTuple.cs index af507137..51211f75 100644 --- a/src/wixext/Tuples/NetFxNativeImageTuple.cs +++ b/src/wixext/Tuples/NetFxNativeImageTuple.cs @@ -6,12 +6,11 @@ namespace WixToolset.Netfx.Tuples public enum NetFxNativeImageTupleFields { - NetFxNativeImage, - File_, + FileRef, Priority, Attributes, - File_Application, - Directory_ApplicationBase, + ApplicationFileRef, + ApplicationBaseDirectoryRef, } public class NetFxNativeImageTuple : IntermediateTuple @@ -26,16 +25,10 @@ namespace WixToolset.Netfx.Tuples public IntermediateField this[NetFxNativeImageTupleFields index] => this.Fields[(int)index]; - public string NetFxNativeImage + public string FileRef { - get => this.Fields[(int)NetFxNativeImageTupleFields.NetFxNativeImage].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.NetFxNativeImage, value); - } - - public string File_ - { - get => this.Fields[(int)NetFxNativeImageTupleFields.File_].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.File_, value); + get => this.Fields[(int)NetFxNativeImageTupleFields.FileRef].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.FileRef, value); } public int Priority @@ -50,16 +43,16 @@ namespace WixToolset.Netfx.Tuples set => this.Set((int)NetFxNativeImageTupleFields.Attributes, value); } - public string File_Application + public string ApplicationFileRef { - get => this.Fields[(int)NetFxNativeImageTupleFields.File_Application].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.File_Application, value); + get => this.Fields[(int)NetFxNativeImageTupleFields.ApplicationFileRef].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.ApplicationFileRef, value); } - public string Directory_ApplicationBase + public string ApplicationBaseDirectoryRef { - get => this.Fields[(int)NetFxNativeImageTupleFields.Directory_ApplicationBase].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.Directory_ApplicationBase, value); + get => this.Fields[(int)NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef].AsString(); + set => this.Set((int)NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef, value); } } } \ No newline at end of file diff --git a/src/wixext/Tuples/NetfxTupleDefinitions.cs b/src/wixext/Tuples/NetfxTupleDefinitions.cs index aa584b38..9b617279 100644 --- a/src/wixext/Tuples/NetfxTupleDefinitions.cs +++ b/src/wixext/Tuples/NetfxTupleDefinitions.cs @@ -1,4 +1,4 @@ -// 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. +// 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.Tuples { @@ -15,12 +15,11 @@ namespace WixToolset.Netfx.Tuples NetfxTupleDefinitionNames.NetFxNativeImage, new[] { - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.NetFxNativeImage), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.FileRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Priority), IntermediateFieldType.Number), new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Attributes), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.File_Application), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Directory_ApplicationBase), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.ApplicationFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef), IntermediateFieldType.String), }, typeof(NetFxNativeImageTuple)); } diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 302e5a1f..438ac60f 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -45,9 +45,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + - + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 00328b08..1d51675a 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From d86b61727a51cde11c44a0c54d1d1bc132808d64 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Mon, 28 Oct 2019 20:39:01 -0400 Subject: Update to latest Tools and Util.wixext. --- src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj | 3 +++ src/wixext/NetFxCompiler.cs | 10 +++++----- src/wixext/NetfxWindowsInstallerBackendExtension.cs | 5 ++++- src/wixlib/netfx.wixproj | 8 ++++---- src/wixlib/packages.config | 4 ++-- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index 3f04fea5..4c2e1444 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -23,6 +23,9 @@ + + + diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs index 8a5d02f5..06d48fe7 100644 --- a/src/wixext/NetFxCompiler.cs +++ b/src/wixext/NetFxCompiler.cs @@ -150,11 +150,11 @@ namespace WixToolset.Netfx { section.Tuples.Add(new NetFxNativeImageTuple(sourceLineNumbers, id) { - FileRef=fileId, - Priority=priority, - Attributes=attributes, - ApplicationFileRef=assemblyApplication, - ApplicationBaseDirectoryRef=appBaseDirectory, + FileRef = fileId, + Priority = priority, + Attributes = attributes, + ApplicationFileRef = assemblyApplication, + ApplicationBaseDirectoryRef = appBaseDirectory, }); } } diff --git a/src/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/wixext/NetfxWindowsInstallerBackendExtension.cs index 5ca554b8..4672b670 100644 --- a/src/wixext/NetfxWindowsInstallerBackendExtension.cs +++ b/src/wixext/NetfxWindowsInstallerBackendExtension.cs @@ -1,7 +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. +// 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.Data.WindowsInstaller; using WixToolset.Extensibility; @@ -23,5 +24,7 @@ namespace WixToolset.Netfx }; protected override TableDefinition[] TableDefinitionsForTuples => Tables; + + public override bool TryAddTupleToOutput(IntermediateTuple tuple, WindowsInstallerData output) => this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, this.TableDefinitionsForTuples, true); } } diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 438ac60f..9f79e04c 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -45,9 +45,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + - + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 1d51675a..d420562a 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 17c0d0788a6b0a18908020cfee633f631af33afb Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 11 Nov 2019 16:24:35 +1000 Subject: Fix WixToolset.Netfx.wixext.targets. Update to latest Tools. --- src/wixext/WixToolset.Netfx.wixext.targets | 2 +- src/wixlib/netfx.wixproj | 4 ++-- src/wixlib/packages.config | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wixext/WixToolset.Netfx.wixext.targets b/src/wixext/WixToolset.Netfx.wixext.targets index 17312abf..2ed9c488 100644 --- a/src/wixext/WixToolset.Netfx.wixext.targets +++ b/src/wixext/WixToolset.Netfx.wixext.targets @@ -3,7 +3,7 @@ - $(MSBuildThisFileDirectory)..\tools\WixToolset.Netfx.wixext.dll" + $(MSBuildThisFileDirectory)..\tools\WixToolset.Netfx.wixext.dll diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 9f79e04c..17a2cf32 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -45,7 +45,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index d420562a..4fb71c41 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 6bd4c05fbcb1a8e4d042db6da45bca9043e25416 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 21 Jan 2020 20:09:20 -0500 Subject: Update build tools to pick up important fixes. --- src/wixlib/netfx.wixproj | 4 ++-- src/wixlib/packages.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 17a2cf32..d890a911 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -45,7 +45,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 4fb71c41..15e9aaaa 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From ce9a0d0c678cffe1d67017074ad420f04f12916c Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 20 Feb 2020 21:16:52 -0500 Subject: Update extension for Data and Extensibility changes. --- src/wixext/NetfxWindowsInstallerBackendExtension.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/wixext/NetfxWindowsInstallerBackendExtension.cs index 4672b670..df4e9839 100644 --- a/src/wixext/NetfxWindowsInstallerBackendExtension.cs +++ b/src/wixext/NetfxWindowsInstallerBackendExtension.cs @@ -2,6 +2,7 @@ namespace WixToolset.Netfx { + using System.Collections.Generic; using WixToolset.Data; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; @@ -23,8 +24,6 @@ namespace WixToolset.Netfx ), }; - protected override TableDefinition[] TableDefinitionsForTuples => Tables; - - public override bool TryAddTupleToOutput(IntermediateTuple tuple, WindowsInstallerData output) => this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, this.TableDefinitionsForTuples, true); + public override IEnumerable TableDefinitions { get => Tables; } } } -- cgit v1.2.3-55-g6feb From 7db9d55d7723fd5c451ded7fbbfde0a4b220b8dd Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Wed, 26 Feb 2020 19:33:01 -0500 Subject: One shiny NuGet package, please and thank you. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a31cfd1d..36fbdf9e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # NetFx.wixext WixToolset.NetFx.wixext - .NET Framework WiX Toolset Extension + -- cgit v1.2.3-55-g6feb From 1e63f31a2b8caf3a81f619d0786efddb0173ab05 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Mon, 9 Mar 2020 13:47:57 -0400 Subject: Version extension ids. Partial fix for wixtoolset/issues#5933. --- src/ca/caDecor.h | 13 +++++++ src/ca/precomp.h | 1 + .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 4 +-- src/wixext/NetFxCompiler.cs | 3 +- .../NetfxWindowsInstallerBackendExtension.cs | 9 ++++- src/wixlib/NetFxExtension_Platform.wxi | 25 +++++++------- src/wixlib/caDecor.wxi | 40 ++++++++++++++++++++++ src/wixlib/caSuffix.wxi | 28 --------------- src/wixlib/netfx.wixproj | 8 ++--- src/wixlib/packages.config | 4 +-- 10 files changed, 85 insertions(+), 50 deletions(-) create mode 100644 src/ca/caDecor.h create mode 100644 src/wixlib/caDecor.wxi delete mode 100644 src/wixlib/caSuffix.wxi diff --git a/src/ca/caDecor.h b/src/ca/caDecor.h new file mode 100644 index 00000000..da274650 --- /dev/null +++ b/src/ca/caDecor.h @@ -0,0 +1,13 @@ +#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/precomp.h b/src/ca/precomp.h index 5caedb16..4a83c164 100644 --- a/src/ca/precomp.h +++ b/src/ca/precomp.h @@ -10,4 +10,5 @@ #include "strutil.h" #include "pathutil.h" +#include "caDecor.h" #include "cost.h" diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs index 3032d99d..38724481 100644 --- a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs +++ b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -16,10 +16,10 @@ namespace WixToolsetTest.Netfx var folder = TestData.Get(@"TestData\UsingNativeImage"); var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder }); - var results = build.BuildAndQuery(Build, "NetFxNativeImage"); + var results = build.BuildAndQuery(Build, "Wix4NetFxNativeImage"); Assert.Equal(new[] { - "NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t", + "Wix4NetFxNativeImage:ExampleNgen\tfil6349_KNDJhqShNzVdHX3ihhvA6Y\t3\t8\t\t", }, results.OrderBy(s => s).ToArray()); } diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs index 06d48fe7..4916994e 100644 --- a/src/wixext/NetFxCompiler.cs +++ b/src/wixext/NetFxCompiler.cs @@ -7,6 +7,7 @@ namespace WixToolset.Netfx using System.Xml.Linq; using WixToolset.Data; using WixToolset.Extensibility; + using WixToolset.Extensibility.Data; using WixToolset.Netfx.Tuples; /// @@ -144,7 +145,7 @@ namespace WixToolset.Netfx this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "NetFxScheduleNativeImage"); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.X86); if (!this.Messaging.EncounteredError) { diff --git a/src/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/wixext/NetfxWindowsInstallerBackendExtension.cs index df4e9839..1c7ce9b8 100644 --- a/src/wixext/NetfxWindowsInstallerBackendExtension.cs +++ b/src/wixext/NetfxWindowsInstallerBackendExtension.cs @@ -11,10 +11,11 @@ namespace WixToolset.Netfx { private static readonly TableDefinition[] Tables = new[] { new TableDefinition( + "Wix4NetFxNativeImage", "NetFxNativeImage", new[] { - new ColumnDefinition("NetFxNativeImage", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "The primary key, a non-localized token."), + new ColumnDefinition("Wix4NetFxNativeImage", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "The primary key, a non-localized token."), new ColumnDefinition("File_", ColumnType.String, 0, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "The assembly for which a native image will be generated."), new ColumnDefinition("Priority", ColumnType.Number, 2, false, false, ColumnCategory.Integer, maxValue: 3, description: "The priority for generating this native image: 0 is syncronous, 1-3 represent various levels of queued generation."), new ColumnDefinition("Attributes", ColumnType.Number, 4, false, false, ColumnCategory.Integer, maxValue: 2147483647, description: "Integer containing bit flags representing native image attributes."), @@ -25,5 +26,11 @@ namespace WixToolset.Netfx }; public override IEnumerable TableDefinitions { get => Tables; } + + public override bool TryAddTupleToOutput(IntermediateTuple tuple, WindowsInstallerData output) + { + var columnZeroIsId = tuple.Id != null; + return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, this.TableDefinitions, columnZeroIsId); + } } } diff --git a/src/wixlib/NetFxExtension_Platform.wxi b/src/wixlib/NetFxExtension_Platform.wxi index 9236f316..92b13dad 100644 --- a/src/wixlib/NetFxExtension_Platform.wxi +++ b/src/wixlib/NetFxExtension_Platform.wxi @@ -4,25 +4,26 @@ - + + - - - - - + + + + + - - RollbackDisabled <> 1 - RollbackDisabled = 1 - RollbackDisabled <> 1 - RollbackDisabled = 1 + + RollbackDisabled <> 1 + RollbackDisabled = 1 + RollbackDisabled <> 1 + RollbackDisabled = 1 - + diff --git a/src/wixlib/caDecor.wxi b/src/wixlib/caDecor.wxi new file mode 100644 index 00000000..1d00df8f --- /dev/null +++ b/src/wixlib/caDecor.wxi @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/caSuffix.wxi b/src/wixlib/caSuffix.wxi deleted file mode 100644 index a56a2393..00000000 --- a/src/wixlib/caSuffix.wxi +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index d890a911..71a6488e 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -45,9 +45,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + - + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 15e9aaaa..01c05df7 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From f04bfc15cae6c9e161e20384096961f00e4b6fff Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 26 Mar 2020 19:09:23 -0400 Subject: One shiny NuGet package, please and thank you. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 36fbdf9e..a31cfd1d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,2 @@ # NetFx.wixext WixToolset.NetFx.wixext - .NET Framework WiX Toolset Extension - -- cgit v1.2.3-55-g6feb From 057da4cedb151761c4a8cbfe9c1899315c8a3b05 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 3 Apr 2020 13:28:12 +1000 Subject: Update dependencies. --- src/wixext/NetfxWindowsInstallerBackendExtension.cs | 7 ------- src/wixlib/netfx.wixproj | 8 ++++---- src/wixlib/packages.config | 4 ++-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/wixext/NetfxWindowsInstallerBackendExtension.cs index 1c7ce9b8..7e30d396 100644 --- a/src/wixext/NetfxWindowsInstallerBackendExtension.cs +++ b/src/wixext/NetfxWindowsInstallerBackendExtension.cs @@ -3,7 +3,6 @@ namespace WixToolset.Netfx { using System.Collections.Generic; - using WixToolset.Data; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; @@ -26,11 +25,5 @@ namespace WixToolset.Netfx }; public override IEnumerable TableDefinitions { get => Tables; } - - public override bool TryAddTupleToOutput(IntermediateTuple tuple, WindowsInstallerData output) - { - var columnZeroIsId = tuple.Id != null; - return this.BackendHelper.TryAddTupleToOutputMatchingTableDefinitions(tuple, output, this.TableDefinitions, columnZeroIsId); - } } } diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 71a6488e..aefce69b 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -45,9 +45,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + - + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 01c05df7..a543c00f 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From aecff401f974f603cb78b8a665000b2a93490e80 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 5 Apr 2020 21:27:11 +1000 Subject: Modernize NetfxCompiler and table definitions. --- src/Directory.Build.props | 4 ++- .../WixToolsetTest.Netfx.csproj | 15 +++++------ src/wixext/NetFxCompiler.cs | 12 ++++----- src/wixext/NetfxTableDefinitions.cs | 29 ++++++++++++++++++++++ .../NetfxWindowsInstallerBackendExtension.cs | 18 +------------- src/wixlib/netfx.wixproj | 4 +-- src/wixlib/packages.config | 2 +- 7 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 src/wixext/NetfxTableDefinitions.cs diff --git a/src/Directory.Build.props b/src/Directory.Build.props index e853e22d..a22f4470 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,6 +8,7 @@ Debug false + MSB3246 $(MSBuildProjectName) $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) @@ -21,6 +22,7 @@ WiX Toolset - + + diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index 4c2e1444..88303fcd 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -3,7 +3,7 @@ - netcoreapp2.1 + netcoreapp3.1 false @@ -23,10 +23,10 @@ - - - - + + + + @@ -36,9 +36,6 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs index 4916994e..58c8c0f6 100644 --- a/src/wixext/NetFxCompiler.cs +++ b/src/wixext/NetFxCompiler.cs @@ -53,14 +53,14 @@ namespace WixToolset.Netfx /// The file identifier of the parent element. private void ParseNativeImageElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + 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 (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -75,7 +75,7 @@ namespace WixToolset.Netfx // See if a formatted value is specified. if (-1 == appBaseDirectory.IndexOf("[", StringComparison.Ordinal)) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Directory", appBaseDirectory); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Directory, appBaseDirectory); } break; case "AssemblyApplication": @@ -84,7 +84,7 @@ namespace WixToolset.Netfx // See if a formatted value is specified. if (-1 == assemblyApplication.IndexOf("[", StringComparison.Ordinal)) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", assemblyApplication); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, assemblyApplication); } break; case "Debug": @@ -140,7 +140,7 @@ namespace WixToolset.Netfx if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("nni", fileId); } this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); @@ -149,7 +149,7 @@ namespace WixToolset.Netfx if (!this.Messaging.EncounteredError) { - section.Tuples.Add(new NetFxNativeImageTuple(sourceLineNumbers, id) + section.AddTuple(new NetFxNativeImageTuple(sourceLineNumbers, id) { FileRef = fileId, Priority = priority, diff --git a/src/wixext/NetfxTableDefinitions.cs b/src/wixext/NetfxTableDefinitions.cs new file mode 100644 index 00000000..378f6def --- /dev/null +++ b/src/wixext/NetfxTableDefinitions.cs @@ -0,0 +1,29 @@ +// 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; + + public static class NetfxTableDefinitions + { + public static readonly TableDefinition NetFxNativeImage = new TableDefinition( + "Wix4NetFxNativeImage", + 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), + }, + tupleDefinitionName: "NetFxNativeImage", + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition[] All = new[] + { + NetFxNativeImage, + }; + } +} diff --git a/src/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/wixext/NetfxWindowsInstallerBackendExtension.cs index 7e30d396..e1404c1a 100644 --- a/src/wixext/NetfxWindowsInstallerBackendExtension.cs +++ b/src/wixext/NetfxWindowsInstallerBackendExtension.cs @@ -8,22 +8,6 @@ namespace WixToolset.Netfx public class NetfxWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension { - private static readonly TableDefinition[] Tables = new[] { - new TableDefinition( - "Wix4NetFxNativeImage", - "NetFxNativeImage", - new[] - { - new ColumnDefinition("Wix4NetFxNativeImage", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "The primary key, a non-localized token."), - new ColumnDefinition("File_", ColumnType.String, 0, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "The assembly for which a native image will be generated."), - new ColumnDefinition("Priority", ColumnType.Number, 2, false, false, ColumnCategory.Integer, maxValue: 3, description: "The priority for generating this native image: 0 is syncronous, 1-3 represent various levels of queued generation."), - new ColumnDefinition("Attributes", ColumnType.Number, 4, false, false, ColumnCategory.Integer, maxValue: 2147483647, description: "Integer containing bit flags representing native image attributes."), - new ColumnDefinition("File_Application", ColumnType.String, 72, false, true, ColumnCategory.Formatted, description: "The application which loads this assembly."), - new ColumnDefinition("Directory_ApplicationBase", ColumnType.String, 72, false, true, ColumnCategory.Formatted, description: "The directory containing the application which loads this assembly."), - } - ), - }; - - public override IEnumerable TableDefinitions { get => Tables; } + public override IEnumerable TableDefinitions => NetfxTableDefinitions.All; } } diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index aefce69b..62a35745 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -45,7 +45,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index a543c00f..d7f7cfd7 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 5a5013dd44116cac92d4e1608e15a4df6d2d51fe Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 5 Apr 2020 21:49:32 +1000 Subject: Update to Visual Studio 2019 appveyor image. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index d55322da..bbf880f0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ # Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml # then update all of the repos. -image: Visual Studio 2017 +image: Visual Studio 2019 version: 0.0.0.{build} configuration: Release -- cgit v1.2.3-55-g6feb From ff96f679e443ce19f87d2a33dcbe7404128b0b0c Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 13 Apr 2020 19:14:39 +1000 Subject: Update dependencies. --- appveyor.yml | 5 +++++ src/Cpp.Build.props | 18 ------------------ src/wixext/NetfxTableDefinitions.cs | 3 ++- src/wixlib/netfx.wixproj | 8 ++++---- src/wixlib/packages.config | 4 ++-- 5 files changed, 13 insertions(+), 25 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index bbf880f0..7c686b04 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,6 +3,11 @@ # 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} diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 44a042c7..9b7a1bb5 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -70,12 +70,6 @@ MultiThreadedDebug - - - - MultiThreadedDebugDll - - MinSpace @@ -89,16 +83,4 @@ true - - - - MultiThreadedDll - - - - - $(LinkKeyFile) - $(LinkDelaySign) - - diff --git a/src/wixext/NetfxTableDefinitions.cs b/src/wixext/NetfxTableDefinitions.cs index 378f6def..a94b0d2f 100644 --- a/src/wixext/NetfxTableDefinitions.cs +++ b/src/wixext/NetfxTableDefinitions.cs @@ -3,11 +3,13 @@ namespace WixToolset.Netfx { using WixToolset.Data.WindowsInstaller; + using WixToolset.Netfx.Tuples; public static class NetfxTableDefinitions { public static readonly TableDefinition NetFxNativeImage = new TableDefinition( "Wix4NetFxNativeImage", + NetfxTupleDefinitions.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), @@ -17,7 +19,6 @@ namespace WixToolset.Netfx 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), }, - tupleDefinitionName: "NetFxNativeImage", tupleIdIsPrimaryKey: true ); diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 62a35745..9fc532ef 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -45,9 +45,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + - + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index d7f7cfd7..d8447626 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From f2e8523f44eeb88e418c93f00715896d663dc256 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 23 Apr 2020 12:28:56 +1000 Subject: Move MBA prereq info back into NetFx. --- nuget.config | 1 + src/wixlib/NetFx4.5.wxs | 27 ++++++++++++++++++++----- src/wixlib/NetFx4.wxs | 50 ++++++++++++++++++++++++++++++++++++---------- src/wixlib/NetFx451.wxs | 27 ++++++++++++++++++++----- src/wixlib/NetFx452.wxs | 28 ++++++++++++++++++++------ src/wixlib/NetFx46.wxs | 27 ++++++++++++++++++++----- src/wixlib/NetFx461.wxs | 27 ++++++++++++++++++++----- src/wixlib/NetFx462.wxs | 27 ++++++++++++++++++++----- src/wixlib/netfx.wixproj | 2 ++ src/wixlib/packages.config | 1 + 10 files changed, 176 insertions(+), 41 deletions(-) diff --git a/nuget.config b/nuget.config index 37377ba2..50ed9623 100644 --- a/nuget.config +++ b/nuget.config @@ -10,6 +10,7 @@ + diff --git a/src/wixlib/NetFx4.5.wxs b/src/wixlib/NetFx4.5.wxs index f2ddd051..d2ee09cd 100644 --- a/src/wixlib/NetFx4.5.wxs +++ b/src/wixlib/NetFx4.5.wxs @@ -2,7 +2,9 @@ - + diff --git a/src/wixlib/NetFx4.wxs b/src/wixlib/NetFx4.wxs index fa26435f..cad4a31c 100644 --- a/src/wixlib/NetFx4.wxs +++ b/src/wixlib/NetFx4.wxs @@ -2,7 +2,9 @@ - + diff --git a/src/wixlib/NetFx451.wxs b/src/wixlib/NetFx451.wxs index 7feff124..dc2b1fd6 100644 --- a/src/wixlib/NetFx451.wxs +++ b/src/wixlib/NetFx451.wxs @@ -2,7 +2,9 @@ - + - - + - + - + - + + + + + + + + + + + + + + + + WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx472MinRelease)" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetFx48.wxs b/src/wixlib/NetFx48.wxs new file mode 100644 index 00000000..5156c3f0 --- /dev/null +++ b/src/wixlib/NetFx48.wxs @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx48MinRelease)" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 32d928ca..e9b95422 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -11,6 +11,8 @@ true + + -- cgit v1.2.3-55-g6feb From 91c46b53b80172a9fe1419ac67500ad55b52c16c Mon Sep 17 00:00:00 2001 From: William Kent Date: Mon, 18 May 2020 20:39:49 -0400 Subject: Add missing NuGet feed aka fix package restore --- nuget.config | 1 + 1 file changed, 1 insertion(+) diff --git a/nuget.config b/nuget.config index 50ed9623..7f258709 100644 --- a/nuget.config +++ b/nuget.config @@ -12,6 +12,7 @@ + -- cgit v1.2.3-55-g6feb From 037243df84151413db9666c78526fc60ff5e3b53 Mon Sep 17 00:00:00 2001 From: William Kent Date: Mon, 18 May 2020 20:48:06 -0400 Subject: Add predefined payload for .NET Core 3.1.x --- src/wixlib/NetCore3.1.1.wxs | 74 +++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.2.wxs | 74 +++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.3.wxs | 103 ++++++++++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.wxs | 74 +++++++++++++++++++++++++++++++ src/wixlib/netfx.wixproj | 4 ++ 5 files changed, 329 insertions(+) create mode 100644 src/wixlib/NetCore3.1.1.wxs create mode 100644 src/wixlib/NetCore3.1.2.wxs create mode 100644 src/wixlib/NetCore3.1.3.wxs create mode 100644 src/wixlib/NetCore3.1.wxs diff --git a/src/wixlib/NetCore3.1.1.wxs b/src/wixlib/NetCore3.1.1.wxs new file mode 100644 index 00000000..109d4f6b --- /dev/null +++ b/src/wixlib/NetCore3.1.1.wxs @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.2.wxs b/src/wixlib/NetCore3.1.2.wxs new file mode 100644 index 00000000..f8a5a7b5 --- /dev/null +++ b/src/wixlib/NetCore3.1.2.wxs @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.3.wxs b/src/wixlib/NetCore3.1.3.wxs new file mode 100644 index 00000000..8f4cba15 --- /dev/null +++ b/src/wixlib/NetCore3.1.3.wxs @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.wxs b/src/wixlib/NetCore3.1.wxs new file mode 100644 index 00000000..7f1cd2f9 --- /dev/null +++ b/src/wixlib/NetCore3.1.wxs @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index e9b95422..a9df9790 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -27,6 +27,10 @@ + + + + -- cgit v1.2.3-55-g6feb From 4029dacd2053cc35bdbce158fb9b2c4c832ebb78 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 20 May 2020 22:33:48 +1000 Subject: Update .NET Core packages so they don't conflict. Make it easier to add new ones. Add AsPrereq package group for DotNetCoreRuntime packages. --- .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 26 +++++ .../TestData/UsingDotNetCorePackages/Bundle.wxs | 20 ++++ .../WixToolsetTest.Netfx.csproj | 6 + src/wixlib/NetCore3.1.1.wxs | 90 ++++++++------- src/wixlib/NetCore3.1.2.wxs | 90 ++++++++------- src/wixlib/NetCore3.1.3.wxs | 127 ++++++++++++--------- src/wixlib/NetCore3.1.wxs | 70 +++++++----- src/wixlib/NetCore3_Platform.wxi | 79 +++++++++++++ src/wixlib/NetCoreShared.wxs | 20 ++++ src/wixlib/netfx.wixproj | 1 + 10 files changed, 367 insertions(+), 162 deletions(-) create mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs create mode 100644 src/wixlib/NetCore3_Platform.wxi create mode 100644 src/wixlib/NetCoreShared.wxs diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs index 38724481..15c31088 100644 --- a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs +++ b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -2,6 +2,7 @@ namespace WixToolsetTest.Netfx { + using System.IO; using System.Linq; using WixBuildTools.TestSupport; using WixToolset.Core.TestPackage; @@ -10,6 +11,31 @@ namespace WixToolsetTest.Netfx public class NetfxExtensionFixture { + [Fact] + public void CanBuildUsingDotNetCorePackages() + { + 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, "Bundle.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() { diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs new file mode 100644 index 00000000..7c008171 --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index 88303fcd..cf7afa8b 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -12,17 +12,23 @@ + + + + + + diff --git a/src/wixlib/NetCore3.1.1.wxs b/src/wixlib/NetCore3.1.1.wxs index 109d4f6b..50e4eae2 100644 --- a/src/wixlib/NetCore3.1.1.wxs +++ b/src/wixlib/NetCore3.1.1.wxs @@ -1,30 +1,41 @@ - + + + + + + + + + + - - + - - + + + + - + - + Name="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)aspnetcore-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.AspNetCoreRedistInstallCommand)" + RepairCommand="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.AspNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.AspNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.AspNetCoreRedistLink)" + LogPathVariable="$(var.AspNetCoreRedistLog)" + Compressed="no"> - - + - - + + + + - + - + Name="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)windowsdesktop-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.DesktopNetCoreRedistInstallCommand)" + RepairCommand="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.DesktopNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.DesktopNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.DesktopNetCoreRedistLink)" + LogPathVariable="$(var.DesktopNetCoreRedistLog)" + Compressed="no"> - + + + + + + + + + + - - + - - + + + + - + - + Name="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)aspnetcore-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.AspNetCoreRedistInstallCommand)" + RepairCommand="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.AspNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.AspNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.AspNetCoreRedistLink)" + LogPathVariable="$(var.AspNetCoreRedistLog)" + Compressed="no"> - - + - - + + + + - + - + Name="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)windowsdesktop-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.DesktopNetCoreRedistInstallCommand)" + RepairCommand="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.DesktopNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.DesktopNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.DesktopNetCoreRedistLink)" + LogPathVariable="$(var.DesktopNetCoreRedistLog)" + Compressed="no"> - + + + + + + + + + + + - - + - - + + + + - + + Name="!(wix.DotNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)dotnet-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.DotNetCoreRedistInstallCommand)" + RepairCommand="!(wix.DotNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.DotNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.DotNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.DotNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.DotNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.DotNetCoreRedistLink)" + LogPathVariable="$(var.DotNetCoreRedistLog)" + Compressed="no"> - - + - - + + + + - + + Name="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)aspnetcore-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.AspNetCoreRedistInstallCommand)" + RepairCommand="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.AspNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.AspNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.AspNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.AspNetCoreRedistLink)" + LogPathVariable="$(var.AspNetCoreRedistLog)" + Compressed="no"> - - + - - + + + + - + + Name="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)PackageDirectory)windowsdesktop-runtime-$(var.NetCoreVersion)-win-$(var.NetCorePlatform).exe" + InstallCommand="$(var.DesktopNetCoreRedistInstallCommand)" + RepairCommand="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)RepairCommand)" + UninstallCommand="$(var.DesktopNetCoreRedistUninstallCommand)" + PerMachine="yes" + DetectCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)DetectCondition)" + InstallCondition="!(wix.DesktopNetCoreRuntime$(var.NetCoreIdVersion)Redist$(var.NetCorePlatform)InstallCondition)" + Id="$(var.DesktopNetCoreRedistId)" + Vital="yes" + Permanent="yes" + Protocol="burn" + DownloadUrl="$(var.DesktopNetCoreRedistLink)" + LogPathVariable="$(var.DesktopNetCoreRedistLog)" + Compressed="no"> - + + + + + + + + + + - - + - - + + + + - + - - - + - - + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCoreShared.wxs b/src/wixlib/NetCoreShared.wxs new file mode 100644 index 00000000..18f9e5a4 --- /dev/null +++ b/src/wixlib/NetCoreShared.wxs @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index a9df9790..78ca93f7 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -31,6 +31,7 @@ + -- cgit v1.2.3-55-g6feb From 9875a626e3b171c206fe6ae83e1c6c2d8c5dc25b Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 20 May 2020 22:55:14 +1000 Subject: Rename .NET Core files to x64. Add placeholders for missing 3.1.x .NET Core packages. --- src/wixlib/NetCore3.1.0_x64.wxs | 125 ++++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.0_x86.wxs | 131 ++++++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.1.wxs | 86 -------------------------- src/wixlib/NetCore3.1.1_x64.wxs | 125 ++++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.1_x86.wxs | 131 ++++++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.2.wxs | 86 -------------------------- src/wixlib/NetCore3.1.2_x64.wxs | 125 ++++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.2_x86.wxs | 131 ++++++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.3.wxs | 120 ------------------------------------ src/wixlib/NetCore3.1.3_x64.wxs | 120 ++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.3_x86.wxs | 131 ++++++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.4_x64.wxs | 131 ++++++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.4_x86.wxs | 131 ++++++++++++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.wxs | 86 -------------------------- src/wixlib/netfx.wixproj | 14 +++-- 15 files changed, 1291 insertions(+), 382 deletions(-) create mode 100644 src/wixlib/NetCore3.1.0_x64.wxs create mode 100644 src/wixlib/NetCore3.1.0_x86.wxs delete mode 100644 src/wixlib/NetCore3.1.1.wxs create mode 100644 src/wixlib/NetCore3.1.1_x64.wxs create mode 100644 src/wixlib/NetCore3.1.1_x86.wxs delete mode 100644 src/wixlib/NetCore3.1.2.wxs create mode 100644 src/wixlib/NetCore3.1.2_x64.wxs create mode 100644 src/wixlib/NetCore3.1.2_x86.wxs delete mode 100644 src/wixlib/NetCore3.1.3.wxs create mode 100644 src/wixlib/NetCore3.1.3_x64.wxs create mode 100644 src/wixlib/NetCore3.1.3_x86.wxs create mode 100644 src/wixlib/NetCore3.1.4_x64.wxs create mode 100644 src/wixlib/NetCore3.1.4_x86.wxs delete mode 100644 src/wixlib/NetCore3.1.wxs diff --git a/src/wixlib/NetCore3.1.0_x64.wxs b/src/wixlib/NetCore3.1.0_x64.wxs new file mode 100644 index 00000000..281f3009 --- /dev/null +++ b/src/wixlib/NetCore3.1.0_x64.wxs @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.0_x86.wxs b/src/wixlib/NetCore3.1.0_x86.wxs new file mode 100644 index 00000000..3b2d76af --- /dev/null +++ b/src/wixlib/NetCore3.1.0_x86.wxs @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.1.wxs b/src/wixlib/NetCore3.1.1.wxs deleted file mode 100644 index 50e4eae2..00000000 --- a/src/wixlib/NetCore3.1.1.wxs +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.1_x64.wxs b/src/wixlib/NetCore3.1.1_x64.wxs new file mode 100644 index 00000000..834752b0 --- /dev/null +++ b/src/wixlib/NetCore3.1.1_x64.wxs @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.1_x86.wxs b/src/wixlib/NetCore3.1.1_x86.wxs new file mode 100644 index 00000000..c1f3d1f3 --- /dev/null +++ b/src/wixlib/NetCore3.1.1_x86.wxs @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.2.wxs b/src/wixlib/NetCore3.1.2.wxs deleted file mode 100644 index db70f693..00000000 --- a/src/wixlib/NetCore3.1.2.wxs +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.2_x64.wxs b/src/wixlib/NetCore3.1.2_x64.wxs new file mode 100644 index 00000000..1cc6a5d6 --- /dev/null +++ b/src/wixlib/NetCore3.1.2_x64.wxs @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.2_x86.wxs b/src/wixlib/NetCore3.1.2_x86.wxs new file mode 100644 index 00000000..d9275c19 --- /dev/null +++ b/src/wixlib/NetCore3.1.2_x86.wxs @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.3.wxs b/src/wixlib/NetCore3.1.3.wxs deleted file mode 100644 index a10b19b6..00000000 --- a/src/wixlib/NetCore3.1.3.wxs +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.3_x64.wxs b/src/wixlib/NetCore3.1.3_x64.wxs new file mode 100644 index 00000000..a10b19b6 --- /dev/null +++ b/src/wixlib/NetCore3.1.3_x64.wxs @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.3_x86.wxs b/src/wixlib/NetCore3.1.3_x86.wxs new file mode 100644 index 00000000..c9fe9806 --- /dev/null +++ b/src/wixlib/NetCore3.1.3_x86.wxs @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.4_x64.wxs b/src/wixlib/NetCore3.1.4_x64.wxs new file mode 100644 index 00000000..39ab8261 --- /dev/null +++ b/src/wixlib/NetCore3.1.4_x64.wxs @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.4_x86.wxs b/src/wixlib/NetCore3.1.4_x86.wxs new file mode 100644 index 00000000..9a6e390b --- /dev/null +++ b/src/wixlib/NetCore3.1.4_x86.wxs @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.wxs b/src/wixlib/NetCore3.1.wxs deleted file mode 100644 index 4ca554fa..00000000 --- a/src/wixlib/NetCore3.1.wxs +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 78ca93f7..371ee24d 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -27,10 +27,16 @@ - - - - + + + + + + + + + + -- cgit v1.2.3-55-g6feb From 2f656639071852058f884126f8d75bbf3512d78f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 20 May 2020 23:04:12 +1000 Subject: Integrate new .NET Framework packages into v4. --- src/wixlib/NetFx472.wxs | 60 +++++++++++++++++++++++++------------------ src/wixlib/NetFx48.wxs | 66 ++++++++++++++++++++++++++++-------------------- src/wixlib/netfx.wixproj | 4 +-- 3 files changed, 77 insertions(+), 53 deletions(-) diff --git a/src/wixlib/NetFx472.wxs b/src/wixlib/NetFx472.wxs index 152d2245..08a17d5b 100644 --- a/src/wixlib/NetFx472.wxs +++ b/src/wixlib/NetFx472.wxs @@ -1,7 +1,9 @@ - + - + - - + + Debug @@ -46,7 +46,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + \ No newline at end of file diff --git a/src/ca/packages.config b/src/ca/packages.config index 4e9403bf..59e81af5 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 7cbd4a2b..dff4762a 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -58,11 +58,11 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + - - + + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index bc0fc20d..f7ce1fd5 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,7 +1,7 @@  - - - + + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 8b709e477823a15c48dff81ac33a17fe88ae7114 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 22 May 2020 21:14:06 +1000 Subject: WIXFEAT:5575 Add MSI properties for 4.7 and 4.7.1. --- src/wixlib/NetFx47.wxs | 25 +++++++++++++++++++++++++ src/wixlib/NetFx471.wxs | 25 +++++++++++++++++++++++++ src/wixlib/netfx.wixproj | 2 ++ 3 files changed, 52 insertions(+) create mode 100644 src/wixlib/NetFx47.wxs create mode 100644 src/wixlib/NetFx471.wxs diff --git a/src/wixlib/NetFx47.wxs b/src/wixlib/NetFx47.wxs new file mode 100644 index 00000000..2f4966ad --- /dev/null +++ b/src/wixlib/NetFx47.wxs @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx47MinRelease)" + + + diff --git a/src/wixlib/NetFx471.wxs b/src/wixlib/NetFx471.wxs new file mode 100644 index 00000000..3fd99aa3 --- /dev/null +++ b/src/wixlib/NetFx471.wxs @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx471MinRelease)" + + + diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index dff4762a..c153eda9 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -24,6 +24,8 @@ + + -- cgit v1.2.3-55-g6feb From 5aee3f30c28734fbbc3e89a6abd711dbc7158382 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 30 May 2020 15:23:11 -0700 Subject: Add NCrunch configuration --- src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject new file mode 100644 index 00000000..7b5b2139 --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 1979837ff79b46ce0a03e25b82e239c37348ec4d Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Sun, 14 Jun 2020 16:03:52 -0400 Subject: Enable platform-specific CAs, including ARM64 - Update to latest dependencies. --- appveyor.cmd | 3 + src/ca/netfxca.vcxproj | 34 +++++++++-- src/ca/packages.config | 4 +- .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 70 +++++++++++++++++++++- .../TestData/UsingNativeImage/Package.wxs | 2 +- src/wixext/NetFxCompiler.cs | 2 +- src/wixlib/NetFxExtension_arm.wxs | 8 +++ src/wixlib/NetFxExtension_arm64.wxs | 8 +++ src/wixlib/NetFxExtension_x64.wxs | 8 +++ src/wixlib/netfx.wixproj | 31 ++++++++-- src/wixlib/packages.config | 6 +- 11 files changed, 155 insertions(+), 21 deletions(-) create mode 100644 src/wixlib/NetFxExtension_arm.wxs create mode 100644 src/wixlib/NetFxExtension_arm64.wxs create mode 100644 src/wixlib/NetFxExtension_x64.wxs diff --git a/appveyor.cmd b/appveyor.cmd index ff940a49..3ee1f17e 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -9,5 +9,8 @@ msbuild -p:Configuration=Release src\test\WixToolsetTest.NetFx\WixToolsetTest.Ne msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.NetFx.wixext.csproj +msbuild -p:Configuration=Release src\test\WixToolsetTest.Netfx\WixToolsetTest.Netfx.csproj +dotnet test -c Release --no-build src\test\WixToolsetTest.Netfx + @popd @endlocal \ No newline at end of file diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index 5ceb914a..b68c265b 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -1,8 +1,8 @@ - - + + Debug @@ -12,12 +12,36 @@ Release Win32 + + Debug + x64 + + + Release + x64 + + + Debug + ARM + + + Release + ARM + + + Debug + ARM64 + + + Release + ARM64 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} DynamicLibrary netfxca - v141 + v142 Unicode netfxca.def WiX Toolset .NET Framework CustomAction @@ -46,7 +70,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + \ No newline at end of file diff --git a/src/ca/packages.config b/src/ca/packages.config index 59e81af5..3a296ead 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs index 15c31088..8bcac8df 100644 --- a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs +++ b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -42,17 +42,81 @@ namespace WixToolsetTest.Netfx var folder = TestData.Get(@"TestData\UsingNativeImage"); var build = new Builder(folder, typeof(NetfxExtensionFactory), new[] { folder }); - var results = build.BuildAndQuery(Build, "Wix4NetFxNativeImage"); + 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) - .AssertSuccess(); + 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/UsingNativeImage/Package.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs index 68ff98fd..7cffdb5b 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs @@ -1,7 +1,7 @@ - + diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs index 58c8c0f6..e12cca6b 100644 --- a/src/wixext/NetFxCompiler.cs +++ b/src/wixext/NetFxCompiler.cs @@ -145,7 +145,7 @@ namespace WixToolset.Netfx this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64 | CustomActionPlatforms.X64 | CustomActionPlatforms.X86); if (!this.Messaging.EncounteredError) { diff --git a/src/wixlib/NetFxExtension_arm.wxs b/src/wixlib/NetFxExtension_arm.wxs new file mode 100644 index 00000000..8b5c508b --- /dev/null +++ b/src/wixlib/NetFxExtension_arm.wxs @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/wixlib/NetFxExtension_arm64.wxs b/src/wixlib/NetFxExtension_arm64.wxs new file mode 100644 index 00000000..8b1f9d36 --- /dev/null +++ b/src/wixlib/NetFxExtension_arm64.wxs @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/wixlib/NetFxExtension_x64.wxs b/src/wixlib/NetFxExtension_x64.wxs new file mode 100644 index 00000000..cc079e5a --- /dev/null +++ b/src/wixlib/NetFxExtension_x64.wxs @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index c153eda9..e0e052d1 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,7 +1,7 @@ - + {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} @@ -28,6 +28,9 @@ + + + @@ -48,6 +51,22 @@ netfxca {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} + Platform=ARM + + + netfxca + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} + Platform=ARM64 + + + netfxca + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} + Platform=x86 + + + netfxca + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} + Platform=x64 @@ -60,11 +79,11 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + - - + + \ No newline at end of file diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index f7ce1fd5..e71c3d9d 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,7 +1,7 @@  - - - + + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 20572fec71899df1a19f5759c64984b6ea9b20df Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 27 Jun 2020 01:53:23 -0700 Subject: The Great Tuple to Symbol Rename (tm) --- src/wixext/NetFxCompiler.cs | 8 ++++---- src/wixext/NetFxExtensionData.cs | 12 +++++------ src/wixext/NetfxTableDefinitions.cs | 6 +++--- src/wixext/Tuples/NetFxNativeImageTuple.cs | 32 +++++++++++++++--------------- src/wixext/Tuples/NetfxTupleDefinitions.cs | 22 ++++++++++---------- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs index e12cca6b..14efe95d 100644 --- a/src/wixext/NetFxCompiler.cs +++ b/src/wixext/NetFxCompiler.cs @@ -8,7 +8,7 @@ namespace WixToolset.Netfx using WixToolset.Data; using WixToolset.Extensibility; using WixToolset.Extensibility.Data; - using WixToolset.Netfx.Tuples; + using WixToolset.Netfx.Symbols; /// /// The compiler for the WiX Toolset .NET Framework Extension. @@ -75,7 +75,7 @@ namespace WixToolset.Netfx // See if a formatted value is specified. if (-1 == appBaseDirectory.IndexOf("[", StringComparison.Ordinal)) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Directory, appBaseDirectory); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Directory, appBaseDirectory); } break; case "AssemblyApplication": @@ -84,7 +84,7 @@ namespace WixToolset.Netfx // See if a formatted value is specified. if (-1 == assemblyApplication.IndexOf("[", StringComparison.Ordinal)) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, assemblyApplication); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, assemblyApplication); } break; case "Debug": @@ -149,7 +149,7 @@ namespace WixToolset.Netfx if (!this.Messaging.EncounteredError) { - section.AddTuple(new NetFxNativeImageTuple(sourceLineNumbers, id) + section.AddSymbol(new NetFxNativeImageSymbol(sourceLineNumbers, id) { FileRef = fileId, Priority = priority, diff --git a/src/wixext/NetFxExtensionData.cs b/src/wixext/NetFxExtensionData.cs index b68741fd..0a24ef1e 100644 --- a/src/wixext/NetFxExtensionData.cs +++ b/src/wixext/NetFxExtensionData.cs @@ -4,22 +4,22 @@ namespace WixToolset.Netfx { using WixToolset.Data; using WixToolset.Extensibility; - using WixToolset.Netfx.Tuples; + using WixToolset.Netfx.Symbols; /// /// The WiX Toolset .NET Framework Extension. /// public sealed class NetfxExtensionData : BaseExtensionData { - public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) + public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) { - tupleDefinition = (name == NetfxTupleDefinitionNames.NetFxNativeImage) ? NetfxTupleDefinitions.NetFxNativeImage : null; - return tupleDefinition != null; + symbolDefinition = (name == NetfxSymbolDefinitionNames.NetFxNativeImage) ? NetfxSymbolDefinitions.NetFxNativeImage : null; + return symbolDefinition != null; } - public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) + public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) { - return Intermediate.Load(typeof(NetfxExtensionData).Assembly, "WixToolset.Netfx.netfx.wixlib", tupleDefinitions); + return Intermediate.Load(typeof(NetfxExtensionData).Assembly, "WixToolset.Netfx.netfx.wixlib", symbolDefinitions); } } } diff --git a/src/wixext/NetfxTableDefinitions.cs b/src/wixext/NetfxTableDefinitions.cs index a94b0d2f..1b2a4d21 100644 --- a/src/wixext/NetfxTableDefinitions.cs +++ b/src/wixext/NetfxTableDefinitions.cs @@ -3,13 +3,13 @@ namespace WixToolset.Netfx { using WixToolset.Data.WindowsInstaller; - using WixToolset.Netfx.Tuples; + using WixToolset.Netfx.Symbols; public static class NetfxTableDefinitions { public static readonly TableDefinition NetFxNativeImage = new TableDefinition( "Wix4NetFxNativeImage", - NetfxTupleDefinitions.NetFxNativeImage, + 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), @@ -19,7 +19,7 @@ namespace WixToolset.Netfx 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), }, - tupleIdIsPrimaryKey: true + symbolIdIsPrimaryKey: true ); public static readonly TableDefinition[] All = new[] diff --git a/src/wixext/Tuples/NetFxNativeImageTuple.cs b/src/wixext/Tuples/NetFxNativeImageTuple.cs index 51211f75..3803abd6 100644 --- a/src/wixext/Tuples/NetFxNativeImageTuple.cs +++ b/src/wixext/Tuples/NetFxNativeImageTuple.cs @@ -1,10 +1,10 @@ // 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.Tuples +namespace WixToolset.Netfx.Symbols { using WixToolset.Data; - public enum NetFxNativeImageTupleFields + public enum NetFxNativeImageSymbolFields { FileRef, Priority, @@ -13,46 +13,46 @@ namespace WixToolset.Netfx.Tuples ApplicationBaseDirectoryRef, } - public class NetFxNativeImageTuple : IntermediateTuple + public class NetFxNativeImageSymbol : IntermediateSymbol { - public NetFxNativeImageTuple() : base(NetfxTupleDefinitions.NetFxNativeImage, null, null) + public NetFxNativeImageSymbol() : base(NetfxSymbolDefinitions.NetFxNativeImage, null, null) { } - public NetFxNativeImageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxTupleDefinitions.NetFxNativeImage, sourceLineNumber, id) + public NetFxNativeImageSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(NetfxSymbolDefinitions.NetFxNativeImage, sourceLineNumber, id) { } - public IntermediateField this[NetFxNativeImageTupleFields index] => this.Fields[(int)index]; + public IntermediateField this[NetFxNativeImageSymbolFields index] => this.Fields[(int)index]; public string FileRef { - get => this.Fields[(int)NetFxNativeImageTupleFields.FileRef].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.FileRef, value); + get => this.Fields[(int)NetFxNativeImageSymbolFields.FileRef].AsString(); + set => this.Set((int)NetFxNativeImageSymbolFields.FileRef, value); } public int Priority { - get => this.Fields[(int)NetFxNativeImageTupleFields.Priority].AsNumber(); - set => this.Set((int)NetFxNativeImageTupleFields.Priority, value); + get => this.Fields[(int)NetFxNativeImageSymbolFields.Priority].AsNumber(); + set => this.Set((int)NetFxNativeImageSymbolFields.Priority, value); } public int Attributes { - get => this.Fields[(int)NetFxNativeImageTupleFields.Attributes].AsNumber(); - set => this.Set((int)NetFxNativeImageTupleFields.Attributes, value); + get => this.Fields[(int)NetFxNativeImageSymbolFields.Attributes].AsNumber(); + set => this.Set((int)NetFxNativeImageSymbolFields.Attributes, value); } public string ApplicationFileRef { - get => this.Fields[(int)NetFxNativeImageTupleFields.ApplicationFileRef].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.ApplicationFileRef, value); + get => this.Fields[(int)NetFxNativeImageSymbolFields.ApplicationFileRef].AsString(); + set => this.Set((int)NetFxNativeImageSymbolFields.ApplicationFileRef, value); } public string ApplicationBaseDirectoryRef { - get => this.Fields[(int)NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef].AsString(); - set => this.Set((int)NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef, value); + 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/Tuples/NetfxTupleDefinitions.cs b/src/wixext/Tuples/NetfxTupleDefinitions.cs index 9b617279..3c0f1176 100644 --- a/src/wixext/Tuples/NetfxTupleDefinitions.cs +++ b/src/wixext/Tuples/NetfxTupleDefinitions.cs @@ -1,26 +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.Tuples +namespace WixToolset.Netfx.Symbols { using WixToolset.Data; - public static class NetfxTupleDefinitionNames + public static class NetfxSymbolDefinitionNames { public static string NetFxNativeImage { get; } = "NetFxNativeImage"; } - public static class NetfxTupleDefinitions + public static class NetfxSymbolDefinitions { - public static readonly IntermediateTupleDefinition NetFxNativeImage = new IntermediateTupleDefinition( - NetfxTupleDefinitionNames.NetFxNativeImage, + public static readonly IntermediateSymbolDefinition NetFxNativeImage = new IntermediateSymbolDefinition( + NetfxSymbolDefinitionNames.NetFxNativeImage, new[] { - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.FileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Priority), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.Attributes), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.ApplicationFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(NetFxNativeImageTupleFields.ApplicationBaseDirectoryRef), IntermediateFieldType.String), + 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(NetFxNativeImageTuple)); + typeof(NetFxNativeImageSymbol)); } } -- cgit v1.2.3-55-g6feb From d6fe720a1d06030afecef83b9b4a7650b08c8dca Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 27 Jun 2020 01:54:19 -0700 Subject: The Great Tuple to Symbol File Rename (tm) --- src/wixext/Symbols/NetFxNativeImageSymbol.cs | 58 ++++++++++++++++++++++++++++ src/wixext/Symbols/NetfxSymbolDefinitions.cs | 26 +++++++++++++ src/wixext/Tuples/NetFxNativeImageTuple.cs | 58 ---------------------------- src/wixext/Tuples/NetfxTupleDefinitions.cs | 26 ------------- 4 files changed, 84 insertions(+), 84 deletions(-) create mode 100644 src/wixext/Symbols/NetFxNativeImageSymbol.cs create mode 100644 src/wixext/Symbols/NetfxSymbolDefinitions.cs delete mode 100644 src/wixext/Tuples/NetFxNativeImageTuple.cs delete mode 100644 src/wixext/Tuples/NetfxTupleDefinitions.cs diff --git a/src/wixext/Symbols/NetFxNativeImageSymbol.cs b/src/wixext/Symbols/NetFxNativeImageSymbol.cs new file mode 100644 index 00000000..3803abd6 --- /dev/null +++ b/src/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/wixext/Symbols/NetfxSymbolDefinitions.cs b/src/wixext/Symbols/NetfxSymbolDefinitions.cs new file mode 100644 index 00000000..3c0f1176 --- /dev/null +++ b/src/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/wixext/Tuples/NetFxNativeImageTuple.cs b/src/wixext/Tuples/NetFxNativeImageTuple.cs deleted file mode 100644 index 3803abd6..00000000 --- a/src/wixext/Tuples/NetFxNativeImageTuple.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/Tuples/NetfxTupleDefinitions.cs b/src/wixext/Tuples/NetfxTupleDefinitions.cs deleted file mode 100644 index 3c0f1176..00000000 --- a/src/wixext/Tuples/NetfxTupleDefinitions.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)); - } -} -- cgit v1.2.3-55-g6feb From a58147fcf877d2b21d98f7fc8aae66be8eef7d45 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 27 Jun 2020 01:58:38 -0700 Subject: Build wixlib with WixToolset.Sdk --- global.json | 5 +++ src/wixlib/netfx.wixproj | 92 ++++++++---------------------------------------- 2 files changed, 19 insertions(+), 78 deletions(-) create mode 100644 global.json diff --git a/global.json b/global.json new file mode 100644 index 00000000..7a995d0a --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "msbuild-sdks": { + "WixToolset.Sdk": "4.0.0-build-0143" + } +} diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index e0e052d1..143a9fbf 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,89 +1,25 @@ - - - - + + - {45e4a6ac-3190-4e17-83f0-9935ffa5dc2b} - netfx Library true - true + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - + + + - - netfxca - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} - Platform=ARM - - - netfxca - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} - Platform=ARM64 - - - netfxca - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} - Platform=x86 - - - netfxca - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} - Platform=x64 - + - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - \ No newline at end of file + + -- cgit v1.2.3-55-g6feb From 9cb68482fea8700bc3bf39139d8840dcabadbb6a Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 27 Jun 2020 02:09:47 -0700 Subject: Update to latest dutil and wcautil --- src/ca/netfxca.vcxproj | 8 ++++---- src/ca/packages.config | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index b68c265b..dec54dca 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -1,8 +1,8 @@ - - + + Debug @@ -70,7 +70,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + \ No newline at end of file diff --git a/src/ca/packages.config b/src/ca/packages.config index 3a296ead..e3dc0e43 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 16e749977b812daeae17615879d95333143a4c1f Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 30 Jun 2020 14:40:02 -0400 Subject: Fix bind paths. --- src/wixlib/netfx.wixproj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 143a9fbf..faf539a7 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -6,6 +6,13 @@ true + + + + + + + -- cgit v1.2.3-55-g6feb From 174043e6f961c5c63fb89a1995b469f03be7894d Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Wed, 2 Sep 2020 17:41:20 -0400 Subject: Fix Condition authoring. --- global.json | 2 +- src/wixlib/NetFx4.5.wxs | 8 +++----- src/wixlib/NetFx4.wxs | 12 +++++------- src/wixlib/NetFx451.wxs | 8 +++----- src/wixlib/NetFx452.wxs | 8 +++----- src/wixlib/NetFx46.wxs | 8 +++----- src/wixlib/NetFx461.wxs | 8 +++----- src/wixlib/NetFx462.wxs | 8 +++----- src/wixlib/NetFx47.wxs | 4 +--- src/wixlib/NetFx471.wxs | 4 +--- src/wixlib/NetFx472.wxs | 8 +++----- src/wixlib/NetFx48.wxs | 8 +++----- src/wixlib/NetFxExtension_Platform.wxi | 8 ++++---- src/wixlib/caDecor.wxi | 21 ++++++++++----------- src/wixlib/netfx.wixproj | 2 +- 15 files changed, 47 insertions(+), 70 deletions(-) diff --git a/global.json b/global.json index 7a995d0a..1ba230a5 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0143" + "WixToolset.Sdk": "4.0.0-build-0154" } } diff --git a/src/wixlib/NetFx4.5.wxs b/src/wixlib/NetFx4.5.wxs index d2ee09cd..ace065e2 100644 --- a/src/wixlib/NetFx4.5.wxs +++ b/src/wixlib/NetFx4.5.wxs @@ -24,9 +24,7 @@ - - WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx45MinRelease)" - + @@ -40,7 +38,7 @@ - + @@ -81,7 +79,7 @@ - + diff --git a/src/wixlib/NetFx4.wxs b/src/wixlib/NetFx4.wxs index cad4a31c..047915b9 100644 --- a/src/wixlib/NetFx4.wxs +++ b/src/wixlib/NetFx4.wxs @@ -27,9 +27,7 @@ - - NETFRAMEWORK40FULL - + @@ -43,7 +41,7 @@ - + - + - + - + - - WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx451MinRelease)" - + - + @@ -71,7 +69,7 @@ - + diff --git a/src/wixlib/NetFx452.wxs b/src/wixlib/NetFx452.wxs index 260f8ab1..8dbdd9b3 100644 --- a/src/wixlib/NetFx452.wxs +++ b/src/wixlib/NetFx452.wxs @@ -23,13 +23,11 @@ - - WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx452MinRelease)" - + - + @@ -69,7 +67,7 @@ - + diff --git a/src/wixlib/NetFx46.wxs b/src/wixlib/NetFx46.wxs index a874ed95..5c875d09 100644 --- a/src/wixlib/NetFx46.wxs +++ b/src/wixlib/NetFx46.wxs @@ -24,13 +24,11 @@ - - WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx46MinRelease)" - + - + @@ -71,7 +69,7 @@ - + diff --git a/src/wixlib/NetFx461.wxs b/src/wixlib/NetFx461.wxs index 52231a40..ec5a405c 100644 --- a/src/wixlib/NetFx461.wxs +++ b/src/wixlib/NetFx461.wxs @@ -23,13 +23,11 @@ - - WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx461MinRelease)" - + - + @@ -70,7 +68,7 @@ - + diff --git a/src/wixlib/NetFx462.wxs b/src/wixlib/NetFx462.wxs index e8628b15..fc3aa158 100644 --- a/src/wixlib/NetFx462.wxs +++ b/src/wixlib/NetFx462.wxs @@ -23,13 +23,11 @@ - - WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx462MinRelease)" - + - + @@ -70,7 +68,7 @@ - + diff --git a/src/wixlib/NetFx47.wxs b/src/wixlib/NetFx47.wxs index 2f4966ad..97f31500 100644 --- a/src/wixlib/NetFx47.wxs +++ b/src/wixlib/NetFx47.wxs @@ -18,8 +18,6 @@ - - WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx47MinRelease)" - + diff --git a/src/wixlib/NetFx471.wxs b/src/wixlib/NetFx471.wxs index 3fd99aa3..b5d2c659 100644 --- a/src/wixlib/NetFx471.wxs +++ b/src/wixlib/NetFx471.wxs @@ -18,8 +18,6 @@ - - WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx471MinRelease)" - + diff --git a/src/wixlib/NetFx472.wxs b/src/wixlib/NetFx472.wxs index 08a17d5b..5aaa1976 100644 --- a/src/wixlib/NetFx472.wxs +++ b/src/wixlib/NetFx472.wxs @@ -21,13 +21,11 @@ - - WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx472MinRelease)" - + - + @@ -68,7 +66,7 @@ - + diff --git a/src/wixlib/NetFx48.wxs b/src/wixlib/NetFx48.wxs index d65d36be..acc79a31 100644 --- a/src/wixlib/NetFx48.wxs +++ b/src/wixlib/NetFx48.wxs @@ -21,13 +21,11 @@ - - WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx48MinRelease)" - + - + @@ -68,7 +66,7 @@ - + diff --git a/src/wixlib/NetFxExtension_Platform.wxi b/src/wixlib/NetFxExtension_Platform.wxi index 92b13dad..96f03d44 100644 --- a/src/wixlib/NetFxExtension_Platform.wxi +++ b/src/wixlib/NetFxExtension_Platform.wxi @@ -15,10 +15,10 @@ - RollbackDisabled <> 1 - RollbackDisabled = 1 - RollbackDisabled <> 1 - RollbackDisabled = 1 + + + + diff --git a/src/wixlib/caDecor.wxi b/src/wixlib/caDecor.wxi index 1d00df8f..b1711518 100644 --- a/src/wixlib/caDecor.wxi +++ b/src/wixlib/caDecor.wxi @@ -1,40 +1,39 @@ - - + - + - + - + - + - + - + - + - + - + diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index faf539a7..426446e8 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -7,7 +7,7 @@ - + -- cgit v1.2.3-55-g6feb From 797c8464e43c999edc2ffce781457f11c3b4e8e5 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Sun, 20 Sep 2020 16:25:13 -0400 Subject: Remove 32-bit ARM support. --- src/ca/netfxca.vcxproj | 8 -------- src/wixext/NetFxCompiler.cs | 2 +- src/wixlib/NetFxExtension_arm.wxs | 8 -------- src/wixlib/netfx.wixproj | 2 -- 4 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 src/wixlib/NetFxExtension_arm.wxs diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index dec54dca..703e98fa 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -20,14 +20,6 @@ Release x64 - - Debug - ARM - - - Release - ARM - Debug ARM64 diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs index 14efe95d..1a7981f5 100644 --- a/src/wixext/NetFxCompiler.cs +++ b/src/wixext/NetFxCompiler.cs @@ -145,7 +145,7 @@ namespace WixToolset.Netfx this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.ARM | CustomActionPlatforms.ARM64 | CustomActionPlatforms.X64 | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.ARM64 | CustomActionPlatforms.X64 | CustomActionPlatforms.X86); if (!this.Messaging.EncounteredError) { diff --git a/src/wixlib/NetFxExtension_arm.wxs b/src/wixlib/NetFxExtension_arm.wxs deleted file mode 100644 index 8b5c508b..00000000 --- a/src/wixlib/NetFxExtension_arm.wxs +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 426446e8..700293d3 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -9,12 +9,10 @@ - - -- cgit v1.2.3-55-g6feb From c62e6f197ce245eaadc432784ca4d119adfb750e Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Sun, 20 Sep 2020 17:28:56 -0400 Subject: Update to latest authoring/tools. --- global.json | 2 +- src/wixlib/NetFxExtension_Platform.wxi | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/global.json b/global.json index 1ba230a5..4d9df50b 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0154" + "WixToolset.Sdk": "4.0.0-build-0157" } } diff --git a/src/wixlib/NetFxExtension_Platform.wxi b/src/wixlib/NetFxExtension_Platform.wxi index 96f03d44..7bd727c5 100644 --- a/src/wixlib/NetFxExtension_Platform.wxi +++ b/src/wixlib/NetFxExtension_Platform.wxi @@ -1,5 +1,4 @@ - - + @@ -7,11 +6,11 @@ - - - - - + + + + + -- cgit v1.2.3-55-g6feb From 2586d9355abacc7294499dd81217012385d3d8a8 Mon Sep 17 00:00:00 2001 From: James Parsons Date: Mon, 21 Sep 2020 13:13:27 -0700 Subject: Update .NET Core package definitions --- src/wixlib/NetCore3.1.0_x64.wxs | 48 ++++++++++++++++------------------ src/wixlib/NetCore3.1.0_x86.wxs | 58 ++++++++++++++++++----------------------- src/wixlib/NetCore3.1.1_x64.wxs | 48 ++++++++++++++++------------------ src/wixlib/NetCore3.1.1_x86.wxs | 58 ++++++++++++++++++----------------------- src/wixlib/NetCore3.1.2_x64.wxs | 48 ++++++++++++++++------------------ src/wixlib/NetCore3.1.2_x86.wxs | 58 ++++++++++++++++++----------------------- src/wixlib/NetCore3.1.3_x64.wxs | 45 +++++++++++++++++--------------- src/wixlib/NetCore3.1.3_x86.wxs | 58 ++++++++++++++++++----------------------- src/wixlib/NetCore3.1.4_x64.wxs | 58 ++++++++++++++++++----------------------- src/wixlib/NetCore3.1.4_x86.wxs | 58 ++++++++++++++++++----------------------- 10 files changed, 243 insertions(+), 294 deletions(-) diff --git a/src/wixlib/NetCore3.1.0_x64.wxs b/src/wixlib/NetCore3.1.0_x64.wxs index 281f3009..cda6aedf 100644 --- a/src/wixlib/NetCore3.1.0_x64.wxs +++ b/src/wixlib/NetCore3.1.0_x64.wxs @@ -11,7 +11,7 @@ - + @@ -21,7 +21,6 @@ - @@ -76,13 +74,13 @@ LogPathVariable="$(var.AspNetCoreRedistLog)" Compressed="no"> + CertificatePublicKey="6608A9DBA86701156A4C17CE63BA99BE8B932F8D" + CertificateThumbprint="62009AAABDAE749FD47D19150958329BF6FF4B34" + Description="Microsoft ASP.NET Core 3.1.0 - Shared Framework" + Hash="2DFD4F9EA2E174A7199C40ED3A826886F1E19EF8" + ProductName="Microsoft ASP.NET Core 3.1.0 - Shared Framework" + Size="7811768" + Version="3.1.0.19566" /> @@ -112,13 +110,13 @@ LogPathVariable="$(var.DesktopNetCoreRedistLog)" Compressed="no"> + CertificatePublicKey="6608A9DBA86701156A4C17CE63BA99BE8B932F8D" + CertificateThumbprint="62009AAABDAE749FD47D19150958329BF6FF4B34" + Description="Microsoft Windows Desktop Runtime - 3.1.0 (x64)" + Hash="C16F271754879BA78868947486F37871C9F0E40F" + ProductName="Microsoft Windows Desktop Runtime - 3.1.0 (x64)" + Size="54443856" + Version="3.1.0.28315" /> diff --git a/src/wixlib/NetCore3.1.0_x86.wxs b/src/wixlib/NetCore3.1.0_x86.wxs index 3b2d76af..92da9266 100644 --- a/src/wixlib/NetCore3.1.0_x86.wxs +++ b/src/wixlib/NetCore3.1.0_x86.wxs @@ -9,9 +9,9 @@ - - - + + + @@ -21,7 +21,6 @@ - @@ -59,7 +57,6 @@ - @@ -98,7 +93,6 @@ - diff --git a/src/wixlib/NetCore3.1.1_x64.wxs b/src/wixlib/NetCore3.1.1_x64.wxs index 834752b0..14adbea3 100644 --- a/src/wixlib/NetCore3.1.1_x64.wxs +++ b/src/wixlib/NetCore3.1.1_x64.wxs @@ -11,7 +11,7 @@ - + @@ -21,7 +21,6 @@ - @@ -76,13 +74,13 @@ LogPathVariable="$(var.AspNetCoreRedistLog)" Compressed="no"> + CertificatePublicKey="6ADD0C9D1AC70DA3668644B1C78884E82E3F3457" + CertificateThumbprint="711AF71DC4C4952C8ED65BB4BA06826ED3922A32" + Description="Microsoft ASP.NET Core 3.1.1 - Shared Framework" + Hash="6614D5792D9335632D66C3EB7DE942A7AE10D6BE" + ProductName="Microsoft ASP.NET Core 3.1.1 - Shared Framework" + Size="7867488" + Version="3.1.1.19615"/> @@ -112,13 +110,13 @@ LogPathVariable="$(var.DesktopNetCoreRedistLog)" Compressed="no"> + CertificatePublicKey="6ADD0C9D1AC70DA3668644B1C78884E82E3F3457" + CertificateThumbprint="711AF71DC4C4952C8ED65BB4BA06826ED3922A32" + Description="Microsoft Windows Desktop Runtime - 3.1.1 (x64)" + Hash="AE723619D9CD6407F3D4B4948DF4F026A99781DC" + ProductName="Microsoft Windows Desktop Runtime - 3.1.1 (x64)" + Size="54211664" + Version="3.1.1.28408"/> diff --git a/src/wixlib/NetCore3.1.1_x86.wxs b/src/wixlib/NetCore3.1.1_x86.wxs index c1f3d1f3..132f4349 100644 --- a/src/wixlib/NetCore3.1.1_x86.wxs +++ b/src/wixlib/NetCore3.1.1_x86.wxs @@ -9,9 +9,9 @@ - - - + + + @@ -21,7 +21,6 @@ - @@ -59,7 +57,6 @@ - @@ -98,7 +93,6 @@ - diff --git a/src/wixlib/NetCore3.1.2_x64.wxs b/src/wixlib/NetCore3.1.2_x64.wxs index 1cc6a5d6..e63f8117 100644 --- a/src/wixlib/NetCore3.1.2_x64.wxs +++ b/src/wixlib/NetCore3.1.2_x64.wxs @@ -11,7 +11,7 @@ - + @@ -21,7 +21,6 @@ - @@ -76,13 +74,13 @@ LogPathVariable="$(var.AspNetCoreRedistLog)" Compressed="no"> + CertificatePublicKey="6ADD0C9D1AC70DA3668644B1C78884E82E3F3457" + CertificateThumbprint="711AF71DC4C4952C8ED65BB4BA06826ED3922A32" + Description="Microsoft ASP.NET Core 3.1.2 - Shared Framework" + Hash="B8EDDD91C0DFD9E47EB7DD7EFED9541340607ADC" + ProductName="Microsoft ASP.NET Core 3.1.2 - Shared Framework" + Size="7812680" + Version="3.1.2.20068"/> @@ -112,13 +110,13 @@ LogPathVariable="$(var.DesktopNetCoreRedistLog)" Compressed="no"> + CertificatePublicKey="6ADD0C9D1AC70DA3668644B1C78884E82E3F3457" + CertificateThumbprint="711AF71DC4C4952C8ED65BB4BA06826ED3922A32" + Description="Microsoft Windows Desktop Runtime - 3.1.2 (x64)" + Hash="C3A76B6C91FB28EFD95422EF82523A73DED322C4" + ProductName="Microsoft Windows Desktop Runtime - 3.1.2 (x64)" + Size="54323576" + Version="3.1.2.28517"/> diff --git a/src/wixlib/NetCore3.1.2_x86.wxs b/src/wixlib/NetCore3.1.2_x86.wxs index d9275c19..8f3c26d7 100644 --- a/src/wixlib/NetCore3.1.2_x86.wxs +++ b/src/wixlib/NetCore3.1.2_x86.wxs @@ -9,9 +9,9 @@ - - - + + + @@ -21,7 +21,6 @@ - @@ -59,7 +57,6 @@ - @@ -98,7 +93,6 @@ - diff --git a/src/wixlib/NetCore3.1.3_x64.wxs b/src/wixlib/NetCore3.1.3_x64.wxs index a10b19b6..85887c84 100644 --- a/src/wixlib/NetCore3.1.3_x64.wxs +++ b/src/wixlib/NetCore3.1.3_x64.wxs @@ -37,13 +37,14 @@ DownloadUrl="$(var.DotNetCoreRedistLink)" LogPathVariable="$(var.DotNetCoreRedistLog)" Compressed="no"> - + @@ -72,13 +73,14 @@ DownloadUrl="$(var.AspNetCoreRedistLink)" LogPathVariable="$(var.AspNetCoreRedistLog)" Compressed="no"> - + @@ -107,13 +109,14 @@ DownloadUrl="$(var.DesktopNetCoreRedistLink)" LogPathVariable="$(var.DesktopNetCoreRedistLog)" Compressed="no"> - + diff --git a/src/wixlib/NetCore3.1.3_x86.wxs b/src/wixlib/NetCore3.1.3_x86.wxs index c9fe9806..9a038650 100644 --- a/src/wixlib/NetCore3.1.3_x86.wxs +++ b/src/wixlib/NetCore3.1.3_x86.wxs @@ -9,9 +9,9 @@ - - - + + + @@ -21,7 +21,6 @@ - @@ -59,7 +57,6 @@ - @@ -98,7 +93,6 @@ - diff --git a/src/wixlib/NetCore3.1.4_x64.wxs b/src/wixlib/NetCore3.1.4_x64.wxs index 39ab8261..06a42c37 100644 --- a/src/wixlib/NetCore3.1.4_x64.wxs +++ b/src/wixlib/NetCore3.1.4_x64.wxs @@ -9,9 +9,9 @@ - - - + + + @@ -21,7 +21,6 @@ - @@ -59,7 +57,6 @@ - @@ -98,7 +93,6 @@ - diff --git a/src/wixlib/NetCore3.1.4_x86.wxs b/src/wixlib/NetCore3.1.4_x86.wxs index 9a6e390b..ea643a04 100644 --- a/src/wixlib/NetCore3.1.4_x86.wxs +++ b/src/wixlib/NetCore3.1.4_x86.wxs @@ -9,9 +9,9 @@ - - - + + + @@ -21,7 +21,6 @@ - @@ -59,7 +57,6 @@ - @@ -98,7 +93,6 @@ - -- cgit v1.2.3-55-g6feb From e0a88194af923cb523384352165bca91780c4289 Mon Sep 17 00:00:00 2001 From: James Parsons Date: Wed, 23 Sep 2020 14:06:22 -0700 Subject: Add package definitions for the latest version of .NET Core 3.1 --- .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 25 ++++ .../TestData/UsingDotNetCorePackages/Bundle.wxs | 32 ++++-- .../UsingDotNetCorePackages/Bundle_x64.wxs | 34 ++++++ .../WixToolsetTest.Netfx.csproj | 1 + src/wixlib/NetCore3.1.Latest_x64.wxs | 128 +++++++++++++++++++++ src/wixlib/NetCore3.1.Latest_x86.wxs | 128 +++++++++++++++++++++ 6 files changed, 339 insertions(+), 9 deletions(-) create mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs create mode 100644 src/wixlib/NetCore3.1.Latest_x64.wxs create mode 100644 src/wixlib/NetCore3.1.Latest_x86.wxs diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs index 8bcac8df..845e1373 100644 --- a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs +++ b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -36,6 +36,31 @@ namespace WixToolsetTest.Netfx } } + [Fact] + public void CanBuildUsingDotNetCorePackages_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, "Bundle_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() { diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs index 7c008171..a31848a7 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs @@ -6,15 +6,29 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs new file mode 100644 index 00000000..a5e91532 --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index cf7afa8b..1df84972 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -13,6 +13,7 @@ + diff --git a/src/wixlib/NetCore3.1.Latest_x64.wxs b/src/wixlib/NetCore3.1.Latest_x64.wxs new file mode 100644 index 00000000..f8f2bfbc --- /dev/null +++ b/src/wixlib/NetCore3.1.Latest_x64.wxs @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.Latest_x86.wxs b/src/wixlib/NetCore3.1.Latest_x86.wxs new file mode 100644 index 00000000..c36523dc --- /dev/null +++ b/src/wixlib/NetCore3.1.Latest_x86.wxs @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-55-g6feb From 9ed6f291d49599bb12a1baa3a0e000f1e0e254cf Mon Sep 17 00:00:00 2001 From: James Parsons Date: Tue, 29 Sep 2020 00:10:57 -0700 Subject: Remove unsupported .NET Core 3.1 package definitions --- .../TestData/UsingDotNetCorePackages/Bundle.wxs | 26 +---- .../UsingDotNetCorePackages/Bundle_x64.wxs | 26 +---- src/wixlib/NetCore3.1.0_x64.wxs | 123 -------------------- src/wixlib/NetCore3.1.0_x86.wxs | 123 -------------------- src/wixlib/NetCore3.1.1_x64.wxs | 123 -------------------- src/wixlib/NetCore3.1.1_x86.wxs | 123 -------------------- src/wixlib/NetCore3.1.2_x64.wxs | 123 -------------------- src/wixlib/NetCore3.1.2_x86.wxs | 123 -------------------- src/wixlib/NetCore3.1.3_x64.wxs | 123 -------------------- src/wixlib/NetCore3.1.3_x86.wxs | 123 -------------------- src/wixlib/NetCore3.1.4_x64.wxs | 123 -------------------- src/wixlib/NetCore3.1.4_x86.wxs | 123 -------------------- src/wixlib/NetCore3.1.Latest_x64.wxs | 128 --------------------- src/wixlib/NetCore3.1.Latest_x86.wxs | 128 --------------------- src/wixlib/NetCore3.1_x64.wxs | 128 +++++++++++++++++++++ src/wixlib/NetCore3.1_x86.wxs | 128 +++++++++++++++++++++ 16 files changed, 262 insertions(+), 1532 deletions(-) delete mode 100644 src/wixlib/NetCore3.1.0_x64.wxs delete mode 100644 src/wixlib/NetCore3.1.0_x86.wxs delete mode 100644 src/wixlib/NetCore3.1.1_x64.wxs delete mode 100644 src/wixlib/NetCore3.1.1_x86.wxs delete mode 100644 src/wixlib/NetCore3.1.2_x64.wxs delete mode 100644 src/wixlib/NetCore3.1.2_x86.wxs delete mode 100644 src/wixlib/NetCore3.1.3_x64.wxs delete mode 100644 src/wixlib/NetCore3.1.3_x86.wxs delete mode 100644 src/wixlib/NetCore3.1.4_x64.wxs delete mode 100644 src/wixlib/NetCore3.1.4_x86.wxs delete mode 100644 src/wixlib/NetCore3.1.Latest_x64.wxs delete mode 100644 src/wixlib/NetCore3.1.Latest_x86.wxs create mode 100644 src/wixlib/NetCore3.1_x64.wxs create mode 100644 src/wixlib/NetCore3.1_x86.wxs diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs index a31848a7..49e8c022 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs @@ -6,29 +6,9 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs index a5e91532..09c7bcdd 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs @@ -6,29 +6,9 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + diff --git a/src/wixlib/NetCore3.1.0_x64.wxs b/src/wixlib/NetCore3.1.0_x64.wxs deleted file mode 100644 index cda6aedf..00000000 --- a/src/wixlib/NetCore3.1.0_x64.wxs +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.0_x86.wxs b/src/wixlib/NetCore3.1.0_x86.wxs deleted file mode 100644 index 92da9266..00000000 --- a/src/wixlib/NetCore3.1.0_x86.wxs +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.1_x64.wxs b/src/wixlib/NetCore3.1.1_x64.wxs deleted file mode 100644 index 14adbea3..00000000 --- a/src/wixlib/NetCore3.1.1_x64.wxs +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.1_x86.wxs b/src/wixlib/NetCore3.1.1_x86.wxs deleted file mode 100644 index 132f4349..00000000 --- a/src/wixlib/NetCore3.1.1_x86.wxs +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.2_x64.wxs b/src/wixlib/NetCore3.1.2_x64.wxs deleted file mode 100644 index e63f8117..00000000 --- a/src/wixlib/NetCore3.1.2_x64.wxs +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.2_x86.wxs b/src/wixlib/NetCore3.1.2_x86.wxs deleted file mode 100644 index 8f3c26d7..00000000 --- a/src/wixlib/NetCore3.1.2_x86.wxs +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.3_x64.wxs b/src/wixlib/NetCore3.1.3_x64.wxs deleted file mode 100644 index 85887c84..00000000 --- a/src/wixlib/NetCore3.1.3_x64.wxs +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.3_x86.wxs b/src/wixlib/NetCore3.1.3_x86.wxs deleted file mode 100644 index 9a038650..00000000 --- a/src/wixlib/NetCore3.1.3_x86.wxs +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.4_x64.wxs b/src/wixlib/NetCore3.1.4_x64.wxs deleted file mode 100644 index 06a42c37..00000000 --- a/src/wixlib/NetCore3.1.4_x64.wxs +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.4_x86.wxs b/src/wixlib/NetCore3.1.4_x86.wxs deleted file mode 100644 index ea643a04..00000000 --- a/src/wixlib/NetCore3.1.4_x86.wxs +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.Latest_x64.wxs b/src/wixlib/NetCore3.1.Latest_x64.wxs deleted file mode 100644 index f8f2bfbc..00000000 --- a/src/wixlib/NetCore3.1.Latest_x64.wxs +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.Latest_x86.wxs b/src/wixlib/NetCore3.1.Latest_x86.wxs deleted file mode 100644 index c36523dc..00000000 --- a/src/wixlib/NetCore3.1.Latest_x86.wxs +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1_x64.wxs b/src/wixlib/NetCore3.1_x64.wxs new file mode 100644 index 00000000..d43ba1ce --- /dev/null +++ b/src/wixlib/NetCore3.1_x64.wxs @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1_x86.wxs b/src/wixlib/NetCore3.1_x86.wxs new file mode 100644 index 00000000..7cb1b26b --- /dev/null +++ b/src/wixlib/NetCore3.1_x86.wxs @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3-55-g6feb From af731a9631a7f7f6d7c3b2ef84f38a07bb4db211 Mon Sep 17 00:00:00 2001 From: James Parsons Date: Thu, 1 Oct 2020 23:05:25 -0700 Subject: Split up latest package and individual packages. Make corresponding changes to tests. --- .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 50 +++++++++ .../TestData/UsingDotNetCorePackages/Bundle.wxs | 6 +- .../UsingDotNetCorePackages/BundleLatest.wxs | 14 +++ .../UsingDotNetCorePackages/BundleLatest_x64.wxs | 14 +++ .../UsingDotNetCorePackages/Bundle_x64.wxs | 6 +- .../WixToolsetTest.Netfx.csproj | 2 + src/wixlib/NetCore3.1.8_x64.wxs | 123 +++++++++++++++++++++ src/wixlib/NetCore3.1.8_x86.wxs | 123 +++++++++++++++++++++ src/wixlib/NetCore3.1_x64.wxs | 116 +------------------ src/wixlib/NetCore3.1_x86.wxs | 116 +------------------ 10 files changed, 344 insertions(+), 226 deletions(-) create mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs create mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs create mode 100644 src/wixlib/NetCore3.1.8_x64.wxs create mode 100644 src/wixlib/NetCore3.1.8_x86.wxs diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs index 845e1373..c9391074 100644 --- a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs +++ b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -11,6 +11,56 @@ namespace WixToolsetTest.Netfx 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 CanBuildUsingDotNetCorePackages() { diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs index 49e8c022..d746226e 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs @@ -6,9 +6,9 @@ - - - + + + diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs new file mode 100644 index 00000000..49e8c022 --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs new file mode 100644 index 00000000..09c7bcdd --- /dev/null +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs index 09c7bcdd..4d1ba73e 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs @@ -6,9 +6,9 @@ - - - + + + diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index 1df84972..a9e5cd2b 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -14,6 +14,8 @@ + + diff --git a/src/wixlib/NetCore3.1.8_x64.wxs b/src/wixlib/NetCore3.1.8_x64.wxs new file mode 100644 index 00000000..56f498de --- /dev/null +++ b/src/wixlib/NetCore3.1.8_x64.wxs @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.8_x86.wxs b/src/wixlib/NetCore3.1.8_x86.wxs new file mode 100644 index 00000000..87d780c3 --- /dev/null +++ b/src/wixlib/NetCore3.1.8_x86.wxs @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1_x64.wxs b/src/wixlib/NetCore3.1_x64.wxs index d43ba1ce..b6fd944d 100644 --- a/src/wixlib/NetCore3.1_x64.wxs +++ b/src/wixlib/NetCore3.1_x64.wxs @@ -4,125 +4,21 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - + + - - - - - - - - - - - + + diff --git a/src/wixlib/NetCore3.1_x86.wxs b/src/wixlib/NetCore3.1_x86.wxs index 7cb1b26b..fd4470c0 100644 --- a/src/wixlib/NetCore3.1_x86.wxs +++ b/src/wixlib/NetCore3.1_x86.wxs @@ -4,125 +4,21 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - + + - - - - - - - - - - - + + -- cgit v1.2.3-55-g6feb From 22825f603eabf92103852de2b9a55431883ffbaf Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 8 Oct 2020 22:04:17 -0400 Subject: Update to latest Tools. --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 4d9df50b..f7eb8875 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0157" + "WixToolset.Sdk": "4.0.0-build-0159" } } -- cgit v1.2.3-55-g6feb From 9a00d9fdb5db903c91f8fbeeb219183bc8a2d3b7 Mon Sep 17 00:00:00 2001 From: James Parsons Date: Thu, 15 Oct 2020 15:23:07 -0700 Subject: Fix 3.1.8 desktop runtime payloads and remove version specific tests --- .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 50 ---------------------- .../TestData/UsingDotNetCorePackages/Bundle.wxs | 14 ------ .../UsingDotNetCorePackages/Bundle_x64.wxs | 14 ------ .../WixToolsetTest.Netfx.csproj | 2 - src/wixlib/NetCore3.1.8_x64.wxs | 8 ++-- src/wixlib/NetCore3.1.8_x86.wxs | 8 ++-- 6 files changed, 8 insertions(+), 88 deletions(-) delete mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs delete mode 100644 src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs diff --git a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs index c9391074..72d4a682 100644 --- a/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs +++ b/src/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -61,56 +61,6 @@ namespace WixToolsetTest.Netfx } } - [Fact] - public void CanBuildUsingDotNetCorePackages() - { - 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, "Bundle.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 CanBuildUsingDotNetCorePackages_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, "Bundle_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() { diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs deleted file mode 100644 index d746226e..00000000 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle.wxs +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs deleted file mode 100644 index 4d1ba73e..00000000 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/Bundle_x64.wxs +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index a9e5cd2b..4dea73da 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -12,8 +12,6 @@ - - diff --git a/src/wixlib/NetCore3.1.8_x64.wxs b/src/wixlib/NetCore3.1.8_x64.wxs index 56f498de..d6877e56 100644 --- a/src/wixlib/NetCore3.1.8_x64.wxs +++ b/src/wixlib/NetCore3.1.8_x64.wxs @@ -76,10 +76,10 @@ diff --git a/src/wixlib/NetCore3.1.8_x86.wxs b/src/wixlib/NetCore3.1.8_x86.wxs index 87d780c3..bf639c22 100644 --- a/src/wixlib/NetCore3.1.8_x86.wxs +++ b/src/wixlib/NetCore3.1.8_x86.wxs @@ -76,10 +76,10 @@ -- cgit v1.2.3-55-g6feb From 2bfd637a14e4460f90107adada95652f28599536 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 20 Oct 2020 17:09:40 -0400 Subject: Update custom action code for new table names. --- src/ca/netfxca.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ca/netfxca.cpp b/src/ca/netfxca.cpp index 15802f2b..3a71babf 100644 --- a/src/ca/netfxca.cpp +++ b/src/ca/netfxca.cpp @@ -23,8 +23,8 @@ LPCWSTR vcsFileId = enum eFileId { fiFile = 1 }; LPCWSTR vcsNgenQuery = - L"SELECT `NetFxNativeImage`.`File_`, `NetFxNativeImage`.`NetFxNativeImage`, `NetFxNativeImage`.`Priority`, `NetFxNativeImage`.`Attributes`, `NetFxNativeImage`.`File_Application`, `NetFxNativeImage`.`Directory_ApplicationBase`, `File`.`Component_` " - L"FROM `NetFxNativeImage`, `File` WHERE `File`.`File`=`NetFxNativeImage`.`File_`"; + 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 = @@ -232,7 +232,7 @@ static HRESULT GetStrongName( // get the name value records for this component hr = WcaOpenView(vcsNgenStrongName, &hView); - ExitOnFailure(hr, "failed to open view on NetFxNativeImage table"); + ExitOnFailure(hr, "failed to open view on Wix4NetFxNativeImage table"); hr = WcaExecuteView(hView, hComponentRec); ExitOnFailure(hr, "failed to execute strong name view"); @@ -462,17 +462,17 @@ extern "C" UINT __stdcall SchedNetFx( // loop through all the NetFx records hr = WcaOpenExecuteView(vcsNgenQuery, &hView); - ExitOnFailure(hr, "failed to open view on NetFxNativeImage table"); + 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 NetFxNativeImage.NetFxNativeImage"); + ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Wix4NetFxNativeImage"); // Get File hr = WcaGetRecordString(hRec, ngqFile, &pwzData); - ExitOnFailure(hr, "failed to get NetFxNativeImage.File_ for record: %ls", pwzId); + 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); @@ -480,7 +480,7 @@ extern "C" UINT __stdcall SchedNetFx( // Get Priority hr = WcaGetRecordInteger(hRec, ngqPriority, &iPriority); - ExitOnFailure(hr, "failed to get NetFxNativeImage.Priority for record: %ls", pwzId); + ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Priority for record: %ls", pwzId); if (0 == iPriority) iAssemblyCost = COST_NGEN_BLOCKING; @@ -489,11 +489,11 @@ extern "C" UINT __stdcall SchedNetFx( // Get Attributes hr = WcaGetRecordInteger(hRec, ngqAttributes, &iAttributes); - ExitOnFailure(hr, "failed to get NetFxNativeImage.Attributes for record: %ls", pwzId); + 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 NetFxNativeImage.File_Application for record: %ls", pwzId); + 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)) @@ -517,7 +517,7 @@ extern "C" UINT __stdcall SchedNetFx( // Get Directory_ApplicationBase or leave pwzDirAppBase NULL. hr = WcaGetRecordFormattedString(hRec, ngqDirAppBase, &pwzData); - ExitOnFailure(hr, "failed to get NetFxNativeImage.Directory_ApplicationBase for record: %ls", pwzId); + ExitOnFailure(hr, "failed to get Wix4NetFxNativeImage.Directory_ApplicationBase for record: %ls", pwzId); if (WcaIsUnicodePropertySet(pwzData)) { @@ -540,7 +540,7 @@ extern "C" UINT __stdcall SchedNetFx( // Get Component hr = WcaGetRecordString(hRec, ngqComponent, &pwzComponent); - ExitOnFailure(hr, "failed to get NetFxNativeImage.Directory_ApplicationBase for record: %ls", pwzId); + 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); -- cgit v1.2.3-55-g6feb From 007e0227ee8c0e0b321d95e617d65d0bac53a361 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Mon, 26 Oct 2020 21:19:54 -0400 Subject: Update test authoring for Package/SummaryInformation change. --- .../TestData/UsingNativeImage/Package.wxs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs index 7cffdb5b..082ac4cc 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs @@ -1,16 +1,11 @@ - - - - - + + - - - + -- cgit v1.2.3-55-g6feb From dbfa4a2ea24408e1e139ed4314e0664c867520fb Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Mon, 26 Oct 2020 22:05:04 -0400 Subject: Update to latest Tools. --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index f7eb8875..f94ab6df 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0159" + "WixToolset.Sdk": "4.0.0-build-0162" } } -- cgit v1.2.3-55-g6feb From dfe065e92bac86b9c6e1679907ce67c507913fd5 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Sat, 31 Oct 2020 21:35:37 -0400 Subject: Strong-name sign WiX assemblies. --- global.json | 2 +- src/CSharp.Build.props | 11 +++++++++++ src/Directory.Build.props | 1 + src/wix.snk | Bin 0 -> 596 bytes 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/CSharp.Build.props create mode 100644 src/wix.snk diff --git a/global.json b/global.json index f94ab6df..10345833 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0162" + "WixToolset.Sdk": "4.0.0-build-0163" } } diff --git a/src/CSharp.Build.props b/src/CSharp.Build.props new file mode 100644 index 00000000..b12f4c6e --- /dev/null +++ b/src/CSharp.Build.props @@ -0,0 +1,11 @@ + + + + + true + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index a22f4470..f83cc154 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,6 +22,7 @@ WiX Toolset + diff --git a/src/wix.snk b/src/wix.snk new file mode 100644 index 00000000..3908a66a Binary files /dev/null and b/src/wix.snk differ -- cgit v1.2.3-55-g6feb From 761eb8b2f6a49f33fb733d8469572796ded6ae0f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 4 Dec 2020 17:36:58 -0600 Subject: xsd got moved to doc repo. Update dependencies. --- global.json | 2 +- src/ca/netfxca.vcxproj | 8 +- src/ca/packages.config | 4 +- src/wixext/WixToolset.Netfx.wixext.csproj | 3 +- src/wixext/netfx.xsd | 235 ------------------------------ src/wixlib/netfx.wixproj | 2 +- src/wixlib/packages.config | 2 +- 7 files changed, 10 insertions(+), 246 deletions(-) delete mode 100644 src/wixext/netfx.xsd diff --git a/global.json b/global.json index 10345833..77a81322 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0163" + "WixToolset.Sdk": "4.0.0-build-0170" } } diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index 703e98fa..b00e4506 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -1,8 +1,8 @@ - - + + Debug @@ -62,7 +62,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + \ No newline at end of file diff --git a/src/ca/packages.config b/src/ca/packages.config index e3dc0e43..9d88f529 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/wixext/WixToolset.Netfx.wixext.csproj b/src/wixext/WixToolset.Netfx.wixext.csproj index 5f02a850..434a7c79 100644 --- a/src/wixext/WixToolset.Netfx.wixext.csproj +++ b/src/wixext/WixToolset.Netfx.wixext.csproj @@ -13,7 +13,6 @@ - @@ -27,6 +26,6 @@ - + diff --git a/src/wixext/netfx.xsd b/src/wixext/netfx.xsd deleted file mode 100644 index 6ef4e9b6..00000000 --- a/src/wixext/netfx.xsd +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - The source code schema for the WiX Toolset .NET Framework Extension. - - - - - - - Improves the performance of managed applications by creating native images. - Requires the .NET Framework 2.0 or newer to be installed on the target machine since - it runs NGen. - - - - - - Native images are files containing compiled processor-specific machine code, which - are installed into the native image cache on the local computer. The runtime - can use native images from the cache instead using the just-in-time (JIT) - compiler to compile the original assembly. - - - The native image custom actions are configured to ignore failures so that failing - to generate or remove a native image will not cause setup to fail and roll back. - - - Note for patches: if you built your target, or baseline, MSI with - previous versions 3.0 or 3.5 of this extension and want to upgrade to formattable - values for @AssemblyApplication or @AppBaseDirectory you must also include a - BinaryRef to "NetFxCA" to pull in necessary changes. If you do use formattable - values and do not include the binary changes ngen.exe will not optimize your - native images for the specified application. - - - This should be a rare occurrence, however. Because you cannot remove components - in a patch - and pyro does validate you do not - it is not practical to switch - from using identifiers to formattable values in a patch. One practical possibility - is if you wanted to use a different application to optimize your native images - and that application is not already installed with the MSI to be updated. - - - - - - - - - The identifier for this NativeImage. - - - - - - - - The directory to use for locating dependent assemblies. - For DLL assemblies and assemblies installed to the Global Assembly Cache (GAC), - this attribute should be set to the directory of the application which loads this - assembly. For EXE assemblies, this attribute does not need to be set because NGen - will use the directory of the assembly file by default. - - - The value can be in the form of a directory identifier, or a formatted string - that resolves to either a directory identifier or a full path to a directory. - - - - - - - - - The application which will load this assembly. - For DLL assemblies which are loaded via reflection, this attribute should - be set to indicate the application which will load this assembly. - The configuration of the application (usually specified via an exe.config file) will be used - to determine how to resolve dependencies for this assembly. - - - The value can be in the form of a file identifier, or a formatted string - that resolves to either a file identifier or a full path to a file. - - - When a shared component is loaded at run time, using the Load method, the - application's configuration file determines the dependencies that are loaded - for the shared component — for example, the version of a dependency that is loaded. - This attribute gives guidance on which dependencies would be loaded at run time in order - to figure out which dependency assemblies will also need to have native images generated - (assuming the Dependency attribute is not set to "no"). - - - This attribute cannot be set if the AssemblyApplication attribute is set on the parent - File element (please note that these attributes both refer to the same application - assembly but do very different things: specifiying File/@AssemblyApplication will force - an assembly to install to a private location next to the indicated application, whereas - this AssemblyApplication attribute will be used to help resolve dependent assemblies - while generating native images for this assembly). - - - - - - - - Set to "yes" to generate native images that can be used under a debugger. - The default value is "no". - - - - - - - Set to "no" to generate the minimum number of native images. - The default value is "yes". - - - - - - - Sets the platform(s) for which native images will be generated. - - - - - - - - Attempt to generate native images only for the 32-bit version of the .NET Framework - on the target machine. If the 32-bit version of the .NET Framework 2.0 or newer is not - present on the target machine, native image custom actions will not be scheduled. - This is the default value. - - - - - - - Attempt to generate native images only for the 64-bit version of the .NET Framework - on the target machine. If a 64-bit version of the .NET Framework 2.0 or newer is not - present on the target machine, native image custom actions will not be scheduled. - - - - - - - Attempt to generate native images for the 32-bit and 64-bit versions of the .NET Framework - on the target machine. If a version of the .NET Framework 2.0 or newer is not present on the - target machine for a processor architecture, native image custom actions will not be - scheduled for that processor architecture. - - - - - - - - - - Sets the priority of generating the native images for this assembly. - - - - - - - - This is the highest priority, it means that image generation occurs syncronously - during the setup process. This option will slow down setup performance. - - - - - - - This will queue image generation to the NGen service to occur immediately. - This option will slow down setup performance. - - - - - - - This will queue image generation to the NGen service to occur after all priority 1 - assemblies have completed. - This option will slow down setup performance. - - - - - - - This is the lowest priority, it will queue image generation to occur when the - machine is idle. - This option should not slow down setup performance. - This is the default value. - - - - - - - - - - Set to "yes" to generate native images that can be used under a profiler. - The default value is "no". - - - - - - - - - Values of this type will either be "yes" or "no". - - - - - - - - diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 700293d3..8ee73326 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -24,7 +24,7 @@ - + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index e71c3d9d..89d73c36 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,6 +1,6 @@  - + -- cgit v1.2.3-55-g6feb From ae2e6a86aedc77d73a675befcdacb83820a8d82a Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 8 Dec 2020 14:57:06 -0600 Subject: Update to latest tools and check for failure in appveyor.cmd. --- appveyor.cmd | 12 +++++------- global.json | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/appveyor.cmd b/appveyor.cmd index 3ee1f17e..50bd492d 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -1,16 +1,14 @@ @setlocal @pushd %~dp0 -nuget restore +nuget restore || exit /b -msbuild -p:Configuration=Release -t:Restore +msbuild -p:Configuration=Release -t:Restore || exit /b -msbuild -p:Configuration=Release src\test\WixToolsetTest.NetFx\WixToolsetTest.NetFx.csproj +msbuild -p:Configuration=Release src\test\WixToolsetTest.Netfx\WixToolsetTest.Netfx.csproj || exit /b +dotnet test -c Release --no-build src\test\WixToolsetTest.Netfx || exit /b -msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.NetFx.wixext.csproj - -msbuild -p:Configuration=Release src\test\WixToolsetTest.Netfx\WixToolsetTest.Netfx.csproj -dotnet test -c Release --no-build src\test\WixToolsetTest.Netfx +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.NetFx.wixext.csproj || exit /b @popd @endlocal \ No newline at end of file diff --git a/global.json b/global.json index 77a81322..349951b0 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0170" + "WixToolset.Sdk": "4.0.0-build-0171" } } -- cgit v1.2.3-55-g6feb From 2be6f679830823096db9110042b2a4a3cf8abede Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 9 Dec 2020 12:55:17 -0600 Subject: Update to latest Bal.wixext. --- global.json | 2 +- .../TestData/UsingDotNetCorePackages/BundleLatest.wxs | 10 ++++------ .../TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs | 10 ++++------ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/global.json b/global.json index 349951b0..de2585b8 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0171" + "WixToolset.Sdk": "4.0.0-build-0172" } } diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs index 49e8c022..8e3d2c30 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest.wxs @@ -1,10 +1,8 @@ - - + - - - + + + diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs index 09c7bcdd..fc42ac99 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/BundleLatest_x64.wxs @@ -1,10 +1,8 @@ - - + - - - + + + -- cgit v1.2.3-55-g6feb From 13e438a69daa9830ec25689d75be1637bb0bb99f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 19 Dec 2020 21:08:19 -0600 Subject: Update dependencies. --- global.json | 2 +- src/CSharp.Build.props | 2 ++ src/Directory.Build.targets | 8 ++++++++ src/FindLocalWix.props | 10 ---------- src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj | 4 ---- src/wixext/WixToolset.Netfx.wixext.csproj | 1 + 6 files changed, 12 insertions(+), 15 deletions(-) delete mode 100644 src/FindLocalWix.props diff --git a/global.json b/global.json index de2585b8..6d38bce4 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0172" + "WixToolset.Sdk": "4.0.0-build-0175" } } diff --git a/src/CSharp.Build.props b/src/CSharp.Build.props index b12f4c6e..81d24ad1 100644 --- a/src/CSharp.Build.props +++ b/src/CSharp.Build.props @@ -5,7 +5,9 @@ --> + true true $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + false diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index dac7452a..cb988931 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -9,6 +9,11 @@ See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284 --> + + false + $(OutputPath)\$(AssemblyName).xml + + true $(SolutionPath) @@ -45,4 +50,7 @@ + + + diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props deleted file mode 100644 index ed0112ce..00000000 --- a/src/FindLocalWix.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - $(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets - - $(MSBuildThisFileDirectory)..\..\Util.wixext\build\Debug\netstandard2.0\WixToolset.Util.wixext.dll - - diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index 4dea73da..acb9e4a4 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -7,10 +7,6 @@ false - - NU1701 - - diff --git a/src/wixext/WixToolset.Netfx.wixext.csproj b/src/wixext/WixToolset.Netfx.wixext.csproj index 434a7c79..725b9c39 100644 --- a/src/wixext/WixToolset.Netfx.wixext.csproj +++ b/src/wixext/WixToolset.Netfx.wixext.csproj @@ -8,6 +8,7 @@ WiX Toolset .NET Framework Extension WiX Toolset .NET Framework Extension true + true build -- cgit v1.2.3-55-g6feb From f26403f12ba828f188673decaedb360843a3e6a7 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 19 Dec 2020 21:23:01 -0600 Subject: Fix AsPrereq package groups to include the referenced package. --- src/wixlib/NetCore3_Platform.wxi | 18 +++++++++++------- src/wixlib/NetFx4.5.wxs | 8 ++++++-- src/wixlib/NetFx4.wxs | 16 ++++++++++++---- src/wixlib/NetFx451.wxs | 8 ++++++-- src/wixlib/NetFx452.wxs | 8 ++++++-- src/wixlib/NetFx46.wxs | 8 ++++++-- src/wixlib/NetFx461.wxs | 8 ++++++-- src/wixlib/NetFx462.wxs | 8 ++++++-- src/wixlib/NetFx472.wxs | 8 ++++++-- src/wixlib/NetFx48.wxs | 8 ++++++-- src/wixlib/packages.config | 7 ------- 11 files changed, 71 insertions(+), 34 deletions(-) delete mode 100644 src/wixlib/packages.config diff --git a/src/wixlib/NetCore3_Platform.wxi b/src/wixlib/NetCore3_Platform.wxi index 67d75e27..2079b5c4 100644 --- a/src/wixlib/NetCore3_Platform.wxi +++ b/src/wixlib/NetCore3_Platform.wxi @@ -57,22 +57,26 @@ After="$(var.DotNetHomeId)" /> - - + + + diff --git a/src/wixlib/NetFx4.5.wxs b/src/wixlib/NetFx4.5.wxs index ace065e2..ea8b66c5 100644 --- a/src/wixlib/NetFx4.5.wxs +++ b/src/wixlib/NetFx4.5.wxs @@ -73,7 +73,9 @@ - + + + @@ -114,7 +116,9 @@ - + + + diff --git a/src/wixlib/NetFx4.wxs b/src/wixlib/NetFx4.wxs index 047915b9..ac463c3c 100644 --- a/src/wixlib/NetFx4.wxs +++ b/src/wixlib/NetFx4.wxs @@ -70,7 +70,9 @@ - + + + @@ -105,7 +107,9 @@ - + + + @@ -150,7 +154,9 @@ - + + + @@ -185,7 +191,9 @@ - + + + diff --git a/src/wixlib/NetFx451.wxs b/src/wixlib/NetFx451.wxs index 36b6bab9..145de6d9 100644 --- a/src/wixlib/NetFx451.wxs +++ b/src/wixlib/NetFx451.wxs @@ -63,7 +63,9 @@ - + + + @@ -104,7 +106,9 @@ - + + + diff --git a/src/wixlib/NetFx452.wxs b/src/wixlib/NetFx452.wxs index 8dbdd9b3..1dfa6600 100644 --- a/src/wixlib/NetFx452.wxs +++ b/src/wixlib/NetFx452.wxs @@ -61,7 +61,9 @@ - + + + @@ -102,7 +104,9 @@ - + + + diff --git a/src/wixlib/NetFx46.wxs b/src/wixlib/NetFx46.wxs index 5c875d09..c185f339 100644 --- a/src/wixlib/NetFx46.wxs +++ b/src/wixlib/NetFx46.wxs @@ -63,7 +63,9 @@ - + + + @@ -104,7 +106,9 @@ - + + + diff --git a/src/wixlib/NetFx461.wxs b/src/wixlib/NetFx461.wxs index ec5a405c..5a43929f 100644 --- a/src/wixlib/NetFx461.wxs +++ b/src/wixlib/NetFx461.wxs @@ -62,7 +62,9 @@ - + + + @@ -103,7 +105,9 @@ - + + + diff --git a/src/wixlib/NetFx462.wxs b/src/wixlib/NetFx462.wxs index fc3aa158..75321147 100644 --- a/src/wixlib/NetFx462.wxs +++ b/src/wixlib/NetFx462.wxs @@ -62,7 +62,9 @@ - + + + @@ -103,7 +105,9 @@ - + + + diff --git a/src/wixlib/NetFx472.wxs b/src/wixlib/NetFx472.wxs index 5aaa1976..f17e9997 100644 --- a/src/wixlib/NetFx472.wxs +++ b/src/wixlib/NetFx472.wxs @@ -60,7 +60,9 @@ - + + + @@ -101,7 +103,9 @@ - + + + diff --git a/src/wixlib/NetFx48.wxs b/src/wixlib/NetFx48.wxs index acc79a31..9a5dd8bf 100644 --- a/src/wixlib/NetFx48.wxs +++ b/src/wixlib/NetFx48.wxs @@ -60,7 +60,9 @@ - + + + @@ -101,7 +103,9 @@ - + + + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config deleted file mode 100644 index 89d73c36..00000000 --- a/src/wixlib/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file -- cgit v1.2.3-55-g6feb From df3a3eba860a853495579bdb32ec6e00aa7a67f2 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 3 Jan 2021 15:25:43 -0600 Subject: Update dependencies. --- NetFx.wixext.sln | 2 ++ appveyor.cmd | 5 ++--- global.json | 2 +- src/Cpp.Build.props | 8 ++++++++ src/CustomizedNativeRecommendedRules.ruleset | 8 ++++++++ src/wixext/WixToolset.Netfx.wixext.csproj | 15 ++++++++++++--- src/wixext/WixToolset.Netfx.wixext.nuspec | 26 ++++++++++++++++++++++++++ src/wixlib/netfx.wixproj | 6 ++++++ 8 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 src/CustomizedNativeRecommendedRules.ruleset create mode 100644 src/wixext/WixToolset.Netfx.wixext.nuspec diff --git a/NetFx.wixext.sln b/NetFx.wixext.sln index 94047f8d..e830aeea 100644 --- a/NetFx.wixext.sln +++ b/NetFx.wixext.sln @@ -27,6 +27,7 @@ Global {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 @@ -36,6 +37,7 @@ Global {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 diff --git a/appveyor.cmd b/appveyor.cmd index 50bd492d..2e91654b 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -3,12 +3,11 @@ nuget restore || exit /b -msbuild -p:Configuration=Release -t:Restore || exit /b +msbuild -p:Configuration=Release -Restore || exit /b -msbuild -p:Configuration=Release src\test\WixToolsetTest.Netfx\WixToolsetTest.Netfx.csproj || exit /b dotnet test -c Release --no-build src\test\WixToolsetTest.Netfx || exit /b -msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.NetFx.wixext.csproj || exit /b +msbuild -p:Configuration=Release -p:NoBuild=true -t:Pack src\wixext\WixToolset.NetFx.wixext.csproj || exit /b @popd @endlocal \ No newline at end of file diff --git a/global.json b/global.json index 6d38bce4..70abf3dd 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0175" + "WixToolset.Sdk": "4.0.0-build-0176" } } diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 9b7a1bb5..e7bba117 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -6,12 +6,20 @@ Win32 $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ $(OutputPath)$(Platform)\ + + + $(Company) + $(Copyright) $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + + $(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset + + $(DisableSpecificCompilerWarnings) diff --git a/src/CustomizedNativeRecommendedRules.ruleset b/src/CustomizedNativeRecommendedRules.ruleset new file mode 100644 index 00000000..142b141c --- /dev/null +++ b/src/CustomizedNativeRecommendedRules.ruleset @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/wixext/WixToolset.Netfx.wixext.csproj b/src/wixext/WixToolset.Netfx.wixext.csproj index 725b9c39..2e59f0c4 100644 --- a/src/wixext/WixToolset.Netfx.wixext.csproj +++ b/src/wixext/WixToolset.Netfx.wixext.csproj @@ -7,9 +7,10 @@ WixToolset.Netfx WiX Toolset .NET Framework Extension WiX Toolset .NET Framework Extension - true - true - build + embedded + $(MSBuildThisFileName).nuspec + true + Id=$(MSBuildThisFileName);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title) @@ -18,6 +19,7 @@ + @@ -29,4 +31,11 @@ + + + + $(OutputPath)..\ + $(NuspecProperties);Version=$(BuildVersionSimple);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildThisFileDirectory) + + diff --git a/src/wixext/WixToolset.Netfx.wixext.nuspec b/src/wixext/WixToolset.Netfx.wixext.nuspec new file mode 100644 index 00000000..280ccad5 --- /dev/null +++ b/src/wixext/WixToolset.Netfx.wixext.nuspec @@ -0,0 +1,26 @@ + + + + $id$ + $version$ + $authors$ + $authors$ + MS-RL + https://github.com/wixtoolset/Netfx.wixext + false + $title$ + $description$ + $copyright$ + + + + + + + + + + + + + diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index 8ee73326..efe66e8e 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -27,4 +27,10 @@ + + + + + + -- cgit v1.2.3-55-g6feb From bdc0be22fbc486f6ecedcc77a2e997d6b1240e82 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Sun, 31 Jan 2021 20:20:04 -0500 Subject: Remove Burn Authenticode Fixes https://github.com/wixtoolset/issues/issues/6301 Fix *Command attribute rename. --- global.json | 2 +- src/wixlib/NetCore3.1.8_x64.wxs | 30 ++++++++++++------------------ src/wixlib/NetCore3.1.8_x86.wxs | 30 ++++++++++++------------------ src/wixlib/NetCore3_Platform.wxi | 12 ++++++------ src/wixlib/NetFx4.5.wxs | 16 ++++++---------- src/wixlib/NetFx4.wxs | 32 ++++++++++++-------------------- src/wixlib/NetFx451.wxs | 16 ++++++---------- src/wixlib/NetFx452.wxs | 27 ++++++++++++--------------- src/wixlib/NetFx46.wxs | 16 ++++++---------- src/wixlib/NetFx461.wxs | 16 ++++++---------- src/wixlib/NetFx462.wxs | 16 ++++++---------- src/wixlib/NetFx472.wxs | 16 ++++++---------- src/wixlib/NetFx48.wxs | 16 ++++++---------- 13 files changed, 97 insertions(+), 148 deletions(-) diff --git a/global.json b/global.json index 70abf3dd..f6e1d10f 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0176" + "WixToolset.Sdk": "4.0.0-build-0185" } } diff --git a/src/wixlib/NetCore3.1.8_x64.wxs b/src/wixlib/NetCore3.1.8_x64.wxs index d6877e56..18392eec 100644 --- a/src/wixlib/NetCore3.1.8_x64.wxs +++ b/src/wixlib/NetCore3.1.8_x64.wxs @@ -19,14 +19,14 @@ - + - + - + - + - + - + - - + + - - + + - - + + diff --git a/src/wixlib/NetFx4.5.wxs b/src/wixlib/NetFx4.5.wxs index ea8b66c5..883c34da 100644 --- a/src/wixlib/NetFx4.5.wxs +++ b/src/wixlib/NetFx4.5.wxs @@ -46,9 +46,9 @@ @@ -89,9 +87,9 @@ diff --git a/src/wixlib/NetFx4.wxs b/src/wixlib/NetFx4.wxs index ac463c3c..8816a235 100644 --- a/src/wixlib/NetFx4.wxs +++ b/src/wixlib/NetFx4.wxs @@ -45,9 +45,9 @@ @@ -82,9 +80,9 @@ @@ -129,9 +125,9 @@ @@ -166,9 +160,9 @@ diff --git a/src/wixlib/NetFx451.wxs b/src/wixlib/NetFx451.wxs index 145de6d9..266a744b 100644 --- a/src/wixlib/NetFx451.wxs +++ b/src/wixlib/NetFx451.wxs @@ -36,9 +36,9 @@ @@ -79,9 +77,9 @@ diff --git a/src/wixlib/NetFx452.wxs b/src/wixlib/NetFx452.wxs index 1dfa6600..ca8859c2 100644 --- a/src/wixlib/NetFx452.wxs +++ b/src/wixlib/NetFx452.wxs @@ -35,9 +35,9 @@ - + @@ -77,9 +76,9 @@ Date: Thu, 4 Feb 2021 22:03:56 -0600 Subject: Update dependencies. --- global.json | 2 +- src/ca/netfxca.vcxproj | 4 ++-- src/ca/packages.config | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/global.json b/global.json index f6e1d10f..0124a83d 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0185" + "WixToolset.Sdk": "4.0.0-build-0186" } } diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index b00e4506..8bd9d18c 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -1,7 +1,7 @@ - + @@ -62,7 +62,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/src/ca/packages.config b/src/ca/packages.config index 9d88f529..c4a3177b 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From e697f71971eeab96fc6ea6c0ad966a863547aeda Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 11 Feb 2021 15:29:36 -0800 Subject: Replace Win64 attribute with Bitness attribute --- global.json | 2 +- src/wixlib/NetCoreShared.wxs | 2 +- src/wixlib/NetFx2.wxs | 2 +- src/wixlib/NetFx3.5.wxs | 2 +- src/wixlib/NetFx3.wxs | 2 +- src/wixlib/NetFx4.wxs | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/global.json b/global.json index 0124a83d..98cf5be7 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0186" + "WixToolset.Sdk": "4.0.0-build-0188" } } diff --git a/src/wixlib/NetCoreShared.wxs b/src/wixlib/NetCoreShared.wxs index 18f9e5a4..540eae6a 100644 --- a/src/wixlib/NetCoreShared.wxs +++ b/src/wixlib/NetCoreShared.wxs @@ -14,7 +14,7 @@ Key="SOFTWARE\dotnet\Setup\InstalledVersions\$(var.PLATFORM)" Value="InstallLocation" Result="value" - Win64="no" /> + Bitness="always32" /> diff --git a/src/wixlib/NetFx2.wxs b/src/wixlib/NetFx2.wxs index 92386b02..9ca358f1 100644 --- a/src/wixlib/NetFx2.wxs +++ b/src/wixlib/NetFx2.wxs @@ -38,7 +38,7 @@ - + diff --git a/src/wixlib/NetFx3.5.wxs b/src/wixlib/NetFx3.5.wxs index 422608da..7544e433 100644 --- a/src/wixlib/NetFx3.5.wxs +++ b/src/wixlib/NetFx3.5.wxs @@ -50,7 +50,7 @@ - + diff --git a/src/wixlib/NetFx3.wxs b/src/wixlib/NetFx3.wxs index 12d51750..ee5dbdb3 100644 --- a/src/wixlib/NetFx3.wxs +++ b/src/wixlib/NetFx3.wxs @@ -39,7 +39,7 @@ - + diff --git a/src/wixlib/NetFx4.wxs b/src/wixlib/NetFx4.wxs index 8816a235..73e8e6e0 100644 --- a/src/wixlib/NetFx4.wxs +++ b/src/wixlib/NetFx4.wxs @@ -214,7 +214,7 @@ - + @@ -242,7 +242,7 @@ - + -- cgit v1.2.3-55-g6feb From 6c1ef0970be62ca45c4b85191d4e803ff4015c28 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 17 Feb 2021 15:23:31 -0600 Subject: Update dependencies. --- global.json | 2 +- src/ca/netfxca.vcxproj | 8 ++++---- src/ca/packages.config | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/global.json b/global.json index 98cf5be7..469d077d 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0188" + "WixToolset.Sdk": "4.0.0-build-0189" } } diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index 8bd9d18c..d03637c7 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -1,8 +1,8 @@ - - + + Debug @@ -62,7 +62,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + \ No newline at end of file diff --git a/src/ca/packages.config b/src/ca/packages.config index c4a3177b..f5039303 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 856e76f63fe19c21a3f0f91b7d04552901b4f733 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 23 Feb 2021 18:27:41 -0500 Subject: Add custom action prefixes. --- src/wixext/NetFxCompiler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wixext/NetFxCompiler.cs b/src/wixext/NetFxCompiler.cs index 1a7981f5..90aa8bcb 100644 --- a/src/wixext/NetFxCompiler.cs +++ b/src/wixext/NetFxCompiler.cs @@ -145,7 +145,7 @@ namespace WixToolset.Netfx this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.ARM64 | CustomActionPlatforms.X64 | CustomActionPlatforms.X86); + this.ParseHelper.CreateCustomActionReference(sourceLineNumbers, section, "Wix4NetFxScheduleNativeImage", this.Context.Platform, CustomActionPlatforms.ARM64 | CustomActionPlatforms.X64 | CustomActionPlatforms.X86); if (!this.Messaging.EncounteredError) { -- cgit v1.2.3-55-g6feb From a5fe70f726e8f428306ccba54037ce2ba055b1f8 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 2 Mar 2021 19:03:25 -0600 Subject: Update dependencies and integrate changes. Remove unsupported versions of .NET Framework. Update to latest 3.1 .NET Core. Remove /ChainingPackage from .NET Framework args. Remove RepairArguments from .NET Framework packages. Make all package urls https. #3992, #4183, #5374, #5615, #5762 --- global.json | 2 +- src/ca/netfxca.vcxproj | 4 +- src/ca/packages.config | 2 +- src/wixlib/NetCore3.1.12_x64.wxs | 114 +++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.12_x86.wxs | 114 +++++++++++++++++++++++++++++++ src/wixlib/NetCore3.1.8_x64.wxs | 117 -------------------------------- src/wixlib/NetCore3.1.8_x86.wxs | 117 -------------------------------- src/wixlib/NetCore3.1_x64.wxs | 6 +- src/wixlib/NetCore3.1_x86.wxs | 6 +- src/wixlib/NetFx4.5.wxs | 83 ----------------------- src/wixlib/NetFx4.wxs | 141 --------------------------------------- src/wixlib/NetFx451.wxs | 83 ----------------------- src/wixlib/NetFx452.wxs | 34 +++++----- src/wixlib/NetFx46.wxs | 34 +++++----- src/wixlib/NetFx461.wxs | 34 +++++----- src/wixlib/NetFx462.wxs | 34 +++++----- src/wixlib/NetFx47.wxs | 1 - src/wixlib/NetFx471.wxs | 1 - src/wixlib/NetFx472.wxs | 28 ++++---- src/wixlib/NetFx48.wxs | 32 ++++----- 20 files changed, 324 insertions(+), 663 deletions(-) create mode 100644 src/wixlib/NetCore3.1.12_x64.wxs create mode 100644 src/wixlib/NetCore3.1.12_x86.wxs delete mode 100644 src/wixlib/NetCore3.1.8_x64.wxs delete mode 100644 src/wixlib/NetCore3.1.8_x86.wxs diff --git a/global.json b/global.json index 469d077d..3a97e4ba 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0189" + "WixToolset.Sdk": "4.0.0-build-0193" } } diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index d03637c7..2f91eba3 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -1,7 +1,7 @@ - + @@ -62,7 +62,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/src/ca/packages.config b/src/ca/packages.config index f5039303..8a6eee87 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/wixlib/NetCore3.1.12_x64.wxs b/src/wixlib/NetCore3.1.12_x64.wxs new file mode 100644 index 00000000..e984468f --- /dev/null +++ b/src/wixlib/NetCore3.1.12_x64.wxs @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.12_x86.wxs b/src/wixlib/NetCore3.1.12_x86.wxs new file mode 100644 index 00000000..727336fe --- /dev/null +++ b/src/wixlib/NetCore3.1.12_x86.wxs @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/NetCore3.1.8_x64.wxs b/src/wixlib/NetCore3.1.8_x64.wxs deleted file mode 100644 index 18392eec..00000000 --- a/src/wixlib/NetCore3.1.8_x64.wxs +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1.8_x86.wxs b/src/wixlib/NetCore3.1.8_x86.wxs deleted file mode 100644 index 445addc2..00000000 --- a/src/wixlib/NetCore3.1.8_x86.wxs +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/NetCore3.1_x64.wxs b/src/wixlib/NetCore3.1_x64.wxs index b6fd944d..7c283de1 100644 --- a/src/wixlib/NetCore3.1_x64.wxs +++ b/src/wixlib/NetCore3.1_x64.wxs @@ -6,19 +6,19 @@ - + - + - + diff --git a/src/wixlib/NetCore3.1_x86.wxs b/src/wixlib/NetCore3.1_x86.wxs index fd4470c0..751d364d 100644 --- a/src/wixlib/NetCore3.1_x86.wxs +++ b/src/wixlib/NetCore3.1_x86.wxs @@ -6,19 +6,19 @@ - + - + - + diff --git a/src/wixlib/NetFx4.5.wxs b/src/wixlib/NetFx4.5.wxs index 883c34da..9f09e663 100644 --- a/src/wixlib/NetFx4.5.wxs +++ b/src/wixlib/NetFx4.5.wxs @@ -3,7 +3,6 @@ diff --git a/src/wixlib/NetFx4.wxs b/src/wixlib/NetFx4.wxs index 73e8e6e0..979c1da4 100644 --- a/src/wixlib/NetFx4.wxs +++ b/src/wixlib/NetFx4.wxs @@ -3,7 +3,6 @@ diff --git a/src/wixlib/NetFx451.wxs b/src/wixlib/NetFx451.wxs index 266a744b..08a9b4f2 100644 --- a/src/wixlib/NetFx451.wxs +++ b/src/wixlib/NetFx451.wxs @@ -3,7 +3,6 @@ - - - + + + @@ -35,9 +35,8 @@ + - @@ -76,9 +74,8 @@ + - diff --git a/src/wixlib/NetFx46.wxs b/src/wixlib/NetFx46.wxs index dbe629ac..c33c1df4 100644 --- a/src/wixlib/NetFx46.wxs +++ b/src/wixlib/NetFx46.wxs @@ -15,9 +15,9 @@ --> - - - + + + @@ -36,9 +36,8 @@ + - @@ -77,9 +75,8 @@ + - diff --git a/src/wixlib/NetFx461.wxs b/src/wixlib/NetFx461.wxs index 900080cc..cf9d3d60 100644 --- a/src/wixlib/NetFx461.wxs +++ b/src/wixlib/NetFx461.wxs @@ -14,9 +14,9 @@ --> - - - + + + @@ -35,9 +35,8 @@ + - @@ -76,9 +74,8 @@ + - diff --git a/src/wixlib/NetFx462.wxs b/src/wixlib/NetFx462.wxs index c80e7c27..22cb70c9 100644 --- a/src/wixlib/NetFx462.wxs +++ b/src/wixlib/NetFx462.wxs @@ -14,9 +14,9 @@ --> - - - + + + @@ -35,9 +35,8 @@ + - @@ -76,9 +74,8 @@ + - diff --git a/src/wixlib/NetFx47.wxs b/src/wixlib/NetFx47.wxs index 97f31500..277f466e 100644 --- a/src/wixlib/NetFx47.wxs +++ b/src/wixlib/NetFx47.wxs @@ -2,7 +2,6 @@ - - - - true - true - $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) - false - - diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props deleted file mode 100644 index e7bba117..00000000 --- a/src/Cpp.Build.props +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - Win32 - $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ - $(OutputPath)$(Platform)\ - - - $(Company) - $(Copyright) - - - - $([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 - - - - - MinSpace - NDEBUG;%(PreprocessorDefinitions) - true - true - MultiThreaded - - - true - true - - - diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f83cc154..b3c6287c 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,8 +22,6 @@ WiX Toolset - - - + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index cb988931..2fcc765a 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -9,11 +9,6 @@ See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284 --> - - false - $(OutputPath)\$(AssemblyName).xml - - true $(SolutionPath) @@ -45,12 +40,12 @@ - + - + diff --git a/src/Directory.csproj.props b/src/Directory.csproj.props new file mode 100644 index 00000000..81d24ad1 --- /dev/null +++ b/src/Directory.csproj.props @@ -0,0 +1,13 @@ + + + + + true + true + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + false + + diff --git a/src/Directory.csproj.targets b/src/Directory.csproj.targets new file mode 100644 index 00000000..c3270426 --- /dev/null +++ b/src/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/Directory.vcxproj.props b/src/Directory.vcxproj.props new file mode 100644 index 00000000..47c2c143 --- /dev/null +++ b/src/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/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index 2f91eba3..f01417b6 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -1,8 +1,7 @@ - - - + + Debug @@ -29,6 +28,7 @@ ARM64 + {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} DynamicLibrary @@ -38,31 +38,36 @@ netfxca.def WiX Toolset .NET Framework CustomAction + + msi.lib + Create + + - + + + + + + + + - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file + diff --git a/src/ca/packages.config b/src/ca/packages.config deleted file mode 100644 index 8a6eee87..00000000 --- a/src/ca/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj index acb9e4a4..1c41d176 100644 --- a/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj +++ b/src/test/WixToolsetTest.Netfx/WixToolsetTest.Netfx.csproj @@ -4,22 +4,14 @@ netcoreapp3.1 + embedded false - - - - - - + - - - - @@ -41,4 +33,8 @@ + + + + diff --git a/src/wixext/WixToolset.Netfx.wixext.csproj b/src/wixext/WixToolset.Netfx.wixext.csproj index 2e59f0c4..7c1d55c1 100644 --- a/src/wixext/WixToolset.Netfx.wixext.csproj +++ b/src/wixext/WixToolset.Netfx.wixext.csproj @@ -4,38 +4,28 @@ netstandard2.0 + embedded WixToolset.Netfx WiX Toolset .NET Framework Extension WiX Toolset .NET Framework Extension - embedded - $(MSBuildThisFileName).nuspec true - Id=$(MSBuildThisFileName);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title) - - - - + - + + + - - - - $(OutputPath)..\ - $(NuspecProperties);Version=$(BuildVersionSimple);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildThisFileDirectory) - - diff --git a/src/wixext/WixToolset.Netfx.wixext.nuspec b/src/wixext/WixToolset.Netfx.wixext.nuspec index 280ccad5..ba3eaade 100644 --- a/src/wixext/WixToolset.Netfx.wixext.nuspec +++ b/src/wixext/WixToolset.Netfx.wixext.nuspec @@ -3,14 +3,13 @@ $id$ $version$ + $title$ + $description$ $authors$ - $authors$ MS-RL - https://github.com/wixtoolset/Netfx.wixext false - $title$ - $description$ $copyright$ + $projectUrl$ diff --git a/src/wixlib/netfx.wixproj b/src/wixlib/netfx.wixproj index efe66e8e..937ed0d4 100644 --- a/src/wixlib/netfx.wixproj +++ b/src/wixlib/netfx.wixproj @@ -1,4 +1,6 @@ + + @@ -13,9 +15,9 @@ - - - + + + @@ -27,10 +29,4 @@ - - - - - - -- cgit v1.2.3-55-g6feb From cde746853cb6d7424298564a3716099a669be3c5 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 18 Mar 2021 18:49:20 -0400 Subject: Update dependencies. --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 30206a47..d02645a7 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0194" + "WixToolset.Sdk": "4.0.0-build-0200" } } -- cgit v1.2.3-55-g6feb From be3823124171b85a00d794032e0739682cbf47d6 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Mon, 22 Mar 2021 19:09:18 -0400 Subject: Update dependencies. --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index d02645a7..f0bcd27a 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0200" + "WixToolset.Sdk": "4.0.0-build-0201" } } -- cgit v1.2.3-55-g6feb From 5baa00dc75b7bd160aa6b445f462793598d78681 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 31 Mar 2021 12:46:08 -0500 Subject: Update to latest Sdk. --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index f0bcd27a..9181db6f 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0201" + "WixToolset.Sdk": "4.0.0-build-0203" } } -- cgit v1.2.3-55-g6feb From 56d24ed8b292c27288fbf00ff3dba3ff35f042a5 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Wed, 7 Apr 2021 20:49:42 -0400 Subject: Update dependencies. --- global.json | 2 +- src/ca/netfxca.vcxproj | 2 +- .../TestData/UsingNativeImage/Package.en-us.wxl | 4 +- .../TestData/UsingNativeImage/Package.wxs | 8 +-- .../UsingNativeImage/PackageComponents.wxs | 4 +- src/wixlib/NetCore3.1.12_x64.wxs | 72 +++------------------- src/wixlib/NetCore3.1.12_x86.wxs | 72 +++------------------- src/wixlib/NetCore3.1_x64.wxs | 6 +- src/wixlib/NetCore3.1_x86.wxs | 6 +- src/wixlib/NetCore3_Platform.wxi | 28 ++------- src/wixlib/NetCoreShared.wxs | 15 +---- src/wixlib/NetFx1.1.wxs | 3 +- src/wixlib/NetFx1.wxs | 3 +- src/wixlib/NetFx2.wxs | 3 +- src/wixlib/NetFx3.5.wxs | 11 +--- src/wixlib/NetFx3.wxs | 3 +- src/wixlib/NetFx4.5.wxs | 14 +---- src/wixlib/NetFx4.wxs | 22 ++----- src/wixlib/NetFx451.wxs | 6 +- src/wixlib/NetFx452.wxs | 49 ++------------- src/wixlib/NetFx46.wxs | 49 ++------------- src/wixlib/NetFx461.wxs | 49 ++------------- src/wixlib/NetFx462.wxs | 49 ++------------- src/wixlib/NetFx47.wxs | 6 +- src/wixlib/NetFx471.wxs | 6 +- src/wixlib/NetFx472.wxs | 49 ++------------- src/wixlib/NetFx48.wxs | 49 ++------------- src/wixlib/NetFxExtension.wxs | 3 +- src/wixlib/NetFxExtension_arm64.wxs | 3 +- src/wixlib/NetFxExtension_x64.wxs | 3 +- src/wixlib/NetFxExtension_x86.wxs | 3 +- 31 files changed, 94 insertions(+), 508 deletions(-) diff --git a/global.json b/global.json index 9181db6f..fc26eb6e 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0203" + "WixToolset.Sdk": "4.0.0-build-0206" } } diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index f01417b6..4196aa80 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -63,7 +63,7 @@ - + diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl index 38c12ac1..5301bb1a 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.en-us.wxl @@ -1,6 +1,4 @@ - - - diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs index 082ac4cc..ace73680 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/Package.wxs @@ -8,10 +8,8 @@ - - + - - - + + diff --git a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs index 21c92f26..a1c806d9 100644 --- a/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs +++ b/src/test/WixToolsetTest.Netfx/TestData/UsingNativeImage/PackageComponents.wxs @@ -1,6 +1,4 @@ - - + diff --git a/src/wixlib/NetCore3.1.12_x64.wxs b/src/wixlib/NetCore3.1.12_x64.wxs index e984468f..990dc0bf 100644 --- a/src/wixlib/NetCore3.1.12_x64.wxs +++ b/src/wixlib/NetCore3.1.12_x64.wxs @@ -1,8 +1,6 @@ - - + - + @@ -22,26 +20,8 @@ - - + + @@ -55,26 +35,8 @@ - - + + @@ -88,26 +50,8 @@ - - + + diff --git a/src/wixlib/NetCore3.1.12_x86.wxs b/src/wixlib/NetCore3.1.12_x86.wxs index 727336fe..b6d5d371 100644 --- a/src/wixlib/NetCore3.1.12_x86.wxs +++ b/src/wixlib/NetCore3.1.12_x86.wxs @@ -1,8 +1,6 @@ - - + - + @@ -22,26 +20,8 @@ - - + + @@ -55,26 +35,8 @@ - - + + @@ -88,26 +50,8 @@ - - + + diff --git a/src/wixlib/NetCore3.1_x64.wxs b/src/wixlib/NetCore3.1_x64.wxs index 7c283de1..60d7c27f 100644 --- a/src/wixlib/NetCore3.1_x64.wxs +++ b/src/wixlib/NetCore3.1_x64.wxs @@ -1,8 +1,6 @@ - - + - + diff --git a/src/wixlib/NetCore3.1_x86.wxs b/src/wixlib/NetCore3.1_x86.wxs index 751d364d..cfff07b3 100644 --- a/src/wixlib/NetCore3.1_x86.wxs +++ b/src/wixlib/NetCore3.1_x86.wxs @@ -1,8 +1,6 @@ - - + - + diff --git a/src/wixlib/NetCore3_Platform.wxi b/src/wixlib/NetCore3_Platform.wxi index bb7e59a7..c7aaca50 100644 --- a/src/wixlib/NetCore3_Platform.wxi +++ b/src/wixlib/NetCore3_Platform.wxi @@ -1,10 +1,7 @@ - - + - + @@ -29,32 +26,17 @@ - + - + - + diff --git a/src/wixlib/NetCoreShared.wxs b/src/wixlib/NetCoreShared.wxs index 540eae6a..0332041a 100644 --- a/src/wixlib/NetCoreShared.wxs +++ b/src/wixlib/NetCoreShared.wxs @@ -1,20 +1,11 @@ - - + - + - + diff --git a/src/wixlib/NetFx1.1.wxs b/src/wixlib/NetFx1.1.wxs index 406aef3f..12f0a4e3 100644 --- a/src/wixlib/NetFx1.1.wxs +++ b/src/wixlib/NetFx1.1.wxs @@ -1,5 +1,4 @@ - - + diff --git a/src/wixlib/NetFx1.wxs b/src/wixlib/NetFx1.wxs index c1b266e8..68d6f13d 100644 --- a/src/wixlib/NetFx1.wxs +++ b/src/wixlib/NetFx1.wxs @@ -1,5 +1,4 @@ - - + diff --git a/src/wixlib/NetFx2.wxs b/src/wixlib/NetFx2.wxs index 9ca358f1..e5eef54b 100644 --- a/src/wixlib/NetFx2.wxs +++ b/src/wixlib/NetFx2.wxs @@ -1,5 +1,4 @@ - - + diff --git a/src/wixlib/NetFx3.5.wxs b/src/wixlib/NetFx3.5.wxs index 7544e433..c1a80f50 100644 --- a/src/wixlib/NetFx3.5.wxs +++ b/src/wixlib/NetFx3.5.wxs @@ -1,5 +1,4 @@ - - + @@ -15,13 +14,7 @@ - + diff --git a/src/wixlib/NetFx3.wxs b/src/wixlib/NetFx3.wxs index ee5dbdb3..5fb279ea 100644 --- a/src/wixlib/NetFx3.wxs +++ b/src/wixlib/NetFx3.wxs @@ -1,5 +1,4 @@ - - + diff --git a/src/wixlib/NetFx4.5.wxs b/src/wixlib/NetFx4.5.wxs index 9f09e663..443235d4 100644 --- a/src/wixlib/NetFx4.5.wxs +++ b/src/wixlib/NetFx4.5.wxs @@ -1,9 +1,7 @@ - - + - + diff --git a/src/wixlib/NetFx4.wxs b/src/wixlib/NetFx4.wxs index 979c1da4..295d8078 100644 --- a/src/wixlib/NetFx4.wxs +++ b/src/wixlib/NetFx4.wxs @@ -1,9 +1,7 @@ - - + - + diff --git a/src/wixlib/NetFx451.wxs b/src/wixlib/NetFx451.wxs index 08a9b4f2..88363555 100644 --- a/src/wixlib/NetFx451.wxs +++ b/src/wixlib/NetFx451.wxs @@ -1,9 +1,7 @@ - - + - + + - + + - + + - + + - + + - + + - + + - + + - + + diff --git a/src/wixlib/NetFxExtension_arm64.wxs b/src/wixlib/NetFxExtension_arm64.wxs index 8b1f9d36..a0492fde 100644 --- a/src/wixlib/NetFxExtension_arm64.wxs +++ b/src/wixlib/NetFxExtension_arm64.wxs @@ -1,5 +1,4 @@ - - + diff --git a/src/wixlib/NetFxExtension_x64.wxs b/src/wixlib/NetFxExtension_x64.wxs index cc079e5a..81c9d768 100644 --- a/src/wixlib/NetFxExtension_x64.wxs +++ b/src/wixlib/NetFxExtension_x64.wxs @@ -1,5 +1,4 @@ - - + diff --git a/src/wixlib/NetFxExtension_x86.wxs b/src/wixlib/NetFxExtension_x86.wxs index 7245a4dd..b8ad1927 100644 --- a/src/wixlib/NetFxExtension_x86.wxs +++ b/src/wixlib/NetFxExtension_x86.wxs @@ -1,5 +1,4 @@ - - + -- cgit v1.2.3-55-g6feb From 873fc6cdedade39c393d7e2f87cf4beacf9024cd Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 15 Apr 2021 18:30:08 -0500 Subject: Update dependencies. --- global.json | 2 +- src/ca/netfxca.vcxproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index fc26eb6e..83ab5c51 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0206" + "WixToolset.Sdk": "4.0.0-build-0209" } } diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index 4196aa80..b154fa3a 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -63,7 +63,7 @@ - + -- cgit v1.2.3-55-g6feb From 00ae085bad8d0c614420cf91832e3d1bf46f148c Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 20 Apr 2021 00:15:18 -0500 Subject: Use IReadOnlyCollection. --- global.json | 2 +- src/wixext/NetfxExtensionFactory.cs | 4 ++-- src/wixext/NetfxWindowsInstallerBackendExtension.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/global.json b/global.json index 83ab5c51..616b0b8c 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0209" + "WixToolset.Sdk": "4.0.0-build-0210" } } diff --git a/src/wixext/NetfxExtensionFactory.cs b/src/wixext/NetfxExtensionFactory.cs index 910c1ac1..fe618460 100644 --- a/src/wixext/NetfxExtensionFactory.cs +++ b/src/wixext/NetfxExtensionFactory.cs @@ -1,4 +1,4 @@ -// 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. +// 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 { @@ -8,7 +8,7 @@ namespace WixToolset.Netfx public class NetfxExtensionFactory : BaseExtensionFactory { - protected override IEnumerable ExtensionTypes => new[] + protected override IReadOnlyCollection ExtensionTypes => new[] { typeof(NetfxCompiler), typeof(NetfxExtensionData), diff --git a/src/wixext/NetfxWindowsInstallerBackendExtension.cs b/src/wixext/NetfxWindowsInstallerBackendExtension.cs index e1404c1a..7d4fe475 100644 --- a/src/wixext/NetfxWindowsInstallerBackendExtension.cs +++ b/src/wixext/NetfxWindowsInstallerBackendExtension.cs @@ -8,6 +8,6 @@ namespace WixToolset.Netfx public class NetfxWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension { - public override IEnumerable TableDefinitions => NetfxTableDefinitions.All; + public override IReadOnlyCollection TableDefinitions => NetfxTableDefinitions.All; } } -- cgit v1.2.3-55-g6feb From 924b0a2d4148566cb9a919c2af9fc2a31567eeb7 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 20 Apr 2021 13:12:54 -0700 Subject: Integrate latest tooling --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 616b0b8c..23dd3fa6 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0210" + "WixToolset.Sdk": "4.0.0-build-0211" } } -- cgit v1.2.3-55-g6feb From 088bc489796e8e0ffbd9323d5eab27e45d2fbc79 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 25 Apr 2021 23:25:36 -0500 Subject: Update to latest Tools and fix 4.8 remote information. --- global.json | 2 +- src/wixlib/NetFx48.wxs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index 23dd3fa6..b32cb322 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0211" + "WixToolset.Sdk": "4.0.0-build-0212" } } diff --git a/src/wixlib/NetFx48.wxs b/src/wixlib/NetFx48.wxs index 4958c647..bfca5092 100644 --- a/src/wixlib/NetFx48.wxs +++ b/src/wixlib/NetFx48.wxs @@ -30,7 +30,7 @@ - + @@ -52,7 +52,7 @@ - + -- cgit v1.2.3-55-g6feb From 50c6c38c18b9078436540aa43d3880c4cdacaafa Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 28 Apr 2021 19:44:30 -0500 Subject: Update dependencies. --- global.json | 2 +- src/ca/netfxca.vcxproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index b32cb322..23d7a5bd 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0212" + "WixToolset.Sdk": "4.0.0-build-0213" } } diff --git a/src/ca/netfxca.vcxproj b/src/ca/netfxca.vcxproj index b154fa3a..5e25b683 100644 --- a/src/ca/netfxca.vcxproj +++ b/src/ca/netfxca.vcxproj @@ -63,8 +63,8 @@ - - + + -- cgit v1.2.3-55-g6feb From ca02e81316d700a3647414f355eab4d2115d6163 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 30 Apr 2021 16:18:31 -0500 Subject: Fix 4.6.2 and 4.7.2 remote information. #6443 --- src/wixlib/NetFx462.wxs | 4 ++-- src/wixlib/NetFx472.wxs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wixlib/NetFx462.wxs b/src/wixlib/NetFx462.wxs index 52cd5b14..146bae5f 100644 --- a/src/wixlib/NetFx462.wxs +++ b/src/wixlib/NetFx462.wxs @@ -32,7 +32,7 @@ - + @@ -54,7 +54,7 @@ - + diff --git a/src/wixlib/NetFx472.wxs b/src/wixlib/NetFx472.wxs index 1a47a3cc..57584a9e 100644 --- a/src/wixlib/NetFx472.wxs +++ b/src/wixlib/NetFx472.wxs @@ -30,7 +30,7 @@ - + @@ -52,7 +52,7 @@ - + -- cgit v1.2.3-55-g6feb 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