From a8a1e0d6f99c2b902a8f81d3d7f3503c506e8171 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 4 May 2021 22:50:56 -0700 Subject: Move VisualStudio.wixext into ext --- .editorconfig | 37 - README.md | 2 - VisualStudio.wixext.sln | 73 -- appveyor.cmd | 19 - appveyor.yml | 42 -- global.json | 5 - nuget.config | 17 - src/.editorconfig | 37 + src/CSharp.Build.props | 11 - src/Cpp.Build.props | 86 --- src/Directory.Build.props | 27 - src/Directory.Build.targets | 51 -- src/Directory.csproj.props | 13 - src/Directory.csproj.targets | 26 - src/Directory.vcxproj.props | 111 --- src/ca/dllmain.cpp | 26 - src/ca/precomp.h | 13 - src/ca/vsca.cpp | 510 ------------- src/ca/vsca.def | 7 - src/ca/vsca.vcxproj | 58 -- src/ext/VisualStudio/CSharp.Build.props | 11 + src/ext/VisualStudio/Cpp.Build.props | 86 +++ src/ext/VisualStudio/Directory.Build.props | 27 + src/ext/VisualStudio/Directory.Build.targets | 51 ++ src/ext/VisualStudio/Directory.csproj.props | 13 + src/ext/VisualStudio/Directory.csproj.targets | 26 + src/ext/VisualStudio/Directory.vcxproj.props | 111 +++ src/ext/VisualStudio/README.md | 2 + src/ext/VisualStudio/VisualStudio.wixext.sln | 73 ++ src/ext/VisualStudio/appveyor.cmd | 19 + src/ext/VisualStudio/appveyor.yml | 42 ++ src/ext/VisualStudio/ca/dllmain.cpp | 26 + src/ext/VisualStudio/ca/precomp.h | 13 + src/ext/VisualStudio/ca/vsca.cpp | 510 +++++++++++++ src/ext/VisualStudio/ca/vsca.def | 7 + src/ext/VisualStudio/ca/vsca.vcxproj | 58 ++ src/ext/VisualStudio/nuget.config | 17 + .../TestData/UsingVsixPackage/Package.en-us.wxl | 11 + .../TestData/UsingVsixPackage/Package.wxs | 17 + .../UsingVsixPackage/PackageComponents.wxs | 14 + .../TestData/UsingVsixPackage/example.txt | 1 + .../VisualStudioExtensionFixture.cs | 45 ++ .../WixToolsetTest.VisualStudio.csproj | 38 + .../WixToolsetTest.VisualStudio.v3.ncrunchproject | 5 + src/ext/VisualStudio/wix.snk | Bin 0 -> 596 bytes .../VisualStudio/wixext/Symbols/HelpFileSymbol.cs | 95 +++ .../wixext/Symbols/HelpFileToNamespaceSymbol.cs | 55 ++ .../wixext/Symbols/HelpFilterSymbol.cs | 55 ++ .../wixext/Symbols/HelpFilterToNamespaceSymbol.cs | 55 ++ .../wixext/Symbols/HelpNamespaceSymbol.cs | 63 ++ .../wixext/Symbols/HelpPluginSymbol.cs | 79 ++ .../wixext/Symbols/VSSymbolDefinitions.cs | 59 ++ src/ext/VisualStudio/wixext/VSCompiler.cs | 828 +++++++++++++++++++++ src/ext/VisualStudio/wixext/VSDecompiler.cs | 298 ++++++++ src/ext/VisualStudio/wixext/VSExtensionData.cs | 27 + src/ext/VisualStudio/wixext/VSExtensionFactory.cs | 18 + src/ext/VisualStudio/wixext/VSTableDefinitions.cs | 97 +++ .../VSWindowsInstallerBackendBinderExtension.cs | 13 + .../wixext/WixToolset.VisualStudio.wixext.csproj | 30 + .../wixext/WixToolset.VisualStudio.wixext.nuspec | 23 + .../wixext/WixToolset.VisualStudio.wixext.targets | 8 + ...ixToolset.VisualStudio.wixext.v3.ncrunchproject | 7 + .../wixlib/HTML_Help_Registration__RTL_X86.wxs | 67 ++ .../VisualStudio/wixlib/Redist/BIN_File_107602.dll | Bin 0 -> 866816 bytes .../VisualStudio/wixlib/Redist/BIN_File_46001.dll | Bin 0 -> 129536 bytes .../VisualStudio/wixlib/Redist/BIN_File_46002.dll | Bin 0 -> 108544 bytes src/ext/VisualStudio/wixlib/VS11.wxs | 205 +++++ src/ext/VisualStudio/wixlib/VS14.wxs | 186 +++++ src/ext/VisualStudio/wixlib/VS2003.wxs | 27 + src/ext/VisualStudio/wixlib/VS2005.wxs | 369 +++++++++ src/ext/VisualStudio/wixlib/VS2008.wxs | 299 ++++++++ src/ext/VisualStudio/wixlib/VS2010.wxs | 312 ++++++++ src/ext/VisualStudio/wixlib/VS2012.wxs | 255 +++++++ src/ext/VisualStudio/wixlib/VS2013.wxs | 252 +++++++ src/ext/VisualStudio/wixlib/VS2015.wxs | 186 +++++ src/ext/VisualStudio/wixlib/VS2017.wxs | 142 ++++ src/ext/VisualStudio/wixlib/VS2019.wxs | 142 ++++ .../VisualStudio/wixlib/VSExtension_Platform.wxi | 17 + src/ext/VisualStudio/wixlib/VSExtension_x86.wxs | 8 + src/ext/VisualStudio/wixlib/VsixPackage.wxs | 60 ++ src/ext/VisualStudio/wixlib/caSuffix.wxi | 28 + src/ext/VisualStudio/wixlib/vs.v3.ncrunchproject | 5 + src/ext/VisualStudio/wixlib/vs.wixproj | 19 + .../vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs | 63 ++ .../wixlib/vs2005/redist/BIN_File_60377.dll | Bin 0 -> 45056 bytes .../wixlib/vs2005/redist/vsipCCSamples.HxK | 14 + .../VisualStudio/wixlib/vs2005/redist/vsipcc.hxc | 33 + .../VisualStudio/wixlib/vs2005/redist/vsipcc.hxt | 15 + .../wixlib/vs2005/redist/vsipccALinks.hxk | 13 + .../wixlib/vs2005/redist/vsipccBLinks.hxk | 13 + .../wixlib/vs2005/redist/vsipccFLinks.hxk | 14 + .../wixlib/vs2005/redist/vsipccKLinks.hxk | 13 + .../wixlib/vs2005/redist/vsipccNamedURLs.hxk | 13 + .../wixlib/vs2005/redist/vsipccSlinks.hxk | 14 + .../wixlib/vs2005/redist/vsipcc_reg.hxs | Bin 0 -> 18400 bytes .../vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs | 60 ++ .../wixlib/vs2008/redist/BIN_435439_x86_enu.dll | Bin 0 -> 103944 bytes .../VisualStudio/wixlib/vs2008/redist/_ALinks.hxk | 10 + .../VisualStudio/wixlib/vs2008/redist/_BLinks.hxk | 10 + .../VisualStudio/wixlib/vs2008/redist/_CLinks.hxk | 13 + .../VisualStudio/wixlib/vs2008/redist/_FLinks.hxk | 10 + .../VisualStudio/wixlib/vs2008/redist/_KLinks.hxk | 10 + .../VisualStudio/wixlib/vs2008/redist/_SLinks.hxk | 13 + .../wixlib/vs2008/redist/_vsipcc90.hxc | 33 + .../wixlib/vs2008/redist/_vsipcc90.hxt | 15 + .../wixlib/vs2008/redist/_vsipcc_namedUrls.hxk | 13 + .../wixlib/vs2008/redist/_vsipcc_samples.HxK | 14 + .../wixlib/vs2008/redist/vsipcc_reg.hxs | Bin 0 -> 18488 bytes src/ext/global.json | 5 + .../TestData/UsingVsixPackage/Package.en-us.wxl | 11 - .../TestData/UsingVsixPackage/Package.wxs | 17 - .../UsingVsixPackage/PackageComponents.wxs | 14 - .../TestData/UsingVsixPackage/example.txt | 1 - .../VisualStudioExtensionFixture.cs | 45 -- .../WixToolsetTest.VisualStudio.csproj | 38 - .../WixToolsetTest.VisualStudio.v3.ncrunchproject | 5 - src/version.json | 11 + src/wix.snk | Bin 596 -> 0 bytes src/wixext/Symbols/HelpFileSymbol.cs | 95 --- src/wixext/Symbols/HelpFileToNamespaceSymbol.cs | 55 -- src/wixext/Symbols/HelpFilterSymbol.cs | 55 -- src/wixext/Symbols/HelpFilterToNamespaceSymbol.cs | 55 -- src/wixext/Symbols/HelpNamespaceSymbol.cs | 63 -- src/wixext/Symbols/HelpPluginSymbol.cs | 79 -- src/wixext/Symbols/VSSymbolDefinitions.cs | 59 -- src/wixext/VSCompiler.cs | 828 --------------------- src/wixext/VSDecompiler.cs | 298 -------- src/wixext/VSExtensionData.cs | 27 - src/wixext/VSExtensionFactory.cs | 18 - src/wixext/VSTableDefinitions.cs | 97 --- .../VSWindowsInstallerBackendBinderExtension.cs | 13 - src/wixext/WixToolset.VisualStudio.wixext.csproj | 30 - src/wixext/WixToolset.VisualStudio.wixext.nuspec | 23 - src/wixext/WixToolset.VisualStudio.wixext.targets | 8 - ...ixToolset.VisualStudio.wixext.v3.ncrunchproject | 7 - src/wixlib/HTML_Help_Registration__RTL_X86.wxs | 67 -- src/wixlib/Redist/BIN_File_107602.dll | Bin 866816 -> 0 bytes src/wixlib/Redist/BIN_File_46001.dll | Bin 129536 -> 0 bytes src/wixlib/Redist/BIN_File_46002.dll | Bin 108544 -> 0 bytes src/wixlib/VS11.wxs | 205 ----- src/wixlib/VS14.wxs | 186 ----- src/wixlib/VS2003.wxs | 27 - src/wixlib/VS2005.wxs | 369 --------- src/wixlib/VS2008.wxs | 299 -------- src/wixlib/VS2010.wxs | 312 -------- src/wixlib/VS2012.wxs | 255 ------- src/wixlib/VS2013.wxs | 252 ------- src/wixlib/VS2015.wxs | 186 ----- src/wixlib/VS2017.wxs | 142 ---- src/wixlib/VS2019.wxs | 142 ---- src/wixlib/VSExtension_Platform.wxi | 17 - src/wixlib/VSExtension_x86.wxs | 8 - src/wixlib/VsixPackage.wxs | 60 -- src/wixlib/caSuffix.wxi | 28 - src/wixlib/vs.v3.ncrunchproject | 5 - src/wixlib/vs.wixproj | 19 - .../vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs | 63 -- src/wixlib/vs2005/redist/BIN_File_60377.dll | Bin 45056 -> 0 bytes src/wixlib/vs2005/redist/vsipCCSamples.HxK | 14 - src/wixlib/vs2005/redist/vsipcc.hxc | 33 - src/wixlib/vs2005/redist/vsipcc.hxt | 15 - src/wixlib/vs2005/redist/vsipccALinks.hxk | 13 - src/wixlib/vs2005/redist/vsipccBLinks.hxk | 13 - src/wixlib/vs2005/redist/vsipccFLinks.hxk | 14 - src/wixlib/vs2005/redist/vsipccKLinks.hxk | 13 - src/wixlib/vs2005/redist/vsipccNamedURLs.hxk | 13 - src/wixlib/vs2005/redist/vsipccSlinks.hxk | 14 - src/wixlib/vs2005/redist/vsipcc_reg.hxs | Bin 18400 -> 0 bytes .../vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs | 60 -- src/wixlib/vs2008/redist/BIN_435439_x86_enu.dll | Bin 103944 -> 0 bytes src/wixlib/vs2008/redist/_ALinks.hxk | 10 - src/wixlib/vs2008/redist/_BLinks.hxk | 10 - src/wixlib/vs2008/redist/_CLinks.hxk | 13 - src/wixlib/vs2008/redist/_FLinks.hxk | 10 - src/wixlib/vs2008/redist/_KLinks.hxk | 10 - src/wixlib/vs2008/redist/_SLinks.hxk | 13 - src/wixlib/vs2008/redist/_vsipcc90.hxc | 33 - src/wixlib/vs2008/redist/_vsipcc90.hxt | 15 - src/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk | 13 - src/wixlib/vs2008/redist/_vsipcc_samples.HxK | 14 - src/wixlib/vs2008/redist/vsipcc_reg.hxs | Bin 18488 -> 0 bytes version.json | 11 - 182 files changed, 6071 insertions(+), 6071 deletions(-) delete mode 100644 .editorconfig delete mode 100644 README.md delete mode 100644 VisualStudio.wixext.sln 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/CSharp.Build.props delete mode 100644 src/Cpp.Build.props 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/dllmain.cpp delete mode 100644 src/ca/precomp.h delete mode 100644 src/ca/vsca.cpp delete mode 100644 src/ca/vsca.def delete mode 100644 src/ca/vsca.vcxproj create mode 100644 src/ext/VisualStudio/CSharp.Build.props create mode 100644 src/ext/VisualStudio/Cpp.Build.props create mode 100644 src/ext/VisualStudio/Directory.Build.props create mode 100644 src/ext/VisualStudio/Directory.Build.targets create mode 100644 src/ext/VisualStudio/Directory.csproj.props create mode 100644 src/ext/VisualStudio/Directory.csproj.targets create mode 100644 src/ext/VisualStudio/Directory.vcxproj.props create mode 100644 src/ext/VisualStudio/README.md create mode 100644 src/ext/VisualStudio/VisualStudio.wixext.sln create mode 100644 src/ext/VisualStudio/appveyor.cmd create mode 100644 src/ext/VisualStudio/appveyor.yml create mode 100644 src/ext/VisualStudio/ca/dllmain.cpp create mode 100644 src/ext/VisualStudio/ca/precomp.h create mode 100644 src/ext/VisualStudio/ca/vsca.cpp create mode 100644 src/ext/VisualStudio/ca/vsca.def create mode 100644 src/ext/VisualStudio/ca/vsca.vcxproj create mode 100644 src/ext/VisualStudio/nuget.config create mode 100644 src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl create mode 100644 src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs create mode 100644 src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs create mode 100644 src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt create mode 100644 src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs create mode 100644 src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj create mode 100644 src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject create mode 100644 src/ext/VisualStudio/wix.snk create mode 100644 src/ext/VisualStudio/wixext/Symbols/HelpFileSymbol.cs create mode 100644 src/ext/VisualStudio/wixext/Symbols/HelpFileToNamespaceSymbol.cs create mode 100644 src/ext/VisualStudio/wixext/Symbols/HelpFilterSymbol.cs create mode 100644 src/ext/VisualStudio/wixext/Symbols/HelpFilterToNamespaceSymbol.cs create mode 100644 src/ext/VisualStudio/wixext/Symbols/HelpNamespaceSymbol.cs create mode 100644 src/ext/VisualStudio/wixext/Symbols/HelpPluginSymbol.cs create mode 100644 src/ext/VisualStudio/wixext/Symbols/VSSymbolDefinitions.cs create mode 100644 src/ext/VisualStudio/wixext/VSCompiler.cs create mode 100644 src/ext/VisualStudio/wixext/VSDecompiler.cs create mode 100644 src/ext/VisualStudio/wixext/VSExtensionData.cs create mode 100644 src/ext/VisualStudio/wixext/VSExtensionFactory.cs create mode 100644 src/ext/VisualStudio/wixext/VSTableDefinitions.cs create mode 100644 src/ext/VisualStudio/wixext/VSWindowsInstallerBackendBinderExtension.cs create mode 100644 src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.csproj create mode 100644 src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.nuspec create mode 100644 src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.targets create mode 100644 src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject create mode 100644 src/ext/VisualStudio/wixlib/HTML_Help_Registration__RTL_X86.wxs create mode 100644 src/ext/VisualStudio/wixlib/Redist/BIN_File_107602.dll create mode 100644 src/ext/VisualStudio/wixlib/Redist/BIN_File_46001.dll create mode 100644 src/ext/VisualStudio/wixlib/Redist/BIN_File_46002.dll create mode 100644 src/ext/VisualStudio/wixlib/VS11.wxs create mode 100644 src/ext/VisualStudio/wixlib/VS14.wxs create mode 100644 src/ext/VisualStudio/wixlib/VS2003.wxs create mode 100644 src/ext/VisualStudio/wixlib/VS2005.wxs create mode 100644 src/ext/VisualStudio/wixlib/VS2008.wxs create mode 100644 src/ext/VisualStudio/wixlib/VS2010.wxs create mode 100644 src/ext/VisualStudio/wixlib/VS2012.wxs create mode 100644 src/ext/VisualStudio/wixlib/VS2013.wxs create mode 100644 src/ext/VisualStudio/wixlib/VS2015.wxs create mode 100644 src/ext/VisualStudio/wixlib/VS2017.wxs create mode 100644 src/ext/VisualStudio/wixlib/VS2019.wxs create mode 100644 src/ext/VisualStudio/wixlib/VSExtension_Platform.wxi create mode 100644 src/ext/VisualStudio/wixlib/VSExtension_x86.wxs create mode 100644 src/ext/VisualStudio/wixlib/VsixPackage.wxs create mode 100644 src/ext/VisualStudio/wixlib/caSuffix.wxi create mode 100644 src/ext/VisualStudio/wixlib/vs.v3.ncrunchproject create mode 100644 src/ext/VisualStudio/wixlib/vs.wixproj create mode 100644 src/ext/VisualStudio/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/BIN_File_60377.dll create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/vsipCCSamples.HxK create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc.hxc create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc.hxt create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/vsipccALinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/vsipccBLinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/vsipccFLinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/vsipccKLinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/vsipccNamedURLs.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/vsipccSlinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc_reg.hxs create mode 100644 src/ext/VisualStudio/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/BIN_435439_x86_enu.dll create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/_ALinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/_BLinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/_CLinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/_FLinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/_KLinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/_SLinks.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc90.hxc create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc90.hxt create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc_samples.HxK create mode 100644 src/ext/VisualStudio/wixlib/vs2008/redist/vsipcc_reg.hxs create mode 100644 src/ext/global.json delete mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl delete mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs delete mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs delete mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt delete mode 100644 src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs delete mode 100644 src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj delete mode 100644 src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject create mode 100644 src/version.json delete mode 100644 src/wix.snk delete mode 100644 src/wixext/Symbols/HelpFileSymbol.cs delete mode 100644 src/wixext/Symbols/HelpFileToNamespaceSymbol.cs delete mode 100644 src/wixext/Symbols/HelpFilterSymbol.cs delete mode 100644 src/wixext/Symbols/HelpFilterToNamespaceSymbol.cs delete mode 100644 src/wixext/Symbols/HelpNamespaceSymbol.cs delete mode 100644 src/wixext/Symbols/HelpPluginSymbol.cs delete mode 100644 src/wixext/Symbols/VSSymbolDefinitions.cs delete mode 100644 src/wixext/VSCompiler.cs delete mode 100644 src/wixext/VSDecompiler.cs delete mode 100644 src/wixext/VSExtensionData.cs delete mode 100644 src/wixext/VSExtensionFactory.cs delete mode 100644 src/wixext/VSTableDefinitions.cs delete mode 100644 src/wixext/VSWindowsInstallerBackendBinderExtension.cs delete mode 100644 src/wixext/WixToolset.VisualStudio.wixext.csproj delete mode 100644 src/wixext/WixToolset.VisualStudio.wixext.nuspec delete mode 100644 src/wixext/WixToolset.VisualStudio.wixext.targets delete mode 100644 src/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject delete mode 100644 src/wixlib/HTML_Help_Registration__RTL_X86.wxs delete mode 100644 src/wixlib/Redist/BIN_File_107602.dll delete mode 100644 src/wixlib/Redist/BIN_File_46001.dll delete mode 100644 src/wixlib/Redist/BIN_File_46002.dll delete mode 100644 src/wixlib/VS11.wxs delete mode 100644 src/wixlib/VS14.wxs delete mode 100644 src/wixlib/VS2003.wxs delete mode 100644 src/wixlib/VS2005.wxs delete mode 100644 src/wixlib/VS2008.wxs delete mode 100644 src/wixlib/VS2010.wxs delete mode 100644 src/wixlib/VS2012.wxs delete mode 100644 src/wixlib/VS2013.wxs delete mode 100644 src/wixlib/VS2015.wxs delete mode 100644 src/wixlib/VS2017.wxs delete mode 100644 src/wixlib/VS2019.wxs delete mode 100644 src/wixlib/VSExtension_Platform.wxi delete mode 100644 src/wixlib/VSExtension_x86.wxs delete mode 100644 src/wixlib/VsixPackage.wxs delete mode 100644 src/wixlib/caSuffix.wxi delete mode 100644 src/wixlib/vs.v3.ncrunchproject delete mode 100644 src/wixlib/vs.wixproj delete mode 100644 src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs delete mode 100644 src/wixlib/vs2005/redist/BIN_File_60377.dll delete mode 100644 src/wixlib/vs2005/redist/vsipCCSamples.HxK delete mode 100644 src/wixlib/vs2005/redist/vsipcc.hxc delete mode 100644 src/wixlib/vs2005/redist/vsipcc.hxt delete mode 100644 src/wixlib/vs2005/redist/vsipccALinks.hxk delete mode 100644 src/wixlib/vs2005/redist/vsipccBLinks.hxk delete mode 100644 src/wixlib/vs2005/redist/vsipccFLinks.hxk delete mode 100644 src/wixlib/vs2005/redist/vsipccKLinks.hxk delete mode 100644 src/wixlib/vs2005/redist/vsipccNamedURLs.hxk delete mode 100644 src/wixlib/vs2005/redist/vsipccSlinks.hxk delete mode 100644 src/wixlib/vs2005/redist/vsipcc_reg.hxs delete mode 100644 src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs delete mode 100644 src/wixlib/vs2008/redist/BIN_435439_x86_enu.dll delete mode 100644 src/wixlib/vs2008/redist/_ALinks.hxk delete mode 100644 src/wixlib/vs2008/redist/_BLinks.hxk delete mode 100644 src/wixlib/vs2008/redist/_CLinks.hxk delete mode 100644 src/wixlib/vs2008/redist/_FLinks.hxk delete mode 100644 src/wixlib/vs2008/redist/_KLinks.hxk delete mode 100644 src/wixlib/vs2008/redist/_SLinks.hxk delete mode 100644 src/wixlib/vs2008/redist/_vsipcc90.hxc delete mode 100644 src/wixlib/vs2008/redist/_vsipcc90.hxt delete mode 100644 src/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk delete mode 100644 src/wixlib/vs2008/redist/_vsipcc_samples.HxK delete mode 100644 src/wixlib/vs2008/redist/vsipcc_reg.hxs 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/README.md b/README.md deleted file mode 100644 index 76fbd4ce..00000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# VisualStudio.wixext -WixToolset.VisualStudio.wixext - Visual Studio WiX Toolset Extension diff --git a/VisualStudio.wixext.sln b/VisualStudio.wixext.sln deleted file mode 100644 index 9d6a8356..00000000 --- a/VisualStudio.wixext.sln +++ /dev/null @@ -1,73 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30611.23 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vsca", "src\ca\vsca.vcxproj", "{45308B85-0628-4978-8FC8-6AD9E1AD5949}" -EndProject -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "vs", "src\wixlib\vs.wixproj", "{14345C9D-8AF8-435A-BB1B-E067CE7EB321}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.VisualStudio.wixext", "src\wixext\WixToolset.VisualStudio.wixext.csproj", "{61BFD377-9DE1-48B4-8687-560DF68D6F3B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.VisualStudio", "src\test\WixToolsetTest.VisualStudio\WixToolsetTest.VisualStudio.csproj", "{DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}" -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 - {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Debug|Any CPU.Build.0 = Debug|Win32 - {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Debug|x64.ActiveCfg = Debug|Win32 - {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Debug|x86.ActiveCfg = Debug|Win32 - {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Debug|x86.Build.0 = Debug|Win32 - {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Release|Any CPU.ActiveCfg = Release|Win32 - {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Release|x64.ActiveCfg = Release|Win32 - {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Release|x86.ActiveCfg = Release|Win32 - {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Release|x86.Build.0 = Release|Win32 - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|x64.ActiveCfg = Debug|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|x64.Build.0 = Debug|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|x86.ActiveCfg = Debug|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|x86.Build.0 = Debug|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|Any CPU.Build.0 = Release|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|x64.ActiveCfg = Release|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|x64.Build.0 = Release|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|x86.ActiveCfg = Release|Any CPU - {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|x86.Build.0 = Release|Any CPU - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|Any CPU.ActiveCfg = Debug|x86 - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|Any CPU.Build.0 = Debug|x86 - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|x64.ActiveCfg = Debug|x86 - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|x86.ActiveCfg = Debug|x86 - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|x86.Build.0 = Debug|x86 - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|Any CPU.ActiveCfg = Release|x86 - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x64.ActiveCfg = Release|x86 - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x86.ActiveCfg = Release|x86 - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x86.Build.0 = Release|x86 - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x64.ActiveCfg = Debug|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x64.Build.0 = Debug|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x86.ActiveCfg = Debug|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x86.Build.0 = Debug|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|Any CPU.Build.0 = Release|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x64.ActiveCfg = Release|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x64.Build.0 = Release|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x86.ActiveCfg = Release|Any CPU - {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.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 deleted file mode 100644 index 847809c3..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.VisualStudio\WixToolsetTest.VisualStudio.csproj || exit /b - -:: Test -dotnet test -c %_C% --no-build src\test\WixToolsetTest.VisualStudio || exit /b - -:: Pack -msbuild -p:Configuration=%_C% -p:NoBuild=true -t:Pack src\wixext\WixToolset.VisualStudio.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 23dd3fa6..00000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0211" - } -} diff --git a/nuget.config b/nuget.config deleted file mode 100644 index 6fb99260..00000000 --- a/nuget.config +++ /dev/null @@ -1,17 +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/CSharp.Build.props b/src/CSharp.Build.props deleted file mode 100644 index b12f4c6e..00000000 --- a/src/CSharp.Build.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - - true - $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) - - diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props deleted file mode 100644 index 9b7a1bb5..00000000 --- a/src/Cpp.Build.props +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - Win32 - $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ - $(OutputPath)$(Platform)\ - - - - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) - - - - - $(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 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 bcf26c57..00000000 --- a/src/Directory.vcxproj.props +++ /dev/null @@ -1,111 +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')) - - - - - $(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/dllmain.cpp b/src/ca/dllmain.cpp deleted file mode 100644 index 35ae6d1c..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 custom actions - -********************************************************************/ -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/precomp.h b/src/ca/precomp.h deleted file mode 100644 index 3edad7ed..00000000 --- a/src/ca/precomp.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. - - -#include -#include - -#define MAXUINT USHRT_MAX -#include - -#include "wcautil.h" -#include "fileutil.h" -#include "strutil.h" diff --git a/src/ca/vsca.cpp b/src/ca/vsca.cpp deleted file mode 100644 index 54a54a34..00000000 --- a/src/ca/vsca.cpp +++ /dev/null @@ -1,510 +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" - -typedef HRESULT (WINAPI *PFN_PROCESS_INSTANCE)( - __in_opt ISetupInstance* pInstance, - __in DWORD64 qwVersion, - __in BOOL fComplete - ); - -struct VS_INSTANCE -{ - DWORD64 qwMinVersion; - DWORD64 qwMaxVersion; - PFN_PROCESS_INSTANCE pfnProcessInstance; -}; - -struct VS_COMPONENT_PROPERTY -{ - LPCWSTR pwzComponent; - LPCWSTR pwzProperty; -}; - -static HRESULT InstanceInProducts( - __in ISetupInstance* pInstance, - __in DWORD cProducts, - __in LPCWSTR* rgwzProducts - ); - -static HRESULT InstanceIsGreater( - __in_opt ISetupInstance* pPreviousInstance, - __in DWORD64 qwPreviousVersion, - __in ISetupInstance* pCurrentInstance, - __in DWORD64 qwCurrentVersion - ); - -static HRESULT ProcessInstance( - __in ISetupInstance* pInstance, - __in LPCWSTR wzProperty, - __in DWORD cComponents, - __in VS_COMPONENT_PROPERTY* rgComponents - ); - -static HRESULT ProcessVS2017( - __in_opt ISetupInstance* pInstance, - __in DWORD64 qwVersion, - __in BOOL fComplete - ); - -static HRESULT ProcessVS2019( - __in_opt ISetupInstance* pInstance, - __in DWORD64 qwVersion, - __in BOOL fComplete - ); - -static HRESULT SetPropertyForComponent( - __in DWORD cComponents, - __in VS_COMPONENT_PROPERTY* rgComponents, - __in LPCWSTR wzComponent - ); - -static VS_INSTANCE vrgInstances[] = -{ - { FILEMAKEVERSION(15, 0, 0, 0), FILEMAKEVERSION(15, 0xffff, 0xffff, 0xffff), ProcessVS2017 }, - { FILEMAKEVERSION(16, 0, 0, 0), FILEMAKEVERSION(16, 0xffff, 0xffff, 0xffff), ProcessVS2019 }, -}; - -/****************************************************************** - FindInstances - entry point for VS custom action to find instances - -*******************************************************************/ -extern "C" UINT __stdcall FindInstances( - __in MSIHANDLE hInstall - ) -{ - HRESULT hr = S_OK; - UINT er = ERROR_SUCCESS; - BOOL fComInitialized = FALSE; - ISetupConfiguration* pConfiguration = NULL; - ISetupHelper* pHelper = NULL; - IEnumSetupInstances* pEnumInstances = NULL; - ISetupInstance* rgpInstances[1] = {}; - ISetupInstance* pInstance = NULL; - ULONG cInstancesFetched = 0; - BSTR bstrVersion = NULL; - DWORD64 qwVersion = 0; - - hr = WcaInitialize(hInstall, "VSFindInstances"); - ExitOnFailure(hr, "Failed to initialize custom action."); - - hr = ::CoInitialize(NULL); - ExitOnFailure(hr, "Failed to initialize COM."); - - fComInitialized = TRUE; - - hr = ::CoCreateInstance(__uuidof(SetupConfiguration), NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pConfiguration)); - if (REGDB_E_CLASSNOTREG != hr) - { - ExitOnFailure(hr, "Failed to initialize setup configuration class."); - } - else - { - WcaLog(LOGMSG_VERBOSE, "Setup configuration not registered; assuming no instances installed."); - - hr = S_OK; - ExitFunction(); - } - - hr = pConfiguration->QueryInterface(IID_PPV_ARGS(&pHelper)); - if (FAILED(hr)) - { - WcaLog(LOGMSG_VERBOSE, "Setup configuration helpers not implemented; assuming Visual Studio 2017."); - - qwVersion = FILEMAKEVERSION(15, 0, 0, 0); - hr = S_OK; - } - - hr = pConfiguration->EnumInstances(&pEnumInstances); - ExitOnFailure(hr, "Failed to get instance enumerator."); - - do - { - hr = pEnumInstances->Next(1, rgpInstances, &cInstancesFetched); - if (SUCCEEDED(hr) && cInstancesFetched) - { - pInstance = rgpInstances[0]; - if (pInstance) - { - if (pHelper) - { - hr = pInstance->GetInstallationVersion(&bstrVersion); - ExitOnFailure(hr, "Failed to get installation version."); - - hr = pHelper->ParseVersion(bstrVersion, &qwVersion); - ExitOnFailure(hr, "Failed to parse installation version."); - } - - for (DWORD i = 0; i < countof(vrgInstances); ++i) - { - const VS_INSTANCE* pElem = &vrgInstances[i]; - - if (pElem->qwMinVersion <= qwVersion && qwVersion <= pElem->qwMaxVersion) - { - hr = pElem->pfnProcessInstance(pInstance, qwVersion, FALSE); - ExitOnFailure(hr, "Failed to process instance."); - } - } - } - - ReleaseNullBSTR(bstrVersion); - ReleaseNullObject(pInstance); - } - } while (SUCCEEDED(hr) && cInstancesFetched); - - // Complete all registered processing functions. - for (DWORD i = 0; i < countof(vrgInstances); ++i) - { - const VS_INSTANCE* pElem = &vrgInstances[i]; - - hr = pElem->pfnProcessInstance(NULL, 0, TRUE); - ExitOnFailure(hr, "Failed to process latest instance."); - } - -LExit: - ReleaseBSTR(bstrVersion); - ReleaseObject(pInstance); - ReleaseObject(pEnumInstances); - ReleaseObject(pHelper); - ReleaseObject(pConfiguration); - - if (fComInitialized) - { - ::CoUninitialize(); - } - - if (FAILED(hr)) - { - er = ERROR_INSTALL_FAILURE; - } - - return WcaFinalize(er); -} - -static HRESULT InstanceInProducts( - __in ISetupInstance* pInstance, - __in DWORD cProducts, - __in LPCWSTR* rgwzProducts - ) -{ - HRESULT hr = S_OK; - ISetupInstance2* pInstance2 = NULL; - ISetupPackageReference* pProduct = NULL; - BSTR bstrId = NULL; - - hr = pInstance->QueryInterface(IID_PPV_ARGS(&pInstance2)); - if (FAILED(hr)) - { - // Older implementations shipped when only VS SKUs were supported. - WcaLog(LOGMSG_VERBOSE, "Could not query instance for product information; assuming supported product."); - - hr = S_OK; - ExitFunction(); - } - - hr = pInstance2->GetProduct(&pProduct); - ExitOnFailure(hr, "Failed to get product package reference."); - - hr = pProduct->GetId(&bstrId); - ExitOnFailure(hr, "Failed to get product package ID."); - - for (DWORD i = 0; i < cProducts; ++i) - { - const LPCWSTR wzProduct = rgwzProducts[i]; - - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, bstrId, -1, wzProduct, -1)) - { - hr = S_OK; - ExitFunction(); - } - } - - hr = S_FALSE; - -LExit: - ReleaseBSTR(bstrId); - ReleaseObject(pProduct); - ReleaseObject(pInstance2); - - return hr; -} - -static HRESULT InstanceIsGreater( - __in_opt ISetupInstance* pPreviousInstance, - __in DWORD64 qwPreviousVersion, - __in ISetupInstance* pCurrentInstance, - __in DWORD64 qwCurrentVersion - ) -{ - HRESULT hr = S_OK; - FILETIME ftPreviousInstance = {}; - FILETIME ftCurrentInstance = {}; - - if (qwPreviousVersion != qwCurrentVersion) - { - return qwPreviousVersion < qwCurrentVersion ? S_OK : S_FALSE; - } - - hr = pPreviousInstance->GetInstallDate(&ftPreviousInstance); - ExitOnFailure(hr, "Failed to get previous install date."); - - hr = pCurrentInstance->GetInstallDate(&ftCurrentInstance); - ExitOnFailure(hr, "Failed to get current install date."); - - return 0 > ::CompareFileTime(&ftPreviousInstance, &ftCurrentInstance) ? S_OK : S_FALSE; - -LExit: - return hr; -} - -static HRESULT ProcessInstance( - __in ISetupInstance* pInstance, - __in LPCWSTR wzProperty, - __in DWORD cComponents, - __in VS_COMPONENT_PROPERTY* rgComponents - ) -{ - HRESULT hr = S_OK; - ISetupInstance2* pInstance2 = NULL; - BSTR bstrPath = NULL; - LPSAFEARRAY psaPackages = NULL; - LONG lPackageIndex = 0; - LONG clMaxPackages = 0; - ISetupPackageReference** rgpPackages = NULL; - ISetupPackageReference* pPackage = NULL; - BSTR bstrPackageId = NULL; - - hr = pInstance->GetInstallationPath(&bstrPath); - ExitOnFailure(hr, "Failed to get installation path."); - - hr = WcaSetProperty(wzProperty, bstrPath); - ExitOnFailure(hr, "Failed to set installation path property: %ls", wzProperty); - - hr = pInstance->QueryInterface(IID_PPV_ARGS(&pInstance2)); - if (FAILED(hr)) - { - // Older implementation did not expose installed components. - hr = S_OK; - ExitFunction(); - } - - hr = pInstance2->GetPackages(&psaPackages); - ExitOnFailure(hr, "Failed to get packages from instance."); - - hr = ::SafeArrayGetLBound(psaPackages, 1, &lPackageIndex); - ExitOnFailure(hr, "Failed to get lower bound of packages array."); - - hr = ::SafeArrayGetUBound(psaPackages, 1, &clMaxPackages); - ExitOnFailure(hr, "Failed to get upper bound of packages array."); - - // Faster access to single dimension SAFEARRAY elements. - hr = ::SafeArrayAccessData(psaPackages, reinterpret_cast(&rgpPackages)); - ExitOnFailure(hr, "Failed to access packages array.") - - for (; lPackageIndex <= clMaxPackages; ++lPackageIndex) - { - pPackage = rgpPackages[lPackageIndex]; - - if (pPackage) - { - hr = pPackage->GetId(&bstrPackageId); - ExitOnFailure(hr, "Failed to get package ID."); - - hr = SetPropertyForComponent(cComponents, rgComponents, bstrPackageId); - ExitOnFailure(hr, "Failed to set property for component: %ls", bstrPackageId); - - ReleaseNullBSTR(bstrPackageId); - } - } - -LExit: - ReleaseBSTR(bstrPackageId); - - if (rgpPackages) - { - ::SafeArrayUnaccessData(psaPackages); - } - - if (psaPackages) - { - // This will Release() all objects in the array. - ::SafeArrayDestroy(psaPackages); - } - - ReleaseObject(pInstance2); - ReleaseBSTR(bstrPath); - - return hr; -} - -static HRESULT ProcessVS2017( - __in_opt ISetupInstance* pInstance, - __in DWORD64 qwVersion, - __in BOOL fComplete - ) -{ - static ISetupInstance* pLatest = NULL; - static DWORD64 qwLatest = 0; - - static LPCWSTR rgwzProducts[] = - { - L"Microsoft.VisualStudio.Product.Community", - L"Microsoft.VisualStudio.Product.Professional", - L"Microsoft.VisualStudio.Product.Enterprise", - }; - - // TODO: Consider making table-driven with these defaults per-version for easy customization. - static VS_COMPONENT_PROPERTY rgComponents[] = - { - { L"Microsoft.VisualStudio.Component.FSharp", L"VS2017_IDE_FSHARP_PROJECTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.Component.Roslyn.LanguageServices", L"VS2017_IDE_VB_PROJECTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.Component.Roslyn.LanguageServices", L"VS2017_IDE_VCSHARP_PROJECTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.Component.TestTools.Core", L"VS2017_IDE_VSTS_TESTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.Component.VC.CoreIde", L"VS2017_IDE_VC_PROJECTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.Component.Web", L"VS2017_IDE_VWD_PROJECTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.PackageGroup.DslRuntime", L"VS2017_IDE_MODELING_PROJECTSYSTEM_INSTALLED" }, - }; - - HRESULT hr = S_OK; - - if (fComplete) - { - if (pLatest) - { - hr = ProcessInstance(pLatest, L"VS2017_ROOT_FOLDER", countof(rgComponents), rgComponents); - ExitOnFailure(hr, "Failed to process VS2017 instance."); - } - } - else if (pInstance) - { - hr = InstanceInProducts(pInstance, countof(rgwzProducts), rgwzProducts); - ExitOnFailure(hr, "Failed to compare product IDs."); - - if (S_FALSE == hr) - { - ExitFunction(); - } - - hr = InstanceIsGreater(pLatest, qwLatest, pInstance, qwVersion); - ExitOnFailure(hr, "Failed to compare instances."); - - if (S_FALSE == hr) - { - ExitFunction(); - } - - ReleaseNullObject(pLatest); - - pLatest = pInstance; - qwLatest = qwVersion; - - // Caller will do a final Release() otherwise. - pLatest->AddRef(); - } - -LExit: - if (fComplete) - { - ReleaseObject(pLatest); - } - - return hr; -} - -static HRESULT ProcessVS2019( - __in_opt ISetupInstance* pInstance, - __in DWORD64 qwVersion, - __in BOOL fComplete - ) -{ - static ISetupInstance* pLatest = NULL; - static DWORD64 qwLatest = 0; - - static LPCWSTR rgwzProducts[] = - { - L"Microsoft.VisualStudio.Product.Community", - L"Microsoft.VisualStudio.Product.Professional", - L"Microsoft.VisualStudio.Product.Enterprise", - }; - - // TODO: Consider making table-driven with these defaults per-version for easy customization. - static VS_COMPONENT_PROPERTY rgComponents[] = - { - { L"Microsoft.VisualStudio.Component.FSharp", L"VS2019_IDE_FSHARP_PROJECTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.Component.Roslyn.LanguageServices", L"VS2019_IDE_VB_PROJECTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.Component.Roslyn.LanguageServices", L"VS2019_IDE_VCSHARP_PROJECTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.PackageGroup.TestTools.Core", L"VS2019_IDE_VSTS_TESTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.Component.VC.CoreIde", L"VS2019_IDE_VC_PROJECTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.Component.Web", L"VS2019_IDE_VWD_PROJECTSYSTEM_INSTALLED" }, - { L"Microsoft.VisualStudio.PackageGroup.DslRuntime", L"VS2019_IDE_MODELING_PROJECTSYSTEM_INSTALLED" }, - }; - - HRESULT hr = S_OK; - - if (fComplete) - { - if (pLatest) - { - hr = ProcessInstance(pLatest, L"VS2019_ROOT_FOLDER", countof(rgComponents), rgComponents); - ExitOnFailure(hr, "Failed to process VS2019 instance."); - } - } - else if (pInstance) - { - hr = InstanceInProducts(pInstance, countof(rgwzProducts), rgwzProducts); - ExitOnFailure(hr, "Failed to compare product IDs."); - - if (S_FALSE == hr) - { - ExitFunction(); - } - - hr = InstanceIsGreater(pLatest, qwLatest, pInstance, qwVersion); - ExitOnFailure(hr, "Failed to compare instances."); - - if (S_FALSE == hr) - { - ExitFunction(); - } - - ReleaseNullObject(pLatest); - - pLatest = pInstance; - qwLatest = qwVersion; - - // Caller will do a final Release() otherwise. - pLatest->AddRef(); - } - -LExit: - if (fComplete) - { - ReleaseObject(pLatest); - } - - return hr; -} - -static HRESULT SetPropertyForComponent( - __in DWORD cComponents, - __in VS_COMPONENT_PROPERTY* rgComponents, - __in LPCWSTR wzComponent - ) -{ - HRESULT hr = S_OK; - - // For small arrays, faster looping through than hashing. There may also be duplicates like with VS2017. - for (DWORD i = 0; i < cComponents; ++i) - { - const VS_COMPONENT_PROPERTY* pComponent = &rgComponents[i]; - - if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pComponent->pwzComponent, -1, wzComponent, -1)) - { - hr = WcaSetIntProperty(pComponent->pwzProperty, 1); - ExitOnFailure(hr, "Failed to set property: %ls", pComponent->pwzProperty); - } - } - -LExit: - return hr; -} diff --git a/src/ca/vsca.def b/src/ca/vsca.def deleted file mode 100644 index fd2db98e..00000000 --- a/src/ca/vsca.def +++ /dev/null @@ -1,7 +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 "vsca" - -EXPORTS - FindInstances diff --git a/src/ca/vsca.vcxproj b/src/ca/vsca.vcxproj deleted file mode 100644 index f4fbcc46..00000000 --- a/src/ca/vsca.vcxproj +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - Debug - Win32 - - - Release - Win32 - - - - - {45308B85-0628-4978-8FC8-6AD9E1AD5949} - DynamicLibrary - vsca - v142 - Unicode - vsca.def - WiX Toolset VS CustomAction - 10.0 - - - - - - - msi.lib - - - - - Create - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ext/VisualStudio/CSharp.Build.props b/src/ext/VisualStudio/CSharp.Build.props new file mode 100644 index 00000000..b12f4c6e --- /dev/null +++ b/src/ext/VisualStudio/CSharp.Build.props @@ -0,0 +1,11 @@ + + + + + true + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + + diff --git a/src/ext/VisualStudio/Cpp.Build.props b/src/ext/VisualStudio/Cpp.Build.props new file mode 100644 index 00000000..9b7a1bb5 --- /dev/null +++ b/src/ext/VisualStudio/Cpp.Build.props @@ -0,0 +1,86 @@ + + + + + + Win32 + $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ + $(OutputPath)$(Platform)\ + + + + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + + + + + $(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/ext/VisualStudio/Directory.Build.props b/src/ext/VisualStudio/Directory.Build.props new file mode 100644 index 00000000..b3c6287c --- /dev/null +++ b/src/ext/VisualStudio/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/VisualStudio/Directory.Build.targets b/src/ext/VisualStudio/Directory.Build.targets new file mode 100644 index 00000000..2fcc765a --- /dev/null +++ b/src/ext/VisualStudio/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/VisualStudio/Directory.csproj.props b/src/ext/VisualStudio/Directory.csproj.props new file mode 100644 index 00000000..81d24ad1 --- /dev/null +++ b/src/ext/VisualStudio/Directory.csproj.props @@ -0,0 +1,13 @@ + + + + + true + true + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + false + + diff --git a/src/ext/VisualStudio/Directory.csproj.targets b/src/ext/VisualStudio/Directory.csproj.targets new file mode 100644 index 00000000..c3270426 --- /dev/null +++ b/src/ext/VisualStudio/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/VisualStudio/Directory.vcxproj.props b/src/ext/VisualStudio/Directory.vcxproj.props new file mode 100644 index 00000000..bcf26c57 --- /dev/null +++ b/src/ext/VisualStudio/Directory.vcxproj.props @@ -0,0 +1,111 @@ + + + + + + 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')) + + + + + $(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/VisualStudio/README.md b/src/ext/VisualStudio/README.md new file mode 100644 index 00000000..76fbd4ce --- /dev/null +++ b/src/ext/VisualStudio/README.md @@ -0,0 +1,2 @@ +# VisualStudio.wixext +WixToolset.VisualStudio.wixext - Visual Studio WiX Toolset Extension diff --git a/src/ext/VisualStudio/VisualStudio.wixext.sln b/src/ext/VisualStudio/VisualStudio.wixext.sln new file mode 100644 index 00000000..9d6a8356 --- /dev/null +++ b/src/ext/VisualStudio/VisualStudio.wixext.sln @@ -0,0 +1,73 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30611.23 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vsca", "src\ca\vsca.vcxproj", "{45308B85-0628-4978-8FC8-6AD9E1AD5949}" +EndProject +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "vs", "src\wixlib\vs.wixproj", "{14345C9D-8AF8-435A-BB1B-E067CE7EB321}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.VisualStudio.wixext", "src\wixext\WixToolset.VisualStudio.wixext.csproj", "{61BFD377-9DE1-48B4-8687-560DF68D6F3B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.VisualStudio", "src\test\WixToolsetTest.VisualStudio\WixToolsetTest.VisualStudio.csproj", "{DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}" +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 + {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Debug|Any CPU.Build.0 = Debug|Win32 + {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Debug|x64.ActiveCfg = Debug|Win32 + {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Debug|x86.ActiveCfg = Debug|Win32 + {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Debug|x86.Build.0 = Debug|Win32 + {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Release|Any CPU.ActiveCfg = Release|Win32 + {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Release|x64.ActiveCfg = Release|Win32 + {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Release|x86.ActiveCfg = Release|Win32 + {45308B85-0628-4978-8FC8-6AD9E1AD5949}.Release|x86.Build.0 = Release|Win32 + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|x64.ActiveCfg = Debug|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|x64.Build.0 = Debug|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|x86.ActiveCfg = Debug|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Debug|x86.Build.0 = Debug|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|Any CPU.Build.0 = Release|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|x64.ActiveCfg = Release|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|x64.Build.0 = Release|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|x86.ActiveCfg = Release|Any CPU + {61BFD377-9DE1-48B4-8687-560DF68D6F3B}.Release|x86.Build.0 = Release|Any CPU + {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|Any CPU.ActiveCfg = Debug|x86 + {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|Any CPU.Build.0 = Debug|x86 + {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|x64.ActiveCfg = Debug|x86 + {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|x86.ActiveCfg = Debug|x86 + {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|x86.Build.0 = Debug|x86 + {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|Any CPU.ActiveCfg = Release|x86 + {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x64.ActiveCfg = Release|x86 + {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x86.ActiveCfg = Release|x86 + {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x86.Build.0 = Release|x86 + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x64.ActiveCfg = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x64.Build.0 = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x86.ActiveCfg = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Debug|x86.Build.0 = Debug|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|Any CPU.Build.0 = Release|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x64.ActiveCfg = Release|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x64.Build.0 = Release|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.Release|x86.ActiveCfg = Release|Any CPU + {DD2BD0F7-1E4A-4D11-954C-3505323C4E1B}.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/VisualStudio/appveyor.cmd b/src/ext/VisualStudio/appveyor.cmd new file mode 100644 index 00000000..847809c3 --- /dev/null +++ b/src/ext/VisualStudio/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.VisualStudio\WixToolsetTest.VisualStudio.csproj || exit /b + +:: Test +dotnet test -c %_C% --no-build src\test\WixToolsetTest.VisualStudio || exit /b + +:: Pack +msbuild -p:Configuration=%_C% -p:NoBuild=true -t:Pack src\wixext\WixToolset.VisualStudio.wixext.csproj || exit /b + +@popd +@endlocal diff --git a/src/ext/VisualStudio/appveyor.yml b/src/ext/VisualStudio/appveyor.yml new file mode 100644 index 00000000..c53cc9cc --- /dev/null +++ b/src/ext/VisualStudio/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/VisualStudio/ca/dllmain.cpp b/src/ext/VisualStudio/ca/dllmain.cpp new file mode 100644 index 00000000..35ae6d1c --- /dev/null +++ b/src/ext/VisualStudio/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 custom actions + +********************************************************************/ +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/VisualStudio/ca/precomp.h b/src/ext/VisualStudio/ca/precomp.h new file mode 100644 index 00000000..3edad7ed --- /dev/null +++ b/src/ext/VisualStudio/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 + +#define MAXUINT USHRT_MAX +#include + +#include "wcautil.h" +#include "fileutil.h" +#include "strutil.h" diff --git a/src/ext/VisualStudio/ca/vsca.cpp b/src/ext/VisualStudio/ca/vsca.cpp new file mode 100644 index 00000000..54a54a34 --- /dev/null +++ b/src/ext/VisualStudio/ca/vsca.cpp @@ -0,0 +1,510 @@ +// 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" + +typedef HRESULT (WINAPI *PFN_PROCESS_INSTANCE)( + __in_opt ISetupInstance* pInstance, + __in DWORD64 qwVersion, + __in BOOL fComplete + ); + +struct VS_INSTANCE +{ + DWORD64 qwMinVersion; + DWORD64 qwMaxVersion; + PFN_PROCESS_INSTANCE pfnProcessInstance; +}; + +struct VS_COMPONENT_PROPERTY +{ + LPCWSTR pwzComponent; + LPCWSTR pwzProperty; +}; + +static HRESULT InstanceInProducts( + __in ISetupInstance* pInstance, + __in DWORD cProducts, + __in LPCWSTR* rgwzProducts + ); + +static HRESULT InstanceIsGreater( + __in_opt ISetupInstance* pPreviousInstance, + __in DWORD64 qwPreviousVersion, + __in ISetupInstance* pCurrentInstance, + __in DWORD64 qwCurrentVersion + ); + +static HRESULT ProcessInstance( + __in ISetupInstance* pInstance, + __in LPCWSTR wzProperty, + __in DWORD cComponents, + __in VS_COMPONENT_PROPERTY* rgComponents + ); + +static HRESULT ProcessVS2017( + __in_opt ISetupInstance* pInstance, + __in DWORD64 qwVersion, + __in BOOL fComplete + ); + +static HRESULT ProcessVS2019( + __in_opt ISetupInstance* pInstance, + __in DWORD64 qwVersion, + __in BOOL fComplete + ); + +static HRESULT SetPropertyForComponent( + __in DWORD cComponents, + __in VS_COMPONENT_PROPERTY* rgComponents, + __in LPCWSTR wzComponent + ); + +static VS_INSTANCE vrgInstances[] = +{ + { FILEMAKEVERSION(15, 0, 0, 0), FILEMAKEVERSION(15, 0xffff, 0xffff, 0xffff), ProcessVS2017 }, + { FILEMAKEVERSION(16, 0, 0, 0), FILEMAKEVERSION(16, 0xffff, 0xffff, 0xffff), ProcessVS2019 }, +}; + +/****************************************************************** + FindInstances - entry point for VS custom action to find instances + +*******************************************************************/ +extern "C" UINT __stdcall FindInstances( + __in MSIHANDLE hInstall + ) +{ + HRESULT hr = S_OK; + UINT er = ERROR_SUCCESS; + BOOL fComInitialized = FALSE; + ISetupConfiguration* pConfiguration = NULL; + ISetupHelper* pHelper = NULL; + IEnumSetupInstances* pEnumInstances = NULL; + ISetupInstance* rgpInstances[1] = {}; + ISetupInstance* pInstance = NULL; + ULONG cInstancesFetched = 0; + BSTR bstrVersion = NULL; + DWORD64 qwVersion = 0; + + hr = WcaInitialize(hInstall, "VSFindInstances"); + ExitOnFailure(hr, "Failed to initialize custom action."); + + hr = ::CoInitialize(NULL); + ExitOnFailure(hr, "Failed to initialize COM."); + + fComInitialized = TRUE; + + hr = ::CoCreateInstance(__uuidof(SetupConfiguration), NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pConfiguration)); + if (REGDB_E_CLASSNOTREG != hr) + { + ExitOnFailure(hr, "Failed to initialize setup configuration class."); + } + else + { + WcaLog(LOGMSG_VERBOSE, "Setup configuration not registered; assuming no instances installed."); + + hr = S_OK; + ExitFunction(); + } + + hr = pConfiguration->QueryInterface(IID_PPV_ARGS(&pHelper)); + if (FAILED(hr)) + { + WcaLog(LOGMSG_VERBOSE, "Setup configuration helpers not implemented; assuming Visual Studio 2017."); + + qwVersion = FILEMAKEVERSION(15, 0, 0, 0); + hr = S_OK; + } + + hr = pConfiguration->EnumInstances(&pEnumInstances); + ExitOnFailure(hr, "Failed to get instance enumerator."); + + do + { + hr = pEnumInstances->Next(1, rgpInstances, &cInstancesFetched); + if (SUCCEEDED(hr) && cInstancesFetched) + { + pInstance = rgpInstances[0]; + if (pInstance) + { + if (pHelper) + { + hr = pInstance->GetInstallationVersion(&bstrVersion); + ExitOnFailure(hr, "Failed to get installation version."); + + hr = pHelper->ParseVersion(bstrVersion, &qwVersion); + ExitOnFailure(hr, "Failed to parse installation version."); + } + + for (DWORD i = 0; i < countof(vrgInstances); ++i) + { + const VS_INSTANCE* pElem = &vrgInstances[i]; + + if (pElem->qwMinVersion <= qwVersion && qwVersion <= pElem->qwMaxVersion) + { + hr = pElem->pfnProcessInstance(pInstance, qwVersion, FALSE); + ExitOnFailure(hr, "Failed to process instance."); + } + } + } + + ReleaseNullBSTR(bstrVersion); + ReleaseNullObject(pInstance); + } + } while (SUCCEEDED(hr) && cInstancesFetched); + + // Complete all registered processing functions. + for (DWORD i = 0; i < countof(vrgInstances); ++i) + { + const VS_INSTANCE* pElem = &vrgInstances[i]; + + hr = pElem->pfnProcessInstance(NULL, 0, TRUE); + ExitOnFailure(hr, "Failed to process latest instance."); + } + +LExit: + ReleaseBSTR(bstrVersion); + ReleaseObject(pInstance); + ReleaseObject(pEnumInstances); + ReleaseObject(pHelper); + ReleaseObject(pConfiguration); + + if (fComInitialized) + { + ::CoUninitialize(); + } + + if (FAILED(hr)) + { + er = ERROR_INSTALL_FAILURE; + } + + return WcaFinalize(er); +} + +static HRESULT InstanceInProducts( + __in ISetupInstance* pInstance, + __in DWORD cProducts, + __in LPCWSTR* rgwzProducts + ) +{ + HRESULT hr = S_OK; + ISetupInstance2* pInstance2 = NULL; + ISetupPackageReference* pProduct = NULL; + BSTR bstrId = NULL; + + hr = pInstance->QueryInterface(IID_PPV_ARGS(&pInstance2)); + if (FAILED(hr)) + { + // Older implementations shipped when only VS SKUs were supported. + WcaLog(LOGMSG_VERBOSE, "Could not query instance for product information; assuming supported product."); + + hr = S_OK; + ExitFunction(); + } + + hr = pInstance2->GetProduct(&pProduct); + ExitOnFailure(hr, "Failed to get product package reference."); + + hr = pProduct->GetId(&bstrId); + ExitOnFailure(hr, "Failed to get product package ID."); + + for (DWORD i = 0; i < cProducts; ++i) + { + const LPCWSTR wzProduct = rgwzProducts[i]; + + if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, bstrId, -1, wzProduct, -1)) + { + hr = S_OK; + ExitFunction(); + } + } + + hr = S_FALSE; + +LExit: + ReleaseBSTR(bstrId); + ReleaseObject(pProduct); + ReleaseObject(pInstance2); + + return hr; +} + +static HRESULT InstanceIsGreater( + __in_opt ISetupInstance* pPreviousInstance, + __in DWORD64 qwPreviousVersion, + __in ISetupInstance* pCurrentInstance, + __in DWORD64 qwCurrentVersion + ) +{ + HRESULT hr = S_OK; + FILETIME ftPreviousInstance = {}; + FILETIME ftCurrentInstance = {}; + + if (qwPreviousVersion != qwCurrentVersion) + { + return qwPreviousVersion < qwCurrentVersion ? S_OK : S_FALSE; + } + + hr = pPreviousInstance->GetInstallDate(&ftPreviousInstance); + ExitOnFailure(hr, "Failed to get previous install date."); + + hr = pCurrentInstance->GetInstallDate(&ftCurrentInstance); + ExitOnFailure(hr, "Failed to get current install date."); + + return 0 > ::CompareFileTime(&ftPreviousInstance, &ftCurrentInstance) ? S_OK : S_FALSE; + +LExit: + return hr; +} + +static HRESULT ProcessInstance( + __in ISetupInstance* pInstance, + __in LPCWSTR wzProperty, + __in DWORD cComponents, + __in VS_COMPONENT_PROPERTY* rgComponents + ) +{ + HRESULT hr = S_OK; + ISetupInstance2* pInstance2 = NULL; + BSTR bstrPath = NULL; + LPSAFEARRAY psaPackages = NULL; + LONG lPackageIndex = 0; + LONG clMaxPackages = 0; + ISetupPackageReference** rgpPackages = NULL; + ISetupPackageReference* pPackage = NULL; + BSTR bstrPackageId = NULL; + + hr = pInstance->GetInstallationPath(&bstrPath); + ExitOnFailure(hr, "Failed to get installation path."); + + hr = WcaSetProperty(wzProperty, bstrPath); + ExitOnFailure(hr, "Failed to set installation path property: %ls", wzProperty); + + hr = pInstance->QueryInterface(IID_PPV_ARGS(&pInstance2)); + if (FAILED(hr)) + { + // Older implementation did not expose installed components. + hr = S_OK; + ExitFunction(); + } + + hr = pInstance2->GetPackages(&psaPackages); + ExitOnFailure(hr, "Failed to get packages from instance."); + + hr = ::SafeArrayGetLBound(psaPackages, 1, &lPackageIndex); + ExitOnFailure(hr, "Failed to get lower bound of packages array."); + + hr = ::SafeArrayGetUBound(psaPackages, 1, &clMaxPackages); + ExitOnFailure(hr, "Failed to get upper bound of packages array."); + + // Faster access to single dimension SAFEARRAY elements. + hr = ::SafeArrayAccessData(psaPackages, reinterpret_cast(&rgpPackages)); + ExitOnFailure(hr, "Failed to access packages array.") + + for (; lPackageIndex <= clMaxPackages; ++lPackageIndex) + { + pPackage = rgpPackages[lPackageIndex]; + + if (pPackage) + { + hr = pPackage->GetId(&bstrPackageId); + ExitOnFailure(hr, "Failed to get package ID."); + + hr = SetPropertyForComponent(cComponents, rgComponents, bstrPackageId); + ExitOnFailure(hr, "Failed to set property for component: %ls", bstrPackageId); + + ReleaseNullBSTR(bstrPackageId); + } + } + +LExit: + ReleaseBSTR(bstrPackageId); + + if (rgpPackages) + { + ::SafeArrayUnaccessData(psaPackages); + } + + if (psaPackages) + { + // This will Release() all objects in the array. + ::SafeArrayDestroy(psaPackages); + } + + ReleaseObject(pInstance2); + ReleaseBSTR(bstrPath); + + return hr; +} + +static HRESULT ProcessVS2017( + __in_opt ISetupInstance* pInstance, + __in DWORD64 qwVersion, + __in BOOL fComplete + ) +{ + static ISetupInstance* pLatest = NULL; + static DWORD64 qwLatest = 0; + + static LPCWSTR rgwzProducts[] = + { + L"Microsoft.VisualStudio.Product.Community", + L"Microsoft.VisualStudio.Product.Professional", + L"Microsoft.VisualStudio.Product.Enterprise", + }; + + // TODO: Consider making table-driven with these defaults per-version for easy customization. + static VS_COMPONENT_PROPERTY rgComponents[] = + { + { L"Microsoft.VisualStudio.Component.FSharp", L"VS2017_IDE_FSHARP_PROJECTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.Component.Roslyn.LanguageServices", L"VS2017_IDE_VB_PROJECTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.Component.Roslyn.LanguageServices", L"VS2017_IDE_VCSHARP_PROJECTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.Component.TestTools.Core", L"VS2017_IDE_VSTS_TESTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.Component.VC.CoreIde", L"VS2017_IDE_VC_PROJECTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.Component.Web", L"VS2017_IDE_VWD_PROJECTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.PackageGroup.DslRuntime", L"VS2017_IDE_MODELING_PROJECTSYSTEM_INSTALLED" }, + }; + + HRESULT hr = S_OK; + + if (fComplete) + { + if (pLatest) + { + hr = ProcessInstance(pLatest, L"VS2017_ROOT_FOLDER", countof(rgComponents), rgComponents); + ExitOnFailure(hr, "Failed to process VS2017 instance."); + } + } + else if (pInstance) + { + hr = InstanceInProducts(pInstance, countof(rgwzProducts), rgwzProducts); + ExitOnFailure(hr, "Failed to compare product IDs."); + + if (S_FALSE == hr) + { + ExitFunction(); + } + + hr = InstanceIsGreater(pLatest, qwLatest, pInstance, qwVersion); + ExitOnFailure(hr, "Failed to compare instances."); + + if (S_FALSE == hr) + { + ExitFunction(); + } + + ReleaseNullObject(pLatest); + + pLatest = pInstance; + qwLatest = qwVersion; + + // Caller will do a final Release() otherwise. + pLatest->AddRef(); + } + +LExit: + if (fComplete) + { + ReleaseObject(pLatest); + } + + return hr; +} + +static HRESULT ProcessVS2019( + __in_opt ISetupInstance* pInstance, + __in DWORD64 qwVersion, + __in BOOL fComplete + ) +{ + static ISetupInstance* pLatest = NULL; + static DWORD64 qwLatest = 0; + + static LPCWSTR rgwzProducts[] = + { + L"Microsoft.VisualStudio.Product.Community", + L"Microsoft.VisualStudio.Product.Professional", + L"Microsoft.VisualStudio.Product.Enterprise", + }; + + // TODO: Consider making table-driven with these defaults per-version for easy customization. + static VS_COMPONENT_PROPERTY rgComponents[] = + { + { L"Microsoft.VisualStudio.Component.FSharp", L"VS2019_IDE_FSHARP_PROJECTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.Component.Roslyn.LanguageServices", L"VS2019_IDE_VB_PROJECTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.Component.Roslyn.LanguageServices", L"VS2019_IDE_VCSHARP_PROJECTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.PackageGroup.TestTools.Core", L"VS2019_IDE_VSTS_TESTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.Component.VC.CoreIde", L"VS2019_IDE_VC_PROJECTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.Component.Web", L"VS2019_IDE_VWD_PROJECTSYSTEM_INSTALLED" }, + { L"Microsoft.VisualStudio.PackageGroup.DslRuntime", L"VS2019_IDE_MODELING_PROJECTSYSTEM_INSTALLED" }, + }; + + HRESULT hr = S_OK; + + if (fComplete) + { + if (pLatest) + { + hr = ProcessInstance(pLatest, L"VS2019_ROOT_FOLDER", countof(rgComponents), rgComponents); + ExitOnFailure(hr, "Failed to process VS2019 instance."); + } + } + else if (pInstance) + { + hr = InstanceInProducts(pInstance, countof(rgwzProducts), rgwzProducts); + ExitOnFailure(hr, "Failed to compare product IDs."); + + if (S_FALSE == hr) + { + ExitFunction(); + } + + hr = InstanceIsGreater(pLatest, qwLatest, pInstance, qwVersion); + ExitOnFailure(hr, "Failed to compare instances."); + + if (S_FALSE == hr) + { + ExitFunction(); + } + + ReleaseNullObject(pLatest); + + pLatest = pInstance; + qwLatest = qwVersion; + + // Caller will do a final Release() otherwise. + pLatest->AddRef(); + } + +LExit: + if (fComplete) + { + ReleaseObject(pLatest); + } + + return hr; +} + +static HRESULT SetPropertyForComponent( + __in DWORD cComponents, + __in VS_COMPONENT_PROPERTY* rgComponents, + __in LPCWSTR wzComponent + ) +{ + HRESULT hr = S_OK; + + // For small arrays, faster looping through than hashing. There may also be duplicates like with VS2017. + for (DWORD i = 0; i < cComponents; ++i) + { + const VS_COMPONENT_PROPERTY* pComponent = &rgComponents[i]; + + if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pComponent->pwzComponent, -1, wzComponent, -1)) + { + hr = WcaSetIntProperty(pComponent->pwzProperty, 1); + ExitOnFailure(hr, "Failed to set property: %ls", pComponent->pwzProperty); + } + } + +LExit: + return hr; +} diff --git a/src/ext/VisualStudio/ca/vsca.def b/src/ext/VisualStudio/ca/vsca.def new file mode 100644 index 00000000..fd2db98e --- /dev/null +++ b/src/ext/VisualStudio/ca/vsca.def @@ -0,0 +1,7 @@ +; 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 "vsca" + +EXPORTS + FindInstances diff --git a/src/ext/VisualStudio/ca/vsca.vcxproj b/src/ext/VisualStudio/ca/vsca.vcxproj new file mode 100644 index 00000000..f4fbcc46 --- /dev/null +++ b/src/ext/VisualStudio/ca/vsca.vcxproj @@ -0,0 +1,58 @@ + + + + + + + Debug + Win32 + + + Release + Win32 + + + + + {45308B85-0628-4978-8FC8-6AD9E1AD5949} + DynamicLibrary + vsca + v142 + Unicode + vsca.def + WiX Toolset VS CustomAction + 10.0 + + + + + + + msi.lib + + + + + Create + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/nuget.config b/src/ext/VisualStudio/nuget.config new file mode 100644 index 00000000..6fb99260 --- /dev/null +++ b/src/ext/VisualStudio/nuget.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl @@ -0,0 +1,11 @@ + + + + + + A newer version of [ProductName] is already installed. + MsiPackage + + diff --git a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs new file mode 100644 index 00000000..c2196807 --- /dev/null +++ b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs new file mode 100644 index 00000000..c8c72cc0 --- /dev/null +++ b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt @@ -0,0 +1 @@ +This is example.txt. \ No newline at end of file diff --git a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs new file mode 100644 index 00000000..306962e3 --- /dev/null +++ b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs @@ -0,0 +1,45 @@ +// 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.VisualStudio +{ + using System.Linq; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.VisualStudio; + using Xunit; + + public class VisualStudioExtensionFixture + { + [Fact] + public void CanBuildUsingVsixPackage() + { + var folder = TestData.Get(@"TestData\UsingVsixPackage"); + var build = new Builder(folder, typeof(VSExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(Build, "CustomAction"); + Assert.Equal(new[] + { + "CustomAction:SetVS2010Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2010_VSIX_INSTALLER_PATH]\t", + "CustomAction:SetVS2012Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2012_VSIX_INSTALLER_PATH]\t", + "CustomAction:SetVS2013Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2013_VSIX_INSTALLER_PATH]\t", + "CustomAction:SetVS2015Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2015_VSIX_INSTALLER_PATH]\t", + "CustomAction:vimLa9TyFoAVwf8JmA0_ZJHA69J2fo\t3122\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\" /admin\t", + "CustomAction:viuMpl8IvFSDAzTulrmpAzBwAmCRTQ\t1074\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\"\t", + "CustomAction:vrmLa9TyFoAVwf8JmA0_ZJHA69J2fo\t3442\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t", + "CustomAction:vruMpl8IvFSDAzTulrmpAzBwAmCRTQ\t1394\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t", + "CustomAction:VSFindInstances\t257\tVSCA\tFindInstances\t", + "CustomAction:vumLa9TyFoAVwf8JmA0_ZJHA69J2fo\t3186\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t", + "CustomAction:vuuMpl8IvFSDAzTulrmpAzBwAmCRTQ\t1138\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t", + "CustomAction:Vwd2012VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2012_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t", + "CustomAction:Vwd2013VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2013_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t", + "CustomAction:Vwd2015VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2015_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t", + }, results); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args) + .AssertSuccess(); + } + } +} diff --git a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj new file mode 100644 index 00000000..9172569f --- /dev/null +++ b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj @@ -0,0 +1,38 @@ + + + + + + netcoreapp3.1 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject new file mode 100644 index 00000000..7b5b2139 --- /dev/null +++ b/src/ext/VisualStudio/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wix.snk b/src/ext/VisualStudio/wix.snk new file mode 100644 index 00000000..3908a66a Binary files /dev/null and b/src/ext/VisualStudio/wix.snk differ diff --git a/src/ext/VisualStudio/wixext/Symbols/HelpFileSymbol.cs b/src/ext/VisualStudio/wixext/Symbols/HelpFileSymbol.cs new file mode 100644 index 00000000..8078f4ab --- /dev/null +++ b/src/ext/VisualStudio/wixext/Symbols/HelpFileSymbol.cs @@ -0,0 +1,95 @@ +// 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.VisualStudio +{ + using WixToolset.Data; + using WixToolset.VisualStudio.Symbols; + + public static partial class VSSymbolDefinitions + { + public static readonly IntermediateSymbolDefinition HelpFile = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpFile.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.HelpFileName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.LangID), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.HxSFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.HxIFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.HxQFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.HxRFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.SamplesFileRef), IntermediateFieldType.String), + }, + typeof(HelpFileSymbol)); + } +} + +namespace WixToolset.VisualStudio.Symbols +{ + using WixToolset.Data; + + public enum HelpFileSymbolFields + { + HelpFileName, + LangID, + HxSFileRef, + HxIFileRef, + HxQFileRef, + HxRFileRef, + SamplesFileRef, + } + + public class HelpFileSymbol : IntermediateSymbol + { + public HelpFileSymbol() : base(VSSymbolDefinitions.HelpFile, null, null) + { + } + + public HelpFileSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFile, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpFileSymbolFields index] => this.Fields[(int)index]; + + public string HelpFileName + { + get => this.Fields[(int)HelpFileSymbolFields.HelpFileName].AsString(); + set => this.Set((int)HelpFileSymbolFields.HelpFileName, value); + } + + public int? LangID + { + get => this.Fields[(int)HelpFileSymbolFields.LangID].AsNullableNumber(); + set => this.Set((int)HelpFileSymbolFields.LangID, value); + } + + public string HxSFileRef + { + get => this.Fields[(int)HelpFileSymbolFields.HxSFileRef].AsString(); + set => this.Set((int)HelpFileSymbolFields.HxSFileRef, value); + } + + public string HxIFileRef + { + get => this.Fields[(int)HelpFileSymbolFields.HxIFileRef].AsString(); + set => this.Set((int)HelpFileSymbolFields.HxIFileRef, value); + } + + public string HxQFileRef + { + get => this.Fields[(int)HelpFileSymbolFields.HxQFileRef].AsString(); + set => this.Set((int)HelpFileSymbolFields.HxQFileRef, value); + } + + public string HxRFileRef + { + get => this.Fields[(int)HelpFileSymbolFields.HxRFileRef].AsString(); + set => this.Set((int)HelpFileSymbolFields.HxRFileRef, value); + } + + public string SamplesFileRef + { + get => this.Fields[(int)HelpFileSymbolFields.SamplesFileRef].AsString(); + set => this.Set((int)HelpFileSymbolFields.SamplesFileRef, value); + } + } +} \ No newline at end of file diff --git a/src/ext/VisualStudio/wixext/Symbols/HelpFileToNamespaceSymbol.cs b/src/ext/VisualStudio/wixext/Symbols/HelpFileToNamespaceSymbol.cs new file mode 100644 index 00000000..f18d6701 --- /dev/null +++ b/src/ext/VisualStudio/wixext/Symbols/HelpFileToNamespaceSymbol.cs @@ -0,0 +1,55 @@ +// 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.VisualStudio +{ + using WixToolset.Data; + using WixToolset.VisualStudio.Symbols; + + public static partial class VSSymbolDefinitions + { + public static readonly IntermediateSymbolDefinition HelpFileToNamespace = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpFileToNamespace.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpFileToNamespaceSymbolFields.HelpFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileToNamespaceSymbolFields.HelpNamespaceRef), IntermediateFieldType.String), + }, + typeof(HelpFileToNamespaceSymbol)); + } +} + +namespace WixToolset.VisualStudio.Symbols +{ + using WixToolset.Data; + + public enum HelpFileToNamespaceSymbolFields + { + HelpFileRef, + HelpNamespaceRef, + } + + public class HelpFileToNamespaceSymbol : IntermediateSymbol + { + public HelpFileToNamespaceSymbol() : base(VSSymbolDefinitions.HelpFileToNamespace, null, null) + { + } + + public HelpFileToNamespaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFileToNamespace, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpFileToNamespaceSymbolFields index] => this.Fields[(int)index]; + + public string HelpFileRef + { + get => this.Fields[(int)HelpFileToNamespaceSymbolFields.HelpFileRef].AsString(); + set => this.Set((int)HelpFileToNamespaceSymbolFields.HelpFileRef, value); + } + + public string HelpNamespaceRef + { + get => this.Fields[(int)HelpFileToNamespaceSymbolFields.HelpNamespaceRef].AsString(); + set => this.Set((int)HelpFileToNamespaceSymbolFields.HelpNamespaceRef, value); + } + } +} \ No newline at end of file diff --git a/src/ext/VisualStudio/wixext/Symbols/HelpFilterSymbol.cs b/src/ext/VisualStudio/wixext/Symbols/HelpFilterSymbol.cs new file mode 100644 index 00000000..9deb47d0 --- /dev/null +++ b/src/ext/VisualStudio/wixext/Symbols/HelpFilterSymbol.cs @@ -0,0 +1,55 @@ +// 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.VisualStudio +{ + using WixToolset.Data; + using WixToolset.VisualStudio.Symbols; + + public static partial class VSSymbolDefinitions + { + public static readonly IntermediateSymbolDefinition HelpFilter = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpFilter.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpFilterSymbolFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFilterSymbolFields.QueryString), IntermediateFieldType.String), + }, + typeof(HelpFilterSymbol)); + } +} + +namespace WixToolset.VisualStudio.Symbols +{ + using WixToolset.Data; + + public enum HelpFilterSymbolFields + { + Description, + QueryString, + } + + public class HelpFilterSymbol : IntermediateSymbol + { + public HelpFilterSymbol() : base(VSSymbolDefinitions.HelpFilter, null, null) + { + } + + public HelpFilterSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFilter, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpFilterSymbolFields index] => this.Fields[(int)index]; + + public string Description + { + get => this.Fields[(int)HelpFilterSymbolFields.Description].AsString(); + set => this.Set((int)HelpFilterSymbolFields.Description, value); + } + + public string QueryString + { + get => this.Fields[(int)HelpFilterSymbolFields.QueryString].AsString(); + set => this.Set((int)HelpFilterSymbolFields.QueryString, value); + } + } +} \ No newline at end of file diff --git a/src/ext/VisualStudio/wixext/Symbols/HelpFilterToNamespaceSymbol.cs b/src/ext/VisualStudio/wixext/Symbols/HelpFilterToNamespaceSymbol.cs new file mode 100644 index 00000000..f3d21289 --- /dev/null +++ b/src/ext/VisualStudio/wixext/Symbols/HelpFilterToNamespaceSymbol.cs @@ -0,0 +1,55 @@ +// 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.VisualStudio +{ + using WixToolset.Data; + using WixToolset.VisualStudio.Symbols; + + public static partial class VSSymbolDefinitions + { + public static readonly IntermediateSymbolDefinition HelpFilterToNamespace = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpFilterToNamespace.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceSymbolFields.HelpFilterRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceSymbolFields.HelpNamespaceRef), IntermediateFieldType.String), + }, + typeof(HelpFilterToNamespaceSymbol)); + } +} + +namespace WixToolset.VisualStudio.Symbols +{ + using WixToolset.Data; + + public enum HelpFilterToNamespaceSymbolFields + { + HelpFilterRef, + HelpNamespaceRef, + } + + public class HelpFilterToNamespaceSymbol : IntermediateSymbol + { + public HelpFilterToNamespaceSymbol() : base(VSSymbolDefinitions.HelpFilterToNamespace, null, null) + { + } + + public HelpFilterToNamespaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFilterToNamespace, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpFilterToNamespaceSymbolFields index] => this.Fields[(int)index]; + + public string HelpFilterRef + { + get => this.Fields[(int)HelpFilterToNamespaceSymbolFields.HelpFilterRef].AsString(); + set => this.Set((int)HelpFilterToNamespaceSymbolFields.HelpFilterRef, value); + } + + public string HelpNamespaceRef + { + get => this.Fields[(int)HelpFilterToNamespaceSymbolFields.HelpNamespaceRef].AsString(); + set => this.Set((int)HelpFilterToNamespaceSymbolFields.HelpNamespaceRef, value); + } + } +} \ No newline at end of file diff --git a/src/ext/VisualStudio/wixext/Symbols/HelpNamespaceSymbol.cs b/src/ext/VisualStudio/wixext/Symbols/HelpNamespaceSymbol.cs new file mode 100644 index 00000000..8d2c2f80 --- /dev/null +++ b/src/ext/VisualStudio/wixext/Symbols/HelpNamespaceSymbol.cs @@ -0,0 +1,63 @@ +// 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.VisualStudio +{ + using WixToolset.Data; + using WixToolset.VisualStudio.Symbols; + + public static partial class VSSymbolDefinitions + { + public static readonly IntermediateSymbolDefinition HelpNamespace = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpNamespace.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpNamespaceSymbolFields.NamespaceName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpNamespaceSymbolFields.CollectionFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpNamespaceSymbolFields.Description), IntermediateFieldType.String), + }, + typeof(HelpNamespaceSymbol)); + } +} + +namespace WixToolset.VisualStudio.Symbols +{ + using WixToolset.Data; + + public enum HelpNamespaceSymbolFields + { + NamespaceName, + CollectionFileRef, + Description, + } + + public class HelpNamespaceSymbol : IntermediateSymbol + { + public HelpNamespaceSymbol() : base(VSSymbolDefinitions.HelpNamespace, null, null) + { + } + + public HelpNamespaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpNamespace, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpNamespaceSymbolFields index] => this.Fields[(int)index]; + + public string NamespaceName + { + get => this.Fields[(int)HelpNamespaceSymbolFields.NamespaceName].AsString(); + set => this.Set((int)HelpNamespaceSymbolFields.NamespaceName, value); + } + + public string CollectionFileRef + { + get => this.Fields[(int)HelpNamespaceSymbolFields.CollectionFileRef].AsString(); + set => this.Set((int)HelpNamespaceSymbolFields.CollectionFileRef, value); + } + + public string Description + { + get => this.Fields[(int)HelpNamespaceSymbolFields.Description].AsString(); + set => this.Set((int)HelpNamespaceSymbolFields.Description, value); + } + } +} \ No newline at end of file diff --git a/src/ext/VisualStudio/wixext/Symbols/HelpPluginSymbol.cs b/src/ext/VisualStudio/wixext/Symbols/HelpPluginSymbol.cs new file mode 100644 index 00000000..a452fbd5 --- /dev/null +++ b/src/ext/VisualStudio/wixext/Symbols/HelpPluginSymbol.cs @@ -0,0 +1,79 @@ +// 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.VisualStudio +{ + using WixToolset.Data; + using WixToolset.VisualStudio.Symbols; + + public static partial class VSSymbolDefinitions + { + public static readonly IntermediateSymbolDefinition HelpPlugin = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpPlugin.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpPluginSymbolFields.HelpNamespaceRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpPluginSymbolFields.ParentHelpNamespaceRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpPluginSymbolFields.HxTFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpPluginSymbolFields.HxAFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpPluginSymbolFields.ParentHxTFileRef), IntermediateFieldType.String), + }, + typeof(HelpPluginSymbol)); + } +} + +namespace WixToolset.VisualStudio.Symbols +{ + using WixToolset.Data; + + public enum HelpPluginSymbolFields + { + HelpNamespaceRef, + ParentHelpNamespaceRef, + HxTFileRef, + HxAFileRef, + ParentHxTFileRef, + } + + public class HelpPluginSymbol : IntermediateSymbol + { + public HelpPluginSymbol() : base(VSSymbolDefinitions.HelpPlugin, null, null) + { + } + + public HelpPluginSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpPlugin, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpPluginSymbolFields index] => this.Fields[(int)index]; + + public string HelpNamespaceRef + { + get => this.Fields[(int)HelpPluginSymbolFields.HelpNamespaceRef].AsString(); + set => this.Set((int)HelpPluginSymbolFields.HelpNamespaceRef, value); + } + + public string ParentHelpNamespaceRef + { + get => this.Fields[(int)HelpPluginSymbolFields.ParentHelpNamespaceRef].AsString(); + set => this.Set((int)HelpPluginSymbolFields.ParentHelpNamespaceRef, value); + } + + public string HxTFileRef + { + get => this.Fields[(int)HelpPluginSymbolFields.HxTFileRef].AsString(); + set => this.Set((int)HelpPluginSymbolFields.HxTFileRef, value); + } + + public string HxAFileRef + { + get => this.Fields[(int)HelpPluginSymbolFields.HxAFileRef].AsString(); + set => this.Set((int)HelpPluginSymbolFields.HxAFileRef, value); + } + + public string ParentHxTFileRef + { + get => this.Fields[(int)HelpPluginSymbolFields.ParentHxTFileRef].AsString(); + set => this.Set((int)HelpPluginSymbolFields.ParentHxTFileRef, value); + } + } +} \ No newline at end of file diff --git a/src/ext/VisualStudio/wixext/Symbols/VSSymbolDefinitions.cs b/src/ext/VisualStudio/wixext/Symbols/VSSymbolDefinitions.cs new file mode 100644 index 00000000..cea6a2b6 --- /dev/null +++ b/src/ext/VisualStudio/wixext/Symbols/VSSymbolDefinitions.cs @@ -0,0 +1,59 @@ +// 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.VisualStudio +{ + using System; + using WixToolset.Data; + + public enum VSSymbolDefinitionType + { + HelpFile, + HelpFileToNamespace, + HelpFilter, + HelpFilterToNamespace, + HelpNamespace, + HelpPlugin, + } + + public static partial class VSSymbolDefinitions + { + public static readonly Version Version = new Version("4.0.0"); + + public static IntermediateSymbolDefinition ByName(string name) + { + if (!Enum.TryParse(name, out VSSymbolDefinitionType type)) + { + return null; + } + + return ByType(type); + } + + public static IntermediateSymbolDefinition ByType(VSSymbolDefinitionType type) + { + switch (type) + { + case VSSymbolDefinitionType.HelpFile: + return VSSymbolDefinitions.HelpFile; + + case VSSymbolDefinitionType.HelpFileToNamespace: + return VSSymbolDefinitions.HelpFileToNamespace; + + case VSSymbolDefinitionType.HelpFilter: + return VSSymbolDefinitions.HelpFilter; + + case VSSymbolDefinitionType.HelpFilterToNamespace: + return VSSymbolDefinitions.HelpFilterToNamespace; + + case VSSymbolDefinitionType.HelpNamespace: + return VSSymbolDefinitions.HelpNamespace; + + case VSSymbolDefinitionType.HelpPlugin: + return VSSymbolDefinitions.HelpPlugin; + + default: + throw new ArgumentOutOfRangeException(nameof(type)); + } + } + } +} diff --git a/src/ext/VisualStudio/wixext/VSCompiler.cs b/src/ext/VisualStudio/wixext/VSCompiler.cs new file mode 100644 index 00000000..65f0f97d --- /dev/null +++ b/src/ext/VisualStudio/wixext/VSCompiler.cs @@ -0,0 +1,828 @@ +// 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.VisualStudio +{ + using System; + using System.Collections.Generic; + using System.Globalization; + using System.Xml.Linq; + using WixToolset.Data; + using WixToolset.Data.Symbols; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Extensibility; + using WixToolset.VisualStudio.Symbols; + + /// + /// The compiler for the WiX Toolset Visual Studio Extension. + /// + public sealed class VSCompiler : BaseCompilerExtension + { + internal const int MsidbCustomActionTypeExe = 0x00000002; // Target = command line args + internal const int MsidbCustomActionTypeProperty = 0x00000030; // Source = full path to executable + internal const int MsidbCustomActionTypeContinue = 0x00000040; // ignore action return status; continue running + internal const int MsidbCustomActionTypeRollback = 0x00000100; // in conjunction with InScript: queue in Rollback script + internal const int MsidbCustomActionTypeInScript = 0x00000400; // queue for execution within script + internal const int MsidbCustomActionTypeNoImpersonate = 0x00000800; // queue for not impersonating + + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/vs"; + + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context) + { + switch (parentElement.Name.LocalName) + { + case "Component": + switch (element.Name.LocalName) + { + case "VsixPackage": + this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], null); + break; + default: + this.ParseHelper.UnexpectedElement(parentElement, element); + break; + } + break; + case "File": + switch (element.Name.LocalName) + { + case "HelpCollection": + this.ParseHelpCollectionElement(intermediate, section, element, context["FileId"]); + break; + case "HelpFile": + this.ParseHelpFileElement(intermediate, section, element, context["FileId"]); + break; + case "VsixPackage": + this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], context["FileId"]); + break; + default: + this.ParseHelper.UnexpectedElement(parentElement, element); + break; + } + break; + case "Fragment": + case "Module": + case "Package": + switch (element.Name.LocalName) + { + case "HelpCollectionRef": + this.ParseHelpCollectionRefElement(intermediate, section, element); + break; + case "HelpFilter": + this.ParseHelpFilterElement(intermediate, section, element); + break; + default: + this.ParseHelper.UnexpectedElement(parentElement, element); + break; + } + break; + default: + this.ParseHelper.UnexpectedElement(parentElement, element); + break; + } + } + + private void ParseHelpCollectionRefElement(Intermediate intermediate, IntermediateSection section, XElement element) + { + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; + + 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); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpNamespace, id.Id); + 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")); + } + + foreach (var child in element.Elements()) + { + if (this.Namespace == child.Name.Namespace) + { + switch (child.Name.LocalName) + { + case "HelpFileRef": + this.ParseHelpFileRefElement(intermediate, section, child, id); + break; + default: + this.ParseHelper.UnexpectedElement(element, child); + break; + } + } + else + { + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); + } + } + } + + private void ParseHelpCollectionElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) + { + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; + string description = null; + string name = null; + var suppressCAs = YesNoType.No; + + 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 "Description": + description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "Name": + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "SuppressCustomActions": + suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); + 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("vshc", fileId, description, name); + } + + if (null == description) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Description")); + } + + if (null == name) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); + } + + foreach (var child in element.Elements()) + { + if (this.Namespace == child.Name.Namespace) + { + switch (child.Name.LocalName) + { + case "HelpFileRef": + this.ParseHelpFileRefElement(intermediate, section, child, id); + break; + case "HelpFilterRef": + this.ParseHelpFilterRefElement(intermediate, section, child, id); + break; + case "PlugCollectionInto": + this.ParsePlugCollectionIntoElement(intermediate, section, child, id); + break; + default: + this.ParseHelper.UnexpectedElement(element, child); + break; + } + } + else + { + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); + } + } + + if (!this.Messaging.EncounteredError) + { + section.AddSymbol(new HelpNamespaceSymbol(sourceLineNumbers, id) + { + NamespaceName = name, + CollectionFileRef = fileId, + Description = description, + }); + + if (YesNoType.No == suppressCAs) + { + this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); + } + } + } + + private void ParseHelpFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) + { + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; + string name = null; + var language = CompilerConstants.IntegerNotSet; + string hxi = null; + string hxq = null; + string hxr = null; + string samples = null; + var suppressCAs = YesNoType.No; + + 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 "AttributeIndex": + hxr = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, hxr); + break; + case "Index": + hxi = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, hxi); + break; + case "Language": + language = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); + break; + case "Name": + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "SampleLocation": + samples = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, samples); + break; + case "Search": + hxq = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, hxq); + break; + case "SuppressCustomActions": + suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); + 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("vshf", fileId, name, language.ToString(CultureInfo.InvariantCulture.NumberFormat)); + } + + if (null == name) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); + } + + // Uninstall will always fail silently, leaving file registered, if Language is not set + if (CompilerConstants.IntegerNotSet == language) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Language")); + } + + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); + + if (!this.Messaging.EncounteredError) + { + section.AddSymbol(new HelpFileSymbol(sourceLineNumbers, id) + { + HelpFileName = name, + LangID = language, + HxSFileRef = fileId, + HxIFileRef = hxi, + HxQFileRef = hxq, + HxRFileRef = hxr, + SamplesFileRef = samples, + }); + + if (YesNoType.No == suppressCAs) + { + this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); + } + } + } + + private void ParseHelpFileRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) + { + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; + + 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); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpFile, id.Id); + 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); + + if (!this.Messaging.EncounteredError) + { + section.AddSymbol(new HelpFileToNamespaceSymbol(sourceLineNumbers, id) + { + HelpFileRef = id.Id, + HelpNamespaceRef = collectionId.Id, + }); + } + } + + private void ParseHelpFilterElement(Intermediate intermediate, IntermediateSection section, XElement element) + { + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; + string filterDefinition = null; + string name = null; + var suppressCAs = YesNoType.No; + + 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 "FilterDefinition": + filterDefinition = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "Name": + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "SuppressCustomActions": + suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); + 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("hfl", name, filterDefinition); + } + + if (null == name) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); + } + + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); + + if (!this.Messaging.EncounteredError) + { + section.AddSymbol(new HelpFilterSymbol(sourceLineNumbers, id) + { + Description = name, + QueryString = filterDefinition, + }); + + if (YesNoType.No == suppressCAs) + { + this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); + } + } + } + + private void ParseHelpFilterRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) + { + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; + + 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); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpFilter, id.Id); + 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); + + if (!this.Messaging.EncounteredError) + { + section.AddSymbol(new HelpFilterToNamespaceSymbol(sourceLineNumbers, id) + { + HelpFilterRef = id.Id, + HelpNamespaceRef = collectionId.Id, + }); + } + } + + private void ParsePlugCollectionIntoElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier parentId) + { + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + string hxa = null; + string hxt = null; + string hxtParent = null; + string namespaceParent = null; + string feature = null; + var suppressExternalNamespaces = YesNoType.No; + + foreach (var attrib in element.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "Attributes": + hxa = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "TableOfContents": + hxt = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "TargetCollection": + namespaceParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "TargetTableOfContents": + hxtParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "TargetFeature": + feature = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "SuppressExternalNamespaces": + suppressExternalNamespaces = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); + break; + default: + this.ParseHelper.UnexpectedAttribute(element, attrib); + break; + } + } + else + { + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); + } + } + + var pluginVS05 = namespaceParent.Equals("MS_VSIPCC_v80", StringComparison.Ordinal); + var pluginVS08 = namespaceParent.Equals("MS.VSIPCC.v90", StringComparison.Ordinal); + + if (null == namespaceParent) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetCollection")); + } + + if (null == feature && (pluginVS05 || pluginVS08) && YesNoType.No == suppressExternalNamespaces) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetFeature")); + } + + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); + + if (!this.Messaging.EncounteredError) + { + section.AddSymbol(new HelpPluginSymbol(sourceLineNumbers, parentId) + { + HelpNamespaceRef = parentId.Id, + ParentHelpNamespaceRef = namespaceParent, + HxTFileRef = hxt, + HxAFileRef = hxa, + ParentHxTFileRef = hxtParent, + }); + + if (pluginVS05) + { + if (YesNoType.No == suppressExternalNamespaces) + { + // Bring in the help 2 base namespace components for VS 2005 + this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, + ComplexReferenceChildType.ComponentGroup, "Help2_VS2005_Namespace_Components", false); + // Reference CustomAction since nothing will happen without it + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "CA_HxMerge_VSIPCC_VSCC"); + } + } + else if (pluginVS08) + { + if (YesNoType.No == suppressExternalNamespaces) + { + // Bring in the help 2 base namespace components for VS 2008 + this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, + ComplexReferenceChildType.ComponentGroup, "Help2_VS2008_Namespace_Components", false); + // Reference CustomAction since nothing will happen without it + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); + } + } + else + { + // Reference the parent namespace to enforce the foreign key relationship + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpNamespace, namespaceParent); + } + } + } + + private void ParseVsixPackageElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) + { + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var propertyId = "VS_VSIX_INSTALLER_PATH"; + string packageId = null; + var permanent = YesNoType.NotSet; + string target = null; + string targetVersion = null; + var vital = YesNoType.NotSet; + + foreach (var attrib in element.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "File": + if (String.IsNullOrEmpty(fileId)) + { + fileId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + } + else + { + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, "File", "File")); + } + break; + case "PackageId": + packageId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "Permanent": + permanent = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); + break; + case "Target": + target = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + switch (target.ToLowerInvariant()) + { + case "integrated": + case "integratedshell": + target = "IntegratedShell"; + break; + case "professional": + target = "Pro"; + break; + case "premium": + target = "Premium"; + break; + case "ultimate": + target = "Ultimate"; + break; + case "vbexpress": + target = "VBExpress"; + break; + case "vcexpress": + target = "VCExpress"; + break; + case "vcsexpress": + target = "VCSExpress"; + break; + case "vwdexpress": + target = "VWDExpress"; + break; + } + break; + case "TargetVersion": + targetVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib); + break; + case "Vital": + vital = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); + break; + case "VsixInstallerPathProperty": + propertyId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + default: + this.ParseHelper.UnexpectedAttribute(element, attrib); + break; + } + } + else + { + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); + } + } + + if (String.IsNullOrEmpty(fileId)) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "File")); + } + + if (String.IsNullOrEmpty(packageId)) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "PackageId")); + } + + if (!String.IsNullOrEmpty(target) && String.IsNullOrEmpty(targetVersion)) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetVersion", "Target")); + } + else if (String.IsNullOrEmpty(target) && !String.IsNullOrEmpty(targetVersion)) + { + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Target", "TargetVersion")); + } + + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); + + if (!this.Messaging.EncounteredError) + { + // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Property, propertyId); + + // Ensure there is a reference to the package file (even if we are a child under it). + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, fileId); + + var cmdlinePrefix = "/q "; + + if (!String.IsNullOrEmpty(target)) + { + cmdlinePrefix = String.Format("{0} /skuName:{1} /skuVersion:{2}", cmdlinePrefix, target, targetVersion); + } + + var installAfter = "WriteRegistryValues"; // by default, come after the registry key registration. + + var installNamePerUser = this.ParseHelper.CreateIdentifier("viu", componentId, fileId, "per-user", target, targetVersion); + var installNamePerMachine = this.ParseHelper.CreateIdentifier("vim", componentId, fileId, "per-machine", target, targetVersion); + var installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId); + var installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin"); + var installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. + var installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. + var installPerUserCA = new CustomActionSymbol(sourceLineNumbers, installNamePerUser) + { + ExecutionType = CustomActionExecutionType.Deferred, + Impersonate = true, + }; + var installPerMachineCA = new CustomActionSymbol(sourceLineNumbers, installNamePerMachine) + { + ExecutionType = CustomActionExecutionType.Deferred, + Impersonate = false, + }; + + // If the package is not vital, mark the install action as continue. + if (vital == YesNoType.No) + { + installPerUserCA.IgnoreResult = true; + installPerMachineCA.IgnoreResult = true; + } + else // the package is vital so ensure there is a rollback action scheduled. + { + var rollbackNamePerUser = this.ParseHelper.CreateIdentifier("vru", componentId, fileId, "per-user", target, targetVersion); + var rollbackNamePerMachine = this.ParseHelper.CreateIdentifier("vrm", componentId, fileId, "per-machine", target, targetVersion); + var rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); + var rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin"); + var rollbackConditionPerUser = String.Format("NOT ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. + var rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. + var rollbackPerUserCA = new CustomActionSymbol(sourceLineNumbers, rollbackNamePerUser) + { + ExecutionType = CustomActionExecutionType.Rollback, + IgnoreResult = true, + Impersonate = true, + }; + var rollbackPerMachineCA = new CustomActionSymbol(sourceLineNumbers, rollbackNamePerMachine) + { + ExecutionType = CustomActionExecutionType.Rollback, + IgnoreResult = true, + Impersonate = false, + }; + + this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackPerUserCA, rollbackConditionPerUser, null, installAfter); + this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackPerMachineCA, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); + + installAfter = rollbackNamePerMachine.Id; + } + + this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installPerUserCA, installConditionPerUser, null, installAfter); + this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installPerMachineCA, installConditionPerMachine, null, installNamePerUser.Id); + + // If not permanent, schedule the uninstall custom action. + if (permanent != YesNoType.Yes) + { + var uninstallNamePerUser = this.ParseHelper.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); + var uninstallNamePerMachine = this.ParseHelper.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); + var uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); + var uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin"); + var uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. + var uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. + var uninstallPerUserCA = new CustomActionSymbol(sourceLineNumbers, uninstallNamePerUser) + { + ExecutionType = CustomActionExecutionType.Deferred, + IgnoreResult = true, + Impersonate = true, + }; + var uninstallPerMachineCA = new CustomActionSymbol(sourceLineNumbers, uninstallNamePerMachine) + { + ExecutionType = CustomActionExecutionType.Deferred, + IgnoreResult = true, + Impersonate = false, + }; + + this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallPerUserCA, uninstallConditionPerUser, "InstallFinalize", null); + this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallPerMachineCA, uninstallConditionPerMachine, "InstallFinalize", null); + } + } + } + + private void SchedulePropertyExeAction(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, CustomActionSymbol caTemplate, string condition, string beforeAction, string afterAction) + { + const SequenceTable sequence = SequenceTable.InstallExecuteSequence; + + caTemplate.SourceType = CustomActionSourceType.Property; + caTemplate.Source = source; + caTemplate.TargetType = CustomActionTargetType.Exe; + caTemplate.Target = cmdline; + section.AddSymbol(caTemplate); + + section.AddSymbol(new WixActionSymbol(sourceLineNumbers, new Identifier(name.Access, sequence, name.Id)) + { + SequenceTable = SequenceTable.InstallExecuteSequence, + Action = name.Id, + Condition = condition, + // no explicit sequence + Before = beforeAction, + After = afterAction, + Overridable = false, + }); + + if (null != beforeAction) + { + if (WindowsInstallerStandard.IsStandardAction(beforeAction)) + { + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixAction, sequence.ToString(), beforeAction); + } + else + { + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, beforeAction); + } + } + + if (null != afterAction) + { + if (WindowsInstallerStandard.IsStandardAction(afterAction)) + { + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixAction, sequence.ToString(), afterAction); + } + else + { + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, afterAction); + } + } + } + + private void AddReferenceToRegisterMicrosoftHelp(IntermediateSection section, SourceLineNumber sourceLineNumbers) + { + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + } + } +} diff --git a/src/ext/VisualStudio/wixext/VSDecompiler.cs b/src/ext/VisualStudio/wixext/VSDecompiler.cs new file mode 100644 index 00000000..08dc364a --- /dev/null +++ b/src/ext/VisualStudio/wixext/VSDecompiler.cs @@ -0,0 +1,298 @@ +// 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.VisualStudio +{ +#if TODO_CONSIDER_DECOMPILER + using System; + using System.Collections; + using System.Diagnostics; + using System.Globalization; + using WixToolset.Data; + using WixToolset.Extensibility; + using VS = WixToolset.Extensions.Serialize.VS; + using Wix = WixToolset.Data.Serialize; + + /// + /// The decompiler for the WiX Toolset Visual Studio Extension. + /// + public sealed class VSDecompiler : DecompilerExtension + { + /// + /// Creates a decompiler for VS Extension. + /// + public VSDecompiler() + { + this.TableDefinitions = VSExtensionData.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 VSExtensionData.GetExtensionLibrary(tableDefinitions); + } + + /// + /// Decompiles an extension table. + /// + /// The table to decompile. + public override void DecompileTable(Table table) + { + switch (table.Name) + { + case "HelpFile": + this.DecompileHelpFileTable(table); + break; + case "HelpFileToNamespace": + this.DecompileHelpFileToNamespaceTable(table); + break; + case "HelpFilter": + this.DecompileHelpFilterTable(table); + break; + case "HelpFilterToNamespace": + this.DecompileHelpFilterToNamespaceTable(table); + break; + case "HelpNamespace": + this.DecompileHelpNamespaceTable(table); + break; + case "HelpPlugin": + this.DecompileHelpPluginTable(table); + break; + default: + base.DecompileTable(table); + break; + } + } + + /// + /// Decompile the HelpFile table. + /// + /// The table to decompile. + private void DecompileHelpFileTable(Table table) + { + foreach (Row row in table.Rows) + { + VS.HelpFile helpFile = new VS.HelpFile(); + + helpFile.Id = (string)row[0]; + + helpFile.Name = (string)row[1]; + + if (null != row[2]) + { + helpFile.Language = (int)row[2]; + } + + if (null != row[4]) + { + helpFile.Index = (string)row[4]; + } + + if (null != row[5]) + { + helpFile.Search = (string)row[5]; + } + + if (null != row[6]) + { + helpFile.AttributeIndex = (string)row[6]; + } + + if (null != row[7]) + { + helpFile.SampleLocation = (string)row[7]; + } + + if (this.Core.RootElement is Wix.Module) + { + helpFile.SuppressCustomActions = VS.YesNoType.yes; + } + + Wix.File file = (Wix.File)this.Core.GetIndexedElement("File", (string)row[3]); + if (null != file) + { + file.AddChild(helpFile); + } + else + { + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "File_HxS", (string)row[3], "File")); + } + } + } + + /// + /// Decompile the HelpFileToNamespace table. + /// + /// The table to decompile. + private void DecompileHelpFileToNamespaceTable(Table table) + { + foreach (Row row in table.Rows) + { + VS.HelpFileRef helpFileRef = new VS.HelpFileRef(); + + helpFileRef.Id = (string)row[0]; + + VS.HelpCollection helpCollection = (VS.HelpCollection)this.Core.GetIndexedElement("HelpNamespace", (string)row[1]); + if (null != helpCollection) + { + helpCollection.AddChild(helpFileRef); + } + else + { + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "HelpNamespace_", (string)row[1], "HelpNamespace")); + } + } + } + + /// + /// Decompile the HelpFilter table. + /// + /// The table to decompile. + private void DecompileHelpFilterTable(Table table) + { + foreach (Row row in table.Rows) + { + VS.HelpFilter helpFilter = new VS.HelpFilter(); + + helpFilter.Id = (string)row[0]; + + helpFilter.Name = (string)row[1]; + + if (null != row[2]) + { + helpFilter.FilterDefinition = (string)row[2]; + } + + if (this.Core.RootElement is Wix.Module) + { + helpFilter.SuppressCustomActions = VS.YesNoType.yes; + } + + this.Core.RootElement.AddChild(helpFilter); + } + } + + /// + /// Decompile the HelpFilterToNamespace table. + /// + /// The table to decompile. + private void DecompileHelpFilterToNamespaceTable(Table table) + { + foreach (Row row in table.Rows) + { + VS.HelpFilterRef helpFilterRef = new VS.HelpFilterRef(); + + helpFilterRef.Id = (string)row[0]; + + VS.HelpCollection helpCollection = (VS.HelpCollection)this.Core.GetIndexedElement("HelpNamespace", (string)row[1]); + if (null != helpCollection) + { + helpCollection.AddChild(helpFilterRef); + } + else + { + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "HelpNamespace_", (string)row[1], "HelpNamespace")); + } + } + } + + /// + /// Decompile the HelpNamespace table. + /// + /// The table to decompile. + private void DecompileHelpNamespaceTable(Table table) + { + foreach (Row row in table.Rows) + { + VS.HelpCollection helpCollection = new VS.HelpCollection(); + + helpCollection.Id = (string)row[0]; + + helpCollection.Name = (string)row[1]; + + if (null != row[3]) + { + helpCollection.Description = (string)row[3]; + } + + if (this.Core.RootElement is Wix.Module) + { + helpCollection.SuppressCustomActions = VS.YesNoType.yes; + } + + Wix.File file = (Wix.File)this.Core.GetIndexedElement("File", (string)row[2]); + if (null != file) + { + file.AddChild(helpCollection); + } + else if (0 != String.Compare(helpCollection.Id, "MS_VSIPCC_v80", StringComparison.Ordinal) && + 0 != String.Compare(helpCollection.Id, "MS.VSIPCC.v90", StringComparison.Ordinal)) + { + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "File_Collection", (string)row[2], "File")); + } + this.Core.IndexElement(row, helpCollection); + } + } + + /// + /// Decompile the HelpPlugin table. + /// + /// The table to decompile. + private void DecompileHelpPluginTable(Table table) + { + foreach (Row row in table.Rows) + { + VS.PlugCollectionInto plugCollectionInto = new VS.PlugCollectionInto(); + + plugCollectionInto.TargetCollection = (string)row[1]; + + if (null != row[2]) + { + plugCollectionInto.TableOfContents = (string)row[2]; + } + + if (null != row[3]) + { + plugCollectionInto.Attributes = (string)row[3]; + } + + if (null != row[4]) + { + plugCollectionInto.TargetTableOfContents = (string)row[4]; + } + + if (this.Core.RootElement is Wix.Module) + { + plugCollectionInto.SuppressExternalNamespaces = VS.YesNoType.yes; + } + + //we cannot do this work because we cannot get the FeatureComponent table + //plugCollectionInto.TargetFeature = DecompileHelpComponents(); + + VS.HelpCollection helpCollection = (VS.HelpCollection)this.Core.GetIndexedElement("HelpNamespace", (string)row[0]); + if (null != helpCollection) + { + helpCollection.AddChild(plugCollectionInto); + } + else + { + this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "HelpNamespace_", (string)row[0], "HelpNamespace")); + } + } + } + //private string DecompileHelpComponents() + //{ + // throw new NotImplementedException(); + // //Find both known compontents from FeatureComponents table and build feature list + + // //remove components from FeatureComponents + + // //return a space delimited list of features that mapped to our help components + // return String.Empty; + //} + } +#endif +} diff --git a/src/ext/VisualStudio/wixext/VSExtensionData.cs b/src/ext/VisualStudio/wixext/VSExtensionData.cs new file mode 100644 index 00000000..51199d2c --- /dev/null +++ b/src/ext/VisualStudio/wixext/VSExtensionData.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.VisualStudio +{ + using WixToolset.Data; + using WixToolset.Extensibility; + + public sealed class VSExtensionData : BaseExtensionData + { + /// + /// Gets the default culture. + /// + /// The default culture. + public override string DefaultCulture => "en-US"; + + public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) + { + symbolDefinition = VSSymbolDefinitions.ByName(name); + return symbolDefinition != null; + } + + public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) + { + return Intermediate.Load(typeof(VSExtensionData).Assembly, "WixToolset.VisualStudio.vs.wixlib", symbolDefinitions); + } + } +} diff --git a/src/ext/VisualStudio/wixext/VSExtensionFactory.cs b/src/ext/VisualStudio/wixext/VSExtensionFactory.cs new file mode 100644 index 00000000..c6e0cc31 --- /dev/null +++ b/src/ext/VisualStudio/wixext/VSExtensionFactory.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.VisualStudio +{ + using System; + using System.Collections.Generic; + using WixToolset.Extensibility; + + public class VSExtensionFactory : BaseExtensionFactory + { + protected override IReadOnlyCollection ExtensionTypes => new[] + { + typeof(VSCompiler), + typeof(VSExtensionData), + typeof(VSWindowsInstallerBackendBinderExtension), + }; + } +} diff --git a/src/ext/VisualStudio/wixext/VSTableDefinitions.cs b/src/ext/VisualStudio/wixext/VSTableDefinitions.cs new file mode 100644 index 00000000..0c3ca907 --- /dev/null +++ b/src/ext/VisualStudio/wixext/VSTableDefinitions.cs @@ -0,0 +1,97 @@ +// 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.VisualStudio +{ + using WixToolset.Data.WindowsInstaller; + + public static class VSTableDefinitions + { + public static readonly TableDefinition HelpFile = new TableDefinition( + "HelpFile", + VSSymbolDefinitions.HelpFile, + new[] + { + new ColumnDefinition("HelpFileKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("HelpFileName", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this HelpFile (required)."), + new ColumnDefinition("LangID", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Language, description: "Language ID for content file (optional)."), + new ColumnDefinition("File_HxS", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxS (Title) file (required).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("File_HxI", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxI (Index) file (optional).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("File_HxQ", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxQ (Query) file (optional).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("File_HxR", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxR (Attributes) file (optional).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("File_Samples", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for a file that is in the 'root' of the samples directory for this HelpFile (optional).", modularizeType: ColumnModularizeType.Column), + }, + symbolIdIsPrimaryKey: true + ); + + public static readonly TableDefinition HelpFileToNamespace = new TableDefinition( + "HelpFileToNamespace", + VSSymbolDefinitions.HelpFileToNamespace, + new[] + { + new ColumnDefinition("HelpFile_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpFile", keyColumn: 1, description: "Foreign key into HelpFile table (required).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), + }, + symbolIdIsPrimaryKey: false + ); + + public static readonly TableDefinition HelpFilter = new TableDefinition( + "HelpFilter", + VSSymbolDefinitions.HelpFilter, + new[] + { + new ColumnDefinition("FilterKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpFilter (required).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Description", ColumnType.Localized, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Friendly name for Filter (required)."), + new ColumnDefinition("QueryString", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Query String for Help Filter (optional)."), + }, + symbolIdIsPrimaryKey: true + ); + + public static readonly TableDefinition HelpFilterToNamespace = new TableDefinition( + "HelpFilterToNamespace", + VSSymbolDefinitions.HelpFilterToNamespace, + new[] + { + new ColumnDefinition("HelpFilter_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpFilter", keyColumn: 1, description: "Foreign key into HelpFilter table (required).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), + }, + symbolIdIsPrimaryKey: false + ); + + public static readonly TableDefinition HelpNamespace = new TableDefinition( + "HelpNamespace", + VSSymbolDefinitions.HelpNamespace, + new[] + { + new ColumnDefinition("NamespaceKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), + new ColumnDefinition("NamespaceName", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this Namespace (required)."), + new ColumnDefinition("File_Collection", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxC (Collection) file (required).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("Description", ColumnType.Localized, 0, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Friendly name for Namespace (optional)."), + }, + symbolIdIsPrimaryKey: true + ); + + public static readonly TableDefinition HelpPlugin = new TableDefinition( + "HelpPlugin", + VSSymbolDefinitions.HelpPlugin, + new[] + { + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the child namespace that will be plugged into the parent namespace (required)."), + new ColumnDefinition("HelpNamespace_Parent", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the parent namespace into which the child will be inserted (required)."), + new ColumnDefinition("File_HxT", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxT file of child namespace (optional).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("File_HxA", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxA (Attributes) file of child namespace (optional).", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("File_ParentHxT", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxT file of parent namespace that now includes the new child namespace (optional).", modularizeType: ColumnModularizeType.Column), + }, + symbolIdIsPrimaryKey: false + ); + + public static readonly TableDefinition[] All = new[] + { + HelpFile, + HelpFileToNamespace, + HelpFilter, + HelpFilterToNamespace, + HelpNamespace, + HelpPlugin, + }; + } +} diff --git a/src/ext/VisualStudio/wixext/VSWindowsInstallerBackendBinderExtension.cs b/src/ext/VisualStudio/wixext/VSWindowsInstallerBackendBinderExtension.cs new file mode 100644 index 00000000..d0d8648c --- /dev/null +++ b/src/ext/VisualStudio/wixext/VSWindowsInstallerBackendBinderExtension.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.VisualStudio +{ + using System.Collections.Generic; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Extensibility; + + public class VSWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension + { + public override IReadOnlyCollection TableDefinitions => VSTableDefinitions.All; + } +} diff --git a/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.csproj b/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.csproj new file mode 100644 index 00000000..20282720 --- /dev/null +++ b/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.csproj @@ -0,0 +1,30 @@ + + + + + + netstandard2.0 + WixToolset.VisualStudio + WiX Toolset Visual Studio Extension + WiX Toolset VS Extension + true + true + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.nuspec b/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.nuspec new file mode 100644 index 00000000..51c9708e --- /dev/null +++ b/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.nuspec @@ -0,0 +1,23 @@ + + + + $id$ + $version$ + $title$ + $description$ + $authors$ + MS-RL + false + $copyright$ + $projectUrl$ + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.targets b/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.targets new file mode 100644 index 00000000..4542375f --- /dev/null +++ b/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.targets @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject b/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject new file mode 100644 index 00000000..56556a9f --- /dev/null +++ b/src/ext/VisualStudio/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject @@ -0,0 +1,7 @@ + + + + ..\..\build\Debug\vs.wixlib + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/HTML_Help_Registration__RTL_X86.wxs b/src/ext/VisualStudio/wixlib/HTML_Help_Registration__RTL_X86.wxs new file mode 100644 index 00000000..2bdb810a --- /dev/null +++ b/src/ext/VisualStudio/wixlib/HTML_Help_Registration__RTL_X86.wxs @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/Redist/BIN_File_107602.dll b/src/ext/VisualStudio/wixlib/Redist/BIN_File_107602.dll new file mode 100644 index 00000000..aef2cf29 Binary files /dev/null and b/src/ext/VisualStudio/wixlib/Redist/BIN_File_107602.dll differ diff --git a/src/ext/VisualStudio/wixlib/Redist/BIN_File_46001.dll b/src/ext/VisualStudio/wixlib/Redist/BIN_File_46001.dll new file mode 100644 index 00000000..9e470267 Binary files /dev/null and b/src/ext/VisualStudio/wixlib/Redist/BIN_File_46001.dll differ diff --git a/src/ext/VisualStudio/wixlib/Redist/BIN_File_46002.dll b/src/ext/VisualStudio/wixlib/Redist/BIN_File_46002.dll new file mode 100644 index 00000000..ae9c30dd Binary files /dev/null and b/src/ext/VisualStudio/wixlib/Redist/BIN_File_46002.dll differ diff --git a/src/ext/VisualStudio/wixlib/VS11.wxs b/src/ext/VisualStudio/wixlib/VS11.wxs new file mode 100644 index 00000000..d3f31843 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS11.wxs @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VS14.wxs b/src/ext/VisualStudio/wixlib/VS14.wxs new file mode 100644 index 00000000..83449802 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS14.wxs @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VS2003.wxs b/src/ext/VisualStudio/wixlib/VS2003.wxs new file mode 100644 index 00000000..1e5d36d9 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS2003.wxs @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VS2005.wxs b/src/ext/VisualStudio/wixlib/VS2005.wxs new file mode 100644 index 00000000..ef538099 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS2005.wxs @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VS2008.wxs b/src/ext/VisualStudio/wixlib/VS2008.wxs new file mode 100644 index 00000000..43bf1d1e --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS2008.wxs @@ -0,0 +1,299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VS2010.wxs b/src/ext/VisualStudio/wixlib/VS2010.wxs new file mode 100644 index 00000000..6c940b86 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS2010.wxs @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VS2012.wxs b/src/ext/VisualStudio/wixlib/VS2012.wxs new file mode 100644 index 00000000..513d8684 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS2012.wxs @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VS2013.wxs b/src/ext/VisualStudio/wixlib/VS2013.wxs new file mode 100644 index 00000000..6681b43f --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS2013.wxs @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VS2015.wxs b/src/ext/VisualStudio/wixlib/VS2015.wxs new file mode 100644 index 00000000..f14802e2 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS2015.wxs @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VS2017.wxs b/src/ext/VisualStudio/wixlib/VS2017.wxs new file mode 100644 index 00000000..5524361d --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS2017.wxs @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VS2019.wxs b/src/ext/VisualStudio/wixlib/VS2019.wxs new file mode 100644 index 00000000..0be63dec --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VS2019.wxs @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VSExtension_Platform.wxi b/src/ext/VisualStudio/wixlib/VSExtension_Platform.wxi new file mode 100644 index 00000000..f9cd96f4 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VSExtension_Platform.wxi @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VSExtension_x86.wxs b/src/ext/VisualStudio/wixlib/VSExtension_x86.wxs new file mode 100644 index 00000000..288cf687 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VSExtension_x86.wxs @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/VsixPackage.wxs b/src/ext/VisualStudio/wixlib/VsixPackage.wxs new file mode 100644 index 00000000..5937177b --- /dev/null +++ b/src/ext/VisualStudio/wixlib/VsixPackage.wxs @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/caSuffix.wxi b/src/ext/VisualStudio/wixlib/caSuffix.wxi new file mode 100644 index 00000000..a56a2393 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/caSuffix.wxi @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/vs.v3.ncrunchproject b/src/ext/VisualStudio/wixlib/vs.v3.ncrunchproject new file mode 100644 index 00000000..319cd523 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs.wixproj b/src/ext/VisualStudio/wixlib/vs.wixproj new file mode 100644 index 00000000..db3e2cff --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs.wixproj @@ -0,0 +1,19 @@ + + + + + + + Library + true + en-us + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs b/src/ext/VisualStudio/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs new file mode 100644 index 00000000..66757349 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/BIN_File_60377.dll b/src/ext/VisualStudio/wixlib/vs2005/redist/BIN_File_60377.dll new file mode 100644 index 00000000..dfdddf66 Binary files /dev/null and b/src/ext/VisualStudio/wixlib/vs2005/redist/BIN_File_60377.dll differ diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/vsipCCSamples.HxK b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipCCSamples.HxK new file mode 100644 index 00000000..00db745c --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipCCSamples.HxK @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc.hxc b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc.hxc new file mode 100644 index 00000000..406e7f2b --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc.hxc @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc.hxt b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc.hxt new file mode 100644 index 00000000..613dcfbb --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc.hxt @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccALinks.hxk b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccALinks.hxk new file mode 100644 index 00000000..27017f76 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccALinks.hxk @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccBLinks.hxk b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccBLinks.hxk new file mode 100644 index 00000000..b37d2e18 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccBLinks.hxk @@ -0,0 +1,13 @@ + + + + diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccFLinks.hxk b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccFLinks.hxk new file mode 100644 index 00000000..2d37efbf --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccFLinks.hxk @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccKLinks.hxk b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccKLinks.hxk new file mode 100644 index 00000000..2938eff3 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccKLinks.hxk @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccNamedURLs.hxk b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccNamedURLs.hxk new file mode 100644 index 00000000..8691c54c --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccNamedURLs.hxk @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccSlinks.hxk b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccSlinks.hxk new file mode 100644 index 00000000..9d193521 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipccSlinks.hxk @@ -0,0 +1,14 @@ + + + + + diff --git a/src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc_reg.hxs b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc_reg.hxs new file mode 100644 index 00000000..3f2905c4 Binary files /dev/null and b/src/ext/VisualStudio/wixlib/vs2005/redist/vsipcc_reg.hxs differ diff --git a/src/ext/VisualStudio/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs b/src/ext/VisualStudio/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs new file mode 100644 index 00000000..9fb1a0e5 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/BIN_435439_x86_enu.dll b/src/ext/VisualStudio/wixlib/vs2008/redist/BIN_435439_x86_enu.dll new file mode 100644 index 00000000..7f5e9436 Binary files /dev/null and b/src/ext/VisualStudio/wixlib/vs2008/redist/BIN_435439_x86_enu.dll differ diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/_ALinks.hxk b/src/ext/VisualStudio/wixlib/vs2008/redist/_ALinks.hxk new file mode 100644 index 00000000..dd6df168 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/redist/_ALinks.hxk @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/_BLinks.hxk b/src/ext/VisualStudio/wixlib/vs2008/redist/_BLinks.hxk new file mode 100644 index 00000000..a2288162 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/redist/_BLinks.hxk @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/_CLinks.hxk b/src/ext/VisualStudio/wixlib/vs2008/redist/_CLinks.hxk new file mode 100644 index 00000000..da0df730 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/redist/_CLinks.hxk @@ -0,0 +1,13 @@ + + + + diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/_FLinks.hxk b/src/ext/VisualStudio/wixlib/vs2008/redist/_FLinks.hxk new file mode 100644 index 00000000..37dfda34 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/redist/_FLinks.hxk @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/_KLinks.hxk b/src/ext/VisualStudio/wixlib/vs2008/redist/_KLinks.hxk new file mode 100644 index 00000000..2303ed0c --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/redist/_KLinks.hxk @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/_SLinks.hxk b/src/ext/VisualStudio/wixlib/vs2008/redist/_SLinks.hxk new file mode 100644 index 00000000..9f65eca3 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/redist/_SLinks.hxk @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc90.hxc b/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc90.hxc new file mode 100644 index 00000000..9ad6869e --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc90.hxc @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc90.hxt b/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc90.hxt new file mode 100644 index 00000000..3ac4d5d6 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc90.hxt @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk b/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk new file mode 100644 index 00000000..aaa79158 --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc_samples.HxK b/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc_samples.HxK new file mode 100644 index 00000000..00db745c --- /dev/null +++ b/src/ext/VisualStudio/wixlib/vs2008/redist/_vsipcc_samples.HxK @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/src/ext/VisualStudio/wixlib/vs2008/redist/vsipcc_reg.hxs b/src/ext/VisualStudio/wixlib/vs2008/redist/vsipcc_reg.hxs new file mode 100644 index 00000000..f6446867 Binary files /dev/null and b/src/ext/VisualStudio/wixlib/vs2008/redist/vsipcc_reg.hxs differ diff --git a/src/ext/global.json b/src/ext/global.json new file mode 100644 index 00000000..23dd3fa6 --- /dev/null +++ b/src/ext/global.json @@ -0,0 +1,5 @@ +{ + "msbuild-sdks": { + "WixToolset.Sdk": "4.0.0-build-0211" + } +} diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl deleted file mode 100644 index 38c12ac1..00000000 --- a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - A newer version of [ProductName] is already installed. - MsiPackage - - diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs deleted file mode 100644 index c2196807..00000000 --- a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs deleted file mode 100644 index c8c72cc0..00000000 --- a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt deleted file mode 100644 index 1b4ffe8a..00000000 --- a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt +++ /dev/null @@ -1 +0,0 @@ -This is example.txt. \ No newline at end of file diff --git a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs deleted file mode 100644 index 306962e3..00000000 --- a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs +++ /dev/null @@ -1,45 +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.VisualStudio -{ - using System.Linq; - using WixBuildTools.TestSupport; - using WixToolset.Core.TestPackage; - using WixToolset.VisualStudio; - using Xunit; - - public class VisualStudioExtensionFixture - { - [Fact] - public void CanBuildUsingVsixPackage() - { - var folder = TestData.Get(@"TestData\UsingVsixPackage"); - var build = new Builder(folder, typeof(VSExtensionFactory), new[] { folder }); - - var results = build.BuildAndQuery(Build, "CustomAction"); - Assert.Equal(new[] - { - "CustomAction:SetVS2010Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2010_VSIX_INSTALLER_PATH]\t", - "CustomAction:SetVS2012Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2012_VSIX_INSTALLER_PATH]\t", - "CustomAction:SetVS2013Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2013_VSIX_INSTALLER_PATH]\t", - "CustomAction:SetVS2015Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2015_VSIX_INSTALLER_PATH]\t", - "CustomAction:vimLa9TyFoAVwf8JmA0_ZJHA69J2fo\t3122\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\" /admin\t", - "CustomAction:viuMpl8IvFSDAzTulrmpAzBwAmCRTQ\t1074\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\"\t", - "CustomAction:vrmLa9TyFoAVwf8JmA0_ZJHA69J2fo\t3442\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t", - "CustomAction:vruMpl8IvFSDAzTulrmpAzBwAmCRTQ\t1394\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t", - "CustomAction:VSFindInstances\t257\tVSCA\tFindInstances\t", - "CustomAction:vumLa9TyFoAVwf8JmA0_ZJHA69J2fo\t3186\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t", - "CustomAction:vuuMpl8IvFSDAzTulrmpAzBwAmCRTQ\t1138\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t", - "CustomAction:Vwd2012VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2012_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t", - "CustomAction:Vwd2013VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2013_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t", - "CustomAction:Vwd2015VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2015_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t", - }, results); - } - - private static void Build(string[] args) - { - var result = WixRunner.Execute(args) - .AssertSuccess(); - } - } -} diff --git a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj deleted file mode 100644 index 9172569f..00000000 --- a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - netcoreapp3.1 - false - - - - NU1701 - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject deleted file mode 100644 index 7b5b2139..00000000 --- a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.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/Symbols/HelpFileSymbol.cs b/src/wixext/Symbols/HelpFileSymbol.cs deleted file mode 100644 index 8078f4ab..00000000 --- a/src/wixext/Symbols/HelpFileSymbol.cs +++ /dev/null @@ -1,95 +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.VisualStudio -{ - using WixToolset.Data; - using WixToolset.VisualStudio.Symbols; - - public static partial class VSSymbolDefinitions - { - public static readonly IntermediateSymbolDefinition HelpFile = new IntermediateSymbolDefinition( - VSSymbolDefinitionType.HelpFile.ToString(), - new[] - { - new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.HelpFileName), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.LangID), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.HxSFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.HxIFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.HxQFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.HxRFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileSymbolFields.SamplesFileRef), IntermediateFieldType.String), - }, - typeof(HelpFileSymbol)); - } -} - -namespace WixToolset.VisualStudio.Symbols -{ - using WixToolset.Data; - - public enum HelpFileSymbolFields - { - HelpFileName, - LangID, - HxSFileRef, - HxIFileRef, - HxQFileRef, - HxRFileRef, - SamplesFileRef, - } - - public class HelpFileSymbol : IntermediateSymbol - { - public HelpFileSymbol() : base(VSSymbolDefinitions.HelpFile, null, null) - { - } - - public HelpFileSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFile, sourceLineNumber, id) - { - } - - public IntermediateField this[HelpFileSymbolFields index] => this.Fields[(int)index]; - - public string HelpFileName - { - get => this.Fields[(int)HelpFileSymbolFields.HelpFileName].AsString(); - set => this.Set((int)HelpFileSymbolFields.HelpFileName, value); - } - - public int? LangID - { - get => this.Fields[(int)HelpFileSymbolFields.LangID].AsNullableNumber(); - set => this.Set((int)HelpFileSymbolFields.LangID, value); - } - - public string HxSFileRef - { - get => this.Fields[(int)HelpFileSymbolFields.HxSFileRef].AsString(); - set => this.Set((int)HelpFileSymbolFields.HxSFileRef, value); - } - - public string HxIFileRef - { - get => this.Fields[(int)HelpFileSymbolFields.HxIFileRef].AsString(); - set => this.Set((int)HelpFileSymbolFields.HxIFileRef, value); - } - - public string HxQFileRef - { - get => this.Fields[(int)HelpFileSymbolFields.HxQFileRef].AsString(); - set => this.Set((int)HelpFileSymbolFields.HxQFileRef, value); - } - - public string HxRFileRef - { - get => this.Fields[(int)HelpFileSymbolFields.HxRFileRef].AsString(); - set => this.Set((int)HelpFileSymbolFields.HxRFileRef, value); - } - - public string SamplesFileRef - { - get => this.Fields[(int)HelpFileSymbolFields.SamplesFileRef].AsString(); - set => this.Set((int)HelpFileSymbolFields.SamplesFileRef, value); - } - } -} \ No newline at end of file diff --git a/src/wixext/Symbols/HelpFileToNamespaceSymbol.cs b/src/wixext/Symbols/HelpFileToNamespaceSymbol.cs deleted file mode 100644 index f18d6701..00000000 --- a/src/wixext/Symbols/HelpFileToNamespaceSymbol.cs +++ /dev/null @@ -1,55 +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.VisualStudio -{ - using WixToolset.Data; - using WixToolset.VisualStudio.Symbols; - - public static partial class VSSymbolDefinitions - { - public static readonly IntermediateSymbolDefinition HelpFileToNamespace = new IntermediateSymbolDefinition( - VSSymbolDefinitionType.HelpFileToNamespace.ToString(), - new[] - { - new IntermediateFieldDefinition(nameof(HelpFileToNamespaceSymbolFields.HelpFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileToNamespaceSymbolFields.HelpNamespaceRef), IntermediateFieldType.String), - }, - typeof(HelpFileToNamespaceSymbol)); - } -} - -namespace WixToolset.VisualStudio.Symbols -{ - using WixToolset.Data; - - public enum HelpFileToNamespaceSymbolFields - { - HelpFileRef, - HelpNamespaceRef, - } - - public class HelpFileToNamespaceSymbol : IntermediateSymbol - { - public HelpFileToNamespaceSymbol() : base(VSSymbolDefinitions.HelpFileToNamespace, null, null) - { - } - - public HelpFileToNamespaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFileToNamespace, sourceLineNumber, id) - { - } - - public IntermediateField this[HelpFileToNamespaceSymbolFields index] => this.Fields[(int)index]; - - public string HelpFileRef - { - get => this.Fields[(int)HelpFileToNamespaceSymbolFields.HelpFileRef].AsString(); - set => this.Set((int)HelpFileToNamespaceSymbolFields.HelpFileRef, value); - } - - public string HelpNamespaceRef - { - get => this.Fields[(int)HelpFileToNamespaceSymbolFields.HelpNamespaceRef].AsString(); - set => this.Set((int)HelpFileToNamespaceSymbolFields.HelpNamespaceRef, value); - } - } -} \ No newline at end of file diff --git a/src/wixext/Symbols/HelpFilterSymbol.cs b/src/wixext/Symbols/HelpFilterSymbol.cs deleted file mode 100644 index 9deb47d0..00000000 --- a/src/wixext/Symbols/HelpFilterSymbol.cs +++ /dev/null @@ -1,55 +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.VisualStudio -{ - using WixToolset.Data; - using WixToolset.VisualStudio.Symbols; - - public static partial class VSSymbolDefinitions - { - public static readonly IntermediateSymbolDefinition HelpFilter = new IntermediateSymbolDefinition( - VSSymbolDefinitionType.HelpFilter.ToString(), - new[] - { - new IntermediateFieldDefinition(nameof(HelpFilterSymbolFields.Description), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFilterSymbolFields.QueryString), IntermediateFieldType.String), - }, - typeof(HelpFilterSymbol)); - } -} - -namespace WixToolset.VisualStudio.Symbols -{ - using WixToolset.Data; - - public enum HelpFilterSymbolFields - { - Description, - QueryString, - } - - public class HelpFilterSymbol : IntermediateSymbol - { - public HelpFilterSymbol() : base(VSSymbolDefinitions.HelpFilter, null, null) - { - } - - public HelpFilterSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFilter, sourceLineNumber, id) - { - } - - public IntermediateField this[HelpFilterSymbolFields index] => this.Fields[(int)index]; - - public string Description - { - get => this.Fields[(int)HelpFilterSymbolFields.Description].AsString(); - set => this.Set((int)HelpFilterSymbolFields.Description, value); - } - - public string QueryString - { - get => this.Fields[(int)HelpFilterSymbolFields.QueryString].AsString(); - set => this.Set((int)HelpFilterSymbolFields.QueryString, value); - } - } -} \ No newline at end of file diff --git a/src/wixext/Symbols/HelpFilterToNamespaceSymbol.cs b/src/wixext/Symbols/HelpFilterToNamespaceSymbol.cs deleted file mode 100644 index f3d21289..00000000 --- a/src/wixext/Symbols/HelpFilterToNamespaceSymbol.cs +++ /dev/null @@ -1,55 +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.VisualStudio -{ - using WixToolset.Data; - using WixToolset.VisualStudio.Symbols; - - public static partial class VSSymbolDefinitions - { - public static readonly IntermediateSymbolDefinition HelpFilterToNamespace = new IntermediateSymbolDefinition( - VSSymbolDefinitionType.HelpFilterToNamespace.ToString(), - new[] - { - new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceSymbolFields.HelpFilterRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceSymbolFields.HelpNamespaceRef), IntermediateFieldType.String), - }, - typeof(HelpFilterToNamespaceSymbol)); - } -} - -namespace WixToolset.VisualStudio.Symbols -{ - using WixToolset.Data; - - public enum HelpFilterToNamespaceSymbolFields - { - HelpFilterRef, - HelpNamespaceRef, - } - - public class HelpFilterToNamespaceSymbol : IntermediateSymbol - { - public HelpFilterToNamespaceSymbol() : base(VSSymbolDefinitions.HelpFilterToNamespace, null, null) - { - } - - public HelpFilterToNamespaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFilterToNamespace, sourceLineNumber, id) - { - } - - public IntermediateField this[HelpFilterToNamespaceSymbolFields index] => this.Fields[(int)index]; - - public string HelpFilterRef - { - get => this.Fields[(int)HelpFilterToNamespaceSymbolFields.HelpFilterRef].AsString(); - set => this.Set((int)HelpFilterToNamespaceSymbolFields.HelpFilterRef, value); - } - - public string HelpNamespaceRef - { - get => this.Fields[(int)HelpFilterToNamespaceSymbolFields.HelpNamespaceRef].AsString(); - set => this.Set((int)HelpFilterToNamespaceSymbolFields.HelpNamespaceRef, value); - } - } -} \ No newline at end of file diff --git a/src/wixext/Symbols/HelpNamespaceSymbol.cs b/src/wixext/Symbols/HelpNamespaceSymbol.cs deleted file mode 100644 index 8d2c2f80..00000000 --- a/src/wixext/Symbols/HelpNamespaceSymbol.cs +++ /dev/null @@ -1,63 +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.VisualStudio -{ - using WixToolset.Data; - using WixToolset.VisualStudio.Symbols; - - public static partial class VSSymbolDefinitions - { - public static readonly IntermediateSymbolDefinition HelpNamespace = new IntermediateSymbolDefinition( - VSSymbolDefinitionType.HelpNamespace.ToString(), - new[] - { - new IntermediateFieldDefinition(nameof(HelpNamespaceSymbolFields.NamespaceName), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpNamespaceSymbolFields.CollectionFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpNamespaceSymbolFields.Description), IntermediateFieldType.String), - }, - typeof(HelpNamespaceSymbol)); - } -} - -namespace WixToolset.VisualStudio.Symbols -{ - using WixToolset.Data; - - public enum HelpNamespaceSymbolFields - { - NamespaceName, - CollectionFileRef, - Description, - } - - public class HelpNamespaceSymbol : IntermediateSymbol - { - public HelpNamespaceSymbol() : base(VSSymbolDefinitions.HelpNamespace, null, null) - { - } - - public HelpNamespaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpNamespace, sourceLineNumber, id) - { - } - - public IntermediateField this[HelpNamespaceSymbolFields index] => this.Fields[(int)index]; - - public string NamespaceName - { - get => this.Fields[(int)HelpNamespaceSymbolFields.NamespaceName].AsString(); - set => this.Set((int)HelpNamespaceSymbolFields.NamespaceName, value); - } - - public string CollectionFileRef - { - get => this.Fields[(int)HelpNamespaceSymbolFields.CollectionFileRef].AsString(); - set => this.Set((int)HelpNamespaceSymbolFields.CollectionFileRef, value); - } - - public string Description - { - get => this.Fields[(int)HelpNamespaceSymbolFields.Description].AsString(); - set => this.Set((int)HelpNamespaceSymbolFields.Description, value); - } - } -} \ No newline at end of file diff --git a/src/wixext/Symbols/HelpPluginSymbol.cs b/src/wixext/Symbols/HelpPluginSymbol.cs deleted file mode 100644 index a452fbd5..00000000 --- a/src/wixext/Symbols/HelpPluginSymbol.cs +++ /dev/null @@ -1,79 +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.VisualStudio -{ - using WixToolset.Data; - using WixToolset.VisualStudio.Symbols; - - public static partial class VSSymbolDefinitions - { - public static readonly IntermediateSymbolDefinition HelpPlugin = new IntermediateSymbolDefinition( - VSSymbolDefinitionType.HelpPlugin.ToString(), - new[] - { - new IntermediateFieldDefinition(nameof(HelpPluginSymbolFields.HelpNamespaceRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpPluginSymbolFields.ParentHelpNamespaceRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpPluginSymbolFields.HxTFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpPluginSymbolFields.HxAFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpPluginSymbolFields.ParentHxTFileRef), IntermediateFieldType.String), - }, - typeof(HelpPluginSymbol)); - } -} - -namespace WixToolset.VisualStudio.Symbols -{ - using WixToolset.Data; - - public enum HelpPluginSymbolFields - { - HelpNamespaceRef, - ParentHelpNamespaceRef, - HxTFileRef, - HxAFileRef, - ParentHxTFileRef, - } - - public class HelpPluginSymbol : IntermediateSymbol - { - public HelpPluginSymbol() : base(VSSymbolDefinitions.HelpPlugin, null, null) - { - } - - public HelpPluginSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpPlugin, sourceLineNumber, id) - { - } - - public IntermediateField this[HelpPluginSymbolFields index] => this.Fields[(int)index]; - - public string HelpNamespaceRef - { - get => this.Fields[(int)HelpPluginSymbolFields.HelpNamespaceRef].AsString(); - set => this.Set((int)HelpPluginSymbolFields.HelpNamespaceRef, value); - } - - public string ParentHelpNamespaceRef - { - get => this.Fields[(int)HelpPluginSymbolFields.ParentHelpNamespaceRef].AsString(); - set => this.Set((int)HelpPluginSymbolFields.ParentHelpNamespaceRef, value); - } - - public string HxTFileRef - { - get => this.Fields[(int)HelpPluginSymbolFields.HxTFileRef].AsString(); - set => this.Set((int)HelpPluginSymbolFields.HxTFileRef, value); - } - - public string HxAFileRef - { - get => this.Fields[(int)HelpPluginSymbolFields.HxAFileRef].AsString(); - set => this.Set((int)HelpPluginSymbolFields.HxAFileRef, value); - } - - public string ParentHxTFileRef - { - get => this.Fields[(int)HelpPluginSymbolFields.ParentHxTFileRef].AsString(); - set => this.Set((int)HelpPluginSymbolFields.ParentHxTFileRef, value); - } - } -} \ No newline at end of file diff --git a/src/wixext/Symbols/VSSymbolDefinitions.cs b/src/wixext/Symbols/VSSymbolDefinitions.cs deleted file mode 100644 index cea6a2b6..00000000 --- a/src/wixext/Symbols/VSSymbolDefinitions.cs +++ /dev/null @@ -1,59 +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.VisualStudio -{ - using System; - using WixToolset.Data; - - public enum VSSymbolDefinitionType - { - HelpFile, - HelpFileToNamespace, - HelpFilter, - HelpFilterToNamespace, - HelpNamespace, - HelpPlugin, - } - - public static partial class VSSymbolDefinitions - { - public static readonly Version Version = new Version("4.0.0"); - - public static IntermediateSymbolDefinition ByName(string name) - { - if (!Enum.TryParse(name, out VSSymbolDefinitionType type)) - { - return null; - } - - return ByType(type); - } - - public static IntermediateSymbolDefinition ByType(VSSymbolDefinitionType type) - { - switch (type) - { - case VSSymbolDefinitionType.HelpFile: - return VSSymbolDefinitions.HelpFile; - - case VSSymbolDefinitionType.HelpFileToNamespace: - return VSSymbolDefinitions.HelpFileToNamespace; - - case VSSymbolDefinitionType.HelpFilter: - return VSSymbolDefinitions.HelpFilter; - - case VSSymbolDefinitionType.HelpFilterToNamespace: - return VSSymbolDefinitions.HelpFilterToNamespace; - - case VSSymbolDefinitionType.HelpNamespace: - return VSSymbolDefinitions.HelpNamespace; - - case VSSymbolDefinitionType.HelpPlugin: - return VSSymbolDefinitions.HelpPlugin; - - default: - throw new ArgumentOutOfRangeException(nameof(type)); - } - } - } -} diff --git a/src/wixext/VSCompiler.cs b/src/wixext/VSCompiler.cs deleted file mode 100644 index 65f0f97d..00000000 --- a/src/wixext/VSCompiler.cs +++ /dev/null @@ -1,828 +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.VisualStudio -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.Xml.Linq; - using WixToolset.Data; - using WixToolset.Data.Symbols; - using WixToolset.Data.WindowsInstaller; - using WixToolset.Extensibility; - using WixToolset.VisualStudio.Symbols; - - /// - /// The compiler for the WiX Toolset Visual Studio Extension. - /// - public sealed class VSCompiler : BaseCompilerExtension - { - internal const int MsidbCustomActionTypeExe = 0x00000002; // Target = command line args - internal const int MsidbCustomActionTypeProperty = 0x00000030; // Source = full path to executable - internal const int MsidbCustomActionTypeContinue = 0x00000040; // ignore action return status; continue running - internal const int MsidbCustomActionTypeRollback = 0x00000100; // in conjunction with InScript: queue in Rollback script - internal const int MsidbCustomActionTypeInScript = 0x00000400; // queue for execution within script - internal const int MsidbCustomActionTypeNoImpersonate = 0x00000800; // queue for not impersonating - - public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/vs"; - - public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context) - { - switch (parentElement.Name.LocalName) - { - case "Component": - switch (element.Name.LocalName) - { - case "VsixPackage": - this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], null); - break; - default: - this.ParseHelper.UnexpectedElement(parentElement, element); - break; - } - break; - case "File": - switch (element.Name.LocalName) - { - case "HelpCollection": - this.ParseHelpCollectionElement(intermediate, section, element, context["FileId"]); - break; - case "HelpFile": - this.ParseHelpFileElement(intermediate, section, element, context["FileId"]); - break; - case "VsixPackage": - this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], context["FileId"]); - break; - default: - this.ParseHelper.UnexpectedElement(parentElement, element); - break; - } - break; - case "Fragment": - case "Module": - case "Package": - switch (element.Name.LocalName) - { - case "HelpCollectionRef": - this.ParseHelpCollectionRefElement(intermediate, section, element); - break; - case "HelpFilter": - this.ParseHelpFilterElement(intermediate, section, element); - break; - default: - this.ParseHelper.UnexpectedElement(parentElement, element); - break; - } - break; - default: - this.ParseHelper.UnexpectedElement(parentElement, element); - break; - } - } - - private void ParseHelpCollectionRefElement(Intermediate intermediate, IntermediateSection section, XElement element) - { - var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - Identifier id = null; - - 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); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpNamespace, id.Id); - 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")); - } - - foreach (var child in element.Elements()) - { - if (this.Namespace == child.Name.Namespace) - { - switch (child.Name.LocalName) - { - case "HelpFileRef": - this.ParseHelpFileRefElement(intermediate, section, child, id); - break; - default: - this.ParseHelper.UnexpectedElement(element, child); - break; - } - } - else - { - this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); - } - } - } - - private void ParseHelpCollectionElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) - { - var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - Identifier id = null; - string description = null; - string name = null; - var suppressCAs = YesNoType.No; - - 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 "Description": - description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - break; - case "Name": - name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - break; - case "SuppressCustomActions": - suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); - 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("vshc", fileId, description, name); - } - - if (null == description) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Description")); - } - - if (null == name) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); - } - - foreach (var child in element.Elements()) - { - if (this.Namespace == child.Name.Namespace) - { - switch (child.Name.LocalName) - { - case "HelpFileRef": - this.ParseHelpFileRefElement(intermediate, section, child, id); - break; - case "HelpFilterRef": - this.ParseHelpFilterRefElement(intermediate, section, child, id); - break; - case "PlugCollectionInto": - this.ParsePlugCollectionIntoElement(intermediate, section, child, id); - break; - default: - this.ParseHelper.UnexpectedElement(element, child); - break; - } - } - else - { - this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); - } - } - - if (!this.Messaging.EncounteredError) - { - section.AddSymbol(new HelpNamespaceSymbol(sourceLineNumbers, id) - { - NamespaceName = name, - CollectionFileRef = fileId, - Description = description, - }); - - if (YesNoType.No == suppressCAs) - { - this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); - } - } - } - - private void ParseHelpFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) - { - var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - Identifier id = null; - string name = null; - var language = CompilerConstants.IntegerNotSet; - string hxi = null; - string hxq = null; - string hxr = null; - string samples = null; - var suppressCAs = YesNoType.No; - - 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 "AttributeIndex": - hxr = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, hxr); - break; - case "Index": - hxi = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, hxi); - break; - case "Language": - language = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); - break; - case "Name": - name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - break; - case "SampleLocation": - samples = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, samples); - break; - case "Search": - hxq = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, hxq); - break; - case "SuppressCustomActions": - suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); - 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("vshf", fileId, name, language.ToString(CultureInfo.InvariantCulture.NumberFormat)); - } - - if (null == name) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); - } - - // Uninstall will always fail silently, leaving file registered, if Language is not set - if (CompilerConstants.IntegerNotSet == language) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Language")); - } - - this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - - if (!this.Messaging.EncounteredError) - { - section.AddSymbol(new HelpFileSymbol(sourceLineNumbers, id) - { - HelpFileName = name, - LangID = language, - HxSFileRef = fileId, - HxIFileRef = hxi, - HxQFileRef = hxq, - HxRFileRef = hxr, - SamplesFileRef = samples, - }); - - if (YesNoType.No == suppressCAs) - { - this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); - } - } - } - - private void ParseHelpFileRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) - { - var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - Identifier id = null; - - 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); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpFile, id.Id); - 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); - - if (!this.Messaging.EncounteredError) - { - section.AddSymbol(new HelpFileToNamespaceSymbol(sourceLineNumbers, id) - { - HelpFileRef = id.Id, - HelpNamespaceRef = collectionId.Id, - }); - } - } - - private void ParseHelpFilterElement(Intermediate intermediate, IntermediateSection section, XElement element) - { - var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - Identifier id = null; - string filterDefinition = null; - string name = null; - var suppressCAs = YesNoType.No; - - 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 "FilterDefinition": - filterDefinition = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - break; - case "Name": - name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - break; - case "SuppressCustomActions": - suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); - 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("hfl", name, filterDefinition); - } - - if (null == name) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); - } - - this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - - if (!this.Messaging.EncounteredError) - { - section.AddSymbol(new HelpFilterSymbol(sourceLineNumbers, id) - { - Description = name, - QueryString = filterDefinition, - }); - - if (YesNoType.No == suppressCAs) - { - this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); - } - } - } - - private void ParseHelpFilterRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) - { - var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - Identifier id = null; - - 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); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpFilter, id.Id); - 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); - - if (!this.Messaging.EncounteredError) - { - section.AddSymbol(new HelpFilterToNamespaceSymbol(sourceLineNumbers, id) - { - HelpFilterRef = id.Id, - HelpNamespaceRef = collectionId.Id, - }); - } - } - - private void ParsePlugCollectionIntoElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier parentId) - { - var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - string hxa = null; - string hxt = null; - string hxtParent = null; - string namespaceParent = null; - string feature = null; - var suppressExternalNamespaces = YesNoType.No; - - foreach (var attrib in element.Attributes()) - { - if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) - { - switch (attrib.Name.LocalName) - { - case "Attributes": - hxa = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - break; - case "TableOfContents": - hxt = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - break; - case "TargetCollection": - namespaceParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - break; - case "TargetTableOfContents": - hxtParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - break; - case "TargetFeature": - feature = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - break; - case "SuppressExternalNamespaces": - suppressExternalNamespaces = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); - break; - default: - this.ParseHelper.UnexpectedAttribute(element, attrib); - break; - } - } - else - { - this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); - } - } - - var pluginVS05 = namespaceParent.Equals("MS_VSIPCC_v80", StringComparison.Ordinal); - var pluginVS08 = namespaceParent.Equals("MS.VSIPCC.v90", StringComparison.Ordinal); - - if (null == namespaceParent) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetCollection")); - } - - if (null == feature && (pluginVS05 || pluginVS08) && YesNoType.No == suppressExternalNamespaces) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetFeature")); - } - - this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - - if (!this.Messaging.EncounteredError) - { - section.AddSymbol(new HelpPluginSymbol(sourceLineNumbers, parentId) - { - HelpNamespaceRef = parentId.Id, - ParentHelpNamespaceRef = namespaceParent, - HxTFileRef = hxt, - HxAFileRef = hxa, - ParentHxTFileRef = hxtParent, - }); - - if (pluginVS05) - { - if (YesNoType.No == suppressExternalNamespaces) - { - // Bring in the help 2 base namespace components for VS 2005 - this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, - ComplexReferenceChildType.ComponentGroup, "Help2_VS2005_Namespace_Components", false); - // Reference CustomAction since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "CA_HxMerge_VSIPCC_VSCC"); - } - } - else if (pluginVS08) - { - if (YesNoType.No == suppressExternalNamespaces) - { - // Bring in the help 2 base namespace components for VS 2008 - this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, - ComplexReferenceChildType.ComponentGroup, "Help2_VS2008_Namespace_Components", false); - // Reference CustomAction since nothing will happen without it - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); - } - } - else - { - // Reference the parent namespace to enforce the foreign key relationship - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpNamespace, namespaceParent); - } - } - } - - private void ParseVsixPackageElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) - { - var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - var propertyId = "VS_VSIX_INSTALLER_PATH"; - string packageId = null; - var permanent = YesNoType.NotSet; - string target = null; - string targetVersion = null; - var vital = YesNoType.NotSet; - - foreach (var attrib in element.Attributes()) - { - if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) - { - switch (attrib.Name.LocalName) - { - case "File": - if (String.IsNullOrEmpty(fileId)) - { - fileId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - } - else - { - this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, "File", "File")); - } - break; - case "PackageId": - packageId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - break; - case "Permanent": - permanent = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); - break; - case "Target": - target = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); - switch (target.ToLowerInvariant()) - { - case "integrated": - case "integratedshell": - target = "IntegratedShell"; - break; - case "professional": - target = "Pro"; - break; - case "premium": - target = "Premium"; - break; - case "ultimate": - target = "Ultimate"; - break; - case "vbexpress": - target = "VBExpress"; - break; - case "vcexpress": - target = "VCExpress"; - break; - case "vcsexpress": - target = "VCSExpress"; - break; - case "vwdexpress": - target = "VWDExpress"; - break; - } - break; - case "TargetVersion": - targetVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib); - break; - case "Vital": - vital = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); - break; - case "VsixInstallerPathProperty": - propertyId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - break; - default: - this.ParseHelper.UnexpectedAttribute(element, attrib); - break; - } - } - else - { - this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); - } - } - - if (String.IsNullOrEmpty(fileId)) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "File")); - } - - if (String.IsNullOrEmpty(packageId)) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "PackageId")); - } - - if (!String.IsNullOrEmpty(target) && String.IsNullOrEmpty(targetVersion)) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetVersion", "Target")); - } - else if (String.IsNullOrEmpty(target) && !String.IsNullOrEmpty(targetVersion)) - { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Target", "TargetVersion")); - } - - this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - - if (!this.Messaging.EncounteredError) - { - // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Property, propertyId); - - // Ensure there is a reference to the package file (even if we are a child under it). - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, fileId); - - var cmdlinePrefix = "/q "; - - if (!String.IsNullOrEmpty(target)) - { - cmdlinePrefix = String.Format("{0} /skuName:{1} /skuVersion:{2}", cmdlinePrefix, target, targetVersion); - } - - var installAfter = "WriteRegistryValues"; // by default, come after the registry key registration. - - var installNamePerUser = this.ParseHelper.CreateIdentifier("viu", componentId, fileId, "per-user", target, targetVersion); - var installNamePerMachine = this.ParseHelper.CreateIdentifier("vim", componentId, fileId, "per-machine", target, targetVersion); - var installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId); - var installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin"); - var installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. - var installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. - var installPerUserCA = new CustomActionSymbol(sourceLineNumbers, installNamePerUser) - { - ExecutionType = CustomActionExecutionType.Deferred, - Impersonate = true, - }; - var installPerMachineCA = new CustomActionSymbol(sourceLineNumbers, installNamePerMachine) - { - ExecutionType = CustomActionExecutionType.Deferred, - Impersonate = false, - }; - - // If the package is not vital, mark the install action as continue. - if (vital == YesNoType.No) - { - installPerUserCA.IgnoreResult = true; - installPerMachineCA.IgnoreResult = true; - } - else // the package is vital so ensure there is a rollback action scheduled. - { - var rollbackNamePerUser = this.ParseHelper.CreateIdentifier("vru", componentId, fileId, "per-user", target, targetVersion); - var rollbackNamePerMachine = this.ParseHelper.CreateIdentifier("vrm", componentId, fileId, "per-machine", target, targetVersion); - var rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); - var rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin"); - var rollbackConditionPerUser = String.Format("NOT ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. - var rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. - var rollbackPerUserCA = new CustomActionSymbol(sourceLineNumbers, rollbackNamePerUser) - { - ExecutionType = CustomActionExecutionType.Rollback, - IgnoreResult = true, - Impersonate = true, - }; - var rollbackPerMachineCA = new CustomActionSymbol(sourceLineNumbers, rollbackNamePerMachine) - { - ExecutionType = CustomActionExecutionType.Rollback, - IgnoreResult = true, - Impersonate = false, - }; - - this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackPerUserCA, rollbackConditionPerUser, null, installAfter); - this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackPerMachineCA, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); - - installAfter = rollbackNamePerMachine.Id; - } - - this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installPerUserCA, installConditionPerUser, null, installAfter); - this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installPerMachineCA, installConditionPerMachine, null, installNamePerUser.Id); - - // If not permanent, schedule the uninstall custom action. - if (permanent != YesNoType.Yes) - { - var uninstallNamePerUser = this.ParseHelper.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); - var uninstallNamePerMachine = this.ParseHelper.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); - var uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); - var uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin"); - var uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. - var uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. - var uninstallPerUserCA = new CustomActionSymbol(sourceLineNumbers, uninstallNamePerUser) - { - ExecutionType = CustomActionExecutionType.Deferred, - IgnoreResult = true, - Impersonate = true, - }; - var uninstallPerMachineCA = new CustomActionSymbol(sourceLineNumbers, uninstallNamePerMachine) - { - ExecutionType = CustomActionExecutionType.Deferred, - IgnoreResult = true, - Impersonate = false, - }; - - this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallPerUserCA, uninstallConditionPerUser, "InstallFinalize", null); - this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallPerMachineCA, uninstallConditionPerMachine, "InstallFinalize", null); - } - } - } - - private void SchedulePropertyExeAction(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, CustomActionSymbol caTemplate, string condition, string beforeAction, string afterAction) - { - const SequenceTable sequence = SequenceTable.InstallExecuteSequence; - - caTemplate.SourceType = CustomActionSourceType.Property; - caTemplate.Source = source; - caTemplate.TargetType = CustomActionTargetType.Exe; - caTemplate.Target = cmdline; - section.AddSymbol(caTemplate); - - section.AddSymbol(new WixActionSymbol(sourceLineNumbers, new Identifier(name.Access, sequence, name.Id)) - { - SequenceTable = SequenceTable.InstallExecuteSequence, - Action = name.Id, - Condition = condition, - // no explicit sequence - Before = beforeAction, - After = afterAction, - Overridable = false, - }); - - if (null != beforeAction) - { - if (WindowsInstallerStandard.IsStandardAction(beforeAction)) - { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixAction, sequence.ToString(), beforeAction); - } - else - { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, beforeAction); - } - } - - if (null != afterAction) - { - if (WindowsInstallerStandard.IsStandardAction(afterAction)) - { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixAction, sequence.ToString(), afterAction); - } - else - { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, afterAction); - } - } - } - - private void AddReferenceToRegisterMicrosoftHelp(IntermediateSection section, SourceLineNumber sourceLineNumbers) - { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); - } - } -} diff --git a/src/wixext/VSDecompiler.cs b/src/wixext/VSDecompiler.cs deleted file mode 100644 index 08dc364a..00000000 --- a/src/wixext/VSDecompiler.cs +++ /dev/null @@ -1,298 +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.VisualStudio -{ -#if TODO_CONSIDER_DECOMPILER - using System; - using System.Collections; - using System.Diagnostics; - using System.Globalization; - using WixToolset.Data; - using WixToolset.Extensibility; - using VS = WixToolset.Extensions.Serialize.VS; - using Wix = WixToolset.Data.Serialize; - - /// - /// The decompiler for the WiX Toolset Visual Studio Extension. - /// - public sealed class VSDecompiler : DecompilerExtension - { - /// - /// Creates a decompiler for VS Extension. - /// - public VSDecompiler() - { - this.TableDefinitions = VSExtensionData.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 VSExtensionData.GetExtensionLibrary(tableDefinitions); - } - - /// - /// Decompiles an extension table. - /// - /// The table to decompile. - public override void DecompileTable(Table table) - { - switch (table.Name) - { - case "HelpFile": - this.DecompileHelpFileTable(table); - break; - case "HelpFileToNamespace": - this.DecompileHelpFileToNamespaceTable(table); - break; - case "HelpFilter": - this.DecompileHelpFilterTable(table); - break; - case "HelpFilterToNamespace": - this.DecompileHelpFilterToNamespaceTable(table); - break; - case "HelpNamespace": - this.DecompileHelpNamespaceTable(table); - break; - case "HelpPlugin": - this.DecompileHelpPluginTable(table); - break; - default: - base.DecompileTable(table); - break; - } - } - - /// - /// Decompile the HelpFile table. - /// - /// The table to decompile. - private void DecompileHelpFileTable(Table table) - { - foreach (Row row in table.Rows) - { - VS.HelpFile helpFile = new VS.HelpFile(); - - helpFile.Id = (string)row[0]; - - helpFile.Name = (string)row[1]; - - if (null != row[2]) - { - helpFile.Language = (int)row[2]; - } - - if (null != row[4]) - { - helpFile.Index = (string)row[4]; - } - - if (null != row[5]) - { - helpFile.Search = (string)row[5]; - } - - if (null != row[6]) - { - helpFile.AttributeIndex = (string)row[6]; - } - - if (null != row[7]) - { - helpFile.SampleLocation = (string)row[7]; - } - - if (this.Core.RootElement is Wix.Module) - { - helpFile.SuppressCustomActions = VS.YesNoType.yes; - } - - Wix.File file = (Wix.File)this.Core.GetIndexedElement("File", (string)row[3]); - if (null != file) - { - file.AddChild(helpFile); - } - else - { - this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "File_HxS", (string)row[3], "File")); - } - } - } - - /// - /// Decompile the HelpFileToNamespace table. - /// - /// The table to decompile. - private void DecompileHelpFileToNamespaceTable(Table table) - { - foreach (Row row in table.Rows) - { - VS.HelpFileRef helpFileRef = new VS.HelpFileRef(); - - helpFileRef.Id = (string)row[0]; - - VS.HelpCollection helpCollection = (VS.HelpCollection)this.Core.GetIndexedElement("HelpNamespace", (string)row[1]); - if (null != helpCollection) - { - helpCollection.AddChild(helpFileRef); - } - else - { - this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "HelpNamespace_", (string)row[1], "HelpNamespace")); - } - } - } - - /// - /// Decompile the HelpFilter table. - /// - /// The table to decompile. - private void DecompileHelpFilterTable(Table table) - { - foreach (Row row in table.Rows) - { - VS.HelpFilter helpFilter = new VS.HelpFilter(); - - helpFilter.Id = (string)row[0]; - - helpFilter.Name = (string)row[1]; - - if (null != row[2]) - { - helpFilter.FilterDefinition = (string)row[2]; - } - - if (this.Core.RootElement is Wix.Module) - { - helpFilter.SuppressCustomActions = VS.YesNoType.yes; - } - - this.Core.RootElement.AddChild(helpFilter); - } - } - - /// - /// Decompile the HelpFilterToNamespace table. - /// - /// The table to decompile. - private void DecompileHelpFilterToNamespaceTable(Table table) - { - foreach (Row row in table.Rows) - { - VS.HelpFilterRef helpFilterRef = new VS.HelpFilterRef(); - - helpFilterRef.Id = (string)row[0]; - - VS.HelpCollection helpCollection = (VS.HelpCollection)this.Core.GetIndexedElement("HelpNamespace", (string)row[1]); - if (null != helpCollection) - { - helpCollection.AddChild(helpFilterRef); - } - else - { - this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "HelpNamespace_", (string)row[1], "HelpNamespace")); - } - } - } - - /// - /// Decompile the HelpNamespace table. - /// - /// The table to decompile. - private void DecompileHelpNamespaceTable(Table table) - { - foreach (Row row in table.Rows) - { - VS.HelpCollection helpCollection = new VS.HelpCollection(); - - helpCollection.Id = (string)row[0]; - - helpCollection.Name = (string)row[1]; - - if (null != row[3]) - { - helpCollection.Description = (string)row[3]; - } - - if (this.Core.RootElement is Wix.Module) - { - helpCollection.SuppressCustomActions = VS.YesNoType.yes; - } - - Wix.File file = (Wix.File)this.Core.GetIndexedElement("File", (string)row[2]); - if (null != file) - { - file.AddChild(helpCollection); - } - else if (0 != String.Compare(helpCollection.Id, "MS_VSIPCC_v80", StringComparison.Ordinal) && - 0 != String.Compare(helpCollection.Id, "MS.VSIPCC.v90", StringComparison.Ordinal)) - { - this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "File_Collection", (string)row[2], "File")); - } - this.Core.IndexElement(row, helpCollection); - } - } - - /// - /// Decompile the HelpPlugin table. - /// - /// The table to decompile. - private void DecompileHelpPluginTable(Table table) - { - foreach (Row row in table.Rows) - { - VS.PlugCollectionInto plugCollectionInto = new VS.PlugCollectionInto(); - - plugCollectionInto.TargetCollection = (string)row[1]; - - if (null != row[2]) - { - plugCollectionInto.TableOfContents = (string)row[2]; - } - - if (null != row[3]) - { - plugCollectionInto.Attributes = (string)row[3]; - } - - if (null != row[4]) - { - plugCollectionInto.TargetTableOfContents = (string)row[4]; - } - - if (this.Core.RootElement is Wix.Module) - { - plugCollectionInto.SuppressExternalNamespaces = VS.YesNoType.yes; - } - - //we cannot do this work because we cannot get the FeatureComponent table - //plugCollectionInto.TargetFeature = DecompileHelpComponents(); - - VS.HelpCollection helpCollection = (VS.HelpCollection)this.Core.GetIndexedElement("HelpNamespace", (string)row[0]); - if (null != helpCollection) - { - helpCollection.AddChild(plugCollectionInto); - } - else - { - this.Core.OnMessage(WixWarnings.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter), "HelpNamespace_", (string)row[0], "HelpNamespace")); - } - } - } - //private string DecompileHelpComponents() - //{ - // throw new NotImplementedException(); - // //Find both known compontents from FeatureComponents table and build feature list - - // //remove components from FeatureComponents - - // //return a space delimited list of features that mapped to our help components - // return String.Empty; - //} - } -#endif -} diff --git a/src/wixext/VSExtensionData.cs b/src/wixext/VSExtensionData.cs deleted file mode 100644 index 51199d2c..00000000 --- a/src/wixext/VSExtensionData.cs +++ /dev/null @@ -1,27 +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.VisualStudio -{ - using WixToolset.Data; - using WixToolset.Extensibility; - - public sealed class VSExtensionData : BaseExtensionData - { - /// - /// Gets the default culture. - /// - /// The default culture. - public override string DefaultCulture => "en-US"; - - public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) - { - symbolDefinition = VSSymbolDefinitions.ByName(name); - return symbolDefinition != null; - } - - public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) - { - return Intermediate.Load(typeof(VSExtensionData).Assembly, "WixToolset.VisualStudio.vs.wixlib", symbolDefinitions); - } - } -} diff --git a/src/wixext/VSExtensionFactory.cs b/src/wixext/VSExtensionFactory.cs deleted file mode 100644 index c6e0cc31..00000000 --- a/src/wixext/VSExtensionFactory.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.VisualStudio -{ - using System; - using System.Collections.Generic; - using WixToolset.Extensibility; - - public class VSExtensionFactory : BaseExtensionFactory - { - protected override IReadOnlyCollection ExtensionTypes => new[] - { - typeof(VSCompiler), - typeof(VSExtensionData), - typeof(VSWindowsInstallerBackendBinderExtension), - }; - } -} diff --git a/src/wixext/VSTableDefinitions.cs b/src/wixext/VSTableDefinitions.cs deleted file mode 100644 index 0c3ca907..00000000 --- a/src/wixext/VSTableDefinitions.cs +++ /dev/null @@ -1,97 +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.VisualStudio -{ - using WixToolset.Data.WindowsInstaller; - - public static class VSTableDefinitions - { - public static readonly TableDefinition HelpFile = new TableDefinition( - "HelpFile", - VSSymbolDefinitions.HelpFile, - new[] - { - new ColumnDefinition("HelpFileKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("HelpFileName", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this HelpFile (required)."), - new ColumnDefinition("LangID", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Language, description: "Language ID for content file (optional)."), - new ColumnDefinition("File_HxS", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxS (Title) file (required).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("File_HxI", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxI (Index) file (optional).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("File_HxQ", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxQ (Query) file (optional).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("File_HxR", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxR (Attributes) file (optional).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("File_Samples", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for a file that is in the 'root' of the samples directory for this HelpFile (optional).", modularizeType: ColumnModularizeType.Column), - }, - symbolIdIsPrimaryKey: true - ); - - public static readonly TableDefinition HelpFileToNamespace = new TableDefinition( - "HelpFileToNamespace", - VSSymbolDefinitions.HelpFileToNamespace, - new[] - { - new ColumnDefinition("HelpFile_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpFile", keyColumn: 1, description: "Foreign key into HelpFile table (required).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), - }, - symbolIdIsPrimaryKey: false - ); - - public static readonly TableDefinition HelpFilter = new TableDefinition( - "HelpFilter", - VSSymbolDefinitions.HelpFilter, - new[] - { - new ColumnDefinition("FilterKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpFilter (required).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("Description", ColumnType.Localized, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Friendly name for Filter (required)."), - new ColumnDefinition("QueryString", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Query String for Help Filter (optional)."), - }, - symbolIdIsPrimaryKey: true - ); - - public static readonly TableDefinition HelpFilterToNamespace = new TableDefinition( - "HelpFilterToNamespace", - VSSymbolDefinitions.HelpFilterToNamespace, - new[] - { - new ColumnDefinition("HelpFilter_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpFilter", keyColumn: 1, description: "Foreign key into HelpFilter table (required).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), - }, - symbolIdIsPrimaryKey: false - ); - - public static readonly TableDefinition HelpNamespace = new TableDefinition( - "HelpNamespace", - VSSymbolDefinitions.HelpNamespace, - new[] - { - new ColumnDefinition("NamespaceKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), - new ColumnDefinition("NamespaceName", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this Namespace (required)."), - new ColumnDefinition("File_Collection", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxC (Collection) file (required).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("Description", ColumnType.Localized, 0, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Friendly name for Namespace (optional)."), - }, - symbolIdIsPrimaryKey: true - ); - - public static readonly TableDefinition HelpPlugin = new TableDefinition( - "HelpPlugin", - VSSymbolDefinitions.HelpPlugin, - new[] - { - new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the child namespace that will be plugged into the parent namespace (required)."), - new ColumnDefinition("HelpNamespace_Parent", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the parent namespace into which the child will be inserted (required)."), - new ColumnDefinition("File_HxT", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxT file of child namespace (optional).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("File_HxA", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxA (Attributes) file of child namespace (optional).", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("File_ParentHxT", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxT file of parent namespace that now includes the new child namespace (optional).", modularizeType: ColumnModularizeType.Column), - }, - symbolIdIsPrimaryKey: false - ); - - public static readonly TableDefinition[] All = new[] - { - HelpFile, - HelpFileToNamespace, - HelpFilter, - HelpFilterToNamespace, - HelpNamespace, - HelpPlugin, - }; - } -} diff --git a/src/wixext/VSWindowsInstallerBackendBinderExtension.cs b/src/wixext/VSWindowsInstallerBackendBinderExtension.cs deleted file mode 100644 index d0d8648c..00000000 --- a/src/wixext/VSWindowsInstallerBackendBinderExtension.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.VisualStudio -{ - using System.Collections.Generic; - using WixToolset.Data.WindowsInstaller; - using WixToolset.Extensibility; - - public class VSWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension - { - public override IReadOnlyCollection TableDefinitions => VSTableDefinitions.All; - } -} diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj deleted file mode 100644 index 20282720..00000000 --- a/src/wixext/WixToolset.VisualStudio.wixext.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - netstandard2.0 - WixToolset.VisualStudio - WiX Toolset Visual Studio Extension - WiX Toolset VS Extension - true - true - - - - - - - - - - - - - - - - - - - diff --git a/src/wixext/WixToolset.VisualStudio.wixext.nuspec b/src/wixext/WixToolset.VisualStudio.wixext.nuspec deleted file mode 100644 index 51c9708e..00000000 --- a/src/wixext/WixToolset.VisualStudio.wixext.nuspec +++ /dev/null @@ -1,23 +0,0 @@ - - - - $id$ - $version$ - $title$ - $description$ - $authors$ - MS-RL - false - $copyright$ - $projectUrl$ - - - - - - - - - - - diff --git a/src/wixext/WixToolset.VisualStudio.wixext.targets b/src/wixext/WixToolset.VisualStudio.wixext.targets deleted file mode 100644 index 4542375f..00000000 --- a/src/wixext/WixToolset.VisualStudio.wixext.targets +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject b/src/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject deleted file mode 100644 index 56556a9f..00000000 --- a/src/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject +++ /dev/null @@ -1,7 +0,0 @@ - - - - ..\..\build\Debug\vs.wixlib - - - \ No newline at end of file diff --git a/src/wixlib/HTML_Help_Registration__RTL_X86.wxs b/src/wixlib/HTML_Help_Registration__RTL_X86.wxs deleted file mode 100644 index 2bdb810a..00000000 --- a/src/wixlib/HTML_Help_Registration__RTL_X86.wxs +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/Redist/BIN_File_107602.dll b/src/wixlib/Redist/BIN_File_107602.dll deleted file mode 100644 index aef2cf29..00000000 Binary files a/src/wixlib/Redist/BIN_File_107602.dll and /dev/null differ diff --git a/src/wixlib/Redist/BIN_File_46001.dll b/src/wixlib/Redist/BIN_File_46001.dll deleted file mode 100644 index 9e470267..00000000 Binary files a/src/wixlib/Redist/BIN_File_46001.dll and /dev/null differ diff --git a/src/wixlib/Redist/BIN_File_46002.dll b/src/wixlib/Redist/BIN_File_46002.dll deleted file mode 100644 index ae9c30dd..00000000 Binary files a/src/wixlib/Redist/BIN_File_46002.dll and /dev/null differ diff --git a/src/wixlib/VS11.wxs b/src/wixlib/VS11.wxs deleted file mode 100644 index d3f31843..00000000 --- a/src/wixlib/VS11.wxs +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VS14.wxs b/src/wixlib/VS14.wxs deleted file mode 100644 index 83449802..00000000 --- a/src/wixlib/VS14.wxs +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VS2003.wxs b/src/wixlib/VS2003.wxs deleted file mode 100644 index 1e5d36d9..00000000 --- a/src/wixlib/VS2003.wxs +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VS2005.wxs b/src/wixlib/VS2005.wxs deleted file mode 100644 index ef538099..00000000 --- a/src/wixlib/VS2005.wxs +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VS2008.wxs b/src/wixlib/VS2008.wxs deleted file mode 100644 index 43bf1d1e..00000000 --- a/src/wixlib/VS2008.wxs +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VS2010.wxs b/src/wixlib/VS2010.wxs deleted file mode 100644 index 6c940b86..00000000 --- a/src/wixlib/VS2010.wxs +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VS2012.wxs b/src/wixlib/VS2012.wxs deleted file mode 100644 index 513d8684..00000000 --- a/src/wixlib/VS2012.wxs +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VS2013.wxs b/src/wixlib/VS2013.wxs deleted file mode 100644 index 6681b43f..00000000 --- a/src/wixlib/VS2013.wxs +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VS2015.wxs b/src/wixlib/VS2015.wxs deleted file mode 100644 index f14802e2..00000000 --- a/src/wixlib/VS2015.wxs +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VS2017.wxs b/src/wixlib/VS2017.wxs deleted file mode 100644 index 5524361d..00000000 --- a/src/wixlib/VS2017.wxs +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VS2019.wxs b/src/wixlib/VS2019.wxs deleted file mode 100644 index 0be63dec..00000000 --- a/src/wixlib/VS2019.wxs +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VSExtension_Platform.wxi b/src/wixlib/VSExtension_Platform.wxi deleted file mode 100644 index f9cd96f4..00000000 --- a/src/wixlib/VSExtension_Platform.wxi +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/VSExtension_x86.wxs b/src/wixlib/VSExtension_x86.wxs deleted file mode 100644 index 288cf687..00000000 --- a/src/wixlib/VSExtension_x86.wxs +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/wixlib/VsixPackage.wxs b/src/wixlib/VsixPackage.wxs deleted file mode 100644 index 5937177b..00000000 --- a/src/wixlib/VsixPackage.wxs +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/vs.v3.ncrunchproject b/src/wixlib/vs.v3.ncrunchproject deleted file mode 100644 index 319cd523..00000000 --- a/src/wixlib/vs.v3.ncrunchproject +++ /dev/null @@ -1,5 +0,0 @@ - - - True - - \ No newline at end of file diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj deleted file mode 100644 index db3e2cff..00000000 --- a/src/wixlib/vs.wixproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - Library - true - en-us - - - - - - - - - - diff --git a/src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs b/src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs deleted file mode 100644 index 66757349..00000000 --- a/src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/vs2005/redist/BIN_File_60377.dll b/src/wixlib/vs2005/redist/BIN_File_60377.dll deleted file mode 100644 index dfdddf66..00000000 Binary files a/src/wixlib/vs2005/redist/BIN_File_60377.dll and /dev/null differ diff --git a/src/wixlib/vs2005/redist/vsipCCSamples.HxK b/src/wixlib/vs2005/redist/vsipCCSamples.HxK deleted file mode 100644 index 00db745c..00000000 --- a/src/wixlib/vs2005/redist/vsipCCSamples.HxK +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2005/redist/vsipcc.hxc b/src/wixlib/vs2005/redist/vsipcc.hxc deleted file mode 100644 index 406e7f2b..00000000 --- a/src/wixlib/vs2005/redist/vsipcc.hxc +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/vs2005/redist/vsipcc.hxt b/src/wixlib/vs2005/redist/vsipcc.hxt deleted file mode 100644 index 613dcfbb..00000000 --- a/src/wixlib/vs2005/redist/vsipcc.hxt +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/src/wixlib/vs2005/redist/vsipccALinks.hxk b/src/wixlib/vs2005/redist/vsipccALinks.hxk deleted file mode 100644 index 27017f76..00000000 --- a/src/wixlib/vs2005/redist/vsipccALinks.hxk +++ /dev/null @@ -1,13 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2005/redist/vsipccBLinks.hxk b/src/wixlib/vs2005/redist/vsipccBLinks.hxk deleted file mode 100644 index b37d2e18..00000000 --- a/src/wixlib/vs2005/redist/vsipccBLinks.hxk +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/src/wixlib/vs2005/redist/vsipccFLinks.hxk b/src/wixlib/vs2005/redist/vsipccFLinks.hxk deleted file mode 100644 index 2d37efbf..00000000 --- a/src/wixlib/vs2005/redist/vsipccFLinks.hxk +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2005/redist/vsipccKLinks.hxk b/src/wixlib/vs2005/redist/vsipccKLinks.hxk deleted file mode 100644 index 2938eff3..00000000 --- a/src/wixlib/vs2005/redist/vsipccKLinks.hxk +++ /dev/null @@ -1,13 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2005/redist/vsipccNamedURLs.hxk b/src/wixlib/vs2005/redist/vsipccNamedURLs.hxk deleted file mode 100644 index 8691c54c..00000000 --- a/src/wixlib/vs2005/redist/vsipccNamedURLs.hxk +++ /dev/null @@ -1,13 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2005/redist/vsipccSlinks.hxk b/src/wixlib/vs2005/redist/vsipccSlinks.hxk deleted file mode 100644 index 9d193521..00000000 --- a/src/wixlib/vs2005/redist/vsipccSlinks.hxk +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/src/wixlib/vs2005/redist/vsipcc_reg.hxs b/src/wixlib/vs2005/redist/vsipcc_reg.hxs deleted file mode 100644 index 3f2905c4..00000000 Binary files a/src/wixlib/vs2005/redist/vsipcc_reg.hxs and /dev/null differ diff --git a/src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs b/src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs deleted file mode 100644 index 9fb1a0e5..00000000 --- a/src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/vs2008/redist/BIN_435439_x86_enu.dll b/src/wixlib/vs2008/redist/BIN_435439_x86_enu.dll deleted file mode 100644 index 7f5e9436..00000000 Binary files a/src/wixlib/vs2008/redist/BIN_435439_x86_enu.dll and /dev/null differ diff --git a/src/wixlib/vs2008/redist/_ALinks.hxk b/src/wixlib/vs2008/redist/_ALinks.hxk deleted file mode 100644 index dd6df168..00000000 --- a/src/wixlib/vs2008/redist/_ALinks.hxk +++ /dev/null @@ -1,10 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_BLinks.hxk b/src/wixlib/vs2008/redist/_BLinks.hxk deleted file mode 100644 index a2288162..00000000 --- a/src/wixlib/vs2008/redist/_BLinks.hxk +++ /dev/null @@ -1,10 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_CLinks.hxk b/src/wixlib/vs2008/redist/_CLinks.hxk deleted file mode 100644 index da0df730..00000000 --- a/src/wixlib/vs2008/redist/_CLinks.hxk +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/src/wixlib/vs2008/redist/_FLinks.hxk b/src/wixlib/vs2008/redist/_FLinks.hxk deleted file mode 100644 index 37dfda34..00000000 --- a/src/wixlib/vs2008/redist/_FLinks.hxk +++ /dev/null @@ -1,10 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_KLinks.hxk b/src/wixlib/vs2008/redist/_KLinks.hxk deleted file mode 100644 index 2303ed0c..00000000 --- a/src/wixlib/vs2008/redist/_KLinks.hxk +++ /dev/null @@ -1,10 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_SLinks.hxk b/src/wixlib/vs2008/redist/_SLinks.hxk deleted file mode 100644 index 9f65eca3..00000000 --- a/src/wixlib/vs2008/redist/_SLinks.hxk +++ /dev/null @@ -1,13 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_vsipcc90.hxc b/src/wixlib/vs2008/redist/_vsipcc90.hxc deleted file mode 100644 index 9ad6869e..00000000 --- a/src/wixlib/vs2008/redist/_vsipcc90.hxc +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/vs2008/redist/_vsipcc90.hxt b/src/wixlib/vs2008/redist/_vsipcc90.hxt deleted file mode 100644 index 3ac4d5d6..00000000 --- a/src/wixlib/vs2008/redist/_vsipcc90.hxt +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/src/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk b/src/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk deleted file mode 100644 index aaa79158..00000000 --- a/src/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk +++ /dev/null @@ -1,13 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_vsipcc_samples.HxK b/src/wixlib/vs2008/redist/_vsipcc_samples.HxK deleted file mode 100644 index 00db745c..00000000 --- a/src/wixlib/vs2008/redist/_vsipcc_samples.HxK +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/vsipcc_reg.hxs b/src/wixlib/vs2008/redist/vsipcc_reg.hxs deleted file mode 100644 index f6446867..00000000 Binary files a/src/wixlib/vs2008/redist/vsipcc_reg.hxs and /dev/null differ 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