From f729d16ab0dfd841a16addaefba61a182d0b0d32 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 2 Oct 2017 23:49:38 -0700 Subject: Initial code commit --- src/Cpp.Build.props | 101 +++ src/Directory.Build.props | 22 + src/FindLocalWix.props | 8 + src/ca/dllmain.cpp | 26 + src/ca/packages.config | 6 + src/ca/precomp.h | 13 + src/ca/vsca.cpp | 432 +++++++++++ src/ca/vsca.def | 7 + src/ca/vsca.vcxproj | 69 ++ src/wixext/Data/messages.xml | 133 ++++ src/wixext/Data/tables.xml | 66 ++ src/wixext/VSCompiler.cs | 835 +++++++++++++++++++++ src/wixext/VSDecompiler.cs | 296 ++++++++ src/wixext/VSExtensionData.cs | 55 ++ src/wixext/WixToolset.VisualStudio.wixext.csproj | 69 ++ src/wixext/WixToolset.VisualStudio.wixext.targets | 10 + src/wixext/xsd/vs.xsd | 292 +++++++ src/wixlib/HTML_Help_Registration__RTL_X86.wxs | 68 ++ src/wixlib/Redist/BIN_File_107602.dll | Bin 0 -> 866816 bytes src/wixlib/Redist/BIN_File_46001.dll | Bin 0 -> 129536 bytes src/wixlib/Redist/BIN_File_46002.dll | Bin 0 -> 108544 bytes src/wixlib/VS11.wxs | 206 +++++ src/wixlib/VS14.wxs | 187 +++++ src/wixlib/VS2003.wxs | 28 + src/wixlib/VS2005.wxs | 370 +++++++++ src/wixlib/VS2008.wxs | 300 ++++++++ src/wixlib/VS2010.wxs | 313 ++++++++ src/wixlib/VS2012.wxs | 256 +++++++ src/wixlib/VS2013.wxs | 253 +++++++ src/wixlib/VS2015.wxs | 187 +++++ src/wixlib/VS2017.wxs | 143 ++++ src/wixlib/VSExtension_Platform.wxi | 18 + src/wixlib/VSExtension_x86.wxs | 8 + src/wixlib/VsixPackage.wxs | 61 ++ src/wixlib/caSuffix.wxi | 28 + src/wixlib/packages.config | 5 + src/wixlib/vs.wixproj | 65 ++ .../vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs | 64 ++ src/wixlib/vs2005/redist/BIN_File_60377.dll | Bin 0 -> 45056 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 0 -> 18400 bytes .../vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs | 61 ++ src/wixlib/vs2008/redist/BIN_435439_x86_enu.dll | Bin 0 -> 103944 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 0 -> 18488 bytes 62 files changed, 5344 insertions(+) create mode 100644 src/Cpp.Build.props create mode 100644 src/Directory.Build.props create mode 100644 src/FindLocalWix.props create mode 100644 src/ca/dllmain.cpp create mode 100644 src/ca/packages.config create mode 100644 src/ca/precomp.h create mode 100644 src/ca/vsca.cpp create mode 100644 src/ca/vsca.def create mode 100644 src/ca/vsca.vcxproj create mode 100644 src/wixext/Data/messages.xml create mode 100644 src/wixext/Data/tables.xml create mode 100644 src/wixext/VSCompiler.cs create mode 100644 src/wixext/VSDecompiler.cs create mode 100644 src/wixext/VSExtensionData.cs create mode 100644 src/wixext/WixToolset.VisualStudio.wixext.csproj create mode 100644 src/wixext/WixToolset.VisualStudio.wixext.targets create mode 100644 src/wixext/xsd/vs.xsd create mode 100644 src/wixlib/HTML_Help_Registration__RTL_X86.wxs create mode 100644 src/wixlib/Redist/BIN_File_107602.dll create mode 100644 src/wixlib/Redist/BIN_File_46001.dll create mode 100644 src/wixlib/Redist/BIN_File_46002.dll create mode 100644 src/wixlib/VS11.wxs create mode 100644 src/wixlib/VS14.wxs create mode 100644 src/wixlib/VS2003.wxs create mode 100644 src/wixlib/VS2005.wxs create mode 100644 src/wixlib/VS2008.wxs create mode 100644 src/wixlib/VS2010.wxs create mode 100644 src/wixlib/VS2012.wxs create mode 100644 src/wixlib/VS2013.wxs create mode 100644 src/wixlib/VS2015.wxs create mode 100644 src/wixlib/VS2017.wxs create mode 100644 src/wixlib/VSExtension_Platform.wxi create mode 100644 src/wixlib/VSExtension_x86.wxs create mode 100644 src/wixlib/VsixPackage.wxs create mode 100644 src/wixlib/caSuffix.wxi create mode 100644 src/wixlib/packages.config create mode 100644 src/wixlib/vs.wixproj create mode 100644 src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs create mode 100644 src/wixlib/vs2005/redist/BIN_File_60377.dll create mode 100644 src/wixlib/vs2005/redist/vsipCCSamples.HxK create mode 100644 src/wixlib/vs2005/redist/vsipcc.hxc create mode 100644 src/wixlib/vs2005/redist/vsipcc.hxt create mode 100644 src/wixlib/vs2005/redist/vsipccALinks.hxk create mode 100644 src/wixlib/vs2005/redist/vsipccBLinks.hxk create mode 100644 src/wixlib/vs2005/redist/vsipccFLinks.hxk create mode 100644 src/wixlib/vs2005/redist/vsipccKLinks.hxk create mode 100644 src/wixlib/vs2005/redist/vsipccNamedURLs.hxk create mode 100644 src/wixlib/vs2005/redist/vsipccSlinks.hxk create mode 100644 src/wixlib/vs2005/redist/vsipcc_reg.hxs create mode 100644 src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs create mode 100644 src/wixlib/vs2008/redist/BIN_435439_x86_enu.dll create mode 100644 src/wixlib/vs2008/redist/_ALinks.hxk create mode 100644 src/wixlib/vs2008/redist/_BLinks.hxk create mode 100644 src/wixlib/vs2008/redist/_CLinks.hxk create mode 100644 src/wixlib/vs2008/redist/_FLinks.hxk create mode 100644 src/wixlib/vs2008/redist/_KLinks.hxk create mode 100644 src/wixlib/vs2008/redist/_SLinks.hxk create mode 100644 src/wixlib/vs2008/redist/_vsipcc90.hxc create mode 100644 src/wixlib/vs2008/redist/_vsipcc90.hxt create mode 100644 src/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk create mode 100644 src/wixlib/vs2008/redist/_vsipcc_samples.HxK create mode 100644 src/wixlib/vs2008/redist/vsipcc_reg.hxs (limited to 'src') diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props new file mode 100644 index 00000000..453aa442 --- /dev/null +++ b/src/Cpp.Build.props @@ -0,0 +1,101 @@ + + + + + + Win32 + $(OutputPath) + $(BaseIntermediateOutputPath)$(Platform)\ + $(OutputPath)$(Platform)\ + + + + + $(DisableSpecificCompilerWarnings) + Level4 + $(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) + Use + precomp.h + StdCall + true + false + -YlprecompDefine + /Zc:threadSafeInit- %(AdditionalOptions) + true + + + $(ArmPreprocessorDefinitions);%(PreprocessorDefinitions) + $(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories) + + + $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories) + + + $(ProjectSubSystem) + $(ProjectModuleDefinitionFile) + $(ResourceOnlyDll) + true + $(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies) + $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories) + /IGNORE:4099 %(AdditionalOptions) + + + + + + NoExtensions + + + + + CDecl + + + + + OldStyle + true + true + + + + + Disabled + EnableFastChecks + _DEBUG;DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebug + + + + + + MultiThreadedDebugDll + + + + + MinSpace + NDEBUG;%(PreprocessorDefinitions) + true + true + MultiThreaded + + + true + true + + + + + + MultiThreadedDll + + + + + $(LinkKeyFile) + $(LinkDelaySign) + + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..63ad5d6e --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,22 @@ + + + + + + Debug + AnyCPU + $(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\ + $(MSBuildThisFileDirectory)..\build\$(Configuration)\ + + WiX Toolset Team + WiX Toolset + Copyright (c) .NET Foundation and contributors. All rights reserved. + + + + $(MSBuildThisFileDirectory)..\..\ + + + + + diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props new file mode 100644 index 00000000..e77fb386 --- /dev/null +++ b/src/FindLocalWix.props @@ -0,0 +1,8 @@ + + + + + + $(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\wix.targets + + diff --git a/src/ca/dllmain.cpp b/src/ca/dllmain.cpp new file mode 100644 index 00000000..35ae6d1c --- /dev/null +++ b/src/ca/dllmain.cpp @@ -0,0 +1,26 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +#include "precomp.h" + +/******************************************************************** +DllMain - standard entry point for all WiX 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/packages.config b/src/ca/packages.config new file mode 100644 index 00000000..b74ff5d0 --- /dev/null +++ b/src/ca/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/ca/precomp.h b/src/ca/precomp.h new file mode 100644 index 00000000..3edad7ed --- /dev/null +++ b/src/ca/precomp.h @@ -0,0 +1,13 @@ +#pragma once +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + + +#include +#include + +#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 new file mode 100644 index 00000000..30174672 --- /dev/null +++ b/src/ca/vsca.cpp @@ -0,0 +1,432 @@ +// 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 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 }, +}; + +/****************************************************************** + 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]; + + if (pElem->qwMinVersion <= qwVersion && qwVersion <= pElem->qwMaxVersion) + { + 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 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 new file mode 100644 index 00000000..fd2db98e --- /dev/null +++ b/src/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/ca/vsca.vcxproj b/src/ca/vsca.vcxproj new file mode 100644 index 00000000..c52840bf --- /dev/null +++ b/src/ca/vsca.vcxproj @@ -0,0 +1,69 @@ + + + + + + + + + + Debug + Win32 + + + Release + Win32 + + + + + {45308B85-0628-4978-8FC8-6AD9E1AD5949} + DynamicLibrary + vsca + v141 + Unicode + vsca.def + WiX Toolset VS CustomAction + + + + + + + + + + + + + + msi.lib + + + + + Create + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + diff --git a/src/wixext/Data/messages.xml b/src/wixext/Data/messages.xml new file mode 100644 index 00000000..d1c85301 --- /dev/null +++ b/src/wixext/Data/messages.xml @@ -0,0 +1,133 @@ + + + + + + + + + Invalid project output group: {0}. + + + + + + No project output group specified. + + + + + Failed to load MSBuild assembly: {0} + + + + + + Failed to load MSBuild engine: {0} + + + + + + Failed to load project {0}: {1} + + + + + + + Failed to build project {0}: {1} + + + + + + + Build failed. + + + + + Missing project output group '{1}' in project {0}. + + + + + + + DirectoryAttributeAccessor tried to access an invalid element type for attribute '{0'}. + + + + + + Invalid generated type: {0}. Must be one of: components, container, payloadgroup, layout. + + + + + + Invalid directory ID: {0}. Check that it doesn't start with a hyphen or slash. + + + + + + Invalid project name: {0}. Check that it doesn't start with a hyphen or slash. + + + + + + Build error during harvesting: {0} + + + + + + Failed to load MSBuild wrapper assembly: {0} + + + + + + Failed to load MSBuild wrapper type: {0} + + + + + + Failed to load MSBuild wrapper object: {0} + + + + + + + + Failed to set loggers: {0} + + + + + + Failed to set project configuration and platform: {0} + + + + + + + + Found ToolsVersion {0} inside project file. + + + + + + Loading project using MSBuild version {0}. + + + + + diff --git a/src/wixext/Data/tables.xml b/src/wixext/Data/tables.xml new file mode 100644 index 00000000..e9c86097 --- /dev/null +++ b/src/wixext/Data/tables.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/VSCompiler.cs b/src/wixext/VSCompiler.cs new file mode 100644 index 00000000..cf6226dd --- /dev/null +++ b/src/wixext/VSCompiler.cs @@ -0,0 +1,835 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Extensions +{ + using System; + using System.Collections.Generic; + using System.Xml.Linq; + using WixToolset.Data; + using WixToolset.Extensibility; + + /// + /// The compiler for the WiX Toolset Visual Studio Extension. + /// + public sealed class VSCompiler : CompilerExtension + { + 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 + + /// + /// Instantiate a new HelpCompiler. + /// + public VSCompiler() + { + this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/vs"; + } + + /// + /// Processes an element for the Compiler. + /// + /// Source line number for the parent element. + /// Parent element of element to process. + /// Element to process. + /// Extra information about the context in which this element is being parsed. + public override void ParseElement(XElement parentElement, XElement element, IDictionary context) + { + switch (parentElement.Name.LocalName) + { + case "Component": + switch (element.Name.LocalName) + { + case "VsixPackage": + this.ParseVsixPackageElement(element, context["ComponentId"], null); + break; + default: + this.Core.UnexpectedElement(parentElement, element); + break; + } + break; + case "File": + switch (element.Name.LocalName) + { + case "HelpCollection": + this.ParseHelpCollectionElement(element, context["FileId"]); + break; + case "HelpFile": + this.ParseHelpFileElement(element, context["FileId"]); + break; + case "VsixPackage": + this.ParseVsixPackageElement(element, context["ComponentId"], context["FileId"]); + break; + default: + this.Core.UnexpectedElement(parentElement, element); + break; + } + break; + case "Fragment": + case "Module": + case "Product": + switch (element.Name.LocalName) + { + case "HelpCollectionRef": + this.ParseHelpCollectionRefElement(element); + break; + case "HelpFilter": + this.ParseHelpFilterElement(element); + break; + default: + this.Core.UnexpectedElement(parentElement, element); + break; + } + break; + default: + this.Core.UnexpectedElement(parentElement, element); + break; + } + } + + /// + /// Parses a HelpCollectionRef element. + /// + /// Element to process. + private void ParseHelpCollectionRefElement(XElement node) + { + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + string id = null; + + foreach (XAttribute attrib in node.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "Id": + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.Core.CreateSimpleReference(sourceLineNumbers, "HelpNamespace", id); + break; + default: + this.Core.UnexpectedAttribute(node, attrib); + break; + } + } + else + { + this.Core.ParseExtensionAttribute(node, attrib); + } + } + + if (null == id) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + } + + foreach (XElement child in node.Elements()) + { + if (this.Namespace == child.Name.Namespace) + { + SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); + switch (child.Name.LocalName) + { + case "HelpFileRef": + this.ParseHelpFileRefElement(child, id); + break; + default: + this.Core.UnexpectedElement(node, child); + break; + } + } + else + { + this.Core.ParseExtensionElement(node, child); + } + } + } + + /// + /// Parses a HelpCollection element. + /// + /// Element to process. + /// Identifier of the parent File element. + private void ParseHelpCollectionElement(XElement node, string fileId) + { + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + string id = null; + string description = null; + string name = null; + YesNoType suppressCAs = YesNoType.No; + + foreach (XAttribute attrib in node.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "Id": + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "Description": + description = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "Name": + name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "SuppressCustomActions": + suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + break; + default: + this.Core.UnexpectedAttribute(node, attrib); + break; + } + } + else + { + this.Core.ParseExtensionAttribute(node, attrib); + } + } + + if (null == id) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + } + + if (null == description) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description")); + } + + if (null == name) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); + } + + foreach (XElement child in node.Elements()) + { + if (this.Namespace == child.Name.Namespace) + { + switch (child.Name.LocalName) + { + case "HelpFileRef": + this.ParseHelpFileRefElement(child, id); + break; + case "HelpFilterRef": + this.ParseHelpFilterRefElement(child, id); + break; + case "PlugCollectionInto": + this.ParsePlugCollectionIntoElement(child, id); + break; + default: + this.Core.UnexpectedElement(node, child); + break; + } + } + else + { + this.Core.ParseExtensionElement(node, child); + } + } + + if (!this.Core.EncounteredError) + { + Row row = this.Core.CreateRow(sourceLineNumbers, "HelpNamespace"); + row[0] = id; + row[1] = name; + row[2] = fileId; + row[3] = description; + + if (YesNoType.No == suppressCAs) + { + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + } + } + } + + /// + /// Parses a HelpFile element. + /// + /// Element to process. + /// Identifier of the parent file element. + private void ParseHelpFileElement(XElement node, string fileId) + { + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + string id = null; + string name = null; + int language = CompilerConstants.IntegerNotSet; + string hxi = null; + string hxq = null; + string hxr = null; + string samples = null; + YesNoType suppressCAs = YesNoType.No; + + foreach (XAttribute attrib in node.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "Id": + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "AttributeIndex": + hxr = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxr); + break; + case "Index": + hxi = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxi); + break; + case "Language": + language = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); + break; + case "Name": + name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "SampleLocation": + samples = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.Core.CreateSimpleReference(sourceLineNumbers, "File", samples); + break; + case "Search": + hxq = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxq); + break; + case "SuppressCustomActions": + suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + break; + default: + this.Core.UnexpectedAttribute(node, attrib); + break; + } + } + else + { + this.Core.ParseExtensionAttribute(node, attrib); + } + } + + if (null == id) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + } + + if (null == name) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); + } + + //uninstall will always fail silently, leaving file registered, if Language is not set + if (CompilerConstants.IntegerNotSet == language) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language")); + } + + this.Core.ParseForExtensionElements(node); + + if (!this.Core.EncounteredError) + { + Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFile"); + row[0] = id; + row[1] = name; + row[2] = language; + row[3] = fileId; + row[4] = hxi; + row[5] = hxq; + row[6] = hxr; + row[7] = samples; + + if (YesNoType.No == suppressCAs) + { + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + } + } + } + + /// + /// Parses a HelpFileRef element. + /// + /// Element to process. + /// Identifier of the parent help collection. + private void ParseHelpFileRefElement(XElement node, string collectionId) + { + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + string id = null; + + foreach (XAttribute attrib in node.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "Id": + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.Core.CreateSimpleReference(sourceLineNumbers, "HelpFile", id); + break; + default: + this.Core.UnexpectedAttribute(node, attrib); + break; + } + } + else + { + this.Core.ParseExtensionAttribute(node, attrib); + } + } + + if (null == id) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + } + + this.Core.ParseForExtensionElements(node); + + if (!this.Core.EncounteredError) + { + Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFileToNamespace"); + row[0] = id; + row[1] = collectionId; + } + } + + /// + /// Parses a HelpFilter element. + /// + /// Element to process. + private void ParseHelpFilterElement(XElement node) + { + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + string id = null; + string filterDefinition = null; + string name = null; + YesNoType suppressCAs = YesNoType.No; + + foreach (XAttribute attrib in node.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "Id": + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "FilterDefinition": + filterDefinition = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "Name": + name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "SuppressCustomActions": + suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + break; + default: + this.Core.UnexpectedAttribute(node, attrib); + break; + } + } + else + { + this.Core.ParseExtensionAttribute(node, attrib); + } + } + + if (null == id) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + } + + if (null == name) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); + } + + this.Core.ParseForExtensionElements(node); + + if (!this.Core.EncounteredError) + { + Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFilter"); + row[0] = id; + row[1] = name; + row[2] = filterDefinition; + + if (YesNoType.No == suppressCAs) + { + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + } + } + } + + /// + /// Parses a HelpFilterRef element. + /// + /// Element to process. + /// Identifier of the parent help collection. + private void ParseHelpFilterRefElement(XElement node, string collectionId) + { + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + string id = null; + + foreach (XAttribute attrib in node.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "Id": + id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.Core.CreateSimpleReference(sourceLineNumbers, "HelpFilter", id); + break; + default: + this.Core.UnexpectedAttribute(node, attrib); + break; + } + } + else + { + this.Core.ParseExtensionAttribute(node, attrib); + } + } + + if (null == id) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + } + + this.Core.ParseForExtensionElements(node); + + if (!this.Core.EncounteredError) + { + Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFilterToNamespace"); + row[0] = id; + row[1] = collectionId; + } + } + + /// + /// Parses a PlugCollectionInto element. + /// + /// Element to process. + /// Identifier of the parent help collection. + private void ParsePlugCollectionIntoElement(XElement node, string parentId) + { + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + string hxa = null; + string hxt = null; + string hxtParent = null; + string namespaceParent = null; + string feature = null; + YesNoType suppressExternalNamespaces = YesNoType.No; + bool pluginVS05 = false; + bool pluginVS08 = false; + + foreach (XAttribute attrib in node.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "Attributes": + hxa = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "TableOfContents": + hxt = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "TargetCollection": + namespaceParent = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "TargetTableOfContents": + hxtParent = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "TargetFeature": + feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + case "SuppressExternalNamespaces": + suppressExternalNamespaces = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + break; + default: + this.Core.UnexpectedAttribute(node, attrib); + break; + } + } + else + { + this.Core.ParseExtensionAttribute(node, attrib); + } + } + + pluginVS05 = namespaceParent.Equals("MS_VSIPCC_v80", StringComparison.Ordinal); + pluginVS08 = namespaceParent.Equals("MS.VSIPCC.v90", StringComparison.Ordinal); + + if (null == namespaceParent) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetCollection")); + } + + if (null == feature && (pluginVS05 || pluginVS08) && YesNoType.No == suppressExternalNamespaces) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFeature")); + } + + this.Core.ParseForExtensionElements(node); + + if (!this.Core.EncounteredError) + { + Row row = this.Core.CreateRow(sourceLineNumbers, "HelpPlugin"); + row[0] = parentId; + row[1] = namespaceParent; + row[2] = hxt; + row[3] = hxa; + row[4] = hxtParent; + + if (pluginVS05) + { + if (YesNoType.No == suppressExternalNamespaces) + { + // Bring in the help 2 base namespace components for VS 2005 + this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, + ComplexReferenceChildType.ComponentGroup, "Help2_VS2005_Namespace_Components", false); + // Reference CustomAction since nothing will happen without it + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", + "CA_HxMerge_VSIPCC_VSCC"); + } + } + else if (pluginVS08) + { + if (YesNoType.No == suppressExternalNamespaces) + { + // Bring in the help 2 base namespace components for VS 2008 + this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, + ComplexReferenceChildType.ComponentGroup, "Help2_VS2008_Namespace_Components", false); + // Reference CustomAction since nothing will happen without it + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", + "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); + } + } + else + { + // Reference the parent namespace to enforce the foreign key relationship + this.Core.CreateSimpleReference(sourceLineNumbers, "HelpNamespace", + namespaceParent); + } + } + } + + /// + /// Parses a VsixPackage element. + /// + /// Element to process. + /// Identifier of the parent Component element. + /// Identifier of the parent File element. + private void ParseVsixPackageElement(XElement node, string componentId, string fileId) + { + SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + string propertyId = "VS_VSIX_INSTALLER_PATH"; + string packageId = null; + YesNoType permanent = YesNoType.NotSet; + string target = null; + string targetVersion = null; + YesNoType vital = YesNoType.NotSet; + + foreach (XAttribute attrib in node.Attributes()) + { + if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) + { + switch (attrib.Name.LocalName) + { + case "File": + if (String.IsNullOrEmpty(fileId)) + { + fileId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + } + else + { + this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "File", "File")); + } + break; + case "PackageId": + packageId = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + break; + case "Permanent": + permanent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + break; + case "Target": + target = this.Core.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.Core.GetAttributeVersionValue(sourceLineNumbers, attrib); + break; + case "Vital": + vital = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + break; + case "VsixInstallerPathProperty": + propertyId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + break; + default: + this.Core.UnexpectedAttribute(node, attrib); + break; + } + } + else + { + this.Core.ParseExtensionAttribute(node, attrib); + } + } + + if (String.IsNullOrEmpty(fileId)) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File")); + } + + if (String.IsNullOrEmpty(packageId)) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PackageId")); + } + + if (!String.IsNullOrEmpty(target) && String.IsNullOrEmpty(targetVersion)) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetVersion", "Target")); + } + else if (String.IsNullOrEmpty(target) && !String.IsNullOrEmpty(targetVersion)) + { + this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetVersion")); + } + + this.Core.ParseForExtensionElements(node); + + if (!this.Core.EncounteredError) + { + // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. + this.Core.CreateSimpleReference(sourceLineNumbers, "Property", propertyId); + + // Ensure there is a reference to the package file (even if we are a child under it). + this.Core.CreateSimpleReference(sourceLineNumbers, "File", fileId); + + string cmdlinePrefix = "/q "; + + if (!String.IsNullOrEmpty(target)) + { + cmdlinePrefix = String.Format("{0} /skuName:{1} /skuVersion:{2}", cmdlinePrefix, target, targetVersion); + } + + string installAfter = "WriteRegistryValues"; // by default, come after the registry key registration. + int installExtraBits = VSCompiler.MsidbCustomActionTypeInScript; + + // If the package is not vital, mark the install action as continue. + if (vital == YesNoType.No) + { + installExtraBits |= VSCompiler.MsidbCustomActionTypeContinue; + } + else // the package is vital so ensure there is a rollback action scheduled. + { + Identifier rollbackNamePerUser = this.Core.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier rollbackNamePerMachine = this.Core.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); + string rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); + string rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin"); + int rollbackExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeRollback | VSCompiler.MsidbCustomActionTypeInScript; + int rollbackExtraBitsPerMachine = rollbackExtraBitsPerUser | VSCompiler.MsidbCustomActionTypeNoImpersonate; + string rollbackConditionPerUser = String.Format("NOT ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. + string rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. + + this.SchedulePropertyExeAction(sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter); + this.SchedulePropertyExeAction(sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); + + installAfter = rollbackNamePerMachine.Id; + } + + Identifier installNamePerUser = this.Core.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier installNamePerMachine = this.Core.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); + string installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId); + string installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin"); + string installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. + string installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. + + this.SchedulePropertyExeAction(sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter); + this.SchedulePropertyExeAction(sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.Id); + + // If not permanent, schedule the uninstall custom action. + if (permanent != YesNoType.Yes) + { + Identifier uninstallNamePerUser = this.Core.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier uninstallNamePerMachine = this.Core.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); + string uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); + string uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin"); + int uninstallExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeInScript; + int uninstallExtraBitsPerMachine = uninstallExtraBitsPerUser | VSCompiler.MsidbCustomActionTypeNoImpersonate; + string uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. + string uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. + + this.SchedulePropertyExeAction(sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null); + this.SchedulePropertyExeAction(sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null); + } + } + } + + private void SchedulePropertyExeAction(SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, int extraBits, string condition, string beforeAction, string afterAction) + { + const string sequence = "InstallExecuteSequence"; + + Row actionRow = this.Core.CreateRow(sourceLineNumbers, "CustomAction", name); + actionRow[1] = VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits; + actionRow[2] = source; + actionRow[3] = cmdline; + + Row sequenceRow = this.Core.CreateRow(sourceLineNumbers, "WixAction"); + sequenceRow[0] = sequence; + sequenceRow[1] = name.Id; + sequenceRow[2] = condition; + // no explicit sequence + sequenceRow[4] = beforeAction; + sequenceRow[5] = afterAction; + sequenceRow[6] = 0; // not overridable + + if (null != beforeAction) + { + if (WindowsInstallerStandard.IsStandardAction(beforeAction)) + { + this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", sequence, beforeAction); + } + else + { + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", beforeAction); + } + } + + if (null != afterAction) + { + if (WindowsInstallerStandard.IsStandardAction(afterAction)) + { + this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", sequence, afterAction); + } + else + { + this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", afterAction); + } + } + } + } +} diff --git a/src/wixext/VSDecompiler.cs b/src/wixext/VSDecompiler.cs new file mode 100644 index 00000000..bfa0670c --- /dev/null +++ b/src/wixext/VSDecompiler.cs @@ -0,0 +1,296 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Extensions +{ + 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; + //} + } +} diff --git a/src/wixext/VSExtensionData.cs b/src/wixext/VSExtensionData.cs new file mode 100644 index 00000000..edb1fd42 --- /dev/null +++ b/src/wixext/VSExtensionData.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.Extensions +{ + using System; + using System.Reflection; + using WixToolset.Data; + using WixToolset.Extensibility; + + /// + /// The WiX Toolset Visual Studio Extension. + /// + public sealed class VSExtensionData : ExtensionData + { + /// + /// Gets the optional table definitions for this extension. + /// + /// The optional table definitions for this extension. + public override TableDefinitionCollection TableDefinitions + { + get + { + return VSExtensionData.GetExtensionTableDefinitions(); + } + } + + /// + /// Gets the library associated with this extension. + /// + /// The table definitions to use while loading the library. + /// The loaded library. + public override Library GetLibrary(TableDefinitionCollection tableDefinitions) + { + return VSExtensionData.GetExtensionLibrary(tableDefinitions); + } + + /// + /// Internal mechanism to access the extension's table definitions. + /// + /// Extension's table definitions. + internal static TableDefinitionCollection GetExtensionTableDefinitions() + { + return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml"); + } + + /// + /// Internal mechanism to access the extension's library. + /// + /// Extension's library. + internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions) + { + return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.vs.wixlib", tableDefinitions); + } + } +} diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj new file mode 100644 index 00000000..0b092662 --- /dev/null +++ b/src/wixext/WixToolset.VisualStudio.wixext.csproj @@ -0,0 +1,69 @@ + + + + + + netstandard2.0 + WixToolset.Extensions + WiX Toolset Visual Studio Extension + WiX Toolset VS Extension + true + build + + + + NU1701 + + + + + $(RootNamespace).Data.tables.xml + + + + $(RootNamespace).Data.Messages.resources + + + + $(RootNamespace).Xsd.vs.xsd + true + tools + + + + WixToolset.Data.Serialize + WixToolset.Extensions.Serialize.VS + + + + Data\vs.wixlib + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + diff --git a/src/wixext/WixToolset.VisualStudio.wixext.targets b/src/wixext/WixToolset.VisualStudio.wixext.targets new file mode 100644 index 00000000..903455e3 --- /dev/null +++ b/src/wixext/WixToolset.VisualStudio.wixext.targets @@ -0,0 +1,10 @@ + + + + + + + $(MSBuildThisFileDirectory)..\tools\WixToolset.VS.wixext.dll + + + diff --git a/src/wixext/xsd/vs.xsd b/src/wixext/xsd/vs.xsd new file mode 100644 index 00000000..51172920 --- /dev/null +++ b/src/wixext/xsd/vs.xsd @@ -0,0 +1,292 @@ + + + + + + + + The source code schema for the WiX Toolset Visual Studio Extension. + + + + + + + Help Namespace for a help collection. The parent file is the key for the HxC (Collection) file. + + + + + + + + + + + + + Primary Key for HelpNamespace. + + + Friendly name for Namespace. + + + Internal Microsoft Help ID for this Namespace. + + + Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + + + Filter for Help Namespace. + + + + + + + + + + Primary Key for HelpFilter. + + + Query String for Help Filter. + + + Friendly name for Filter. + + + Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + + + File for Help Namespace. The parent file is the key for HxS (Title) file. + + + + + + + + Primary Key for HelpFile Table. + + + Key for HxR (Attributes) file. + + + Key for HxI (Index) file. + + + Language ID for content file. + + + Internal Microsoft Help ID for this HelpFile. + + + Key for a file that is in the "root" of the samples directory for this HelpFile. + + + Key for HxQ (Query) file. + + + Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + Plugin for Help Namespace. + + + Key for HxA (Attributes) file of child namespace. + + + Key for HxT file of child namespace. + + + + Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted. + The following special keys can be used to plug into external namespaces defined outside of the installer. + MS_VSIPCC_v80 : Visual Studio 2005 + MS.VSIPCC.v90 : Visual Studio 2008 + + + + Key for HxT file of parent namespace that now includes the new child namespace. + + + Key for the feature parent of this help collection. Required only when plugging into external namespaces. + + + Suppress linking Visual Studio Help namespaces. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + Create a reference to a HelpFile element in another Fragment. + + + Primary Key for HelpFile Table. + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + Create a reference to a HelpFile element in another Fragment. + + + Primary Key for HelpFilter. + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + + Create a reference to a HelpCollection element in another Fragment. + + + + + + + + + + + + Primary Key for HelpNamespace Table. + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + + + This element provides the metdata required to install/uninstall a file as + a VSIX Package. The VSIX package file will be installed as part of the MSI + then passed to the VSIX installer to install the VSIX package. To avoid the + duplication, simply use the MSI to install the VSIX package itself. + + + + + + + + + + + Reference to file identifer. This attribute is required when the element is not a + child of a File element and is invalid when the element is a child of the File element. + + + + + + + Identity of the VSIX package per its internal manifest. If this value is not correct + the VSIX package will not correctly uninstall. + + + + + + + Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled. + The default is 'no'. + + + + + + + Specifies the SKU of Visual Studio in which to register the extension. If no target + is specified the extension is registered with all installed SKUs. If the Target + attribute is specified the TargetVersion attribute must also be specified. The + following is a list of known Visual Studio targets: integratedShell, professional, + premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress + + + + + + + Specifies the version of Visual Studio in which to register the extension. This attribute + is required if the Target attribute is specified. + + + + + + + Indicates whether failure to install the VSIX package causes the installation to rollback. + The default is 'yes'. + + + + + + + Optional reference to a Property element that contains the path to the VsixInstaller.exe. + By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX + package. It is highly recommended that this attribute is *not* used. + + + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + Values of this type will look like: "x.x.x.x" where x is an integer from 0 to 65534. + + + + + + + + Values of this type will either be "yes" or "no". + + + + + + + diff --git a/src/wixlib/HTML_Help_Registration__RTL_X86.wxs b/src/wixlib/HTML_Help_Registration__RTL_X86.wxs new file mode 100644 index 00000000..fcb99f0f --- /dev/null +++ b/src/wixlib/HTML_Help_Registration__RTL_X86.wxs @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ( NOT RollbackDisabled ) + ( RollbackDisabled ) + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/Redist/BIN_File_107602.dll b/src/wixlib/Redist/BIN_File_107602.dll new file mode 100644 index 00000000..aef2cf29 Binary files /dev/null and b/src/wixlib/Redist/BIN_File_107602.dll differ diff --git a/src/wixlib/Redist/BIN_File_46001.dll b/src/wixlib/Redist/BIN_File_46001.dll new file mode 100644 index 00000000..9e470267 Binary files /dev/null and b/src/wixlib/Redist/BIN_File_46001.dll differ diff --git a/src/wixlib/Redist/BIN_File_46002.dll b/src/wixlib/Redist/BIN_File_46002.dll new file mode 100644 index 00000000..ae9c30dd Binary files /dev/null and b/src/wixlib/Redist/BIN_File_46002.dll differ diff --git a/src/wixlib/VS11.wxs b/src/wixlib/VS11.wxs new file mode 100644 index 00000000..dd52e80a --- /dev/null +++ b/src/wixlib/VS11.wxs @@ -0,0 +1,206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS11DEVENV + + + + + + + + + VS11DEVENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VWD11EXPRESS_IDE + + + + + + + + VWD11EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS11WINEXPRESS_IDE + + + + + + + + VS11WINEXPRESS_IDE + + + diff --git a/src/wixlib/VS14.wxs b/src/wixlib/VS14.wxs new file mode 100644 index 00000000..52db1562 --- /dev/null +++ b/src/wixlib/VS14.wxs @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS14DEVENV + + + + + + + + + VS14DEVENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VWD14EXPRESS_IDE + + + + + + + + VWD14EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS14WINEXPRESS_IDE + + + + + + + + VS14WINEXPRESS_IDE + + + diff --git a/src/wixlib/VS2003.wxs b/src/wixlib/VS2003.wxs new file mode 100644 index 00000000..10515b52 --- /dev/null +++ b/src/wixlib/VS2003.wxs @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + VS2003DEVENV + + + + + + + + + + diff --git a/src/wixlib/VS2005.wxs b/src/wixlib/VS2005.wxs new file mode 100644 index 00000000..3aadf08c --- /dev/null +++ b/src/wixlib/VS2005.wxs @@ -0,0 +1,370 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS2005DEVENV + + + + + + + + + VS2005DEVENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + VCSHARP2005EXPRESS_IDE + + + + + + + + + + VCSHARP2005EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VB2005EXPRESS_IDE + + + + + + + + + + VB2005EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VWD2005EXPRESS_IDE + + + + + + + + + + VWD2005EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VC2005EXPRESS_IDE + + + + + + + + + + VC2005EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VJSHARP2005EXPRESS_IDE + + + + + + + + + + VJSHARP2005EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/VS2008.wxs b/src/wixlib/VS2008.wxs new file mode 100644 index 00000000..096221c2 --- /dev/null +++ b/src/wixlib/VS2008.wxs @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS90DEVENV + + + + + + + + + VS90DEVENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + VCSHARP90EXPRESS_IDE + + + + + + + + + + VCSHARP90EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VB90EXPRESS_IDE + + + + + + + + + + VB90EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VWD90EXPRESS_IDE + + + + + + + + + + VWD90EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VC90EXPRESS_IDE + + + + + + + + + + VC90EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/VS2010.wxs b/src/wixlib/VS2010.wxs new file mode 100644 index 00000000..d0d899cc --- /dev/null +++ b/src/wixlib/VS2010.wxs @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS2010DEVENV + + + + + + + + + VS2010DEVENV + + + + + + + + + + + + + + + + + + + + + VCSHARP2010EXPRESS_IDE + + + + + + + + + + VCSHARP2010EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VB2010EXPRESS_IDE + + + + + + + + + + VB2010EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VWD2010EXPRESS_IDE + + + + + + + + + + VWD2010EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VC2010EXPRESS_IDE + + + + + + + + + + VC2010EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VPD2010EXPRESS_IDE + + + + + + + + + + VPD2010EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/VS2012.wxs b/src/wixlib/VS2012.wxs new file mode 100644 index 00000000..c4baa2c9 --- /dev/null +++ b/src/wixlib/VS2012.wxs @@ -0,0 +1,256 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS2012DEVENV + + + + + + + + + VS2012DEVENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VWD2012EXPRESS_IDE + + + + + + + + VWD2012EXPRESS_IDE + + + + + + + + + + + + + + + VPD2012EXPRESS_IDE + + + + + + + + VPD2012EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS2012WINEXPRESS_IDE + + + + + + + + VS2012WINEXPRESS_IDE + + + + + + + + + + + + + + + + + + + VS2012WDEXPRESS_IDE + + + + + + + + VS2012WDEXPRESS_IDE + + + diff --git a/src/wixlib/VS2013.wxs b/src/wixlib/VS2013.wxs new file mode 100644 index 00000000..fa774ff0 --- /dev/null +++ b/src/wixlib/VS2013.wxs @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS2013DEVENV + + + + + + + + + VS2013DEVENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VWD2013EXPRESS_IDE + + + + + + + + VWD2013EXPRESS_IDE + + + + + + + + + + + + + + + VPD2013EXPRESS_IDE + + + + + + + + VPD2013EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS2013WINEXPRESS_IDE + + + + + + + + + VS2013WINEXPRESS_IDE + + + + + + + + + + + + + + + + + + + + VS2013WDEXPRESS_IDE + + + + + + + + + VS2013WDEXPRESS_IDE + + + diff --git a/src/wixlib/VS2015.wxs b/src/wixlib/VS2015.wxs new file mode 100644 index 00000000..b7fb7b4d --- /dev/null +++ b/src/wixlib/VS2015.wxs @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS2015DEVENV + + + + + + + + + VS2015DEVENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VWD2015EXPRESS_IDE + + + + + + + + VWD2015EXPRESS_IDE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS2015WINEXPRESS_IDE + + + + + + + + VS2015WINEXPRESS_IDE + + + diff --git a/src/wixlib/VS2017.wxs b/src/wixlib/VS2017.wxs new file mode 100644 index 00000000..acc96d67 --- /dev/null +++ b/src/wixlib/VS2017.wxs @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS2017DEVENV + + + + + + + + + VS2017DEVENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/VSExtension_Platform.wxi b/src/wixlib/VSExtension_Platform.wxi new file mode 100644 index 00000000..30d107ef --- /dev/null +++ b/src/wixlib/VSExtension_Platform.wxi @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/VSExtension_x86.wxs b/src/wixlib/VSExtension_x86.wxs new file mode 100644 index 00000000..288cf687 --- /dev/null +++ b/src/wixlib/VSExtension_x86.wxs @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/wixlib/VsixPackage.wxs b/src/wixlib/VsixPackage.wxs new file mode 100644 index 00000000..8149c55b --- /dev/null +++ b/src/wixlib/VsixPackage.wxs @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOT VS_VSIX_INSTALLER_PATH AND VS2015_VSIX_INSTALLER_PATH + NOT VS_VSIX_INSTALLER_PATH AND VWD2015_VSIX_INSTALL_ROOT + + NOT VS_VSIX_INSTALLER_PATH AND VS2013_VSIX_INSTALLER_PATH + NOT VS_VSIX_INSTALLER_PATH AND VWD2013_VSIX_INSTALL_ROOT + + NOT VS_VSIX_INSTALLER_PATH AND VS2012_VSIX_INSTALLER_PATH + NOT VS_VSIX_INSTALLER_PATH AND VWD2012_VSIX_INSTALL_ROOT + + NOT VS_VSIX_INSTALLER_PATH AND VS2010_VSIX_INSTALLER_PATH + + diff --git a/src/wixlib/caSuffix.wxi b/src/wixlib/caSuffix.wxi new file mode 100644 index 00000000..a56a2393 --- /dev/null +++ b/src/wixlib/caSuffix.wxi @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config new file mode 100644 index 00000000..7120dc24 --- /dev/null +++ b/src/wixlib/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj new file mode 100644 index 00000000..15dd5092 --- /dev/null +++ b/src/wixlib/vs.wixproj @@ -0,0 +1,65 @@ + + + + + + + + + {14345C9D-8AF8-435A-BB1B-E067CE7EB321} + vs + Library + true + true + en-us + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vsca + {45308b85-0628-4978-8fc8-6ad9e1ad5949} + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + diff --git a/src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs b/src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs new file mode 100644 index 00000000..bb0dfd62 --- /dev/null +++ b/src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MS_VSIPCC_v80 + MS_VSCC_v80 + FL_vsipcc_hxt_86880________ + + + + + MS_VSIPCC_v80 + MS_VSExpressCC_v80 + FL_vsipcc_hxt_86880________ + + + + + + + MS_VSIPCC_v80 + MS.VSIPCC.v80 + FL_vsipcc_hxc_86879________ + VSIP Documentation + + + + + + + + + diff --git a/src/wixlib/vs2005/redist/BIN_File_60377.dll b/src/wixlib/vs2005/redist/BIN_File_60377.dll new file mode 100644 index 00000000..dfdddf66 Binary files /dev/null and b/src/wixlib/vs2005/redist/BIN_File_60377.dll differ diff --git a/src/wixlib/vs2005/redist/vsipCCSamples.HxK b/src/wixlib/vs2005/redist/vsipCCSamples.HxK new file mode 100644 index 00000000..00db745c --- /dev/null +++ b/src/wixlib/vs2005/redist/vsipCCSamples.HxK @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2005/redist/vsipcc.hxc b/src/wixlib/vs2005/redist/vsipcc.hxc new file mode 100644 index 00000000..406e7f2b --- /dev/null +++ b/src/wixlib/vs2005/redist/vsipcc.hxc @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/vs2005/redist/vsipcc.hxt b/src/wixlib/vs2005/redist/vsipcc.hxt new file mode 100644 index 00000000..613dcfbb --- /dev/null +++ b/src/wixlib/vs2005/redist/vsipcc.hxt @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/src/wixlib/vs2005/redist/vsipccALinks.hxk b/src/wixlib/vs2005/redist/vsipccALinks.hxk new file mode 100644 index 00000000..27017f76 --- /dev/null +++ b/src/wixlib/vs2005/redist/vsipccALinks.hxk @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2005/redist/vsipccBLinks.hxk b/src/wixlib/vs2005/redist/vsipccBLinks.hxk new file mode 100644 index 00000000..b37d2e18 --- /dev/null +++ b/src/wixlib/vs2005/redist/vsipccBLinks.hxk @@ -0,0 +1,13 @@ + + + + diff --git a/src/wixlib/vs2005/redist/vsipccFLinks.hxk b/src/wixlib/vs2005/redist/vsipccFLinks.hxk new file mode 100644 index 00000000..2d37efbf --- /dev/null +++ b/src/wixlib/vs2005/redist/vsipccFLinks.hxk @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2005/redist/vsipccKLinks.hxk b/src/wixlib/vs2005/redist/vsipccKLinks.hxk new file mode 100644 index 00000000..2938eff3 --- /dev/null +++ b/src/wixlib/vs2005/redist/vsipccKLinks.hxk @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2005/redist/vsipccNamedURLs.hxk b/src/wixlib/vs2005/redist/vsipccNamedURLs.hxk new file mode 100644 index 00000000..8691c54c --- /dev/null +++ b/src/wixlib/vs2005/redist/vsipccNamedURLs.hxk @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2005/redist/vsipccSlinks.hxk b/src/wixlib/vs2005/redist/vsipccSlinks.hxk new file mode 100644 index 00000000..9d193521 --- /dev/null +++ b/src/wixlib/vs2005/redist/vsipccSlinks.hxk @@ -0,0 +1,14 @@ + + + + + diff --git a/src/wixlib/vs2005/redist/vsipcc_reg.hxs b/src/wixlib/vs2005/redist/vsipcc_reg.hxs new file mode 100644 index 00000000..3f2905c4 Binary files /dev/null and b/src/wixlib/vs2005/redist/vsipcc_reg.hxs differ diff --git a/src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs b/src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs new file mode 100644 index 00000000..bfeef18f --- /dev/null +++ b/src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MS.VSIPCC.v90 + MS.VSIPCC.v90 + FL_vsipcc_hxc_86879_86879_cn_ln + VSIP Documentation + + + + + MS.VSIPCC.v90 + MS.VSCC.v90 + FL_vsipcc_hxt_86880_86880_cn_ln + + + + + + + + + Not Installed + + + + + + + + diff --git a/src/wixlib/vs2008/redist/BIN_435439_x86_enu.dll b/src/wixlib/vs2008/redist/BIN_435439_x86_enu.dll new file mode 100644 index 00000000..7f5e9436 Binary files /dev/null and b/src/wixlib/vs2008/redist/BIN_435439_x86_enu.dll differ diff --git a/src/wixlib/vs2008/redist/_ALinks.hxk b/src/wixlib/vs2008/redist/_ALinks.hxk new file mode 100644 index 00000000..dd6df168 --- /dev/null +++ b/src/wixlib/vs2008/redist/_ALinks.hxk @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_BLinks.hxk b/src/wixlib/vs2008/redist/_BLinks.hxk new file mode 100644 index 00000000..a2288162 --- /dev/null +++ b/src/wixlib/vs2008/redist/_BLinks.hxk @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_CLinks.hxk b/src/wixlib/vs2008/redist/_CLinks.hxk new file mode 100644 index 00000000..da0df730 --- /dev/null +++ b/src/wixlib/vs2008/redist/_CLinks.hxk @@ -0,0 +1,13 @@ + + + + diff --git a/src/wixlib/vs2008/redist/_FLinks.hxk b/src/wixlib/vs2008/redist/_FLinks.hxk new file mode 100644 index 00000000..37dfda34 --- /dev/null +++ b/src/wixlib/vs2008/redist/_FLinks.hxk @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_KLinks.hxk b/src/wixlib/vs2008/redist/_KLinks.hxk new file mode 100644 index 00000000..2303ed0c --- /dev/null +++ b/src/wixlib/vs2008/redist/_KLinks.hxk @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_SLinks.hxk b/src/wixlib/vs2008/redist/_SLinks.hxk new file mode 100644 index 00000000..9f65eca3 --- /dev/null +++ b/src/wixlib/vs2008/redist/_SLinks.hxk @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_vsipcc90.hxc b/src/wixlib/vs2008/redist/_vsipcc90.hxc new file mode 100644 index 00000000..9ad6869e --- /dev/null +++ b/src/wixlib/vs2008/redist/_vsipcc90.hxc @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/vs2008/redist/_vsipcc90.hxt b/src/wixlib/vs2008/redist/_vsipcc90.hxt new file mode 100644 index 00000000..3ac4d5d6 --- /dev/null +++ b/src/wixlib/vs2008/redist/_vsipcc90.hxt @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/src/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk b/src/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk new file mode 100644 index 00000000..aaa79158 --- /dev/null +++ b/src/wixlib/vs2008/redist/_vsipcc_namedUrls.hxk @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/_vsipcc_samples.HxK b/src/wixlib/vs2008/redist/_vsipcc_samples.HxK new file mode 100644 index 00000000..00db745c --- /dev/null +++ b/src/wixlib/vs2008/redist/_vsipcc_samples.HxK @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/src/wixlib/vs2008/redist/vsipcc_reg.hxs b/src/wixlib/vs2008/redist/vsipcc_reg.hxs new file mode 100644 index 00000000..f6446867 Binary files /dev/null and b/src/wixlib/vs2008/redist/vsipcc_reg.hxs differ -- cgit v1.2.3-55-g6feb From e2d15ce225cbd9cd3e815cb9999f8896f8c610bf Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 4 Oct 2017 15:32:41 -0700 Subject: Reference extension by correct name --- src/wixext/WixToolset.VisualStudio.wixext.targets | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/wixext/WixToolset.VisualStudio.wixext.targets b/src/wixext/WixToolset.VisualStudio.wixext.targets index 903455e3..4542375f 100644 --- a/src/wixext/WixToolset.VisualStudio.wixext.targets +++ b/src/wixext/WixToolset.VisualStudio.wixext.targets @@ -3,8 +3,6 @@ - - $(MSBuildThisFileDirectory)..\tools\WixToolset.VS.wixext.dll - + -- cgit v1.2.3-55-g6feb From cba9d16b54cd4ba5b8750ee97ed5aa36cf1fc382 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 29 Dec 2017 04:55:28 -0800 Subject: Update to latest changes from Core and send build notifications to Slack --- VisualStudio.wixext.sln | 20 +- appveyor.cmd | 4 +- appveyor.yml | 5 + src/FindLocalWix.props | 2 +- .../TestData/UsingVsixPackage/Package.en-us.wxl | 11 + .../TestData/UsingVsixPackage/Package.wxs | 24 ++ .../UsingVsixPackage/PackageComponents.wxs | 14 + .../TestData/UsingVsixPackage/example.txt | 1 + .../VisualStudioExtensionFixture.cs | 46 ++ .../WixToolsetTest.VisualStudio.csproj | 40 ++ src/wixext/Data/messages.xml | 133 ------ src/wixext/Data/tables.xml | 66 --- src/wixext/VSCompiler.cs | 469 +++++++++------------ src/wixext/VSDecompiler.cs | 8 +- src/wixext/VSExtensionData.cs | 48 +-- src/wixext/VSExtensionFactory.cs | 18 + src/wixext/VSWindowsInstallerBackendExtension.cs | 75 ++++ src/wixext/WixToolset.VisualStudio.wixext.csproj | 45 +- src/wixext/vs.xsd | 292 +++++++++++++ src/wixext/xsd/vs.xsd | 292 ------------- src/wixlib/packages.config | 4 +- src/wixlib/vs.wixproj | 18 +- 22 files changed, 771 insertions(+), 864 deletions(-) create mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl create mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs create mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs create mode 100644 src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt create mode 100644 src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs create mode 100644 src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj delete mode 100644 src/wixext/Data/messages.xml delete mode 100644 src/wixext/Data/tables.xml create mode 100644 src/wixext/VSExtensionFactory.cs create mode 100644 src/wixext/VSWindowsInstallerBackendExtension.cs create mode 100644 src/wixext/vs.xsd delete mode 100644 src/wixext/xsd/vs.xsd (limited to 'src') diff --git a/VisualStudio.wixext.sln b/VisualStudio.wixext.sln index ca8aac82..d787afa2 100644 --- a/VisualStudio.wixext.sln +++ b/VisualStudio.wixext.sln @@ -1,13 +1,15 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26730.16 +VisualStudioVersion = 15.0.27130.2003 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ca", "src\ca\vsca.vcxproj", "{45308B85-0628-4978-8FC8-6AD9E1AD5949}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vsca", "src\ca\vsca.vcxproj", "{45308B85-0628-4978-8FC8-6AD9E1AD5949}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.VisualStudio.wixext", "src\wixext\WixToolset.VisualStudio.wixext.csproj", "{61BFD377-9DE1-48B4-8687-560DF68D6F3B}" EndProject -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "wixlib", "src\wixlib\vs.wixproj", "{14345C9D-8AF8-435A-BB1B-E067CE7EB321}" +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "vs", "src\wixlib\vs.wixproj", "{14345C9D-8AF8-435A-BB1B-E067CE7EB321}" +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 @@ -49,6 +51,18 @@ Global {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x64.Build.0 = Release|x64 {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 diff --git a/appveyor.cmd b/appveyor.cmd index a4f49085..4621592d 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -5,7 +5,9 @@ nuget restore msbuild -p:Configuration=Release -t:Restore -msbuild -p:Configuration=Release -t:Pack .\src\wixext\WixToolset.VisualStudio.wixext.csproj +msbuild -p:Configuration=Release src\test\WixToolsetTest.VisualStudio\WixToolsetTest.VisualStudio.csproj + +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.VisualStudio.wixext.csproj @popd @endlocal \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index d9da1df5..0c74d54b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,3 +22,8 @@ skip_tags: true artifacts: - path: build\Release\**\*.nupkg name: nuget + +notifications: +- provider: Slack + incoming_webhook: + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA= diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props index e77fb386..016dac77 100644 --- a/src/FindLocalWix.props +++ b/src/FindLocalWix.props @@ -3,6 +3,6 @@ - $(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\wix.targets + $(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\net461\wix.targets diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/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/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs new file mode 100644 index 00000000..07e6ba3d --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs new file mode 100644 index 00000000..c8c72cc0 --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/PackageComponents.wxs @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/example.txt @@ -0,0 +1 @@ +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 new file mode 100644 index 00000000..5bcc4391 --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs @@ -0,0 +1,46 @@ +// 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]\t0", + "CustomAction:SetVS2012Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2012_VSIX_INSTALLER_PATH]\t0", + "CustomAction:SetVS2013Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2013_VSIX_INSTALLER_PATH]\t0", + "CustomAction:SetVS2015Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2015_VSIX_INSTALLER_PATH]\t0", + "CustomAction:vimyrEjb_CFhXi3TTLayKNM2w7rvr4\t3122\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\" /admin\t0", + "CustomAction:viuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1074\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\"\t0", + "CustomAction:vrmyrEjb_CFhXi3TTLayKNM2w7rvr4\t3442\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t0", + "CustomAction:vruFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1394\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t0", + "CustomAction:VSFindInstances\t257\tVSCA\tFindInstances\t0", + "CustomAction:vumyrEjb_CFhXi3TTLayKNM2w7rvr4\t3186\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t0", + "CustomAction:vuuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1138\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t0", + "CustomAction:Vwd2012VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2012_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", + "CustomAction:Vwd2013VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2013_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", + "CustomAction:Vwd2015VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2015_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", + }, results.OrderBy(s => s).ToArray()); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args, out var messages); + Assert.Equal(0, result); + Assert.Empty(messages); + } + } +} diff --git a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj new file mode 100644 index 00000000..621ce70b --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj @@ -0,0 +1,40 @@ + + + + + + netcoreapp2.0 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/Data/messages.xml b/src/wixext/Data/messages.xml deleted file mode 100644 index d1c85301..00000000 --- a/src/wixext/Data/messages.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - Invalid project output group: {0}. - - - - - - No project output group specified. - - - - - Failed to load MSBuild assembly: {0} - - - - - - Failed to load MSBuild engine: {0} - - - - - - Failed to load project {0}: {1} - - - - - - - Failed to build project {0}: {1} - - - - - - - Build failed. - - - - - Missing project output group '{1}' in project {0}. - - - - - - - DirectoryAttributeAccessor tried to access an invalid element type for attribute '{0'}. - - - - - - Invalid generated type: {0}. Must be one of: components, container, payloadgroup, layout. - - - - - - Invalid directory ID: {0}. Check that it doesn't start with a hyphen or slash. - - - - - - Invalid project name: {0}. Check that it doesn't start with a hyphen or slash. - - - - - - Build error during harvesting: {0} - - - - - - Failed to load MSBuild wrapper assembly: {0} - - - - - - Failed to load MSBuild wrapper type: {0} - - - - - - Failed to load MSBuild wrapper object: {0} - - - - - - - - Failed to set loggers: {0} - - - - - - Failed to set project configuration and platform: {0} - - - - - - - - Found ToolsVersion {0} inside project file. - - - - - - Loading project using MSBuild version {0}. - - - - - diff --git a/src/wixext/Data/tables.xml b/src/wixext/Data/tables.xml deleted file mode 100644 index e9c86097..00000000 --- a/src/wixext/Data/tables.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixext/VSCompiler.cs b/src/wixext/VSCompiler.cs index cf6226dd..8c01cb5b 100644 --- a/src/wixext/VSCompiler.cs +++ b/src/wixext/VSCompiler.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -namespace WixToolset.Extensions +namespace WixToolset.VisualStudio { using System; using System.Collections.Generic; @@ -11,7 +11,7 @@ namespace WixToolset.Extensions /// /// The compiler for the WiX Toolset Visual Studio Extension. /// - public sealed class VSCompiler : CompilerExtension + public sealed class VSCompiler : BaseCompilerExtension { internal const int MsidbCustomActionTypeExe = 0x00000002; // Target = command line args internal const int MsidbCustomActionTypeProperty = 0x00000030; // Source = full path to executable @@ -20,22 +20,9 @@ namespace WixToolset.Extensions internal const int MsidbCustomActionTypeInScript = 0x00000400; // queue for execution within script internal const int MsidbCustomActionTypeNoImpersonate = 0x00000800; // queue for not impersonating - /// - /// Instantiate a new HelpCompiler. - /// - public VSCompiler() - { - this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/vs"; - } + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/vs"; - /// - /// Processes an element for the Compiler. - /// - /// Source line number for the parent element. - /// Parent element of element to process. - /// Element to process. - /// Extra information about the context in which this element is being parsed. - public override void ParseElement(XElement parentElement, XElement element, IDictionary context) + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context) { switch (parentElement.Name.LocalName) { @@ -43,10 +30,10 @@ namespace WixToolset.Extensions switch (element.Name.LocalName) { case "VsixPackage": - this.ParseVsixPackageElement(element, context["ComponentId"], null); + this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], null); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } break; @@ -54,16 +41,16 @@ namespace WixToolset.Extensions switch (element.Name.LocalName) { case "HelpCollection": - this.ParseHelpCollectionElement(element, context["FileId"]); + this.ParseHelpCollectionElement(intermediate, section, element, context["FileId"]); break; case "HelpFile": - this.ParseHelpFileElement(element, context["FileId"]); + this.ParseHelpFileElement(intermediate, section, element, context["FileId"]); break; case "VsixPackage": - this.ParseVsixPackageElement(element, context["ComponentId"], context["FileId"]); + this.ParseVsixPackageElement(intermediate, section, element, context["ComponentId"], context["FileId"]); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } break; @@ -73,186 +60,171 @@ namespace WixToolset.Extensions switch (element.Name.LocalName) { case "HelpCollectionRef": - this.ParseHelpCollectionRefElement(element); + this.ParseHelpCollectionRefElement(intermediate, section, element); break; case "HelpFilter": - this.ParseHelpFilterElement(element); + this.ParseHelpFilterElement(intermediate, section, element); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } } - /// - /// Parses a HelpCollectionRef element. - /// - /// Element to process. - private void ParseHelpCollectionRefElement(XElement node) + private void ParseHelpCollectionRefElement(Intermediate intermediate, IntermediateSection section, XElement element) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "HelpNamespace", id); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", id.Id); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } - foreach (XElement child in node.Elements()) + foreach (XElement child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { - SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child); + SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); switch (child.Name.LocalName) { case "HelpFileRef": - this.ParseHelpFileRefElement(child, id); + this.ParseHelpFileRefElement(intermediate, section, child, id); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(element, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); } } } - /// - /// Parses a HelpCollection element. - /// - /// Element to process. - /// Identifier of the parent File element. - private void ParseHelpCollectionElement(XElement node, string fileId) + private void ParseHelpCollectionElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; string description = null; string name = null; YesNoType suppressCAs = YesNoType.No; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); break; case "Description": - description = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SuppressCustomActions": - suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } if (null == description) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Description")); } if (null == name) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); } - foreach (XElement child in node.Elements()) + foreach (XElement child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { switch (child.Name.LocalName) { case "HelpFileRef": - this.ParseHelpFileRefElement(child, id); + this.ParseHelpFileRefElement(intermediate, section, child, id); break; case "HelpFilterRef": - this.ParseHelpFilterRefElement(child, id); + this.ParseHelpFilterRefElement(intermediate, section, child, id); break; case "PlugCollectionInto": - this.ParsePlugCollectionIntoElement(child, id); + this.ParsePlugCollectionIntoElement(intermediate, section, child, id); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(element, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child); } } - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpNamespace"); - row[0] = id; - row[1] = name; - row[2] = fileId; - row[3] = description; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpNamespace", id); + row.Set(1, name); + row.Set(2, fileId); + row.Set(3, description); if (YesNoType.No == suppressCAs) { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); } } } - /// - /// Parses a HelpFile element. - /// - /// Element to process. - /// Identifier of the parent file element. - private void ParseHelpFileElement(XElement node, string fileId) + private void ParseHelpFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; string name = null; int language = CompilerConstants.IntegerNotSet; string hxi = null; @@ -261,255 +233,232 @@ namespace WixToolset.Extensions string samples = null; YesNoType suppressCAs = YesNoType.No; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); break; case "AttributeIndex": - hxr = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxr); + hxr = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxr); break; case "Index": - hxi = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxi); + hxi = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxi); break; case "Language": - language = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); + language = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SampleLocation": - samples = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "File", samples); + samples = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", samples); break; case "Search": - hxq = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "File", hxq); + hxq = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxq); break; case "SuppressCustomActions": - suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } if (null == name) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); } - //uninstall will always fail silently, leaving file registered, if Language is not set + // Uninstall will always fail silently, leaving file registered, if Language is not set if (CompilerConstants.IntegerNotSet == language) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Language")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Language")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFile"); - row[0] = id; - row[1] = name; - row[2] = language; - row[3] = fileId; - row[4] = hxi; - row[5] = hxq; - row[6] = hxr; - row[7] = samples; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFile", id); + row.Set(1, name); + row.Set(2, language); + row.Set(3, fileId); + row.Set(4, hxi); + row.Set(5, hxq); + row.Set(6, hxr); + row.Set(7, samples); if (YesNoType.No == suppressCAs) { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); } } } - /// - /// Parses a HelpFileRef element. - /// - /// Element to process. - /// Identifier of the parent help collection. - private void ParseHelpFileRefElement(XElement node, string collectionId) + private void ParseHelpFileRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "HelpFile", id); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFile", id.Id); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFileToNamespace"); - row[0] = id; - row[1] = collectionId; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFileToNamespace", id); + row.Set(1, collectionId); } } - /// - /// Parses a HelpFilter element. - /// - /// Element to process. - private void ParseHelpFilterElement(XElement node) + private void ParseHelpFilterElement(Intermediate intermediate, IntermediateSection section, XElement element) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; string filterDefinition = null; string name = null; YesNoType suppressCAs = YesNoType.No; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); break; case "FilterDefinition": - filterDefinition = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + filterDefinition = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SuppressCustomActions": - suppressCAs = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } if (null == name) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFilter"); - row[0] = id; - row[1] = name; - row[2] = filterDefinition; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilter", id); + row.Set(1, name); + row.Set(2, filterDefinition); if (YesNoType.No == suppressCAs) { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); } } } - /// - /// Parses a HelpFilterRef element. - /// - /// Element to process. - /// Identifier of the parent help collection. - private void ParseHelpFilterRefElement(XElement node, string collectionId) + private void ParseHelpFilterRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); - string id = null; + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + Identifier id = null; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "HelpFilter", id); + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFilter", id.Id); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (null == id) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpFilterToNamespace"); - row[0] = id; - row[1] = collectionId; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilterToNamespace", id); + row.Set(1, collectionId.Id); } } - /// - /// Parses a PlugCollectionInto element. - /// - /// Element to process. - /// Identifier of the parent help collection. - private void ParsePlugCollectionIntoElement(XElement node, string parentId) + private void ParsePlugCollectionIntoElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier parentId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); string hxa = null; string hxt = null; string hxtParent = null; @@ -519,38 +468,38 @@ namespace WixToolset.Extensions bool pluginVS05 = false; bool pluginVS08 = false; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Attributes": - hxa = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + hxa = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "TableOfContents": - hxt = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + hxt = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "TargetCollection": - namespaceParent = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + namespaceParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "TargetTableOfContents": - hxtParent = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + hxtParent = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "TargetFeature": - feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + feature = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "SuppressExternalNamespaces": - suppressExternalNamespaces = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + suppressExternalNamespaces = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } @@ -559,35 +508,33 @@ namespace WixToolset.Extensions if (null == namespaceParent) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetCollection")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetCollection")); } if (null == feature && (pluginVS05 || pluginVS08) && YesNoType.No == suppressExternalNamespaces) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetFeature")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetFeature")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "HelpPlugin"); - row[0] = parentId; - row[1] = namespaceParent; - row[2] = hxt; - row[3] = hxa; - row[4] = hxtParent; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpPlugin", parentId); + row.Set(1, namespaceParent); + row.Set(2, hxt); + row.Set(3, hxa); + row.Set(4, hxtParent); if (pluginVS05) { if (YesNoType.No == suppressExternalNamespaces) { // Bring in the help 2 base namespace components for VS 2005 - this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, + 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.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", - "CA_HxMerge_VSIPCC_VSCC"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_HxMerge_VSIPCC_VSCC"); } } else if (pluginVS08) @@ -595,31 +542,23 @@ namespace WixToolset.Extensions if (YesNoType.No == suppressExternalNamespaces) { // Bring in the help 2 base namespace components for VS 2008 - this.Core.CreateComplexReference(sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, + 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.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", - "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); } } else { // Reference the parent namespace to enforce the foreign key relationship - this.Core.CreateSimpleReference(sourceLineNumbers, "HelpNamespace", - namespaceParent); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", namespaceParent); } } } - /// - /// Parses a VsixPackage element. - /// - /// Element to process. - /// Identifier of the parent Component element. - /// Identifier of the parent File element. - private void ParseVsixPackageElement(XElement node, string componentId, string fileId) + private void ParseVsixPackageElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); string propertyId = "VS_VSIX_INSTALLER_PATH"; string packageId = null; YesNoType permanent = YesNoType.NotSet; @@ -627,7 +566,7 @@ namespace WixToolset.Extensions string targetVersion = null; YesNoType vital = YesNoType.NotSet; - foreach (XAttribute attrib in node.Attributes()) + foreach (XAttribute attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -636,21 +575,21 @@ namespace WixToolset.Extensions case "File": if (String.IsNullOrEmpty(fileId)) { - fileId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + fileId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); } else { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, "File", "File")); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, element.Name.LocalName, "File", "File")); } break; case "PackageId": - packageId = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + packageId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Permanent": - permanent = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + permanent = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; case "Target": - target = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + target = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (target.ToLowerInvariant()) { case "integrated": @@ -681,53 +620,53 @@ namespace WixToolset.Extensions } break; case "TargetVersion": - targetVersion = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib); + targetVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib); break; case "Vital": - vital = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib); + vital = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); break; case "VsixInstallerPathProperty": - propertyId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + propertyId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(element, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib); } } if (String.IsNullOrEmpty(fileId)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "File")); } if (String.IsNullOrEmpty(packageId)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PackageId")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "PackageId")); } if (!String.IsNullOrEmpty(target) && String.IsNullOrEmpty(targetVersion)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TargetVersion", "Target")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "TargetVersion", "Target")); } else if (String.IsNullOrEmpty(target) && !String.IsNullOrEmpty(targetVersion)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Target", "TargetVersion")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Target", "TargetVersion")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. - this.Core.CreateSimpleReference(sourceLineNumbers, "Property", propertyId); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Property", propertyId); // Ensure there is a reference to the package file (even if we are a child under it). - this.Core.CreateSimpleReference(sourceLineNumbers, "File", fileId); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", fileId); string cmdlinePrefix = "/q "; @@ -746,8 +685,8 @@ namespace WixToolset.Extensions } else // the package is vital so ensure there is a rollback action scheduled. { - Identifier rollbackNamePerUser = this.Core.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); - Identifier rollbackNamePerMachine = this.Core.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier rollbackNamePerUser = this.ParseHelper.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier rollbackNamePerMachine = this.ParseHelper.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); string rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); string rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin"); int rollbackExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeRollback | VSCompiler.MsidbCustomActionTypeInScript; @@ -755,27 +694,27 @@ namespace WixToolset.Extensions string rollbackConditionPerUser = String.Format("NOT ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. string rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. - this.SchedulePropertyExeAction(sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter); - this.SchedulePropertyExeAction(sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); + this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter); + this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); installAfter = rollbackNamePerMachine.Id; } - Identifier installNamePerUser = this.Core.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); - Identifier installNamePerMachine = this.Core.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier installNamePerUser = this.ParseHelper.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier installNamePerMachine = this.ParseHelper.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); string installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId); string installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin"); string installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. string installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. - this.SchedulePropertyExeAction(sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter); - this.SchedulePropertyExeAction(sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.Id); + this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter); + this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.Id); // If not permanent, schedule the uninstall custom action. if (permanent != YesNoType.Yes) { - Identifier uninstallNamePerUser = this.Core.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); - Identifier uninstallNamePerMachine = this.Core.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier uninstallNamePerUser = this.ParseHelper.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); + Identifier uninstallNamePerMachine = this.ParseHelper.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); string uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); string uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin"); int uninstallExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeInScript; @@ -783,39 +722,39 @@ namespace WixToolset.Extensions string uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. string uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. - this.SchedulePropertyExeAction(sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null); - this.SchedulePropertyExeAction(sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null); + this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null); + this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null); } } } - private void SchedulePropertyExeAction(SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, int extraBits, string condition, string beforeAction, string afterAction) + private void SchedulePropertyExeAction(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, int extraBits, string condition, string beforeAction, string afterAction) { const string sequence = "InstallExecuteSequence"; - Row actionRow = this.Core.CreateRow(sourceLineNumbers, "CustomAction", name); - actionRow[1] = VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits; - actionRow[2] = source; - actionRow[3] = cmdline; + var actionRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "CustomAction", name); + actionRow.Set(1, VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits); + actionRow.Set(2, source); + actionRow.Set(3, cmdline); - Row sequenceRow = this.Core.CreateRow(sourceLineNumbers, "WixAction"); - sequenceRow[0] = sequence; - sequenceRow[1] = name.Id; - sequenceRow[2] = condition; + var sequenceRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixAction", new Identifier(name.Access, sequence, name.Id)); + sequenceRow.Set(0, sequence); + sequenceRow.Set(1, name.Id); + sequenceRow.Set(2, condition); // no explicit sequence - sequenceRow[4] = beforeAction; - sequenceRow[5] = afterAction; - sequenceRow[6] = 0; // not overridable + sequenceRow.Set(4, beforeAction); + sequenceRow.Set(5, afterAction); + sequenceRow.Set(6, 0); // not overridable if (null != beforeAction) { if (WindowsInstallerStandard.IsStandardAction(beforeAction)) { - this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", sequence, beforeAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, beforeAction); } else { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", beforeAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", beforeAction); } } @@ -823,11 +762,11 @@ namespace WixToolset.Extensions { if (WindowsInstallerStandard.IsStandardAction(afterAction)) { - this.Core.CreateSimpleReference(sourceLineNumbers, "WixAction", sequence, afterAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, afterAction); } else { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", afterAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", afterAction); } } } diff --git a/src/wixext/VSDecompiler.cs b/src/wixext/VSDecompiler.cs index bfa0670c..08dc364a 100644 --- a/src/wixext/VSDecompiler.cs +++ b/src/wixext/VSDecompiler.cs @@ -1,7 +1,8 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -namespace WixToolset.Extensions +namespace WixToolset.VisualStudio { +#if TODO_CONSIDER_DECOMPILER using System; using System.Collections; using System.Diagnostics; @@ -104,7 +105,7 @@ namespace WixToolset.Extensions { helpFile.SampleLocation = (string)row[7]; } - + if (this.Core.RootElement is Wix.Module) { helpFile.SuppressCustomActions = VS.YesNoType.yes; @@ -270,7 +271,7 @@ namespace WixToolset.Extensions //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) { @@ -293,4 +294,5 @@ namespace WixToolset.Extensions // return String.Empty; //} } +#endif } diff --git a/src/wixext/VSExtensionData.cs b/src/wixext/VSExtensionData.cs index edb1fd42..bc846af0 100644 --- a/src/wixext/VSExtensionData.cs +++ b/src/wixext/VSExtensionData.cs @@ -1,55 +1,15 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -namespace WixToolset.Extensions +namespace WixToolset.VisualStudio { - using System; - using System.Reflection; using WixToolset.Data; using WixToolset.Extensibility; - /// - /// The WiX Toolset Visual Studio Extension. - /// - public sealed class VSExtensionData : ExtensionData + public sealed class VSExtensionData : BaseExtensionData { - /// - /// Gets the optional table definitions for this extension. - /// - /// The optional table definitions for this extension. - public override TableDefinitionCollection TableDefinitions + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) { - get - { - return VSExtensionData.GetExtensionTableDefinitions(); - } - } - - /// - /// Gets the library associated with this extension. - /// - /// The table definitions to use while loading the library. - /// The loaded library. - public override Library GetLibrary(TableDefinitionCollection tableDefinitions) - { - return VSExtensionData.GetExtensionLibrary(tableDefinitions); - } - - /// - /// Internal mechanism to access the extension's table definitions. - /// - /// Extension's table definitions. - internal static TableDefinitionCollection GetExtensionTableDefinitions() - { - return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml"); - } - - /// - /// Internal mechanism to access the extension's library. - /// - /// Extension's library. - internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions) - { - return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.vs.wixlib", tableDefinitions); + return Intermediate.Load(typeof(VSExtensionData).Assembly, "WixToolset.VisualStudio.vs.wixlib", tupleDefinitions); } } } diff --git a/src/wixext/VSExtensionFactory.cs b/src/wixext/VSExtensionFactory.cs new file mode 100644 index 00000000..650cbe04 --- /dev/null +++ b/src/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 IEnumerable ExtensionTypes => new[] + { + typeof(VSCompiler), + typeof(VSExtensionData), + typeof(VSWindowsInstallerBackendExtension), + }; + } +} diff --git a/src/wixext/VSWindowsInstallerBackendExtension.cs b/src/wixext/VSWindowsInstallerBackendExtension.cs new file mode 100644 index 00000000..16ed008a --- /dev/null +++ b/src/wixext/VSWindowsInstallerBackendExtension.cs @@ -0,0 +1,75 @@ +// 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; + using WixToolset.Extensibility; + + public class VSWindowsInstallerBackendExtension : BaseWindowsInstallerBackendExtension + { + private static readonly TableDefinition[] Tables = new[] { + new TableDefinition( + "HelpFile", + new[] + { + new ColumnDefinition("HelpFileKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required)."), + new ColumnDefinition("HelpFileName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this HelpFile (required)."), + new ColumnDefinition("LangID", ColumnType.Number, 2, false, true, ColumnCategory.Language, description: "Language ID for content file (optional)."), + new ColumnDefinition("File_HxS", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxS (Title) file (required)."), + new ColumnDefinition("File_HxI", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxI (Index) file (required)."), + new ColumnDefinition("File_HxQ", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxQ (Query) file (required)."), + new ColumnDefinition("File_HxR", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxR (Attributes) file (required)."), + new ColumnDefinition("File_Samples", ColumnType.String, 72, false, 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)."), + } + ), + new TableDefinition( + "HelpFileToNamespace", + new[] + { + new ColumnDefinition("HelpFile_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFile", keyColumn: 1, description: "Foreign key into HelpFile table (required)."), + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), + } + ), + new TableDefinition( + "HelpFilter", + new[] + { + new ColumnDefinition("FilterKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFilter (required)."), + new ColumnDefinition("Description", ColumnType.Localized, 0, false, false, ColumnCategory.Text, description: "Friendly name for Filter (required)."), + new ColumnDefinition("QueryString", ColumnType.String, 0, false, true, ColumnCategory.Text, description: "Query String for Help Filter (optional)."), + } + ), + new TableDefinition( + "HelpFilterToNamespace", + new[] + { + new ColumnDefinition("HelpFilter_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFilter", keyColumn: 1, description: "Foreign key into HelpFilter table (required)."), + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), + } + ), + new TableDefinition( + "HelpNamespace", + new[] + { + new ColumnDefinition("NamespaceKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), + new ColumnDefinition("NamespaceName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this Namespace (required)."), + new ColumnDefinition("File_Collection", ColumnType.String, 72, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxC (Collection) file (required)."), + new ColumnDefinition("Description", ColumnType.Localized, 0, false, true, ColumnCategory.Text, description: "Friendly name for Namespace (optional)."), + } + ), + new TableDefinition( + "HelpPlugin", + new[] + { + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, 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, true, 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, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of child namespace (optional)."), + new ColumnDefinition("File_HxA", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxA (Attributes) file of child namespace (optional)."), + new ColumnDefinition("File_ParentHxT", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of parent namespace that now includes the new child namespace (optional)."), + } + ), + }; + + protected override TableDefinition[] TableDefinitionsForTuples => Tables; + } +} diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj index 0b092662..e0c4a983 100644 --- a/src/wixext/WixToolset.VisualStudio.wixext.csproj +++ b/src/wixext/WixToolset.VisualStudio.wixext.csproj @@ -4,66 +4,29 @@ netstandard2.0 - WixToolset.Extensions + WixToolset.VisualStudio WiX Toolset Visual Studio Extension WiX Toolset VS Extension true build - - NU1701 - - - - - $(RootNamespace).Data.tables.xml - - - - $(RootNamespace).Data.Messages.resources - - - - $(RootNamespace).Xsd.vs.xsd - true - tools - - - - WixToolset.Data.Serialize - WixToolset.Extensions.Serialize.VS - - - - Data\vs.wixlib - - - + + - - - - - - - - false - + - - diff --git a/src/wixext/vs.xsd b/src/wixext/vs.xsd new file mode 100644 index 00000000..51172920 --- /dev/null +++ b/src/wixext/vs.xsd @@ -0,0 +1,292 @@ + + + + + + + + The source code schema for the WiX Toolset Visual Studio Extension. + + + + + + + Help Namespace for a help collection. The parent file is the key for the HxC (Collection) file. + + + + + + + + + + + + + Primary Key for HelpNamespace. + + + Friendly name for Namespace. + + + Internal Microsoft Help ID for this Namespace. + + + Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + + + Filter for Help Namespace. + + + + + + + + + + Primary Key for HelpFilter. + + + Query String for Help Filter. + + + Friendly name for Filter. + + + Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + + + File for Help Namespace. The parent file is the key for HxS (Title) file. + + + + + + + + Primary Key for HelpFile Table. + + + Key for HxR (Attributes) file. + + + Key for HxI (Index) file. + + + Language ID for content file. + + + Internal Microsoft Help ID for this HelpFile. + + + Key for a file that is in the "root" of the samples directory for this HelpFile. + + + Key for HxQ (Query) file. + + + Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + Plugin for Help Namespace. + + + Key for HxA (Attributes) file of child namespace. + + + Key for HxT file of child namespace. + + + + Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted. + The following special keys can be used to plug into external namespaces defined outside of the installer. + MS_VSIPCC_v80 : Visual Studio 2005 + MS.VSIPCC.v90 : Visual Studio 2008 + + + + Key for HxT file of parent namespace that now includes the new child namespace. + + + Key for the feature parent of this help collection. Required only when plugging into external namespaces. + + + Suppress linking Visual Studio Help namespaces. Help redistributable merge modules will be required. Use this when building a merge module. + + + + + + Create a reference to a HelpFile element in another Fragment. + + + Primary Key for HelpFile Table. + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + Create a reference to a HelpFile element in another Fragment. + + + Primary Key for HelpFilter. + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + + Create a reference to a HelpCollection element in another Fragment. + + + + + + + + + + + + Primary Key for HelpNamespace Table. + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + + + This element provides the metdata required to install/uninstall a file as + a VSIX Package. The VSIX package file will be installed as part of the MSI + then passed to the VSIX installer to install the VSIX package. To avoid the + duplication, simply use the MSI to install the VSIX package itself. + + + + + + + + + + + Reference to file identifer. This attribute is required when the element is not a + child of a File element and is invalid when the element is a child of the File element. + + + + + + + Identity of the VSIX package per its internal manifest. If this value is not correct + the VSIX package will not correctly uninstall. + + + + + + + Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled. + The default is 'no'. + + + + + + + Specifies the SKU of Visual Studio in which to register the extension. If no target + is specified the extension is registered with all installed SKUs. If the Target + attribute is specified the TargetVersion attribute must also be specified. The + following is a list of known Visual Studio targets: integratedShell, professional, + premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress + + + + + + + Specifies the version of Visual Studio in which to register the extension. This attribute + is required if the Target attribute is specified. + + + + + + + Indicates whether failure to install the VSIX package causes the installation to rollback. + The default is 'yes'. + + + + + + + Optional reference to a Property element that contains the path to the VsixInstaller.exe. + By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX + package. It is highly recommended that this attribute is *not* used. + + + + + + Extensibility point in the WiX XML Schema. Schema extensions can register additional + attributes at this point in the schema. + + + + + + + Values of this type will look like: "x.x.x.x" where x is an integer from 0 to 65534. + + + + + + + + Values of this type will either be "yes" or "no". + + + + + + + diff --git a/src/wixext/xsd/vs.xsd b/src/wixext/xsd/vs.xsd deleted file mode 100644 index 51172920..00000000 --- a/src/wixext/xsd/vs.xsd +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - - The source code schema for the WiX Toolset Visual Studio Extension. - - - - - - - Help Namespace for a help collection. The parent file is the key for the HxC (Collection) file. - - - - - - - - - - - - - Primary Key for HelpNamespace. - - - Friendly name for Namespace. - - - Internal Microsoft Help ID for this Namespace. - - - Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - - - Filter for Help Namespace. - - - - - - - - - - Primary Key for HelpFilter. - - - Query String for Help Filter. - - - Friendly name for Filter. - - - Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - - - File for Help Namespace. The parent file is the key for HxS (Title) file. - - - - - - - - Primary Key for HelpFile Table. - - - Key for HxR (Attributes) file. - - - Key for HxI (Index) file. - - - Language ID for content file. - - - Internal Microsoft Help ID for this HelpFile. - - - Key for a file that is in the "root" of the samples directory for this HelpFile. - - - Key for HxQ (Query) file. - - - Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - Plugin for Help Namespace. - - - Key for HxA (Attributes) file of child namespace. - - - Key for HxT file of child namespace. - - - - Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted. - The following special keys can be used to plug into external namespaces defined outside of the installer. - MS_VSIPCC_v80 : Visual Studio 2005 - MS.VSIPCC.v90 : Visual Studio 2008 - - - - Key for HxT file of parent namespace that now includes the new child namespace. - - - Key for the feature parent of this help collection. Required only when plugging into external namespaces. - - - Suppress linking Visual Studio Help namespaces. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - Create a reference to a HelpFile element in another Fragment. - - - Primary Key for HelpFile Table. - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - Create a reference to a HelpFile element in another Fragment. - - - Primary Key for HelpFilter. - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - - Create a reference to a HelpCollection element in another Fragment. - - - - - - - - - - - - Primary Key for HelpNamespace Table. - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - - - This element provides the metdata required to install/uninstall a file as - a VSIX Package. The VSIX package file will be installed as part of the MSI - then passed to the VSIX installer to install the VSIX package. To avoid the - duplication, simply use the MSI to install the VSIX package itself. - - - - - - - - - - - Reference to file identifer. This attribute is required when the element is not a - child of a File element and is invalid when the element is a child of the File element. - - - - - - - Identity of the VSIX package per its internal manifest. If this value is not correct - the VSIX package will not correctly uninstall. - - - - - - - Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled. - The default is 'no'. - - - - - - - Specifies the SKU of Visual Studio in which to register the extension. If no target - is specified the extension is registered with all installed SKUs. If the Target - attribute is specified the TargetVersion attribute must also be specified. The - following is a list of known Visual Studio targets: integratedShell, professional, - premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress - - - - - - - Specifies the version of Visual Studio in which to register the extension. This attribute - is required if the Target attribute is specified. - - - - - - - Indicates whether failure to install the VSIX package causes the installation to rollback. - The default is 'yes'. - - - - - - - Optional reference to a Property element that contains the path to the VsixInstaller.exe. - By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX - package. It is highly recommended that this attribute is *not* used. - - - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - Values of this type will look like: "x.x.x.x" where x is an integer from 0 to 65534. - - - - - - - - Values of this type will either be "yes" or "no". - - - - - - - diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 7120dc24..09c3a290 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index 15dd5092..c5613bb4 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -1,10 +1,8 @@ - - + - {14345C9D-8AF8-435A-BB1B-E067CE7EB321} vs @@ -13,7 +11,6 @@ true en-us - @@ -31,35 +28,30 @@ - - - vsca {45308b85-0628-4978-8fc8-6ad9e1ad5949} - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + - - + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 3d923d8c97c165a50d4064303fecfaf8f92c3f8e Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 1 Jan 2018 16:45:33 -0800 Subject: Update to latest dependencies --- src/FindLocalWix.props | 2 +- .../WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj | 6 +++--- src/wixext/VSCompiler.cs | 2 +- src/wixext/WixToolset.VisualStudio.wixext.csproj | 2 ++ src/wixlib/packages.config | 2 +- src/wixlib/vs.wixproj | 4 ++-- 6 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props index 016dac77..1301b0e5 100644 --- a/src/FindLocalWix.props +++ b/src/FindLocalWix.props @@ -3,6 +3,6 @@ - $(MSBuildThisFileDirectory)..\..\Core\build\Release\publish\net461\wix.targets + $(MSBuildThisFileDirectory)..\..\Core\build\Debug\net461\wix.targets diff --git a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj index 621ce70b..c0d9ed81 100644 --- a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj +++ b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj @@ -23,9 +23,9 @@ - - - + + + diff --git a/src/wixext/VSCompiler.cs b/src/wixext/VSCompiler.cs index 8c01cb5b..17b7f7a0 100644 --- a/src/wixext/VSCompiler.cs +++ b/src/wixext/VSCompiler.cs @@ -350,7 +350,7 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFileToNamespace", id); - row.Set(1, collectionId); + row.Set(1, collectionId.Id); } } diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj index e0c4a983..57d5b0c8 100644 --- a/src/wixext/WixToolset.VisualStudio.wixext.csproj +++ b/src/wixext/WixToolset.VisualStudio.wixext.csproj @@ -18,7 +18,9 @@ + + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 09c3a290..4250845c 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index c5613bb4..69b944ba 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -1,7 +1,7 @@ - + {14345C9D-8AF8-435A-BB1B-E067CE7EB321} @@ -51,7 +51,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 2816e91b3d9644e4573d77ec49d8db0d6de35d3c Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 23 Jul 2018 21:16:59 -0700 Subject: Integrate Core to Tools repro and Extensibility.Data namespace changes --- nuget.config | 1 + src/FindLocalWix.props | 2 +- .../WixToolsetTest.VisualStudio.csproj | 16 +++++++++------- src/wixext/WixToolset.VisualStudio.wixext.csproj | 2 +- src/wixlib/packages.config | 4 ++-- src/wixlib/vs.wixproj | 12 ++++++------ 6 files changed, 20 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/nuget.config b/nuget.config index bb8de141..aaee3228 100644 --- a/nuget.config +++ b/nuget.config @@ -9,6 +9,7 @@ + diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props index 1301b0e5..a784e352 100644 --- a/src/FindLocalWix.props +++ b/src/FindLocalWix.props @@ -3,6 +3,6 @@ - $(MSBuildThisFileDirectory)..\..\Core\build\Debug\net461\wix.targets + $(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets diff --git a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj index c0d9ed81..0c7238fc 100644 --- a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj +++ b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj @@ -1,9 +1,9 @@ - + - netcoreapp2.0 + netcoreapp2.1 false @@ -23,9 +23,11 @@ - - + + + + @@ -33,8 +35,8 @@ - - - + + + diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj index 57d5b0c8..a7702183 100644 --- a/src/wixext/WixToolset.VisualStudio.wixext.csproj +++ b/src/wixext/WixToolset.VisualStudio.wixext.csproj @@ -29,6 +29,6 @@ - + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 4250845c..45e5c7b1 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index 69b944ba..3cbd18e2 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -1,7 +1,7 @@ - - + + {14345C9D-8AF8-435A-BB1B-E067CE7EB321} @@ -44,14 +44,14 @@ - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 11f33bf61ebe93b54cf0a9901f118852896a1f88 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 16 Aug 2018 17:39:42 -0400 Subject: Update to latest MSBuild NuGet package and Windows 10 SDK for CA --- src/ca/vsca.vcxproj | 1 + src/wixlib/packages.config | 2 +- src/wixlib/vs.wixproj | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ca/vsca.vcxproj b/src/ca/vsca.vcxproj index c52840bf..f80b7215 100644 --- a/src/ca/vsca.vcxproj +++ b/src/ca/vsca.vcxproj @@ -24,6 +24,7 @@ Unicode vsca.def WiX Toolset VS CustomAction + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 45e5c7b1..f3d424e1 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index 3cbd18e2..f283e6ef 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -1,7 +1,7 @@ - + {14345C9D-8AF8-435A-BB1B-E067CE7EB321} @@ -51,7 +51,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 39191332831f49cd03b688793842dfd2d2e2a0ad Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 2 Oct 2018 15:25:09 -0700 Subject: Enable NCrunch support --- VisualStudio.wixext.sln | 8 ++++---- src/Cpp.Build.props | 5 ++--- src/Directory.Build.props | 15 +++++++++++---- src/wixext/WixToolset.VisualStudio.wixext.csproj | 2 +- .../WixToolset.VisualStudio.wixext.v3.ncrunchproject | 7 +++++++ src/wixlib/vs.v3.ncrunchproject | 5 +++++ 6 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 src/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject create mode 100644 src/wixlib/vs.v3.ncrunchproject (limited to 'src') diff --git a/VisualStudio.wixext.sln b/VisualStudio.wixext.sln index d787afa2..30cdb4a3 100644 --- a/VisualStudio.wixext.sln +++ b/VisualStudio.wixext.sln @@ -22,6 +22,7 @@ Global 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 @@ -42,13 +43,12 @@ Global {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|x64.ActiveCfg = Debug|x64 - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Debug|x64.Build.0 = Debug|x64 + {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|x64 - {14345C9D-8AF8-435A-BB1B-E067CE7EB321}.Release|x64.Build.0 = Release|x64 + {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 diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 453aa442..296b36ca 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -3,9 +3,8 @@ - Win32 - $(OutputPath) - $(BaseIntermediateOutputPath)$(Platform)\ + Win32 + $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ $(OutputPath)$(Platform)\ diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 63ad5d6e..9eacf3f5 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,16 +1,23 @@ - + Debug - AnyCPU - $(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\ - $(MSBuildThisFileDirectory)..\build\$(Configuration)\ + false + + $(MSBuildProjectName) + $(MSBuildThisFileDirectory)..\build\ + $(BaseOutputPath)obj\$(ProjectName)\ + $(BaseOutputPath)$(Configuration)\ WiX Toolset Team WiX Toolset Copyright (c) .NET Foundation and contributors. All rights reserved. + WiX Toolset diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj index a7702183..3131b64c 100644 --- a/src/wixext/WixToolset.VisualStudio.wixext.csproj +++ b/src/wixext/WixToolset.VisualStudio.wixext.csproj @@ -25,7 +25,7 @@ - + diff --git a/src/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject b/src/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject new file mode 100644 index 00000000..56556a9f --- /dev/null +++ b/src/wixext/WixToolset.VisualStudio.wixext.v3.ncrunchproject @@ -0,0 +1,7 @@ + + + + ..\..\build\Debug\vs.wixlib + + + \ No newline at end of file diff --git a/src/wixlib/vs.v3.ncrunchproject b/src/wixlib/vs.v3.ncrunchproject new file mode 100644 index 00000000..319cd523 --- /dev/null +++ b/src/wixlib/vs.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 187f0275f034d779c7744a5bc6d481baf6b839d3 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 3 Oct 2018 22:20:40 -0700 Subject: Adopt new WixRunner execution --- src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs index 5bcc4391..a980071e 100644 --- a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs +++ b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs @@ -38,9 +38,8 @@ namespace WixToolsetTest.VisualStudio private static void Build(string[] args) { - var result = WixRunner.Execute(args, out var messages); - Assert.Equal(0, result); - Assert.Empty(messages); + var result = WixRunner.Execute(args) + .AssertSuccess(); } } } -- cgit v1.2.3-55-g6feb From 600a864d8f22ca53bfbf70a111b21f4a83c33d07 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 29 Nov 2018 14:36:39 -0500 Subject: _Update extension for latest changes in WixToolset.Extensibility._ --- src/wixext/VSExtensionFactory.cs | 2 +- src/wixext/VSWindowsInstallerBackendExtension.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wixext/VSExtensionFactory.cs b/src/wixext/VSExtensionFactory.cs index 650cbe04..cc0d7314 100644 --- a/src/wixext/VSExtensionFactory.cs +++ b/src/wixext/VSExtensionFactory.cs @@ -12,7 +12,7 @@ namespace WixToolset.VisualStudio { typeof(VSCompiler), typeof(VSExtensionData), - typeof(VSWindowsInstallerBackendExtension), + typeof(VSWindowsInstallerBackendBinderExtension), }; } } diff --git a/src/wixext/VSWindowsInstallerBackendExtension.cs b/src/wixext/VSWindowsInstallerBackendExtension.cs index 16ed008a..12473b04 100644 --- a/src/wixext/VSWindowsInstallerBackendExtension.cs +++ b/src/wixext/VSWindowsInstallerBackendExtension.cs @@ -5,7 +5,7 @@ namespace WixToolset.VisualStudio using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; - public class VSWindowsInstallerBackendExtension : BaseWindowsInstallerBackendExtension + public class VSWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension { private static readonly TableDefinition[] Tables = new[] { new TableDefinition( -- cgit v1.2.3-55-g6feb From fd7f8754b3c8807d39dcf8295a12ff32ec0264b4 Mon Sep 17 00:00:00 2001 From: "Painter, Christopher P" Date: Thu, 20 Dec 2018 13:57:18 -0600 Subject: VS2019 Support --- src/ca/vsca.cpp | 81 ++++++++++++++++++++++++++++ src/wixlib/VS2019.wxs | 143 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/wixlib/vs.wixproj | 1 + 3 files changed, 225 insertions(+) create mode 100644 src/wixlib/VS2019.wxs (limited to 'src') diff --git a/src/ca/vsca.cpp b/src/ca/vsca.cpp index 30174672..ac045db8 100644 --- a/src/ca/vsca.cpp +++ b/src/ca/vsca.cpp @@ -47,6 +47,12 @@ static HRESULT ProcessVS2017( __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, @@ -56,6 +62,7 @@ static HRESULT SetPropertyForComponent( 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 }, }; /****************************************************************** @@ -407,6 +414,80 @@ LExit: 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.Component.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, diff --git a/src/wixlib/VS2019.wxs b/src/wixlib/VS2019.wxs new file mode 100644 index 00000000..57ae6168 --- /dev/null +++ b/src/wixlib/VS2019.wxs @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VS2019DEVENV + + + + + + + + + VS2019DEVENV + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index f283e6ef..e18a52cd 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -23,6 +23,7 @@ + -- cgit v1.2.3-55-g6feb From dc7b9a12716a68d9f994a33c00fe7c558429bba7 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 24 Dec 2018 05:42:11 -0800 Subject: Update to latest Home\repo-template --- .editorconfig | 37 +++++++++++ .gitignore | 72 ++++++++++++++++++---- appveyor.yml | 6 ++ src/Directory.Build.props | 9 +-- src/Directory.Build.targets | 48 +++++++++++++++ .../WixToolsetTest.VisualStudio.csproj | 6 +- src/wixext/WixToolset.VisualStudio.wixext.csproj | 5 +- 7 files changed, 155 insertions(+), 28 deletions(-) create mode 100644 .editorconfig create mode 100644 src/Directory.Build.targets (limited to 'src') diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..1d72e683 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,37 @@ +# Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig +# then update all of the repos. + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.{cs,vb}] +dotnet_sort_system_directives_first = true + +[*.cs] +csharp_indent_case_contents = true : error +csharp_indent_switch_labels = true : error +csharp_new_line_before_open_brace = all +csharp_prefer_braces = true : error +csharp_style_expression_bodied_methods = when_on_single_line : suggestion +csharp_style_expression_bodied_constructors = when_on_single_line : suggestion +csharp_style_expression_bodied_operators = when_on_single_line : suggestion +csharp_style_expression_bodied_properties = when_on_single_line : suggestion +csharp_style_expression_bodied_indexers = when_on_single_line : suggestion +csharp_style_expression_bodied_accessors = when_on_single_line : suggestion +csharp_style_var_elsewhere = true : suggestion +csharp_style_var_for_built_in_types = true : suggestion +csharp_style_var_when_type_is_apparent = true : suggestion +dotnet_style_qualification_for_event = true : error +dotnet_style_qualification_for_field = true : error +dotnet_style_qualification_for_method = true : error +dotnet_style_qualification_for_property = true : error + +[*.targets] +indent_size = 2 diff --git a/.gitignore b/.gitignore index 3c6208a8..3e8a1553 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files +*.rsuser *.suo *.user *.userosscache @@ -19,16 +20,21 @@ [Rr]eleases/ x64/ x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ -# Visual Studio 2015 cache/options directory +# Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ +# Visual Studio 2017 auto generated files +Generated\ Files/ + # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* @@ -49,16 +55,21 @@ BenchmarkDotNet.Artifacts/ project.lock.json project.fragment.lock.json artifacts/ -**/Properties/launchSettings.json +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio *_i.c *_p.c -*_i.h +*_h.h *.ilk *.meta *.obj +*.iobj *.pch *.pdb +*.ipdb *.pgc *.pgd *.rsp @@ -68,6 +79,7 @@ artifacts/ *.tlh *.tmp *.tmp_proj +*_wpftmp.csproj *.log *.vspscc *.vssscc @@ -96,6 +108,9 @@ ipch/ *.vspx *.sap +# Visual Studio Trace Files +*.e2e + # TFS 2012 Local Workspace $tf/ @@ -116,6 +131,10 @@ _TeamCity* # DotCover is a Code Coverage Tool *.dotCover +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + # Visual Studio code coverage results *.coverage *.coveragexml @@ -164,11 +183,11 @@ PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore -**/packages/* +**/[Pp]ackages/* # except build/, which is used as an MSBuild target. -!**/packages/build/ +!**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config +#!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets @@ -192,7 +211,7 @@ _pkginfo.txt # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache -!*.[Cc]ache/ +!?*.[Cc]ache/ # Others ClientBin/ @@ -205,9 +224,15 @@ ClientBin/ *.publishsettings orleans.codegen.cs +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ +# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true +**/wwwroot/lib/ # RIA/Silverlight projects Generated_Code/ @@ -219,6 +244,8 @@ _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak # SQL Server files *.mdf @@ -229,6 +256,7 @@ UpgradeLog*.htm *.rdl.data *.bim.layout *.bim_*.settings +*.rptproj.rsuser # Microsoft Fakes FakesAssemblies/ @@ -240,9 +268,6 @@ FakesAssemblies/ .ntvs_analysis.dat node_modules/ -# Typescript v1 declaration files -typings/ - # Visual Studio 6 build log *.plg @@ -271,8 +296,8 @@ paket-files/ .idea/ *.sln.iml -# CodeRush -.cr/ +# CodeRush personal settings +.cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ @@ -292,4 +317,25 @@ __pycache__/ *.btp.cs *.btm.cs *.odx.cs -*.xsd.cs \ No newline at end of file +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb diff --git a/appveyor.yml b/appveyor.yml index 0c74d54b..d55322da 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,8 @@ +# Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml +# then update all of the repos. + image: Visual Studio 2017 version: 0.0.0.{build} @@ -17,6 +22,7 @@ pull_requests: nuget: disable_publish_on_pr: true +skip_branch_with_pr: true skip_tags: true artifacts: diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 9eacf3f5..e853e22d 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,7 @@ @@ -10,20 +10,17 @@ false $(MSBuildProjectName) - $(MSBuildThisFileDirectory)..\build\ + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) $(BaseOutputPath)obj\$(ProjectName)\ $(BaseOutputPath)$(Configuration)\ WiX Toolset Team WiX Toolset Copyright (c) .NET Foundation and contributors. All rights reserved. + MS-RL WiX Toolset - - $(MSBuildThisFileDirectory)..\..\ - - diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..dac7452a --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,48 @@ + + + + + + + true + $(SolutionPath) + $(NCrunchOriginalSolutionPath) + + + + + + + $([System.IO.File]::ReadAllText($(TheSolutionPath))) + $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) )) + (?<="[PackageName]", ")(.*)(?=", ") + + + + + + %(Identity) + $(SolutionFileContent.Contains('\%(Identity).csproj')) + + + + + $(RegexPattern.Replace('[PackageName]','%(PackageName)') ) + $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)')) + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj index 0c7238fc..79cec135 100644 --- a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj +++ b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj @@ -23,11 +23,7 @@ - - - - - + diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj index 3131b64c..989755fc 100644 --- a/src/wixext/WixToolset.VisualStudio.wixext.csproj +++ b/src/wixext/WixToolset.VisualStudio.wixext.csproj @@ -18,10 +18,7 @@ - - - - + -- cgit v1.2.3-55-g6feb From 9b42d1d2f0fc13085f5f8d9ce8e420f556c55814 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 13 Jan 2019 19:05:05 -0600 Subject: Update to latest Cpp.Build.props for locating latest Win10 SDK. --- src/Cpp.Build.props | 6 +++++- src/ca/vsca.vcxproj | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 296b36ca..0e00132b 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -8,6 +8,10 @@ $(OutputPath)$(Platform)\ + + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + + $(DisableSpecificCompilerWarnings) @@ -16,7 +20,7 @@ WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) Use precomp.h - StdCall + StdCall true false -YlprecompDefine diff --git a/src/ca/vsca.vcxproj b/src/ca/vsca.vcxproj index f80b7215..c52840bf 100644 --- a/src/ca/vsca.vcxproj +++ b/src/ca/vsca.vcxproj @@ -24,7 +24,6 @@ Unicode vsca.def WiX Toolset VS CustomAction - $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) -- cgit v1.2.3-55-g6feb From 5e69f559a3cebd6fea0075f99ff5a6eb53958993 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Sun, 5 May 2019 10:28:22 -0700 Subject: Find latest for each VS2017+ version found Fixes wixtoolset/issues#5979 --- src/ca/vsca.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ca/vsca.cpp b/src/ca/vsca.cpp index ac045db8..54a54a34 100644 --- a/src/ca/vsca.cpp +++ b/src/ca/vsca.cpp @@ -51,7 +51,7 @@ static HRESULT ProcessVS2019( __in_opt ISetupInstance* pInstance, __in DWORD64 qwVersion, __in BOOL fComplete -); + ); static HRESULT SetPropertyForComponent( __in DWORD cComponents, @@ -157,11 +157,8 @@ extern "C" UINT __stdcall FindInstances( { const VS_INSTANCE* pElem = &vrgInstances[i]; - if (pElem->qwMinVersion <= qwVersion && qwVersion <= pElem->qwMaxVersion) - { - hr = pElem->pfnProcessInstance(NULL, 0, TRUE); - ExitOnFailure(hr, "Failed to process latest instance."); - } + hr = pElem->pfnProcessInstance(NULL, 0, TRUE); + ExitOnFailure(hr, "Failed to process latest instance."); } LExit: @@ -418,7 +415,7 @@ static HRESULT ProcessVS2019( __in_opt ISetupInstance* pInstance, __in DWORD64 qwVersion, __in BOOL fComplete -) + ) { static ISetupInstance* pLatest = NULL; static DWORD64 qwLatest = 0; @@ -436,7 +433,7 @@ static HRESULT ProcessVS2019( { 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.Component.TestTools.Core", L"VS2019_IDE_VSTS_TESTSYSTEM_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" }, -- cgit v1.2.3-55-g6feb From 6dd0c57a19e556c881064f62a2e77a3467eab286 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 7 Apr 2020 18:07:01 +1000 Subject: Update Dependencies. --- appveyor.yml | 2 +- src/Cpp.Build.props | 2 +- src/Directory.Build.props | 4 +++- src/FindLocalWix.props | 2 +- src/ca/packages.config | 4 ++-- src/ca/vsca.vcxproj | 8 ++++---- .../WixToolsetTest.VisualStudio.csproj | 15 +++++++++------ src/wixext/VSCompiler.cs | 1 + src/wixext/VSWindowsInstallerBackendExtension.cs | 3 ++- src/wixlib/packages.config | 2 +- src/wixlib/vs.wixproj | 4 ++-- 11 files changed, 27 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/appveyor.yml b/appveyor.yml index d55322da..bbf880f0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ # Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml # then update all of the repos. -image: Visual Studio 2017 +image: Visual Studio 2019 version: 0.0.0.{build} configuration: Release diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 0e00132b..44a042c7 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -8,7 +8,7 @@ $(OutputPath)$(Platform)\ - + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index e853e22d..a22f4470 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,6 +8,7 @@ Debug false + MSB3246 $(MSBuildProjectName) $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) @@ -21,6 +22,7 @@ WiX Toolset - + + diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props index a784e352..1666e4fe 100644 --- a/src/FindLocalWix.props +++ b/src/FindLocalWix.props @@ -3,6 +3,6 @@ - $(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets + $(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets diff --git a/src/ca/packages.config b/src/ca/packages.config index b74ff5d0..14f2feeb 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file diff --git a/src/ca/vsca.vcxproj b/src/ca/vsca.vcxproj index c52840bf..45409757 100644 --- a/src/ca/vsca.vcxproj +++ b/src/ca/vsca.vcxproj @@ -2,8 +2,8 @@ - - + + @@ -63,7 +63,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + diff --git a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj index 79cec135..6bb325c6 100644 --- a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj +++ b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj @@ -1,9 +1,9 @@ - + - netcoreapp2.1 + netcoreapp3.1 false @@ -23,7 +23,10 @@ - + + + + @@ -31,8 +34,8 @@ - - - + + + diff --git a/src/wixext/VSCompiler.cs b/src/wixext/VSCompiler.cs index 17b7f7a0..ebf7fa59 100644 --- a/src/wixext/VSCompiler.cs +++ b/src/wixext/VSCompiler.cs @@ -6,6 +6,7 @@ namespace WixToolset.VisualStudio using System.Collections.Generic; using System.Xml.Linq; using WixToolset.Data; + using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; /// diff --git a/src/wixext/VSWindowsInstallerBackendExtension.cs b/src/wixext/VSWindowsInstallerBackendExtension.cs index 12473b04..38d350cf 100644 --- a/src/wixext/VSWindowsInstallerBackendExtension.cs +++ b/src/wixext/VSWindowsInstallerBackendExtension.cs @@ -2,6 +2,7 @@ namespace WixToolset.VisualStudio { + using System.Collections.Generic; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; @@ -70,6 +71,6 @@ namespace WixToolset.VisualStudio ), }; - protected override TableDefinition[] TableDefinitionsForTuples => Tables; + public override IEnumerable TableDefinitions => Tables; } } diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index f3d424e1..e1b601f6 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index e18a52cd..6987eaa1 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -1,7 +1,7 @@ - + {14345C9D-8AF8-435A-BB1B-E067CE7EB321} @@ -52,7 +52,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 32646d97b57d35e8a5786eb2c7c56a499107065d Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 7 Apr 2020 18:11:22 +1000 Subject: Split the table definitions into VSTableDefinitions. --- src/wixext/VSTableDefinitions.cs | 72 ++++++++++++++++++++ .../VSWindowsInstallerBackendBinderExtension.cs | 13 ++++ src/wixext/VSWindowsInstallerBackendExtension.cs | 76 ---------------------- 3 files changed, 85 insertions(+), 76 deletions(-) create mode 100644 src/wixext/VSTableDefinitions.cs create mode 100644 src/wixext/VSWindowsInstallerBackendBinderExtension.cs delete mode 100644 src/wixext/VSWindowsInstallerBackendExtension.cs (limited to 'src') diff --git a/src/wixext/VSTableDefinitions.cs b/src/wixext/VSTableDefinitions.cs new file mode 100644 index 00000000..64634004 --- /dev/null +++ b/src/wixext/VSTableDefinitions.cs @@ -0,0 +1,72 @@ +// 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[] Tables = new[] { + new TableDefinition( + "HelpFile", + new[] + { + new ColumnDefinition("HelpFileKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required)."), + new ColumnDefinition("HelpFileName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this HelpFile (required)."), + new ColumnDefinition("LangID", ColumnType.Number, 2, false, true, ColumnCategory.Language, description: "Language ID for content file (optional)."), + new ColumnDefinition("File_HxS", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxS (Title) file (required)."), + new ColumnDefinition("File_HxI", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxI (Index) file (required)."), + new ColumnDefinition("File_HxQ", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxQ (Query) file (required)."), + new ColumnDefinition("File_HxR", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxR (Attributes) file (required)."), + new ColumnDefinition("File_Samples", ColumnType.String, 72, false, 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)."), + } + ), + new TableDefinition( + "HelpFileToNamespace", + new[] + { + new ColumnDefinition("HelpFile_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFile", keyColumn: 1, description: "Foreign key into HelpFile table (required)."), + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), + } + ), + new TableDefinition( + "HelpFilter", + new[] + { + new ColumnDefinition("FilterKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFilter (required)."), + new ColumnDefinition("Description", ColumnType.Localized, 0, false, false, ColumnCategory.Text, description: "Friendly name for Filter (required)."), + new ColumnDefinition("QueryString", ColumnType.String, 0, false, true, ColumnCategory.Text, description: "Query String for Help Filter (optional)."), + } + ), + new TableDefinition( + "HelpFilterToNamespace", + new[] + { + new ColumnDefinition("HelpFilter_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFilter", keyColumn: 1, description: "Foreign key into HelpFilter table (required)."), + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), + } + ), + new TableDefinition( + "HelpNamespace", + new[] + { + new ColumnDefinition("NamespaceKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), + new ColumnDefinition("NamespaceName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this Namespace (required)."), + new ColumnDefinition("File_Collection", ColumnType.String, 72, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxC (Collection) file (required)."), + new ColumnDefinition("Description", ColumnType.Localized, 0, false, true, ColumnCategory.Text, description: "Friendly name for Namespace (optional)."), + } + ), + new TableDefinition( + "HelpPlugin", + new[] + { + new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, 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, true, 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, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of child namespace (optional)."), + new ColumnDefinition("File_HxA", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxA (Attributes) file of child namespace (optional)."), + new ColumnDefinition("File_ParentHxT", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of parent namespace that now includes the new child namespace (optional)."), + } + ), + }; + } +} diff --git a/src/wixext/VSWindowsInstallerBackendBinderExtension.cs b/src/wixext/VSWindowsInstallerBackendBinderExtension.cs new file mode 100644 index 00000000..7a9579ca --- /dev/null +++ b/src/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 IEnumerable TableDefinitions => VSTableDefinitions.Tables; + } +} diff --git a/src/wixext/VSWindowsInstallerBackendExtension.cs b/src/wixext/VSWindowsInstallerBackendExtension.cs deleted file mode 100644 index 38d350cf..00000000 --- a/src/wixext/VSWindowsInstallerBackendExtension.cs +++ /dev/null @@ -1,76 +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 - { - private static readonly TableDefinition[] Tables = new[] { - new TableDefinition( - "HelpFile", - new[] - { - new ColumnDefinition("HelpFileKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required)."), - new ColumnDefinition("HelpFileName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this HelpFile (required)."), - new ColumnDefinition("LangID", ColumnType.Number, 2, false, true, ColumnCategory.Language, description: "Language ID for content file (optional)."), - new ColumnDefinition("File_HxS", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxS (Title) file (required)."), - new ColumnDefinition("File_HxI", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxI (Index) file (required)."), - new ColumnDefinition("File_HxQ", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxQ (Query) file (required)."), - new ColumnDefinition("File_HxR", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxR (Attributes) file (required)."), - new ColumnDefinition("File_Samples", ColumnType.String, 72, false, 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)."), - } - ), - new TableDefinition( - "HelpFileToNamespace", - new[] - { - new ColumnDefinition("HelpFile_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFile", keyColumn: 1, description: "Foreign key into HelpFile table (required)."), - new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), - } - ), - new TableDefinition( - "HelpFilter", - new[] - { - new ColumnDefinition("FilterKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFilter (required)."), - new ColumnDefinition("Description", ColumnType.Localized, 0, false, false, ColumnCategory.Text, description: "Friendly name for Filter (required)."), - new ColumnDefinition("QueryString", ColumnType.String, 0, false, true, ColumnCategory.Text, description: "Query String for Help Filter (optional)."), - } - ), - new TableDefinition( - "HelpFilterToNamespace", - new[] - { - new ColumnDefinition("HelpFilter_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFilter", keyColumn: 1, description: "Foreign key into HelpFilter table (required)."), - new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), - } - ), - new TableDefinition( - "HelpNamespace", - new[] - { - new ColumnDefinition("NamespaceKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), - new ColumnDefinition("NamespaceName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this Namespace (required)."), - new ColumnDefinition("File_Collection", ColumnType.String, 72, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxC (Collection) file (required)."), - new ColumnDefinition("Description", ColumnType.Localized, 0, false, true, ColumnCategory.Text, description: "Friendly name for Namespace (optional)."), - } - ), - new TableDefinition( - "HelpPlugin", - new[] - { - new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, 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, true, 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, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of child namespace (optional)."), - new ColumnDefinition("File_HxA", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxA (Attributes) file of child namespace (optional)."), - new ColumnDefinition("File_ParentHxT", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of parent namespace that now includes the new child namespace (optional)."), - } - ), - }; - - public override IEnumerable TableDefinitions => Tables; - } -} -- cgit v1.2.3-55-g6feb From 7ad398d455c42bae61f5196c3f2f66aecf9f9a1a Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 7 Apr 2020 20:06:03 +1000 Subject: Modernize VSExtension. --- .../VisualStudioExtensionFixture.cs | 30 +- src/wixext/Tuples/HelpFileToNamespaceTuple.cs | 55 ++++ src/wixext/Tuples/HelpFileTuple.cs | 95 +++++++ src/wixext/Tuples/HelpFilterToNamespaceTuple.cs | 55 ++++ src/wixext/Tuples/HelpFilterTuple.cs | 55 ++++ src/wixext/Tuples/HelpNamespaceTuple.cs | 63 +++++ src/wixext/Tuples/HelpPluginTuple.cs | 79 ++++++ src/wixext/Tuples/VSTupleDefinitions.cs | 59 ++++ src/wixext/VSCompiler.cs | 305 ++++++++++++--------- src/wixext/VSExtensionData.cs | 12 + src/wixext/VSTableDefinitions.cs | 147 +++++----- .../VSWindowsInstallerBackendBinderExtension.cs | 4 +- 12 files changed, 755 insertions(+), 204 deletions(-) create mode 100644 src/wixext/Tuples/HelpFileToNamespaceTuple.cs create mode 100644 src/wixext/Tuples/HelpFileTuple.cs create mode 100644 src/wixext/Tuples/HelpFilterToNamespaceTuple.cs create mode 100644 src/wixext/Tuples/HelpFilterTuple.cs create mode 100644 src/wixext/Tuples/HelpNamespaceTuple.cs create mode 100644 src/wixext/Tuples/HelpPluginTuple.cs create mode 100644 src/wixext/Tuples/VSTupleDefinitions.cs (limited to 'src') diff --git a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs index a980071e..b8800cee 100644 --- a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs +++ b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs @@ -19,21 +19,21 @@ namespace WixToolsetTest.VisualStudio var results = build.BuildAndQuery(Build, "CustomAction"); Assert.Equal(new[] { - "CustomAction:SetVS2010Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2010_VSIX_INSTALLER_PATH]\t0", - "CustomAction:SetVS2012Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2012_VSIX_INSTALLER_PATH]\t0", - "CustomAction:SetVS2013Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2013_VSIX_INSTALLER_PATH]\t0", - "CustomAction:SetVS2015Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2015_VSIX_INSTALLER_PATH]\t0", - "CustomAction:vimyrEjb_CFhXi3TTLayKNM2w7rvr4\t3122\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\" /admin\t0", - "CustomAction:viuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1074\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\"\t0", - "CustomAction:vrmyrEjb_CFhXi3TTLayKNM2w7rvr4\t3442\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t0", - "CustomAction:vruFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1394\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t0", - "CustomAction:VSFindInstances\t257\tVSCA\tFindInstances\t0", - "CustomAction:vumyrEjb_CFhXi3TTLayKNM2w7rvr4\t3186\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t0", - "CustomAction:vuuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1138\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t0", - "CustomAction:Vwd2012VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2012_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", - "CustomAction:Vwd2013VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2013_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", - "CustomAction:Vwd2015VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2015_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", - }, results.OrderBy(s => s).ToArray()); + "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:vimyrEjb_CFhXi3TTLayKNM2w7rvr4\t3122\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\" /admin\t", + "CustomAction:viuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1074\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\"\t", + "CustomAction:vrmyrEjb_CFhXi3TTLayKNM2w7rvr4\t3442\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t", + "CustomAction:vruFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1394\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t", + "CustomAction:VSFindInstances\t257\tVSCA\tFindInstances\t", + "CustomAction:vumyrEjb_CFhXi3TTLayKNM2w7rvr4\t3186\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t", + "CustomAction:vuuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\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) diff --git a/src/wixext/Tuples/HelpFileToNamespaceTuple.cs b/src/wixext/Tuples/HelpFileToNamespaceTuple.cs new file mode 100644 index 00000000..f91dacc1 --- /dev/null +++ b/src/wixext/Tuples/HelpFileToNamespaceTuple.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.Tuples; + + public static partial class VSTupleDefinitions + { + public static readonly IntermediateTupleDefinition HelpFileToNamespace = new IntermediateTupleDefinition( + VSTupleDefinitionType.HelpFileToNamespace.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpFileToNamespaceTupleFields.HelpFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileToNamespaceTupleFields.HelpNamespaceRef), IntermediateFieldType.String), + }, + typeof(HelpFileToNamespaceTuple)); + } +} + +namespace WixToolset.VisualStudio.Tuples +{ + using WixToolset.Data; + + public enum HelpFileToNamespaceTupleFields + { + HelpFileRef, + HelpNamespaceRef, + } + + public class HelpFileToNamespaceTuple : IntermediateTuple + { + public HelpFileToNamespaceTuple() : base(VSTupleDefinitions.HelpFileToNamespace, null, null) + { + } + + public HelpFileToNamespaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFileToNamespace, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpFileToNamespaceTupleFields index] => this.Fields[(int)index]; + + public string HelpFileRef + { + get => this.Fields[(int)HelpFileToNamespaceTupleFields.HelpFileRef].AsString(); + set => this.Set((int)HelpFileToNamespaceTupleFields.HelpFileRef, value); + } + + public string HelpNamespaceRef + { + get => this.Fields[(int)HelpFileToNamespaceTupleFields.HelpNamespaceRef].AsString(); + set => this.Set((int)HelpFileToNamespaceTupleFields.HelpNamespaceRef, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/HelpFileTuple.cs b/src/wixext/Tuples/HelpFileTuple.cs new file mode 100644 index 00000000..9ea5e8e3 --- /dev/null +++ b/src/wixext/Tuples/HelpFileTuple.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.Tuples; + + public static partial class VSTupleDefinitions + { + public static readonly IntermediateTupleDefinition HelpFile = new IntermediateTupleDefinition( + VSTupleDefinitionType.HelpFile.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HelpFileName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileTupleFields.LangID), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxSFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxIFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxQFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxRFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileTupleFields.SamplesFileRef), IntermediateFieldType.String), + }, + typeof(HelpFileTuple)); + } +} + +namespace WixToolset.VisualStudio.Tuples +{ + using WixToolset.Data; + + public enum HelpFileTupleFields + { + HelpFileName, + LangID, + HxSFileRef, + HxIFileRef, + HxQFileRef, + HxRFileRef, + SamplesFileRef, + } + + public class HelpFileTuple : IntermediateTuple + { + public HelpFileTuple() : base(VSTupleDefinitions.HelpFile, null, null) + { + } + + public HelpFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFile, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpFileTupleFields index] => this.Fields[(int)index]; + + public string HelpFileName + { + get => this.Fields[(int)HelpFileTupleFields.HelpFileName].AsString(); + set => this.Set((int)HelpFileTupleFields.HelpFileName, value); + } + + public int LangID + { + get => this.Fields[(int)HelpFileTupleFields.LangID].AsNumber(); + set => this.Set((int)HelpFileTupleFields.LangID, value); + } + + public string HxSFileRef + { + get => this.Fields[(int)HelpFileTupleFields.HxSFileRef].AsString(); + set => this.Set((int)HelpFileTupleFields.HxSFileRef, value); + } + + public string HxIFileRef + { + get => this.Fields[(int)HelpFileTupleFields.HxIFileRef].AsString(); + set => this.Set((int)HelpFileTupleFields.HxIFileRef, value); + } + + public string HxQFileRef + { + get => this.Fields[(int)HelpFileTupleFields.HxQFileRef].AsString(); + set => this.Set((int)HelpFileTupleFields.HxQFileRef, value); + } + + public string HxRFileRef + { + get => this.Fields[(int)HelpFileTupleFields.HxRFileRef].AsString(); + set => this.Set((int)HelpFileTupleFields.HxRFileRef, value); + } + + public string SamplesFileRef + { + get => this.Fields[(int)HelpFileTupleFields.SamplesFileRef].AsString(); + set => this.Set((int)HelpFileTupleFields.SamplesFileRef, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/HelpFilterToNamespaceTuple.cs b/src/wixext/Tuples/HelpFilterToNamespaceTuple.cs new file mode 100644 index 00000000..c6690d47 --- /dev/null +++ b/src/wixext/Tuples/HelpFilterToNamespaceTuple.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.Tuples; + + public static partial class VSTupleDefinitions + { + public static readonly IntermediateTupleDefinition HelpFilterToNamespace = new IntermediateTupleDefinition( + VSTupleDefinitionType.HelpFilterToNamespace.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceTupleFields.HelpFilterRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceTupleFields.HelpNamespaceRef), IntermediateFieldType.String), + }, + typeof(HelpFilterToNamespaceTuple)); + } +} + +namespace WixToolset.VisualStudio.Tuples +{ + using WixToolset.Data; + + public enum HelpFilterToNamespaceTupleFields + { + HelpFilterRef, + HelpNamespaceRef, + } + + public class HelpFilterToNamespaceTuple : IntermediateTuple + { + public HelpFilterToNamespaceTuple() : base(VSTupleDefinitions.HelpFilterToNamespace, null, null) + { + } + + public HelpFilterToNamespaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFilterToNamespace, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpFilterToNamespaceTupleFields index] => this.Fields[(int)index]; + + public string HelpFilterRef + { + get => this.Fields[(int)HelpFilterToNamespaceTupleFields.HelpFilterRef].AsString(); + set => this.Set((int)HelpFilterToNamespaceTupleFields.HelpFilterRef, value); + } + + public string HelpNamespaceRef + { + get => this.Fields[(int)HelpFilterToNamespaceTupleFields.HelpNamespaceRef].AsString(); + set => this.Set((int)HelpFilterToNamespaceTupleFields.HelpNamespaceRef, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/HelpFilterTuple.cs b/src/wixext/Tuples/HelpFilterTuple.cs new file mode 100644 index 00000000..6592defa --- /dev/null +++ b/src/wixext/Tuples/HelpFilterTuple.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.Tuples; + + public static partial class VSTupleDefinitions + { + public static readonly IntermediateTupleDefinition HelpFilter = new IntermediateTupleDefinition( + VSTupleDefinitionType.HelpFilter.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpFilterTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFilterTupleFields.QueryString), IntermediateFieldType.String), + }, + typeof(HelpFilterTuple)); + } +} + +namespace WixToolset.VisualStudio.Tuples +{ + using WixToolset.Data; + + public enum HelpFilterTupleFields + { + Description, + QueryString, + } + + public class HelpFilterTuple : IntermediateTuple + { + public HelpFilterTuple() : base(VSTupleDefinitions.HelpFilter, null, null) + { + } + + public HelpFilterTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFilter, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpFilterTupleFields index] => this.Fields[(int)index]; + + public string Description + { + get => this.Fields[(int)HelpFilterTupleFields.Description].AsString(); + set => this.Set((int)HelpFilterTupleFields.Description, value); + } + + public string QueryString + { + get => this.Fields[(int)HelpFilterTupleFields.QueryString].AsString(); + set => this.Set((int)HelpFilterTupleFields.QueryString, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/HelpNamespaceTuple.cs b/src/wixext/Tuples/HelpNamespaceTuple.cs new file mode 100644 index 00000000..69b471fb --- /dev/null +++ b/src/wixext/Tuples/HelpNamespaceTuple.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.Tuples; + + public static partial class VSTupleDefinitions + { + public static readonly IntermediateTupleDefinition HelpNamespace = new IntermediateTupleDefinition( + VSTupleDefinitionType.HelpNamespace.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpNamespaceTupleFields.NamespaceName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpNamespaceTupleFields.CollectionFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpNamespaceTupleFields.Description), IntermediateFieldType.String), + }, + typeof(HelpNamespaceTuple)); + } +} + +namespace WixToolset.VisualStudio.Tuples +{ + using WixToolset.Data; + + public enum HelpNamespaceTupleFields + { + NamespaceName, + CollectionFileRef, + Description, + } + + public class HelpNamespaceTuple : IntermediateTuple + { + public HelpNamespaceTuple() : base(VSTupleDefinitions.HelpNamespace, null, null) + { + } + + public HelpNamespaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpNamespace, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpNamespaceTupleFields index] => this.Fields[(int)index]; + + public string NamespaceName + { + get => this.Fields[(int)HelpNamespaceTupleFields.NamespaceName].AsString(); + set => this.Set((int)HelpNamespaceTupleFields.NamespaceName, value); + } + + public string CollectionFileRef + { + get => this.Fields[(int)HelpNamespaceTupleFields.CollectionFileRef].AsString(); + set => this.Set((int)HelpNamespaceTupleFields.CollectionFileRef, value); + } + + public string Description + { + get => this.Fields[(int)HelpNamespaceTupleFields.Description].AsString(); + set => this.Set((int)HelpNamespaceTupleFields.Description, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/HelpPluginTuple.cs b/src/wixext/Tuples/HelpPluginTuple.cs new file mode 100644 index 00000000..5f146199 --- /dev/null +++ b/src/wixext/Tuples/HelpPluginTuple.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.Tuples; + + public static partial class VSTupleDefinitions + { + public static readonly IntermediateTupleDefinition HelpPlugin = new IntermediateTupleDefinition( + VSTupleDefinitionType.HelpPlugin.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.HelpNamespaceRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.ParentHelpNamespaceRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.HxTFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.HxAFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.ParentHxTFileRef), IntermediateFieldType.String), + }, + typeof(HelpPluginTuple)); + } +} + +namespace WixToolset.VisualStudio.Tuples +{ + using WixToolset.Data; + + public enum HelpPluginTupleFields + { + HelpNamespaceRef, + ParentHelpNamespaceRef, + HxTFileRef, + HxAFileRef, + ParentHxTFileRef, + } + + public class HelpPluginTuple : IntermediateTuple + { + public HelpPluginTuple() : base(VSTupleDefinitions.HelpPlugin, null, null) + { + } + + public HelpPluginTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpPlugin, sourceLineNumber, id) + { + } + + public IntermediateField this[HelpPluginTupleFields index] => this.Fields[(int)index]; + + public string HelpNamespaceRef + { + get => this.Fields[(int)HelpPluginTupleFields.HelpNamespaceRef].AsString(); + set => this.Set((int)HelpPluginTupleFields.HelpNamespaceRef, value); + } + + public string ParentHelpNamespaceRef + { + get => this.Fields[(int)HelpPluginTupleFields.ParentHelpNamespaceRef].AsString(); + set => this.Set((int)HelpPluginTupleFields.ParentHelpNamespaceRef, value); + } + + public string HxTFileRef + { + get => this.Fields[(int)HelpPluginTupleFields.HxTFileRef].AsString(); + set => this.Set((int)HelpPluginTupleFields.HxTFileRef, value); + } + + public string HxAFileRef + { + get => this.Fields[(int)HelpPluginTupleFields.HxAFileRef].AsString(); + set => this.Set((int)HelpPluginTupleFields.HxAFileRef, value); + } + + public string ParentHxTFileRef + { + get => this.Fields[(int)HelpPluginTupleFields.ParentHxTFileRef].AsString(); + set => this.Set((int)HelpPluginTupleFields.ParentHxTFileRef, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/VSTupleDefinitions.cs b/src/wixext/Tuples/VSTupleDefinitions.cs new file mode 100644 index 00000000..fadcf808 --- /dev/null +++ b/src/wixext/Tuples/VSTupleDefinitions.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 VSTupleDefinitionType + { + HelpFile, + HelpFileToNamespace, + HelpFilter, + HelpFilterToNamespace, + HelpNamespace, + HelpPlugin, + } + + public static partial class VSTupleDefinitions + { + public static readonly Version Version = new Version("4.0.0"); + + public static IntermediateTupleDefinition ByName(string name) + { + if (!Enum.TryParse(name, out VSTupleDefinitionType type)) + { + return null; + } + + return ByType(type); + } + + public static IntermediateTupleDefinition ByType(VSTupleDefinitionType type) + { + switch (type) + { + case VSTupleDefinitionType.HelpFile: + return VSTupleDefinitions.HelpFile; + + case VSTupleDefinitionType.HelpFileToNamespace: + return VSTupleDefinitions.HelpFileToNamespace; + + case VSTupleDefinitionType.HelpFilter: + return VSTupleDefinitions.HelpFilter; + + case VSTupleDefinitionType.HelpFilterToNamespace: + return VSTupleDefinitions.HelpFilterToNamespace; + + case VSTupleDefinitionType.HelpNamespace: + return VSTupleDefinitions.HelpNamespace; + + case VSTupleDefinitionType.HelpPlugin: + return VSTupleDefinitions.HelpPlugin; + + default: + throw new ArgumentOutOfRangeException(nameof(type)); + } + } + } +} diff --git a/src/wixext/VSCompiler.cs b/src/wixext/VSCompiler.cs index ebf7fa59..b9390fea 100644 --- a/src/wixext/VSCompiler.cs +++ b/src/wixext/VSCompiler.cs @@ -4,10 +4,13 @@ namespace WixToolset.VisualStudio { using System; using System.Collections.Generic; + using System.Globalization; using System.Xml.Linq; using WixToolset.Data; + using WixToolset.Data.Tuples; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; + using WixToolset.VisualStudio.Tuples; /// /// The compiler for the WiX Toolset Visual Studio Extension. @@ -79,10 +82,10 @@ namespace WixToolset.VisualStudio private void ParseHelpCollectionRefElement(Intermediate intermediate, IntermediateSection section, XElement element) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -90,7 +93,7 @@ namespace WixToolset.VisualStudio { case "Id": id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", id.Id); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpNamespace, id.Id); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -108,11 +111,10 @@ namespace WixToolset.VisualStudio this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); } - foreach (XElement child in element.Elements()) + foreach (var child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { - SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); switch (child.Name.LocalName) { case "HelpFileRef": @@ -132,13 +134,13 @@ namespace WixToolset.VisualStudio private void ParseHelpCollectionElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string description = null; string name = null; - YesNoType suppressCAs = YesNoType.No; + var suppressCAs = YesNoType.No; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -169,7 +171,7 @@ namespace WixToolset.VisualStudio if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("vshc", fileId, description, name); } if (null == description) @@ -182,7 +184,7 @@ namespace WixToolset.VisualStudio this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); } - foreach (XElement child in element.Elements()) + foreach (var child in element.Elements()) { if (this.Namespace == child.Name.Namespace) { @@ -210,31 +212,33 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpNamespace", id); - row.Set(1, name); - row.Set(2, fileId); - row.Set(3, description); + section.AddTuple(new HelpNamespaceTuple(sourceLineNumbers, id) + { + NamespaceName = name, + CollectionFileRef = fileId, + Description = description, + }); if (YesNoType.No == suppressCAs) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); } } } private void ParseHelpFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string name = null; - int language = CompilerConstants.IntegerNotSet; + var language = CompilerConstants.IntegerNotSet; string hxi = null; string hxq = null; string hxr = null; string samples = null; - YesNoType suppressCAs = YesNoType.No; + var suppressCAs = YesNoType.No; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -245,11 +249,11 @@ namespace WixToolset.VisualStudio break; case "AttributeIndex": hxr = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxr); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, hxr); break; case "Index": hxi = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxi); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, hxi); break; case "Language": language = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); @@ -259,11 +263,11 @@ namespace WixToolset.VisualStudio break; case "SampleLocation": samples = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", samples); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, samples); break; case "Search": hxq = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxq); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, hxq); break; case "SuppressCustomActions": suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); @@ -281,7 +285,7 @@ namespace WixToolset.VisualStudio if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("vshf", fileId, name, language.ToString(CultureInfo.InvariantCulture.NumberFormat)); } if (null == name) @@ -299,28 +303,30 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFile", id); - row.Set(1, name); - row.Set(2, language); - row.Set(3, fileId); - row.Set(4, hxi); - row.Set(5, hxq); - row.Set(6, hxr); - row.Set(7, samples); + section.AddTuple(new HelpFileTuple(sourceLineNumbers, id) + { + HelpFileName = name, + LangID = language, + HxSFileRef = fileId, + HxIFileRef = hxi, + HxQFileRef = hxq, + HxRFileRef = hxr, + SamplesFileRef = samples, + }); if (YesNoType.No == suppressCAs) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); } } } private void ParseHelpFileRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -328,7 +334,7 @@ namespace WixToolset.VisualStudio { case "Id": id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFile", id.Id); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpFile, id.Id); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -350,20 +356,23 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFileToNamespace", id); - row.Set(1, collectionId.Id); + section.AddTuple(new HelpFileToNamespaceTuple(sourceLineNumbers, id) + { + HelpFileRef = id.Id, + HelpNamespaceRef = collectionId.Id, + }); } } private void ParseHelpFilterElement(Intermediate intermediate, IntermediateSection section, XElement element) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; string filterDefinition = null; string name = null; - YesNoType suppressCAs = YesNoType.No; + var suppressCAs = YesNoType.No; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -394,7 +403,7 @@ namespace WixToolset.VisualStudio if (null == id) { - this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); + id = this.ParseHelper.CreateIdentifier("hfl", name, filterDefinition); } if (null == name) @@ -406,23 +415,25 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilter", id); - row.Set(1, name); - row.Set(2, filterDefinition); + section.AddTuple(new HelpFilterTuple(sourceLineNumbers, id) + { + Description = name, + QueryString = filterDefinition, + }); if (YesNoType.No == suppressCAs) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); } } } private void ParseHelpFilterRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); Identifier id = null; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -430,7 +441,7 @@ namespace WixToolset.VisualStudio { case "Id": id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFilter", id.Id); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpFilter, id.Id); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -452,24 +463,25 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilterToNamespace", id); - row.Set(1, collectionId.Id); + section.AddTuple(new HelpFilterToNamespaceTuple(sourceLineNumbers, id) + { + HelpFilterRef = id.Id, + HelpNamespaceRef = collectionId.Id, + }); } } private void ParsePlugCollectionIntoElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier parentId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); string hxa = null; string hxt = null; string hxtParent = null; string namespaceParent = null; string feature = null; - YesNoType suppressExternalNamespaces = YesNoType.No; - bool pluginVS05 = false; - bool pluginVS08 = false; + var suppressExternalNamespaces = YesNoType.No; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -504,8 +516,8 @@ namespace WixToolset.VisualStudio } } - pluginVS05 = namespaceParent.Equals("MS_VSIPCC_v80", StringComparison.Ordinal); - pluginVS08 = namespaceParent.Equals("MS.VSIPCC.v90", StringComparison.Ordinal); + var pluginVS05 = namespaceParent.Equals("MS_VSIPCC_v80", StringComparison.Ordinal); + var pluginVS08 = namespaceParent.Equals("MS.VSIPCC.v90", StringComparison.Ordinal); if (null == namespaceParent) { @@ -521,11 +533,14 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpPlugin", parentId); - row.Set(1, namespaceParent); - row.Set(2, hxt); - row.Set(3, hxa); - row.Set(4, hxtParent); + section.AddTuple(new HelpPluginTuple(sourceLineNumbers, parentId) + { + HelpNamespaceRef = parentId.Id, + ParentHelpNamespaceRef = namespaceParent, + HxTFileRef = hxt, + HxAFileRef = hxa, + ParentHxTFileRef = hxtParent, + }); if (pluginVS05) { @@ -535,7 +550,7 @@ namespace WixToolset.VisualStudio 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, "CustomAction", "CA_HxMerge_VSIPCC_VSCC"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "CA_HxMerge_VSIPCC_VSCC"); } } else if (pluginVS08) @@ -546,28 +561,28 @@ namespace WixToolset.VisualStudio 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, "CustomAction", "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); } } else { // Reference the parent namespace to enforce the foreign key relationship - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", namespaceParent); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpNamespace, namespaceParent); } } } private void ParseVsixPackageElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) { - SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); - string propertyId = "VS_VSIX_INSTALLER_PATH"; + var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); + var propertyId = "VS_VSIX_INSTALLER_PATH"; string packageId = null; - YesNoType permanent = YesNoType.NotSet; + var permanent = YesNoType.NotSet; string target = null; string targetVersion = null; - YesNoType vital = YesNoType.NotSet; + var vital = YesNoType.NotSet; - foreach (XAttribute attrib in element.Attributes()) + foreach (var attrib in element.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) { @@ -664,98 +679,131 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Property", propertyId); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Property, propertyId); // Ensure there is a reference to the package file (even if we are a child under it). - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", fileId); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, fileId); - string cmdlinePrefix = "/q "; + var cmdlinePrefix = "/q "; if (!String.IsNullOrEmpty(target)) { cmdlinePrefix = String.Format("{0} /skuName:{1} /skuVersion:{2}", cmdlinePrefix, target, targetVersion); } - string installAfter = "WriteRegistryValues"; // by default, come after the registry key registration. - int installExtraBits = VSCompiler.MsidbCustomActionTypeInScript; + 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 CustomActionTuple(sourceLineNumbers, installNamePerUser) + { + ExecutionType = CustomActionExecutionType.Deferred, + Impersonate = true, + }; + var installPerMachineCA = new CustomActionTuple(sourceLineNumbers, installNamePerMachine) + { + ExecutionType = CustomActionExecutionType.Deferred, + Impersonate = false, + }; // If the package is not vital, mark the install action as continue. if (vital == YesNoType.No) { - installExtraBits |= VSCompiler.MsidbCustomActionTypeContinue; + installPerUserCA.IgnoreResult = true; + installPerMachineCA.IgnoreResult = true; } else // the package is vital so ensure there is a rollback action scheduled. { - Identifier rollbackNamePerUser = this.ParseHelper.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); - Identifier rollbackNamePerMachine = this.ParseHelper.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); - string rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); - string rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin"); - int rollbackExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeRollback | VSCompiler.MsidbCustomActionTypeInScript; - int rollbackExtraBitsPerMachine = rollbackExtraBitsPerUser | VSCompiler.MsidbCustomActionTypeNoImpersonate; - string rollbackConditionPerUser = String.Format("NOT ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. - string rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. + 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 CustomActionTuple(sourceLineNumbers, rollbackNamePerUser) + { + ExecutionType = CustomActionExecutionType.Rollback, + IgnoreResult = true, + Impersonate = true, + }; + var rollbackPerMachineCA = new CustomActionTuple(sourceLineNumbers, rollbackNamePerMachine) + { + ExecutionType = CustomActionExecutionType.Rollback, + IgnoreResult = true, + Impersonate = false, + }; - this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter); - this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); + 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; } - Identifier installNamePerUser = this.ParseHelper.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); - Identifier installNamePerMachine = this.ParseHelper.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); - string installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId); - string installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin"); - string installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. - string installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. - - this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter); - this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.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) { - Identifier uninstallNamePerUser = this.ParseHelper.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); - Identifier uninstallNamePerMachine = this.ParseHelper.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); - string uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); - string uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin"); - int uninstallExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeInScript; - int uninstallExtraBitsPerMachine = uninstallExtraBitsPerUser | VSCompiler.MsidbCustomActionTypeNoImpersonate; - string uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. - string uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. + 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 CustomActionTuple(sourceLineNumbers, uninstallNamePerUser) + { + ExecutionType = CustomActionExecutionType.Deferred, + IgnoreResult = true, + Impersonate = true, + }; + var uninstallPerMachineCA = new CustomActionTuple(sourceLineNumbers, uninstallNamePerMachine) + { + ExecutionType = CustomActionExecutionType.Deferred, + IgnoreResult = true, + Impersonate = false, + }; - this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null); - this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null); + 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, int extraBits, string condition, string beforeAction, string afterAction) + private void SchedulePropertyExeAction(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, CustomActionTuple caTemplate, string condition, string beforeAction, string afterAction) { - const string sequence = "InstallExecuteSequence"; - - var actionRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "CustomAction", name); - actionRow.Set(1, VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits); - actionRow.Set(2, source); - actionRow.Set(3, cmdline); - - var sequenceRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixAction", new Identifier(name.Access, sequence, name.Id)); - sequenceRow.Set(0, sequence); - sequenceRow.Set(1, name.Id); - sequenceRow.Set(2, condition); - // no explicit sequence - sequenceRow.Set(4, beforeAction); - sequenceRow.Set(5, afterAction); - sequenceRow.Set(6, 0); // not overridable + const SequenceTable sequence = SequenceTable.InstallExecuteSequence; + + caTemplate.SourceType = CustomActionSourceType.Property; + caTemplate.Source = source; + caTemplate.TargetType = CustomActionTargetType.Exe; + caTemplate.Target = cmdline; + section.AddTuple(caTemplate); + + section.AddTuple(new WixActionTuple(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, "WixAction", sequence, beforeAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixAction, sequence.ToString(), beforeAction); } else { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", beforeAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, beforeAction); } } @@ -763,13 +811,18 @@ namespace WixToolset.VisualStudio { if (WindowsInstallerStandard.IsStandardAction(afterAction)) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, afterAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixAction, sequence.ToString(), afterAction); } else { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", afterAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, afterAction); } } } + + private void AddReferenceToRegisterMicrosoftHelp(IntermediateSection section, SourceLineNumber sourceLineNumbers) + { + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + } } } diff --git a/src/wixext/VSExtensionData.cs b/src/wixext/VSExtensionData.cs index bc846af0..3d28b625 100644 --- a/src/wixext/VSExtensionData.cs +++ b/src/wixext/VSExtensionData.cs @@ -7,6 +7,18 @@ namespace WixToolset.VisualStudio public sealed class VSExtensionData : BaseExtensionData { + /// + /// Gets the default culture. + /// + /// The default culture. + public override string DefaultCulture => "en-US"; + + public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) + { + tupleDefinition = VSTupleDefinitions.ByName(name); + return tupleDefinition != null; + } + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) { return Intermediate.Load(typeof(VSExtensionData).Assembly, "WixToolset.VisualStudio.vs.wixlib", tupleDefinitions); diff --git a/src/wixext/VSTableDefinitions.cs b/src/wixext/VSTableDefinitions.cs index 64634004..f630f138 100644 --- a/src/wixext/VSTableDefinitions.cs +++ b/src/wixext/VSTableDefinitions.cs @@ -6,67 +6,92 @@ namespace WixToolset.VisualStudio public static class VSTableDefinitions { - public static readonly TableDefinition[] Tables = new[] { - new TableDefinition( - "HelpFile", - new[] - { - new ColumnDefinition("HelpFileKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required)."), - new ColumnDefinition("HelpFileName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this HelpFile (required)."), - new ColumnDefinition("LangID", ColumnType.Number, 2, false, true, ColumnCategory.Language, description: "Language ID for content file (optional)."), - new ColumnDefinition("File_HxS", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxS (Title) file (required)."), - new ColumnDefinition("File_HxI", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxI (Index) file (required)."), - new ColumnDefinition("File_HxQ", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxQ (Query) file (required)."), - new ColumnDefinition("File_HxR", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxR (Attributes) file (required)."), - new ColumnDefinition("File_Samples", ColumnType.String, 72, false, 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)."), - } - ), - new TableDefinition( - "HelpFileToNamespace", - new[] - { - new ColumnDefinition("HelpFile_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFile", keyColumn: 1, description: "Foreign key into HelpFile table (required)."), - new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), - } - ), - new TableDefinition( - "HelpFilter", - new[] - { - new ColumnDefinition("FilterKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFilter (required)."), - new ColumnDefinition("Description", ColumnType.Localized, 0, false, false, ColumnCategory.Text, description: "Friendly name for Filter (required)."), - new ColumnDefinition("QueryString", ColumnType.String, 0, false, true, ColumnCategory.Text, description: "Query String for Help Filter (optional)."), - } - ), - new TableDefinition( - "HelpFilterToNamespace", - new[] - { - new ColumnDefinition("HelpFilter_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFilter", keyColumn: 1, description: "Foreign key into HelpFilter table (required)."), - new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), - } - ), - new TableDefinition( - "HelpNamespace", - new[] - { - new ColumnDefinition("NamespaceKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), - new ColumnDefinition("NamespaceName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this Namespace (required)."), - new ColumnDefinition("File_Collection", ColumnType.String, 72, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxC (Collection) file (required)."), - new ColumnDefinition("Description", ColumnType.Localized, 0, false, true, ColumnCategory.Text, description: "Friendly name for Namespace (optional)."), - } - ), - new TableDefinition( - "HelpPlugin", - new[] - { - new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, 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, true, 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, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of child namespace (optional)."), - new ColumnDefinition("File_HxA", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxA (Attributes) file of child namespace (optional)."), - new ColumnDefinition("File_ParentHxT", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of parent namespace that now includes the new child namespace (optional)."), - } - ), + public static readonly TableDefinition HelpFile = new TableDefinition( + "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), + }, + tupleDefinitionName: VSTupleDefinitions.HelpFile.Name, + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition HelpFileToNamespace = new TableDefinition( + "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)."), + }, + tupleDefinitionName: VSTupleDefinitions.HelpFileToNamespace.Name, + tupleIdIsPrimaryKey: false + ); + + public static readonly TableDefinition HelpFilter = new TableDefinition( + "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)."), + }, + tupleDefinitionName: VSTupleDefinitions.HelpFilter.Name, + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition HelpFilterToNamespace = new TableDefinition( + "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)."), + }, + tupleDefinitionName: VSTupleDefinitions.HelpFilterToNamespace.Name, + tupleIdIsPrimaryKey: false + ); + + public static readonly TableDefinition HelpNamespace = new TableDefinition( + "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)."), + }, + tupleDefinitionName: VSTupleDefinitions.HelpNamespace.Name, + tupleIdIsPrimaryKey: true + ); + + public static readonly TableDefinition HelpPlugin = new TableDefinition( + "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), + }, + tupleDefinitionName: VSTupleDefinitions.HelpPlugin.Name, + tupleIdIsPrimaryKey: 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 index 7a9579ca..825c8ca7 100644 --- a/src/wixext/VSWindowsInstallerBackendBinderExtension.cs +++ b/src/wixext/VSWindowsInstallerBackendBinderExtension.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.VisualStudio { @@ -8,6 +8,6 @@ namespace WixToolset.VisualStudio public class VSWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension { - public override IEnumerable TableDefinitions => VSTableDefinitions.Tables; + public override IEnumerable TableDefinitions => VSTableDefinitions.All; } } -- cgit v1.2.3-55-g6feb From 89bbda630ba953e202289aa8a8dd0dad47c9c994 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 13 Apr 2020 18:13:23 +1000 Subject: Update dependencies. --- appveyor.yml | 5 +++++ src/Cpp.Build.props | 18 ------------------ src/wixext/Tuples/HelpFileTuple.cs | 4 ++-- src/wixext/VSTableDefinitions.cs | 12 ++++++------ src/wixlib/packages.config | 2 +- src/wixlib/vs.wixproj | 4 ++-- 6 files changed, 16 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/appveyor.yml b/appveyor.yml index bbf880f0..7c686b04 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,6 +3,11 @@ # Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml # then update all of the repos. +branches: + only: + - master + - develop + image: Visual Studio 2019 version: 0.0.0.{build} diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 44a042c7..9b7a1bb5 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -70,12 +70,6 @@ MultiThreadedDebug - - - - MultiThreadedDebugDll - - MinSpace @@ -89,16 +83,4 @@ true - - - - MultiThreadedDll - - - - - $(LinkKeyFile) - $(LinkDelaySign) - - diff --git a/src/wixext/Tuples/HelpFileTuple.cs b/src/wixext/Tuples/HelpFileTuple.cs index 9ea5e8e3..49d3bc44 100644 --- a/src/wixext/Tuples/HelpFileTuple.cs +++ b/src/wixext/Tuples/HelpFileTuple.cs @@ -56,9 +56,9 @@ namespace WixToolset.VisualStudio.Tuples set => this.Set((int)HelpFileTupleFields.HelpFileName, value); } - public int LangID + public int? LangID { - get => this.Fields[(int)HelpFileTupleFields.LangID].AsNumber(); + get => this.Fields[(int)HelpFileTupleFields.LangID].AsNullableNumber(); set => this.Set((int)HelpFileTupleFields.LangID, value); } diff --git a/src/wixext/VSTableDefinitions.cs b/src/wixext/VSTableDefinitions.cs index f630f138..bbc74b96 100644 --- a/src/wixext/VSTableDefinitions.cs +++ b/src/wixext/VSTableDefinitions.cs @@ -8,6 +8,7 @@ namespace WixToolset.VisualStudio { public static readonly TableDefinition HelpFile = new TableDefinition( "HelpFile", + VSTupleDefinitions.HelpFile, new[] { new ColumnDefinition("HelpFileKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required).", modularizeType: ColumnModularizeType.Column), @@ -19,46 +20,46 @@ namespace WixToolset.VisualStudio 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), }, - tupleDefinitionName: VSTupleDefinitions.HelpFile.Name, tupleIdIsPrimaryKey: true ); public static readonly TableDefinition HelpFileToNamespace = new TableDefinition( "HelpFileToNamespace", + VSTupleDefinitions.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)."), }, - tupleDefinitionName: VSTupleDefinitions.HelpFileToNamespace.Name, tupleIdIsPrimaryKey: false ); public static readonly TableDefinition HelpFilter = new TableDefinition( "HelpFilter", + VSTupleDefinitions.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)."), }, - tupleDefinitionName: VSTupleDefinitions.HelpFilter.Name, tupleIdIsPrimaryKey: true ); public static readonly TableDefinition HelpFilterToNamespace = new TableDefinition( "HelpFilterToNamespace", + VSTupleDefinitions.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)."), }, - tupleDefinitionName: VSTupleDefinitions.HelpFilterToNamespace.Name, tupleIdIsPrimaryKey: false ); public static readonly TableDefinition HelpNamespace = new TableDefinition( "HelpNamespace", + VSTupleDefinitions.HelpNamespace, new[] { new ColumnDefinition("NamespaceKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), @@ -66,12 +67,12 @@ namespace WixToolset.VisualStudio 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)."), }, - tupleDefinitionName: VSTupleDefinitions.HelpNamespace.Name, tupleIdIsPrimaryKey: true ); public static readonly TableDefinition HelpPlugin = new TableDefinition( "HelpPlugin", + VSTupleDefinitions.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)."), @@ -80,7 +81,6 @@ namespace WixToolset.VisualStudio 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), }, - tupleDefinitionName: VSTupleDefinitions.HelpPlugin.Name, tupleIdIsPrimaryKey: false ); diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index e1b601f6..1e5a9850 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index 6987eaa1..fccbdfc0 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -1,7 +1,7 @@ - + {14345C9D-8AF8-435A-BB1B-E067CE7EB321} @@ -52,7 +52,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file -- cgit v1.2.3-55-g6feb From a97eda851f9c42e135f156173ddea76e6a5a1668 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 30 May 2020 15:23:38 -0700 Subject: Add NCrunch configuration --- .../WixToolsetTest.VisualStudio.v3.ncrunchproject | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject (limited to 'src') diff --git a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject new file mode 100644 index 00000000..7b5b2139 --- /dev/null +++ b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file -- cgit v1.2.3-55-g6feb From 77b1836e860d2318bf50c5edf09a8fa70db36893 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 27 Jun 2020 03:16:38 -0700 Subject: The Great Tuple to Symbol Rename (tm) --- src/wixext/Tuples/HelpFileToNamespaceTuple.cs | 34 ++++++------- src/wixext/Tuples/HelpFileTuple.cs | 64 +++++++++++------------ src/wixext/Tuples/HelpFilterToNamespaceTuple.cs | 34 ++++++------- src/wixext/Tuples/HelpFilterTuple.cs | 34 ++++++------- src/wixext/Tuples/HelpNamespaceTuple.cs | 40 +++++++-------- src/wixext/Tuples/HelpPluginTuple.cs | 52 +++++++++---------- src/wixext/Tuples/VSTupleDefinitions.cs | 34 ++++++------- src/wixext/VSCompiler.cs | 68 ++++++++++++------------- src/wixext/VSExtensionData.cs | 10 ++-- src/wixext/VSTableDefinitions.cs | 24 ++++----- 10 files changed, 197 insertions(+), 197 deletions(-) (limited to 'src') diff --git a/src/wixext/Tuples/HelpFileToNamespaceTuple.cs b/src/wixext/Tuples/HelpFileToNamespaceTuple.cs index f91dacc1..f18d6701 100644 --- a/src/wixext/Tuples/HelpFileToNamespaceTuple.cs +++ b/src/wixext/Tuples/HelpFileToNamespaceTuple.cs @@ -3,53 +3,53 @@ namespace WixToolset.VisualStudio { using WixToolset.Data; - using WixToolset.VisualStudio.Tuples; + using WixToolset.VisualStudio.Symbols; - public static partial class VSTupleDefinitions + public static partial class VSSymbolDefinitions { - public static readonly IntermediateTupleDefinition HelpFileToNamespace = new IntermediateTupleDefinition( - VSTupleDefinitionType.HelpFileToNamespace.ToString(), + public static readonly IntermediateSymbolDefinition HelpFileToNamespace = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpFileToNamespace.ToString(), new[] { - new IntermediateFieldDefinition(nameof(HelpFileToNamespaceTupleFields.HelpFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileToNamespaceTupleFields.HelpNamespaceRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileToNamespaceSymbolFields.HelpFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFileToNamespaceSymbolFields.HelpNamespaceRef), IntermediateFieldType.String), }, - typeof(HelpFileToNamespaceTuple)); + typeof(HelpFileToNamespaceSymbol)); } } -namespace WixToolset.VisualStudio.Tuples +namespace WixToolset.VisualStudio.Symbols { using WixToolset.Data; - public enum HelpFileToNamespaceTupleFields + public enum HelpFileToNamespaceSymbolFields { HelpFileRef, HelpNamespaceRef, } - public class HelpFileToNamespaceTuple : IntermediateTuple + public class HelpFileToNamespaceSymbol : IntermediateSymbol { - public HelpFileToNamespaceTuple() : base(VSTupleDefinitions.HelpFileToNamespace, null, null) + public HelpFileToNamespaceSymbol() : base(VSSymbolDefinitions.HelpFileToNamespace, null, null) { } - public HelpFileToNamespaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFileToNamespace, sourceLineNumber, id) + public HelpFileToNamespaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFileToNamespace, sourceLineNumber, id) { } - public IntermediateField this[HelpFileToNamespaceTupleFields index] => this.Fields[(int)index]; + public IntermediateField this[HelpFileToNamespaceSymbolFields index] => this.Fields[(int)index]; public string HelpFileRef { - get => this.Fields[(int)HelpFileToNamespaceTupleFields.HelpFileRef].AsString(); - set => this.Set((int)HelpFileToNamespaceTupleFields.HelpFileRef, value); + get => this.Fields[(int)HelpFileToNamespaceSymbolFields.HelpFileRef].AsString(); + set => this.Set((int)HelpFileToNamespaceSymbolFields.HelpFileRef, value); } public string HelpNamespaceRef { - get => this.Fields[(int)HelpFileToNamespaceTupleFields.HelpNamespaceRef].AsString(); - set => this.Set((int)HelpFileToNamespaceTupleFields.HelpNamespaceRef, value); + 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/Tuples/HelpFileTuple.cs b/src/wixext/Tuples/HelpFileTuple.cs index 49d3bc44..8078f4ab 100644 --- a/src/wixext/Tuples/HelpFileTuple.cs +++ b/src/wixext/Tuples/HelpFileTuple.cs @@ -3,31 +3,31 @@ namespace WixToolset.VisualStudio { using WixToolset.Data; - using WixToolset.VisualStudio.Tuples; + using WixToolset.VisualStudio.Symbols; - public static partial class VSTupleDefinitions + public static partial class VSSymbolDefinitions { - public static readonly IntermediateTupleDefinition HelpFile = new IntermediateTupleDefinition( - VSTupleDefinitionType.HelpFile.ToString(), + public static readonly IntermediateSymbolDefinition HelpFile = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpFile.ToString(), new[] { - new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HelpFileName), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileTupleFields.LangID), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxSFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxIFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxQFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxRFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFileTupleFields.SamplesFileRef), IntermediateFieldType.String), + 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(HelpFileTuple)); + typeof(HelpFileSymbol)); } } -namespace WixToolset.VisualStudio.Tuples +namespace WixToolset.VisualStudio.Symbols { using WixToolset.Data; - public enum HelpFileTupleFields + public enum HelpFileSymbolFields { HelpFileName, LangID, @@ -38,58 +38,58 @@ namespace WixToolset.VisualStudio.Tuples SamplesFileRef, } - public class HelpFileTuple : IntermediateTuple + public class HelpFileSymbol : IntermediateSymbol { - public HelpFileTuple() : base(VSTupleDefinitions.HelpFile, null, null) + public HelpFileSymbol() : base(VSSymbolDefinitions.HelpFile, null, null) { } - public HelpFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFile, sourceLineNumber, id) + public HelpFileSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFile, sourceLineNumber, id) { } - public IntermediateField this[HelpFileTupleFields index] => this.Fields[(int)index]; + public IntermediateField this[HelpFileSymbolFields index] => this.Fields[(int)index]; public string HelpFileName { - get => this.Fields[(int)HelpFileTupleFields.HelpFileName].AsString(); - set => this.Set((int)HelpFileTupleFields.HelpFileName, value); + get => this.Fields[(int)HelpFileSymbolFields.HelpFileName].AsString(); + set => this.Set((int)HelpFileSymbolFields.HelpFileName, value); } public int? LangID { - get => this.Fields[(int)HelpFileTupleFields.LangID].AsNullableNumber(); - set => this.Set((int)HelpFileTupleFields.LangID, value); + get => this.Fields[(int)HelpFileSymbolFields.LangID].AsNullableNumber(); + set => this.Set((int)HelpFileSymbolFields.LangID, value); } public string HxSFileRef { - get => this.Fields[(int)HelpFileTupleFields.HxSFileRef].AsString(); - set => this.Set((int)HelpFileTupleFields.HxSFileRef, value); + get => this.Fields[(int)HelpFileSymbolFields.HxSFileRef].AsString(); + set => this.Set((int)HelpFileSymbolFields.HxSFileRef, value); } public string HxIFileRef { - get => this.Fields[(int)HelpFileTupleFields.HxIFileRef].AsString(); - set => this.Set((int)HelpFileTupleFields.HxIFileRef, value); + get => this.Fields[(int)HelpFileSymbolFields.HxIFileRef].AsString(); + set => this.Set((int)HelpFileSymbolFields.HxIFileRef, value); } public string HxQFileRef { - get => this.Fields[(int)HelpFileTupleFields.HxQFileRef].AsString(); - set => this.Set((int)HelpFileTupleFields.HxQFileRef, value); + get => this.Fields[(int)HelpFileSymbolFields.HxQFileRef].AsString(); + set => this.Set((int)HelpFileSymbolFields.HxQFileRef, value); } public string HxRFileRef { - get => this.Fields[(int)HelpFileTupleFields.HxRFileRef].AsString(); - set => this.Set((int)HelpFileTupleFields.HxRFileRef, value); + get => this.Fields[(int)HelpFileSymbolFields.HxRFileRef].AsString(); + set => this.Set((int)HelpFileSymbolFields.HxRFileRef, value); } public string SamplesFileRef { - get => this.Fields[(int)HelpFileTupleFields.SamplesFileRef].AsString(); - set => this.Set((int)HelpFileTupleFields.SamplesFileRef, value); + 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/Tuples/HelpFilterToNamespaceTuple.cs b/src/wixext/Tuples/HelpFilterToNamespaceTuple.cs index c6690d47..f3d21289 100644 --- a/src/wixext/Tuples/HelpFilterToNamespaceTuple.cs +++ b/src/wixext/Tuples/HelpFilterToNamespaceTuple.cs @@ -3,53 +3,53 @@ namespace WixToolset.VisualStudio { using WixToolset.Data; - using WixToolset.VisualStudio.Tuples; + using WixToolset.VisualStudio.Symbols; - public static partial class VSTupleDefinitions + public static partial class VSSymbolDefinitions { - public static readonly IntermediateTupleDefinition HelpFilterToNamespace = new IntermediateTupleDefinition( - VSTupleDefinitionType.HelpFilterToNamespace.ToString(), + public static readonly IntermediateSymbolDefinition HelpFilterToNamespace = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpFilterToNamespace.ToString(), new[] { - new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceTupleFields.HelpFilterRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceTupleFields.HelpNamespaceRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceSymbolFields.HelpFilterRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceSymbolFields.HelpNamespaceRef), IntermediateFieldType.String), }, - typeof(HelpFilterToNamespaceTuple)); + typeof(HelpFilterToNamespaceSymbol)); } } -namespace WixToolset.VisualStudio.Tuples +namespace WixToolset.VisualStudio.Symbols { using WixToolset.Data; - public enum HelpFilterToNamespaceTupleFields + public enum HelpFilterToNamespaceSymbolFields { HelpFilterRef, HelpNamespaceRef, } - public class HelpFilterToNamespaceTuple : IntermediateTuple + public class HelpFilterToNamespaceSymbol : IntermediateSymbol { - public HelpFilterToNamespaceTuple() : base(VSTupleDefinitions.HelpFilterToNamespace, null, null) + public HelpFilterToNamespaceSymbol() : base(VSSymbolDefinitions.HelpFilterToNamespace, null, null) { } - public HelpFilterToNamespaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFilterToNamespace, sourceLineNumber, id) + public HelpFilterToNamespaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFilterToNamespace, sourceLineNumber, id) { } - public IntermediateField this[HelpFilterToNamespaceTupleFields index] => this.Fields[(int)index]; + public IntermediateField this[HelpFilterToNamespaceSymbolFields index] => this.Fields[(int)index]; public string HelpFilterRef { - get => this.Fields[(int)HelpFilterToNamespaceTupleFields.HelpFilterRef].AsString(); - set => this.Set((int)HelpFilterToNamespaceTupleFields.HelpFilterRef, value); + get => this.Fields[(int)HelpFilterToNamespaceSymbolFields.HelpFilterRef].AsString(); + set => this.Set((int)HelpFilterToNamespaceSymbolFields.HelpFilterRef, value); } public string HelpNamespaceRef { - get => this.Fields[(int)HelpFilterToNamespaceTupleFields.HelpNamespaceRef].AsString(); - set => this.Set((int)HelpFilterToNamespaceTupleFields.HelpNamespaceRef, value); + 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/Tuples/HelpFilterTuple.cs b/src/wixext/Tuples/HelpFilterTuple.cs index 6592defa..9deb47d0 100644 --- a/src/wixext/Tuples/HelpFilterTuple.cs +++ b/src/wixext/Tuples/HelpFilterTuple.cs @@ -3,53 +3,53 @@ namespace WixToolset.VisualStudio { using WixToolset.Data; - using WixToolset.VisualStudio.Tuples; + using WixToolset.VisualStudio.Symbols; - public static partial class VSTupleDefinitions + public static partial class VSSymbolDefinitions { - public static readonly IntermediateTupleDefinition HelpFilter = new IntermediateTupleDefinition( - VSTupleDefinitionType.HelpFilter.ToString(), + public static readonly IntermediateSymbolDefinition HelpFilter = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpFilter.ToString(), new[] { - new IntermediateFieldDefinition(nameof(HelpFilterTupleFields.Description), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpFilterTupleFields.QueryString), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFilterSymbolFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpFilterSymbolFields.QueryString), IntermediateFieldType.String), }, - typeof(HelpFilterTuple)); + typeof(HelpFilterSymbol)); } } -namespace WixToolset.VisualStudio.Tuples +namespace WixToolset.VisualStudio.Symbols { using WixToolset.Data; - public enum HelpFilterTupleFields + public enum HelpFilterSymbolFields { Description, QueryString, } - public class HelpFilterTuple : IntermediateTuple + public class HelpFilterSymbol : IntermediateSymbol { - public HelpFilterTuple() : base(VSTupleDefinitions.HelpFilter, null, null) + public HelpFilterSymbol() : base(VSSymbolDefinitions.HelpFilter, null, null) { } - public HelpFilterTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFilter, sourceLineNumber, id) + public HelpFilterSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpFilter, sourceLineNumber, id) { } - public IntermediateField this[HelpFilterTupleFields index] => this.Fields[(int)index]; + public IntermediateField this[HelpFilterSymbolFields index] => this.Fields[(int)index]; public string Description { - get => this.Fields[(int)HelpFilterTupleFields.Description].AsString(); - set => this.Set((int)HelpFilterTupleFields.Description, value); + get => this.Fields[(int)HelpFilterSymbolFields.Description].AsString(); + set => this.Set((int)HelpFilterSymbolFields.Description, value); } public string QueryString { - get => this.Fields[(int)HelpFilterTupleFields.QueryString].AsString(); - set => this.Set((int)HelpFilterTupleFields.QueryString, value); + 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/Tuples/HelpNamespaceTuple.cs b/src/wixext/Tuples/HelpNamespaceTuple.cs index 69b471fb..8d2c2f80 100644 --- a/src/wixext/Tuples/HelpNamespaceTuple.cs +++ b/src/wixext/Tuples/HelpNamespaceTuple.cs @@ -3,61 +3,61 @@ namespace WixToolset.VisualStudio { using WixToolset.Data; - using WixToolset.VisualStudio.Tuples; + using WixToolset.VisualStudio.Symbols; - public static partial class VSTupleDefinitions + public static partial class VSSymbolDefinitions { - public static readonly IntermediateTupleDefinition HelpNamespace = new IntermediateTupleDefinition( - VSTupleDefinitionType.HelpNamespace.ToString(), + public static readonly IntermediateSymbolDefinition HelpNamespace = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpNamespace.ToString(), new[] { - new IntermediateFieldDefinition(nameof(HelpNamespaceTupleFields.NamespaceName), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpNamespaceTupleFields.CollectionFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpNamespaceTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpNamespaceSymbolFields.NamespaceName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpNamespaceSymbolFields.CollectionFileRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(HelpNamespaceSymbolFields.Description), IntermediateFieldType.String), }, - typeof(HelpNamespaceTuple)); + typeof(HelpNamespaceSymbol)); } } -namespace WixToolset.VisualStudio.Tuples +namespace WixToolset.VisualStudio.Symbols { using WixToolset.Data; - public enum HelpNamespaceTupleFields + public enum HelpNamespaceSymbolFields { NamespaceName, CollectionFileRef, Description, } - public class HelpNamespaceTuple : IntermediateTuple + public class HelpNamespaceSymbol : IntermediateSymbol { - public HelpNamespaceTuple() : base(VSTupleDefinitions.HelpNamespace, null, null) + public HelpNamespaceSymbol() : base(VSSymbolDefinitions.HelpNamespace, null, null) { } - public HelpNamespaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpNamespace, sourceLineNumber, id) + public HelpNamespaceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpNamespace, sourceLineNumber, id) { } - public IntermediateField this[HelpNamespaceTupleFields index] => this.Fields[(int)index]; + public IntermediateField this[HelpNamespaceSymbolFields index] => this.Fields[(int)index]; public string NamespaceName { - get => this.Fields[(int)HelpNamespaceTupleFields.NamespaceName].AsString(); - set => this.Set((int)HelpNamespaceTupleFields.NamespaceName, value); + get => this.Fields[(int)HelpNamespaceSymbolFields.NamespaceName].AsString(); + set => this.Set((int)HelpNamespaceSymbolFields.NamespaceName, value); } public string CollectionFileRef { - get => this.Fields[(int)HelpNamespaceTupleFields.CollectionFileRef].AsString(); - set => this.Set((int)HelpNamespaceTupleFields.CollectionFileRef, value); + get => this.Fields[(int)HelpNamespaceSymbolFields.CollectionFileRef].AsString(); + set => this.Set((int)HelpNamespaceSymbolFields.CollectionFileRef, value); } public string Description { - get => this.Fields[(int)HelpNamespaceTupleFields.Description].AsString(); - set => this.Set((int)HelpNamespaceTupleFields.Description, value); + 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/Tuples/HelpPluginTuple.cs b/src/wixext/Tuples/HelpPluginTuple.cs index 5f146199..a452fbd5 100644 --- a/src/wixext/Tuples/HelpPluginTuple.cs +++ b/src/wixext/Tuples/HelpPluginTuple.cs @@ -3,29 +3,29 @@ namespace WixToolset.VisualStudio { using WixToolset.Data; - using WixToolset.VisualStudio.Tuples; + using WixToolset.VisualStudio.Symbols; - public static partial class VSTupleDefinitions + public static partial class VSSymbolDefinitions { - public static readonly IntermediateTupleDefinition HelpPlugin = new IntermediateTupleDefinition( - VSTupleDefinitionType.HelpPlugin.ToString(), + public static readonly IntermediateSymbolDefinition HelpPlugin = new IntermediateSymbolDefinition( + VSSymbolDefinitionType.HelpPlugin.ToString(), new[] { - new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.HelpNamespaceRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.ParentHelpNamespaceRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.HxTFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.HxAFileRef), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.ParentHxTFileRef), IntermediateFieldType.String), + 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(HelpPluginTuple)); + typeof(HelpPluginSymbol)); } } -namespace WixToolset.VisualStudio.Tuples +namespace WixToolset.VisualStudio.Symbols { using WixToolset.Data; - public enum HelpPluginTupleFields + public enum HelpPluginSymbolFields { HelpNamespaceRef, ParentHelpNamespaceRef, @@ -34,46 +34,46 @@ namespace WixToolset.VisualStudio.Tuples ParentHxTFileRef, } - public class HelpPluginTuple : IntermediateTuple + public class HelpPluginSymbol : IntermediateSymbol { - public HelpPluginTuple() : base(VSTupleDefinitions.HelpPlugin, null, null) + public HelpPluginSymbol() : base(VSSymbolDefinitions.HelpPlugin, null, null) { } - public HelpPluginTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpPlugin, sourceLineNumber, id) + public HelpPluginSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSSymbolDefinitions.HelpPlugin, sourceLineNumber, id) { } - public IntermediateField this[HelpPluginTupleFields index] => this.Fields[(int)index]; + public IntermediateField this[HelpPluginSymbolFields index] => this.Fields[(int)index]; public string HelpNamespaceRef { - get => this.Fields[(int)HelpPluginTupleFields.HelpNamespaceRef].AsString(); - set => this.Set((int)HelpPluginTupleFields.HelpNamespaceRef, value); + get => this.Fields[(int)HelpPluginSymbolFields.HelpNamespaceRef].AsString(); + set => this.Set((int)HelpPluginSymbolFields.HelpNamespaceRef, value); } public string ParentHelpNamespaceRef { - get => this.Fields[(int)HelpPluginTupleFields.ParentHelpNamespaceRef].AsString(); - set => this.Set((int)HelpPluginTupleFields.ParentHelpNamespaceRef, value); + get => this.Fields[(int)HelpPluginSymbolFields.ParentHelpNamespaceRef].AsString(); + set => this.Set((int)HelpPluginSymbolFields.ParentHelpNamespaceRef, value); } public string HxTFileRef { - get => this.Fields[(int)HelpPluginTupleFields.HxTFileRef].AsString(); - set => this.Set((int)HelpPluginTupleFields.HxTFileRef, value); + get => this.Fields[(int)HelpPluginSymbolFields.HxTFileRef].AsString(); + set => this.Set((int)HelpPluginSymbolFields.HxTFileRef, value); } public string HxAFileRef { - get => this.Fields[(int)HelpPluginTupleFields.HxAFileRef].AsString(); - set => this.Set((int)HelpPluginTupleFields.HxAFileRef, value); + get => this.Fields[(int)HelpPluginSymbolFields.HxAFileRef].AsString(); + set => this.Set((int)HelpPluginSymbolFields.HxAFileRef, value); } public string ParentHxTFileRef { - get => this.Fields[(int)HelpPluginTupleFields.ParentHxTFileRef].AsString(); - set => this.Set((int)HelpPluginTupleFields.ParentHxTFileRef, value); + 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/Tuples/VSTupleDefinitions.cs b/src/wixext/Tuples/VSTupleDefinitions.cs index fadcf808..cea6a2b6 100644 --- a/src/wixext/Tuples/VSTupleDefinitions.cs +++ b/src/wixext/Tuples/VSTupleDefinitions.cs @@ -5,7 +5,7 @@ namespace WixToolset.VisualStudio using System; using WixToolset.Data; - public enum VSTupleDefinitionType + public enum VSSymbolDefinitionType { HelpFile, HelpFileToNamespace, @@ -15,13 +15,13 @@ namespace WixToolset.VisualStudio HelpPlugin, } - public static partial class VSTupleDefinitions + public static partial class VSSymbolDefinitions { public static readonly Version Version = new Version("4.0.0"); - public static IntermediateTupleDefinition ByName(string name) + public static IntermediateSymbolDefinition ByName(string name) { - if (!Enum.TryParse(name, out VSTupleDefinitionType type)) + if (!Enum.TryParse(name, out VSSymbolDefinitionType type)) { return null; } @@ -29,27 +29,27 @@ namespace WixToolset.VisualStudio return ByType(type); } - public static IntermediateTupleDefinition ByType(VSTupleDefinitionType type) + public static IntermediateSymbolDefinition ByType(VSSymbolDefinitionType type) { switch (type) { - case VSTupleDefinitionType.HelpFile: - return VSTupleDefinitions.HelpFile; + case VSSymbolDefinitionType.HelpFile: + return VSSymbolDefinitions.HelpFile; - case VSTupleDefinitionType.HelpFileToNamespace: - return VSTupleDefinitions.HelpFileToNamespace; + case VSSymbolDefinitionType.HelpFileToNamespace: + return VSSymbolDefinitions.HelpFileToNamespace; - case VSTupleDefinitionType.HelpFilter: - return VSTupleDefinitions.HelpFilter; + case VSSymbolDefinitionType.HelpFilter: + return VSSymbolDefinitions.HelpFilter; - case VSTupleDefinitionType.HelpFilterToNamespace: - return VSTupleDefinitions.HelpFilterToNamespace; + case VSSymbolDefinitionType.HelpFilterToNamespace: + return VSSymbolDefinitions.HelpFilterToNamespace; - case VSTupleDefinitionType.HelpNamespace: - return VSTupleDefinitions.HelpNamespace; + case VSSymbolDefinitionType.HelpNamespace: + return VSSymbolDefinitions.HelpNamespace; - case VSTupleDefinitionType.HelpPlugin: - return VSTupleDefinitions.HelpPlugin; + case VSSymbolDefinitionType.HelpPlugin: + return VSSymbolDefinitions.HelpPlugin; default: throw new ArgumentOutOfRangeException(nameof(type)); diff --git a/src/wixext/VSCompiler.cs b/src/wixext/VSCompiler.cs index b9390fea..d3afc2ab 100644 --- a/src/wixext/VSCompiler.cs +++ b/src/wixext/VSCompiler.cs @@ -7,10 +7,10 @@ namespace WixToolset.VisualStudio using System.Globalization; using System.Xml.Linq; using WixToolset.Data; - using WixToolset.Data.Tuples; + using WixToolset.Data.Symbols; using WixToolset.Data.WindowsInstaller; using WixToolset.Extensibility; - using WixToolset.VisualStudio.Tuples; + using WixToolset.VisualStudio.Symbols; /// /// The compiler for the WiX Toolset Visual Studio Extension. @@ -93,7 +93,7 @@ namespace WixToolset.VisualStudio { case "Id": id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpNamespace, id.Id); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpNamespace, id.Id); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -212,7 +212,7 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - section.AddTuple(new HelpNamespaceTuple(sourceLineNumbers, id) + section.AddSymbol(new HelpNamespaceSymbol(sourceLineNumbers, id) { NamespaceName = name, CollectionFileRef = fileId, @@ -249,11 +249,11 @@ namespace WixToolset.VisualStudio break; case "AttributeIndex": hxr = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, hxr); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, hxr); break; case "Index": hxi = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, hxi); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, hxi); break; case "Language": language = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); @@ -263,11 +263,11 @@ namespace WixToolset.VisualStudio break; case "SampleLocation": samples = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, samples); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, samples); break; case "Search": hxq = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, hxq); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, hxq); break; case "SuppressCustomActions": suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); @@ -303,7 +303,7 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - section.AddTuple(new HelpFileTuple(sourceLineNumbers, id) + section.AddSymbol(new HelpFileSymbol(sourceLineNumbers, id) { HelpFileName = name, LangID = language, @@ -334,7 +334,7 @@ namespace WixToolset.VisualStudio { case "Id": id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpFile, id.Id); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpFile, id.Id); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -356,7 +356,7 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - section.AddTuple(new HelpFileToNamespaceTuple(sourceLineNumbers, id) + section.AddSymbol(new HelpFileToNamespaceSymbol(sourceLineNumbers, id) { HelpFileRef = id.Id, HelpNamespaceRef = collectionId.Id, @@ -415,7 +415,7 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - section.AddTuple(new HelpFilterTuple(sourceLineNumbers, id) + section.AddSymbol(new HelpFilterSymbol(sourceLineNumbers, id) { Description = name, QueryString = filterDefinition, @@ -441,7 +441,7 @@ namespace WixToolset.VisualStudio { case "Id": id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpFilter, id.Id); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpFilter, id.Id); break; default: this.ParseHelper.UnexpectedAttribute(element, attrib); @@ -463,7 +463,7 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - section.AddTuple(new HelpFilterToNamespaceTuple(sourceLineNumbers, id) + section.AddSymbol(new HelpFilterToNamespaceSymbol(sourceLineNumbers, id) { HelpFilterRef = id.Id, HelpNamespaceRef = collectionId.Id, @@ -533,7 +533,7 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { - section.AddTuple(new HelpPluginTuple(sourceLineNumbers, parentId) + section.AddSymbol(new HelpPluginSymbol(sourceLineNumbers, parentId) { HelpNamespaceRef = parentId.Id, ParentHelpNamespaceRef = namespaceParent, @@ -550,7 +550,7 @@ namespace WixToolset.VisualStudio 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, TupleDefinitions.CustomAction, "CA_HxMerge_VSIPCC_VSCC"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "CA_HxMerge_VSIPCC_VSCC"); } } else if (pluginVS08) @@ -561,13 +561,13 @@ namespace WixToolset.VisualStudio 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, TupleDefinitions.CustomAction, "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); + 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, VSTupleDefinitions.HelpNamespace, namespaceParent); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSSymbolDefinitions.HelpNamespace, namespaceParent); } } } @@ -679,10 +679,10 @@ namespace WixToolset.VisualStudio if (!this.Messaging.EncounteredError) { // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Property, propertyId); + 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, TupleDefinitions.File, fileId); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.File, fileId); var cmdlinePrefix = "/q "; @@ -699,12 +699,12 @@ namespace WixToolset.VisualStudio 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 CustomActionTuple(sourceLineNumbers, installNamePerUser) + var installPerUserCA = new CustomActionSymbol(sourceLineNumbers, installNamePerUser) { ExecutionType = CustomActionExecutionType.Deferred, Impersonate = true, }; - var installPerMachineCA = new CustomActionTuple(sourceLineNumbers, installNamePerMachine) + var installPerMachineCA = new CustomActionSymbol(sourceLineNumbers, installNamePerMachine) { ExecutionType = CustomActionExecutionType.Deferred, Impersonate = false, @@ -724,13 +724,13 @@ namespace WixToolset.VisualStudio 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 CustomActionTuple(sourceLineNumbers, rollbackNamePerUser) + var rollbackPerUserCA = new CustomActionSymbol(sourceLineNumbers, rollbackNamePerUser) { ExecutionType = CustomActionExecutionType.Rollback, IgnoreResult = true, Impersonate = true, }; - var rollbackPerMachineCA = new CustomActionTuple(sourceLineNumbers, rollbackNamePerMachine) + var rollbackPerMachineCA = new CustomActionSymbol(sourceLineNumbers, rollbackNamePerMachine) { ExecutionType = CustomActionExecutionType.Rollback, IgnoreResult = true, @@ -755,13 +755,13 @@ namespace WixToolset.VisualStudio 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 CustomActionTuple(sourceLineNumbers, uninstallNamePerUser) + var uninstallPerUserCA = new CustomActionSymbol(sourceLineNumbers, uninstallNamePerUser) { ExecutionType = CustomActionExecutionType.Deferred, IgnoreResult = true, Impersonate = true, }; - var uninstallPerMachineCA = new CustomActionTuple(sourceLineNumbers, uninstallNamePerMachine) + var uninstallPerMachineCA = new CustomActionSymbol(sourceLineNumbers, uninstallNamePerMachine) { ExecutionType = CustomActionExecutionType.Deferred, IgnoreResult = true, @@ -774,7 +774,7 @@ namespace WixToolset.VisualStudio } } - private void SchedulePropertyExeAction(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, CustomActionTuple caTemplate, string condition, string beforeAction, string afterAction) + 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; @@ -782,9 +782,9 @@ namespace WixToolset.VisualStudio caTemplate.Source = source; caTemplate.TargetType = CustomActionTargetType.Exe; caTemplate.Target = cmdline; - section.AddTuple(caTemplate); + section.AddSymbol(caTemplate); - section.AddTuple(new WixActionTuple(sourceLineNumbers, new Identifier(name.Access, sequence, name.Id)) + section.AddSymbol(new WixActionSymbol(sourceLineNumbers, new Identifier(name.Access, sequence, name.Id)) { SequenceTable = SequenceTable.InstallExecuteSequence, Action = name.Id, @@ -799,11 +799,11 @@ namespace WixToolset.VisualStudio { if (WindowsInstallerStandard.IsStandardAction(beforeAction)) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixAction, sequence.ToString(), beforeAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixAction, sequence.ToString(), beforeAction); } else { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, beforeAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, beforeAction); } } @@ -811,18 +811,18 @@ namespace WixToolset.VisualStudio { if (WindowsInstallerStandard.IsStandardAction(afterAction)) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixAction, sequence.ToString(), afterAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixAction, sequence.ToString(), afterAction); } else { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, afterAction); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, afterAction); } } } private void AddReferenceToRegisterMicrosoftHelp(IntermediateSection section, SourceLineNumber sourceLineNumbers) { - this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.CustomAction, "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); } } } diff --git a/src/wixext/VSExtensionData.cs b/src/wixext/VSExtensionData.cs index 3d28b625..51199d2c 100644 --- a/src/wixext/VSExtensionData.cs +++ b/src/wixext/VSExtensionData.cs @@ -13,15 +13,15 @@ namespace WixToolset.VisualStudio /// The default culture. public override string DefaultCulture => "en-US"; - public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) + public override bool TryGetSymbolDefinitionByName(string name, out IntermediateSymbolDefinition symbolDefinition) { - tupleDefinition = VSTupleDefinitions.ByName(name); - return tupleDefinition != null; + symbolDefinition = VSSymbolDefinitions.ByName(name); + return symbolDefinition != null; } - public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) + public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) { - return Intermediate.Load(typeof(VSExtensionData).Assembly, "WixToolset.VisualStudio.vs.wixlib", tupleDefinitions); + return Intermediate.Load(typeof(VSExtensionData).Assembly, "WixToolset.VisualStudio.vs.wixlib", symbolDefinitions); } } } diff --git a/src/wixext/VSTableDefinitions.cs b/src/wixext/VSTableDefinitions.cs index bbc74b96..0c3ca907 100644 --- a/src/wixext/VSTableDefinitions.cs +++ b/src/wixext/VSTableDefinitions.cs @@ -8,7 +8,7 @@ namespace WixToolset.VisualStudio { public static readonly TableDefinition HelpFile = new TableDefinition( "HelpFile", - VSTupleDefinitions.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), @@ -20,46 +20,46 @@ namespace WixToolset.VisualStudio 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), }, - tupleIdIsPrimaryKey: true + symbolIdIsPrimaryKey: true ); public static readonly TableDefinition HelpFileToNamespace = new TableDefinition( "HelpFileToNamespace", - VSTupleDefinitions.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)."), }, - tupleIdIsPrimaryKey: false + symbolIdIsPrimaryKey: false ); public static readonly TableDefinition HelpFilter = new TableDefinition( "HelpFilter", - VSTupleDefinitions.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)."), }, - tupleIdIsPrimaryKey: true + symbolIdIsPrimaryKey: true ); public static readonly TableDefinition HelpFilterToNamespace = new TableDefinition( "HelpFilterToNamespace", - VSTupleDefinitions.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)."), }, - tupleIdIsPrimaryKey: false + symbolIdIsPrimaryKey: false ); public static readonly TableDefinition HelpNamespace = new TableDefinition( "HelpNamespace", - VSTupleDefinitions.HelpNamespace, + VSSymbolDefinitions.HelpNamespace, new[] { new ColumnDefinition("NamespaceKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), @@ -67,12 +67,12 @@ namespace WixToolset.VisualStudio 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)."), }, - tupleIdIsPrimaryKey: true + symbolIdIsPrimaryKey: true ); public static readonly TableDefinition HelpPlugin = new TableDefinition( "HelpPlugin", - VSTupleDefinitions.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)."), @@ -81,7 +81,7 @@ namespace WixToolset.VisualStudio 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), }, - tupleIdIsPrimaryKey: false + symbolIdIsPrimaryKey: false ); public static readonly TableDefinition[] All = new[] -- cgit v1.2.3-55-g6feb From b35ada263291a2c37ab891976c1fb9f2fb9c8ac9 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 27 Jun 2020 03:18:02 -0700 Subject: The Great Tuple to Symbol File Rename (tm) --- 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/Tuples/HelpFileToNamespaceTuple.cs | 55 ------------- src/wixext/Tuples/HelpFileTuple.cs | 95 ----------------------- src/wixext/Tuples/HelpFilterToNamespaceTuple.cs | 55 ------------- src/wixext/Tuples/HelpFilterTuple.cs | 55 ------------- src/wixext/Tuples/HelpNamespaceTuple.cs | 63 --------------- src/wixext/Tuples/HelpPluginTuple.cs | 79 ------------------- src/wixext/Tuples/VSTupleDefinitions.cs | 59 -------------- 14 files changed, 461 insertions(+), 461 deletions(-) create mode 100644 src/wixext/Symbols/HelpFileSymbol.cs create mode 100644 src/wixext/Symbols/HelpFileToNamespaceSymbol.cs create mode 100644 src/wixext/Symbols/HelpFilterSymbol.cs create mode 100644 src/wixext/Symbols/HelpFilterToNamespaceSymbol.cs create mode 100644 src/wixext/Symbols/HelpNamespaceSymbol.cs create mode 100644 src/wixext/Symbols/HelpPluginSymbol.cs create mode 100644 src/wixext/Symbols/VSSymbolDefinitions.cs delete mode 100644 src/wixext/Tuples/HelpFileToNamespaceTuple.cs delete mode 100644 src/wixext/Tuples/HelpFileTuple.cs delete mode 100644 src/wixext/Tuples/HelpFilterToNamespaceTuple.cs delete mode 100644 src/wixext/Tuples/HelpFilterTuple.cs delete mode 100644 src/wixext/Tuples/HelpNamespaceTuple.cs delete mode 100644 src/wixext/Tuples/HelpPluginTuple.cs delete mode 100644 src/wixext/Tuples/VSTupleDefinitions.cs (limited to 'src') diff --git a/src/wixext/Symbols/HelpFileSymbol.cs b/src/wixext/Symbols/HelpFileSymbol.cs new file mode 100644 index 00000000..8078f4ab --- /dev/null +++ b/src/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/wixext/Symbols/HelpFileToNamespaceSymbol.cs b/src/wixext/Symbols/HelpFileToNamespaceSymbol.cs new file mode 100644 index 00000000..f18d6701 --- /dev/null +++ b/src/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/wixext/Symbols/HelpFilterSymbol.cs b/src/wixext/Symbols/HelpFilterSymbol.cs new file mode 100644 index 00000000..9deb47d0 --- /dev/null +++ b/src/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/wixext/Symbols/HelpFilterToNamespaceSymbol.cs b/src/wixext/Symbols/HelpFilterToNamespaceSymbol.cs new file mode 100644 index 00000000..f3d21289 --- /dev/null +++ b/src/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/wixext/Symbols/HelpNamespaceSymbol.cs b/src/wixext/Symbols/HelpNamespaceSymbol.cs new file mode 100644 index 00000000..8d2c2f80 --- /dev/null +++ b/src/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/wixext/Symbols/HelpPluginSymbol.cs b/src/wixext/Symbols/HelpPluginSymbol.cs new file mode 100644 index 00000000..a452fbd5 --- /dev/null +++ b/src/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/wixext/Symbols/VSSymbolDefinitions.cs b/src/wixext/Symbols/VSSymbolDefinitions.cs new file mode 100644 index 00000000..cea6a2b6 --- /dev/null +++ b/src/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/wixext/Tuples/HelpFileToNamespaceTuple.cs b/src/wixext/Tuples/HelpFileToNamespaceTuple.cs deleted file mode 100644 index f18d6701..00000000 --- a/src/wixext/Tuples/HelpFileToNamespaceTuple.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/Tuples/HelpFileTuple.cs b/src/wixext/Tuples/HelpFileTuple.cs deleted file mode 100644 index 8078f4ab..00000000 --- a/src/wixext/Tuples/HelpFileTuple.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/Tuples/HelpFilterToNamespaceTuple.cs b/src/wixext/Tuples/HelpFilterToNamespaceTuple.cs deleted file mode 100644 index f3d21289..00000000 --- a/src/wixext/Tuples/HelpFilterToNamespaceTuple.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/Tuples/HelpFilterTuple.cs b/src/wixext/Tuples/HelpFilterTuple.cs deleted file mode 100644 index 9deb47d0..00000000 --- a/src/wixext/Tuples/HelpFilterTuple.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/Tuples/HelpNamespaceTuple.cs b/src/wixext/Tuples/HelpNamespaceTuple.cs deleted file mode 100644 index 8d2c2f80..00000000 --- a/src/wixext/Tuples/HelpNamespaceTuple.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/Tuples/HelpPluginTuple.cs b/src/wixext/Tuples/HelpPluginTuple.cs deleted file mode 100644 index a452fbd5..00000000 --- a/src/wixext/Tuples/HelpPluginTuple.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/Tuples/VSTupleDefinitions.cs b/src/wixext/Tuples/VSTupleDefinitions.cs deleted file mode 100644 index cea6a2b6..00000000 --- a/src/wixext/Tuples/VSTupleDefinitions.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)); - } - } - } -} -- cgit v1.2.3-55-g6feb From 13601ef88f7ae15655d9de782addcd22178b3a16 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 27 Jun 2020 03:18:42 -0700 Subject: Build wixlib with WixToolset.Sdk --- global.json | 5 +++++ src/FindLocalWix.props | 8 ------- src/wixlib/packages.config | 5 ----- src/wixlib/vs.wixproj | 56 +++++++--------------------------------------- 4 files changed, 13 insertions(+), 61 deletions(-) create mode 100644 global.json delete mode 100644 src/FindLocalWix.props delete mode 100644 src/wixlib/packages.config (limited to 'src') diff --git a/global.json b/global.json new file mode 100644 index 00000000..7a995d0a --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "msbuild-sdks": { + "WixToolset.Sdk": "4.0.0-build-0143" + } +} diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props deleted file mode 100644 index 1666e4fe..00000000 --- a/src/FindLocalWix.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - $(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets - - diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config deleted file mode 100644 index 1e5a9850..00000000 --- a/src/wixlib/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index fccbdfc0..8da8378d 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -1,58 +1,18 @@ - - - - + + - {14345C9D-8AF8-435A-BB1B-E067CE7EB321} - vs Library true - true en-us + - - - - - - - - - - - - - - - - + + - - + - - - - - - vsca - {45308b85-0628-4978-8fc8-6ad9e1ad5949} - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - \ No newline at end of file + + -- cgit v1.2.3-55-g6feb From 8c81985d52fcad8f52bdf73f0c076a32468d8ac4 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 27 Jun 2020 03:18:58 -0700 Subject: Update to latest dutil and wcautil --- src/ca/packages.config | 4 ++-- src/ca/vsca.vcxproj | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/ca/packages.config b/src/ca/packages.config index 14f2feeb..d70a26fe 100644 --- a/src/ca/packages.config +++ b/src/ca/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file diff --git a/src/ca/vsca.vcxproj b/src/ca/vsca.vcxproj index 45409757..2a024374 100644 --- a/src/ca/vsca.vcxproj +++ b/src/ca/vsca.vcxproj @@ -2,8 +2,8 @@ - - + + @@ -63,7 +63,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + -- cgit v1.2.3-55-g6feb From 16ed14a97c67b563feceff359efcb81c324cb953 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 27 Oct 2020 17:41:10 -0400 Subject: Update project for Package/SummaryInformation change. --- VisualStudio.wixext.sln | 4 +- global.json | 2 +- src/ca/vsca.vcxproj | 17 +- .../TestData/UsingVsixPackage/Package.wxs | 11 +- .../VisualStudioExtensionFixture.cs | 12 +- src/wixext/VSCompiler.cs | 2 +- src/wixext/WixToolset.VisualStudio.wixext.csproj | 1 - src/wixext/vs.xsd | 292 --------------------- src/wixlib/HTML_Help_Registration__RTL_X86.wxs | 39 ++- src/wixlib/VS11.wxs | 15 +- src/wixlib/VS14.wxs | 15 +- src/wixlib/VS2003.wxs | 5 +- src/wixlib/VS2005.wxs | 39 ++- src/wixlib/VS2008.wxs | 45 ++-- src/wixlib/VS2010.wxs | 39 ++- src/wixlib/VS2012.wxs | 23 +- src/wixlib/VS2013.wxs | 23 +- src/wixlib/VS2015.wxs | 15 +- src/wixlib/VS2017.wxs | 7 +- src/wixlib/VS2019.wxs | 7 +- src/wixlib/VSExtension_Platform.wxi | 5 +- src/wixlib/VsixPackage.wxs | 17 +- .../vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs | 35 ++- .../vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs | 49 ++-- 24 files changed, 197 insertions(+), 522 deletions(-) delete mode 100644 src/wixext/vs.xsd (limited to 'src') diff --git a/VisualStudio.wixext.sln b/VisualStudio.wixext.sln index 30cdb4a3..b00eea9e 100644 --- a/VisualStudio.wixext.sln +++ b/VisualStudio.wixext.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2003 +# 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 diff --git a/global.json b/global.json index 7a995d0a..f94ab6df 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0143" + "WixToolset.Sdk": "4.0.0-build-0162" } } diff --git a/src/ca/vsca.vcxproj b/src/ca/vsca.vcxproj index 2a024374..e37e94fc 100644 --- a/src/ca/vsca.vcxproj +++ b/src/ca/vsca.vcxproj @@ -1,10 +1,8 @@ - - Debug @@ -15,49 +13,40 @@ Win32 - {45308B85-0628-4978-8FC8-6AD9E1AD5949} DynamicLibrary vsca - v141 + v142 Unicode vsca.def WiX Toolset VS CustomAction + 10.0 - - - - msi.lib - Create - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. @@ -66,4 +55,4 @@ - + \ No newline at end of file diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs index 07e6ba3d..e0e6f11e 100644 --- a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs +++ b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs @@ -1,18 +1,13 @@ - - - - - + + - - - + diff --git a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs index b8800cee..306962e3 100644 --- a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs +++ b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs @@ -23,13 +23,13 @@ namespace WixToolsetTest.VisualStudio "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:vimyrEjb_CFhXi3TTLayKNM2w7rvr4\t3122\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\" /admin\t", - "CustomAction:viuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1074\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\"\t", - "CustomAction:vrmyrEjb_CFhXi3TTLayKNM2w7rvr4\t3442\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t", - "CustomAction:vruFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1394\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\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:vumyrEjb_CFhXi3TTLayKNM2w7rvr4\t3186\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t", - "CustomAction:vuuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1138\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\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", diff --git a/src/wixext/VSCompiler.cs b/src/wixext/VSCompiler.cs index d3afc2ab..65f0f97d 100644 --- a/src/wixext/VSCompiler.cs +++ b/src/wixext/VSCompiler.cs @@ -60,7 +60,7 @@ namespace WixToolset.VisualStudio break; case "Fragment": case "Module": - case "Product": + case "Package": switch (element.Name.LocalName) { case "HelpCollectionRef": diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj index 989755fc..bb7bba6b 100644 --- a/src/wixext/WixToolset.VisualStudio.wixext.csproj +++ b/src/wixext/WixToolset.VisualStudio.wixext.csproj @@ -13,7 +13,6 @@ - diff --git a/src/wixext/vs.xsd b/src/wixext/vs.xsd deleted file mode 100644 index 51172920..00000000 --- a/src/wixext/vs.xsd +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - - The source code schema for the WiX Toolset Visual Studio Extension. - - - - - - - Help Namespace for a help collection. The parent file is the key for the HxC (Collection) file. - - - - - - - - - - - - - Primary Key for HelpNamespace. - - - Friendly name for Namespace. - - - Internal Microsoft Help ID for this Namespace. - - - Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - - - Filter for Help Namespace. - - - - - - - - - - Primary Key for HelpFilter. - - - Query String for Help Filter. - - - Friendly name for Filter. - - - Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - - - File for Help Namespace. The parent file is the key for HxS (Title) file. - - - - - - - - Primary Key for HelpFile Table. - - - Key for HxR (Attributes) file. - - - Key for HxI (Index) file. - - - Language ID for content file. - - - Internal Microsoft Help ID for this HelpFile. - - - Key for a file that is in the "root" of the samples directory for this HelpFile. - - - Key for HxQ (Query) file. - - - Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - Plugin for Help Namespace. - - - Key for HxA (Attributes) file of child namespace. - - - Key for HxT file of child namespace. - - - - Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted. - The following special keys can be used to plug into external namespaces defined outside of the installer. - MS_VSIPCC_v80 : Visual Studio 2005 - MS.VSIPCC.v90 : Visual Studio 2008 - - - - Key for HxT file of parent namespace that now includes the new child namespace. - - - Key for the feature parent of this help collection. Required only when plugging into external namespaces. - - - Suppress linking Visual Studio Help namespaces. Help redistributable merge modules will be required. Use this when building a merge module. - - - - - - Create a reference to a HelpFile element in another Fragment. - - - Primary Key for HelpFile Table. - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - Create a reference to a HelpFile element in another Fragment. - - - Primary Key for HelpFilter. - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - - Create a reference to a HelpCollection element in another Fragment. - - - - - - - - - - - - Primary Key for HelpNamespace Table. - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - - - This element provides the metdata required to install/uninstall a file as - a VSIX Package. The VSIX package file will be installed as part of the MSI - then passed to the VSIX installer to install the VSIX package. To avoid the - duplication, simply use the MSI to install the VSIX package itself. - - - - - - - - - - - Reference to file identifer. This attribute is required when the element is not a - child of a File element and is invalid when the element is a child of the File element. - - - - - - - Identity of the VSIX package per its internal manifest. If this value is not correct - the VSIX package will not correctly uninstall. - - - - - - - Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled. - The default is 'no'. - - - - - - - Specifies the SKU of Visual Studio in which to register the extension. If no target - is specified the extension is registered with all installed SKUs. If the Target - attribute is specified the TargetVersion attribute must also be specified. The - following is a list of known Visual Studio targets: integratedShell, professional, - premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress - - - - - - - Specifies the version of Visual Studio in which to register the extension. This attribute - is required if the Target attribute is specified. - - - - - - - Indicates whether failure to install the VSIX package causes the installation to rollback. - The default is 'yes'. - - - - - - - Optional reference to a Property element that contains the path to the VsixInstaller.exe. - By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX - package. It is highly recommended that this attribute is *not* used. - - - - - - Extensibility point in the WiX XML Schema. Schema extensions can register additional - attributes at this point in the schema. - - - - - - - Values of this type will look like: "x.x.x.x" where x is an integer from 0 to 65534. - - - - - - - - Values of this type will either be "yes" or "no". - - - - - - - diff --git a/src/wixlib/HTML_Help_Registration__RTL_X86.wxs b/src/wixlib/HTML_Help_Registration__RTL_X86.wxs index fcb99f0f..2bdb810a 100644 --- a/src/wixlib/HTML_Help_Registration__RTL_X86.wxs +++ b/src/wixlib/HTML_Help_Registration__RTL_X86.wxs @@ -1,5 +1,4 @@ - - + @@ -18,23 +17,23 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + @@ -45,8 +44,8 @@ - ( NOT RollbackDisabled ) - ( RollbackDisabled ) + + diff --git a/src/wixlib/VS11.wxs b/src/wixlib/VS11.wxs index dd52e80a..d3f31843 100644 --- a/src/wixlib/VS11.wxs +++ b/src/wixlib/VS11.wxs @@ -1,5 +1,4 @@ - - + @@ -60,7 +59,7 @@ - VS11DEVENV + @@ -69,7 +68,7 @@ - VS11DEVENV + @@ -108,7 +107,7 @@ - VWD11EXPRESS_IDE + @@ -116,7 +115,7 @@ - VWD11EXPRESS_IDE + @@ -192,7 +191,7 @@ - VS11WINEXPRESS_IDE + @@ -200,7 +199,7 @@ - VS11WINEXPRESS_IDE + diff --git a/src/wixlib/VS14.wxs b/src/wixlib/VS14.wxs index 52db1562..83449802 100644 --- a/src/wixlib/VS14.wxs +++ b/src/wixlib/VS14.wxs @@ -1,5 +1,4 @@ - - + @@ -60,7 +59,7 @@ - VS14DEVENV + @@ -69,7 +68,7 @@ - VS14DEVENV + @@ -106,7 +105,7 @@ - VWD14EXPRESS_IDE + @@ -114,7 +113,7 @@ - VWD14EXPRESS_IDE + @@ -173,7 +172,7 @@ - VS14WINEXPRESS_IDE + @@ -181,7 +180,7 @@ - VS14WINEXPRESS_IDE + diff --git a/src/wixlib/VS2003.wxs b/src/wixlib/VS2003.wxs index 10515b52..1e5d36d9 100644 --- a/src/wixlib/VS2003.wxs +++ b/src/wixlib/VS2003.wxs @@ -1,5 +1,4 @@ - - + @@ -15,7 +14,7 @@ - VS2003DEVENV + diff --git a/src/wixlib/VS2005.wxs b/src/wixlib/VS2005.wxs index 3aadf08c..ef538099 100644 --- a/src/wixlib/VS2005.wxs +++ b/src/wixlib/VS2005.wxs @@ -1,5 +1,4 @@ - - + @@ -47,7 +46,7 @@ - VS2005DEVENV + @@ -56,7 +55,7 @@ - VS2005DEVENV + @@ -72,8 +71,8 @@ - - + + @@ -84,7 +83,7 @@ - VCSHARP2005EXPRESS_IDE + @@ -94,7 +93,7 @@ - VCSHARP2005EXPRESS_IDE + @@ -114,7 +113,7 @@ - + @@ -125,7 +124,7 @@ - VB2005EXPRESS_IDE + @@ -135,7 +134,7 @@ - VB2005EXPRESS_IDE + @@ -155,7 +154,7 @@ - + @@ -166,7 +165,7 @@ - VWD2005EXPRESS_IDE + @@ -176,7 +175,7 @@ - VWD2005EXPRESS_IDE + @@ -196,7 +195,7 @@ - + @@ -207,7 +206,7 @@ - VC2005EXPRESS_IDE + @@ -217,7 +216,7 @@ - VC2005EXPRESS_IDE + @@ -237,7 +236,7 @@ - + @@ -248,7 +247,7 @@ - VJSHARP2005EXPRESS_IDE + @@ -258,7 +257,7 @@ - VJSHARP2005EXPRESS_IDE + diff --git a/src/wixlib/VS2008.wxs b/src/wixlib/VS2008.wxs index 096221c2..43bf1d1e 100644 --- a/src/wixlib/VS2008.wxs +++ b/src/wixlib/VS2008.wxs @@ -1,5 +1,4 @@ - - + @@ -41,7 +40,7 @@ - VS90DEVENV + @@ -50,7 +49,7 @@ - VS90DEVENV + @@ -66,8 +65,8 @@ - - + + @@ -78,7 +77,7 @@ - VCSHARP90EXPRESS_IDE + @@ -88,7 +87,7 @@ - VCSHARP90EXPRESS_IDE + @@ -108,7 +107,7 @@ - + @@ -119,7 +118,7 @@ - VB90EXPRESS_IDE + @@ -129,7 +128,7 @@ - VB90EXPRESS_IDE + @@ -149,7 +148,7 @@ - + @@ -160,7 +159,7 @@ - VWD90EXPRESS_IDE + @@ -170,7 +169,7 @@ - VWD90EXPRESS_IDE + @@ -190,7 +189,7 @@ - + @@ -201,7 +200,7 @@ - VC90EXPRESS_IDE + @@ -211,7 +210,7 @@ - VC90EXPRESS_IDE + @@ -245,7 +244,7 @@ - + @@ -256,7 +255,7 @@ - + @@ -266,7 +265,7 @@ - + @@ -275,8 +274,8 @@ - - + + @@ -286,7 +285,7 @@ - + diff --git a/src/wixlib/VS2010.wxs b/src/wixlib/VS2010.wxs index d0d899cc..6c940b86 100644 --- a/src/wixlib/VS2010.wxs +++ b/src/wixlib/VS2010.wxs @@ -1,5 +1,4 @@ - - + @@ -60,7 +59,7 @@ - VS2010DEVENV + @@ -69,7 +68,7 @@ - VS2010DEVENV + @@ -78,8 +77,8 @@ - - + + @@ -90,7 +89,7 @@ - VCSHARP2010EXPRESS_IDE + @@ -100,7 +99,7 @@ - VCSHARP2010EXPRESS_IDE + @@ -120,7 +119,7 @@ - + @@ -131,7 +130,7 @@ - VB2010EXPRESS_IDE + @@ -141,7 +140,7 @@ - VB2010EXPRESS_IDE + @@ -161,7 +160,7 @@ - + @@ -172,7 +171,7 @@ - VWD2010EXPRESS_IDE + @@ -182,7 +181,7 @@ - VWD2010EXPRESS_IDE + @@ -202,7 +201,7 @@ - + @@ -213,7 +212,7 @@ - VC2010EXPRESS_IDE + @@ -223,7 +222,7 @@ - VC2010EXPRESS_IDE + @@ -243,7 +242,7 @@ - + @@ -254,7 +253,7 @@ - VPD2010EXPRESS_IDE + @@ -264,7 +263,7 @@ - VPD2010EXPRESS_IDE + diff --git a/src/wixlib/VS2012.wxs b/src/wixlib/VS2012.wxs index c4baa2c9..513d8684 100644 --- a/src/wixlib/VS2012.wxs +++ b/src/wixlib/VS2012.wxs @@ -1,5 +1,4 @@ - - + @@ -60,7 +59,7 @@ - VS2012DEVENV + @@ -69,7 +68,7 @@ - VS2012DEVENV + @@ -108,7 +107,7 @@ - VWD2012EXPRESS_IDE + @@ -116,7 +115,7 @@ - VWD2012EXPRESS_IDE + @@ -131,7 +130,7 @@ - VPD2012EXPRESS_IDE + @@ -139,7 +138,7 @@ - VPD2012EXPRESS_IDE + @@ -215,7 +214,7 @@ - VS2012WINEXPRESS_IDE + @@ -223,7 +222,7 @@ - VS2012WINEXPRESS_IDE + @@ -242,7 +241,7 @@ - VS2012WDEXPRESS_IDE + @@ -250,7 +249,7 @@ - VS2012WDEXPRESS_IDE + diff --git a/src/wixlib/VS2013.wxs b/src/wixlib/VS2013.wxs index fa774ff0..6681b43f 100644 --- a/src/wixlib/VS2013.wxs +++ b/src/wixlib/VS2013.wxs @@ -1,5 +1,4 @@ - - + @@ -60,7 +59,7 @@ - VS2013DEVENV + @@ -69,7 +68,7 @@ - VS2013DEVENV + @@ -108,7 +107,7 @@ - VWD2013EXPRESS_IDE + @@ -116,7 +115,7 @@ - VWD2013EXPRESS_IDE + @@ -131,7 +130,7 @@ - VPD2013EXPRESS_IDE + @@ -139,7 +138,7 @@ - VPD2013EXPRESS_IDE + @@ -209,7 +208,7 @@ - VS2013WINEXPRESS_IDE + @@ -218,7 +217,7 @@ - VS2013WINEXPRESS_IDE + @@ -238,7 +237,7 @@ - VS2013WDEXPRESS_IDE + @@ -247,7 +246,7 @@ - VS2013WDEXPRESS_IDE + diff --git a/src/wixlib/VS2015.wxs b/src/wixlib/VS2015.wxs index b7fb7b4d..f14802e2 100644 --- a/src/wixlib/VS2015.wxs +++ b/src/wixlib/VS2015.wxs @@ -1,5 +1,4 @@ - - + @@ -60,7 +59,7 @@ - VS2015DEVENV + @@ -69,7 +68,7 @@ - VS2015DEVENV + @@ -106,7 +105,7 @@ - VWD2015EXPRESS_IDE + @@ -114,7 +113,7 @@ - VWD2015EXPRESS_IDE + @@ -173,7 +172,7 @@ - VS2015WINEXPRESS_IDE + @@ -181,7 +180,7 @@ - VS2015WINEXPRESS_IDE + diff --git a/src/wixlib/VS2017.wxs b/src/wixlib/VS2017.wxs index acc96d67..5524361d 100644 --- a/src/wixlib/VS2017.wxs +++ b/src/wixlib/VS2017.wxs @@ -1,5 +1,4 @@ - - + @@ -74,7 +73,7 @@ - VS2017DEVENV + @@ -83,7 +82,7 @@ - VS2017DEVENV + diff --git a/src/wixlib/VS2019.wxs b/src/wixlib/VS2019.wxs index 57ae6168..0be63dec 100644 --- a/src/wixlib/VS2019.wxs +++ b/src/wixlib/VS2019.wxs @@ -1,5 +1,4 @@ - - + @@ -74,7 +73,7 @@ - VS2019DEVENV + @@ -83,7 +82,7 @@ - VS2019DEVENV + diff --git a/src/wixlib/VSExtension_Platform.wxi b/src/wixlib/VSExtension_Platform.wxi index 30d107ef..f9cd96f4 100644 --- a/src/wixlib/VSExtension_Platform.wxi +++ b/src/wixlib/VSExtension_Platform.wxi @@ -1,10 +1,9 @@ - - + - + diff --git a/src/wixlib/VsixPackage.wxs b/src/wixlib/VsixPackage.wxs index 8149c55b..5937177b 100644 --- a/src/wixlib/VsixPackage.wxs +++ b/src/wixlib/VsixPackage.wxs @@ -1,5 +1,4 @@ - - + @@ -47,15 +46,15 @@ - NOT VS_VSIX_INSTALLER_PATH AND VS2015_VSIX_INSTALLER_PATH - NOT VS_VSIX_INSTALLER_PATH AND VWD2015_VSIX_INSTALL_ROOT + + - NOT VS_VSIX_INSTALLER_PATH AND VS2013_VSIX_INSTALLER_PATH - NOT VS_VSIX_INSTALLER_PATH AND VWD2013_VSIX_INSTALL_ROOT + + - NOT VS_VSIX_INSTALLER_PATH AND VS2012_VSIX_INSTALLER_PATH - NOT VS_VSIX_INSTALLER_PATH AND VWD2012_VSIX_INSTALL_ROOT + + - NOT VS_VSIX_INSTALLER_PATH AND VS2010_VSIX_INSTALLER_PATH + diff --git a/src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs b/src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs index bb0dfd62..66757349 100644 --- a/src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs +++ b/src/wixlib/vs2005/VS2005_VSIPCC_Collection_Files_RTL.wxs @@ -1,5 +1,4 @@ - - + @@ -24,41 +23,41 @@ - - + + - - + + - MS_VSIPCC_v80 - MS_VSCC_v80 - FL_vsipcc_hxt_86880________ + + + - MS_VSIPCC_v80 - MS_VSExpressCC_v80 - FL_vsipcc_hxt_86880________ + + + - MS_VSIPCC_v80 - MS.VSIPCC.v80 - FL_vsipcc_hxc_86879________ - VSIP Documentation + + + + - - + + diff --git a/src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs b/src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs index bfeef18f..9fb1a0e5 100644 --- a/src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs +++ b/src/wixlib/vs2008/VS2008_VSIPCC_Collection_Files_RTL.wxs @@ -1,12 +1,11 @@ - - + - - + + @@ -15,33 +14,33 @@ - - - - - - - - - - - + + + + + + + + + + + - MS.VSIPCC.v90 - MS.VSIPCC.v90 - FL_vsipcc_hxc_86879_86879_cn_ln - VSIP Documentation + + + + - MS.VSIPCC.v90 - MS.VSCC.v90 - FL_vsipcc_hxt_86880_86880_cn_ln + + + @@ -50,12 +49,12 @@ - Not Installed + - - + + -- cgit v1.2.3-55-g6feb From bfdf787bc4a6b795eb1f78b69ec9b79df2d2a203 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Sat, 31 Oct 2020 22:18:26 -0400 Subject: Strong-name sign WiX assemblies. --- global.json | 2 +- src/CSharp.Build.props | 11 +++++++++++ src/Directory.Build.props | 1 + src/wix.snk | Bin 0 -> 596 bytes 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/CSharp.Build.props create mode 100644 src/wix.snk (limited to 'src') diff --git a/global.json b/global.json index f94ab6df..10345833 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0162" + "WixToolset.Sdk": "4.0.0-build-0163" } } diff --git a/src/CSharp.Build.props b/src/CSharp.Build.props new file mode 100644 index 00000000..b12f4c6e --- /dev/null +++ b/src/CSharp.Build.props @@ -0,0 +1,11 @@ + + + + + true + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index a22f4470..f83cc154 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,6 +22,7 @@ WiX Toolset + diff --git a/src/wix.snk b/src/wix.snk new file mode 100644 index 00000000..3908a66a Binary files /dev/null and b/src/wix.snk differ -- cgit v1.2.3-55-g6feb From d15c04e29d7ac167e382efe37365b8fa451728de Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 1 Mar 2021 14:57:38 -0800 Subject: Update to latest build infrastructure --- .gitignore | 43 ++++++-- VisualStudio.wixext.sln | 4 +- appveyor.cmd | 17 ++-- appveyor.yml | 2 + global.json | 2 +- src/Directory.Build.props | 4 +- src/Directory.Build.targets | 5 +- src/Directory.csproj.props | 13 +++ src/Directory.csproj.targets | 26 +++++ src/Directory.vcxproj.props | 111 +++++++++++++++++++++ src/ca/packages.config | 6 -- src/ca/vsca.vcxproj | 34 +++---- .../WixToolsetTest.VisualStudio.csproj | 5 +- src/wixext/WixToolset.VisualStudio.wixext.csproj | 11 +- src/wixext/WixToolset.VisualStudio.wixext.nuspec | 23 +++++ src/wixlib/vs.wixproj | 6 +- 16 files changed, 254 insertions(+), 58 deletions(-) create mode 100644 src/Directory.csproj.props create mode 100644 src/Directory.csproj.targets create mode 100644 src/Directory.vcxproj.props delete mode 100644 src/ca/packages.config create mode 100644 src/wixext/WixToolset.VisualStudio.wixext.nuspec (limited to 'src') diff --git a/.gitignore b/.gitignore index 3e8a1553..1ee53850 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs +# Mono auto generated files +mono_crash.* + # Build results [Dd]ebug/ [Dd]ebugPublic/ @@ -20,12 +23,14 @@ [Rr]eleases/ x64/ x86/ +[Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ +[Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ @@ -39,9 +44,10 @@ Generated\ Files/ [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* -# NUNIT +# NUnit *.VisualState.xml TestResult.xml +nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ @@ -56,6 +62,9 @@ project.lock.json project.fragment.lock.json artifacts/ +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + # StyleCop StyleCopReport.xml @@ -122,9 +131,6 @@ _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user -# JustCode is a .NET coding add-in -.JustCode - # TeamCity is a build add-in _TeamCity* @@ -135,6 +141,11 @@ _TeamCity* .axoCover/* !.axoCover/settings.json +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + # Visual Studio code coverage results *.coverage *.coveragexml @@ -182,6 +193,8 @@ PublishScripts/ # NuGet Packages *.nupkg +# NuGet Symbol Packages +*.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. @@ -206,6 +219,8 @@ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx +*.appxbundle +*.appxupload # Visual Studio cache files # files ending in .cache can be ignored @@ -231,8 +246,6 @@ orleans.codegen.cs # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ -# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true -**/wwwroot/lib/ # RIA/Silverlight projects Generated_Code/ @@ -257,6 +270,9 @@ ServiceFabricBackup/ *.bim.layout *.bim_*.settings *.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ @@ -292,10 +308,6 @@ paket-files/ # FAKE - F# Make .fake/ -# JetBrains Rider -.idea/ -*.sln.iml - # CodeRush personal settings .cr/personal @@ -337,5 +349,14 @@ ASALocalRun/ # Local History for Visual Studio .localhistory/ -# BeatPulse healthcheck temp database +# BeatPulse healthcheck temp database healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd diff --git a/VisualStudio.wixext.sln b/VisualStudio.wixext.sln index b00eea9e..9d6a8356 100644 --- a/VisualStudio.wixext.sln +++ b/VisualStudio.wixext.sln @@ -5,10 +5,10 @@ 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("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.VisualStudio.wixext", "src\wixext\WixToolset.VisualStudio.wixext.csproj", "{61BFD377-9DE1-48B4-8687-560DF68D6F3B}" -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 diff --git a/appveyor.cmd b/appveyor.cmd index 84e1d13b..847809c3 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -1,14 +1,19 @@ @setlocal @pushd %~dp0 +@set _C=Release +@if /i "%1"=="debug" set _C=Debug -nuget restore || exit /b +:: Restore +msbuild -p:Configuration=%_C% -t:Restore || exit /b -msbuild -p:Configuration=Release -t:Restore || exit /b +:: Build +msbuild -p:Configuration=%_C% src\test\WixToolsetTest.VisualStudio\WixToolsetTest.VisualStudio.csproj || exit /b -msbuild -p:Configuration=Release src\test\WixToolsetTest.VisualStudio\WixToolsetTest.VisualStudio.csproj || exit /b -dotnet test -c Release --no-build src\test\WixToolsetTest.VisualStudio || exit /b +:: Test +dotnet test -c %_C% --no-build src\test\WixToolsetTest.VisualStudio || exit /b -msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.VisualStudio.wixext.csproj || exit /b +:: Pack +msbuild -p:Configuration=%_C% -p:NoBuild=true -t:Pack src\wixext\WixToolset.VisualStudio.wixext.csproj || exit /b @popd -@endlocal \ No newline at end of file +@endlocal diff --git a/appveyor.yml b/appveyor.yml index 7c686b04..c53cc9cc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -33,6 +33,8 @@ skip_tags: true artifacts: - path: build\Release\**\*.nupkg name: nuget +- path: build\Release\**\*.snupkg + name: snupkg notifications: - provider: Slack diff --git a/global.json b/global.json index 10345833..e101f0d5 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0163" + "WixToolset.Sdk": "4.0.0-build-0192" } } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f83cc154..b3c6287c 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,8 +22,6 @@ WiX Toolset - - - + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index dac7452a..2fcc765a 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -40,9 +40,12 @@ - + + + + diff --git a/src/Directory.csproj.props b/src/Directory.csproj.props new file mode 100644 index 00000000..81d24ad1 --- /dev/null +++ b/src/Directory.csproj.props @@ -0,0 +1,13 @@ + + + + + true + true + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + false + + diff --git a/src/Directory.csproj.targets b/src/Directory.csproj.targets new file mode 100644 index 00000000..c3270426 --- /dev/null +++ b/src/Directory.csproj.targets @@ -0,0 +1,26 @@ + + + + + false + $(OutputPath)\$(AssemblyName).xml + + + + + $(PrivateRepositoryUrl.Replace('.git','')) + + $(MSBuildProjectName).nuspec + $(OutputPath)..\ + $(NuspecProperties);Id=$(PackageId);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title) + $(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl) + true + snupkg + + + + diff --git a/src/Directory.vcxproj.props b/src/Directory.vcxproj.props new file mode 100644 index 00000000..bcf26c57 --- /dev/null +++ b/src/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/ca/packages.config b/src/ca/packages.config deleted file mode 100644 index d70a26fe..00000000 --- a/src/ca/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/ca/vsca.vcxproj b/src/ca/vsca.vcxproj index e37e94fc..80ff9ff1 100644 --- a/src/ca/vsca.vcxproj +++ b/src/ca/vsca.vcxproj @@ -1,8 +1,7 @@ + - - Debug @@ -13,6 +12,7 @@ Win32 + {45308B85-0628-4978-8FC8-6AD9E1AD5949} DynamicLibrary @@ -23,36 +23,36 @@ WiX Toolset VS CustomAction 10.0 + - - - - - + msi.lib + Create + + - + + + + + + + + + - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - \ No newline at end of file + diff --git a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj index 6bb325c6..9172569f 100644 --- a/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj +++ b/src/test/WixToolsetTest.VisualStudio/WixToolsetTest.VisualStudio.csproj @@ -12,10 +12,7 @@ - - - - + diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj index bb7bba6b..82aa0d1d 100644 --- a/src/wixext/WixToolset.VisualStudio.wixext.csproj +++ b/src/wixext/WixToolset.VisualStudio.wixext.csproj @@ -8,23 +8,24 @@ WiX Toolset Visual Studio Extension WiX Toolset VS Extension true - build + true - - + - + + - + + diff --git a/src/wixext/WixToolset.VisualStudio.wixext.nuspec b/src/wixext/WixToolset.VisualStudio.wixext.nuspec new file mode 100644 index 00000000..51c9708e --- /dev/null +++ b/src/wixext/WixToolset.VisualStudio.wixext.nuspec @@ -0,0 +1,23 @@ + + + + $id$ + $version$ + $title$ + $description$ + $authors$ + MS-RL + false + $copyright$ + $projectUrl$ + + + + + + + + + + + diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index 8da8378d..40333913 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -1,4 +1,6 @@ + + @@ -8,11 +10,11 @@ - + - + -- cgit v1.2.3-55-g6feb From f283708b2a9b38459345ce433204d854d478c94a Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 8 Apr 2021 07:54:35 -0700 Subject: Update dependencies --- global.json | 2 +- src/ca/vsca.vcxproj | 2 +- .../TestData/UsingVsixPackage/Package.wxs | 8 +++----- src/wixext/WixToolset.VisualStudio.wixext.csproj | 1 - src/wixlib/vs.wixproj | 1 - 5 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index e101f0d5..fc26eb6e 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0192" + "WixToolset.Sdk": "4.0.0-build-0206" } } diff --git a/src/ca/vsca.vcxproj b/src/ca/vsca.vcxproj index 80ff9ff1..f4fbcc46 100644 --- a/src/ca/vsca.vcxproj +++ b/src/ca/vsca.vcxproj @@ -48,7 +48,7 @@ - + diff --git a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs index e0e6f11e..c2196807 100644 --- a/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs +++ b/src/test/WixToolsetTest.VisualStudio/TestData/UsingVsixPackage/Package.wxs @@ -10,10 +10,8 @@ - - - - - + + + diff --git a/src/wixext/WixToolset.VisualStudio.wixext.csproj b/src/wixext/WixToolset.VisualStudio.wixext.csproj index 82aa0d1d..20282720 100644 --- a/src/wixext/WixToolset.VisualStudio.wixext.csproj +++ b/src/wixext/WixToolset.VisualStudio.wixext.csproj @@ -20,7 +20,6 @@ - diff --git a/src/wixlib/vs.wixproj b/src/wixlib/vs.wixproj index 40333913..db3e2cff 100644 --- a/src/wixlib/vs.wixproj +++ b/src/wixlib/vs.wixproj @@ -16,5 +16,4 @@ - -- cgit v1.2.3-55-g6feb From e137eef6a20999a37a137414b8c8b9a8f5af3cd4 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 20 Apr 2021 12:37:29 -0700 Subject: Integrate latest tooling --- global.json | 2 +- src/wixext/VSExtensionFactory.cs | 2 +- src/wixext/VSWindowsInstallerBackendBinderExtension.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/global.json b/global.json index fc26eb6e..23dd3fa6 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "msbuild-sdks": { - "WixToolset.Sdk": "4.0.0-build-0206" + "WixToolset.Sdk": "4.0.0-build-0211" } } diff --git a/src/wixext/VSExtensionFactory.cs b/src/wixext/VSExtensionFactory.cs index cc0d7314..c6e0cc31 100644 --- a/src/wixext/VSExtensionFactory.cs +++ b/src/wixext/VSExtensionFactory.cs @@ -8,7 +8,7 @@ namespace WixToolset.VisualStudio public class VSExtensionFactory : BaseExtensionFactory { - protected override IEnumerable ExtensionTypes => new[] + protected override IReadOnlyCollection ExtensionTypes => new[] { typeof(VSCompiler), typeof(VSExtensionData), diff --git a/src/wixext/VSWindowsInstallerBackendBinderExtension.cs b/src/wixext/VSWindowsInstallerBackendBinderExtension.cs index 825c8ca7..d0d8648c 100644 --- a/src/wixext/VSWindowsInstallerBackendBinderExtension.cs +++ b/src/wixext/VSWindowsInstallerBackendBinderExtension.cs @@ -8,6 +8,6 @@ namespace WixToolset.VisualStudio public class VSWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension { - public override IEnumerable TableDefinitions => VSTableDefinitions.All; + public override IReadOnlyCollection TableDefinitions => VSTableDefinitions.All; } } -- cgit v1.2.3-55-g6feb 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 (limited to 'src') 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