This commit is contained in:
Sean Hall 2019-02-03 14:43:56 -06:00
Родитель 72f3dceefa
Коммит 6f29d2fc2b
44 изменённых файлов: 1324 добавлений и 392 удалений

37
.editorconfig Normal file
Просмотреть файл

@ -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

61
Dependency.wixext.sln Normal file
Просмотреть файл

@ -0,0 +1,61 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2016
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dependencyca", "src\ca\dependencyca.vcxproj", "{B86AF46C-0F90-49CC-923F-A800B088D015}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "dependency", "src\wixlib\dependency.wixproj", "{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Dependency.wixext", "src\wixext\WixToolset.Dependency.wixext.csproj", "{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Dependency", "src\test\WixToolsetTest.Dependency\WixToolsetTest.Dependency.csproj", "{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|Any CPU.ActiveCfg = Debug|Win32
{B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|Any CPU.Build.0 = Debug|Win32
{B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|x86.ActiveCfg = Debug|Win32
{B86AF46C-0F90-49CC-923F-A800B088D015}.Debug|x86.Build.0 = Debug|Win32
{B86AF46C-0F90-49CC-923F-A800B088D015}.Release|Any CPU.ActiveCfg = Release|Win32
{B86AF46C-0F90-49CC-923F-A800B088D015}.Release|Any CPU.Build.0 = Release|Win32
{B86AF46C-0F90-49CC-923F-A800B088D015}.Release|x86.ActiveCfg = Release|Win32
{B86AF46C-0F90-49CC-923F-A800B088D015}.Release|x86.Build.0 = Release|Win32
{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|Any CPU.ActiveCfg = Debug|x86
{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|Any CPU.Build.0 = Debug|x86
{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|x86.ActiveCfg = Debug|x86
{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Debug|x86.Build.0 = Debug|x86
{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|Any CPU.ActiveCfg = Release|x86
{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|Any CPU.Build.0 = Release|x86
{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|x86.ActiveCfg = Release|x86
{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}.Release|x86.Build.0 = Release|x86
{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|x86.ActiveCfg = Debug|Any CPU
{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Debug|x86.Build.0 = Debug|Any CPU
{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|Any CPU.Build.0 = Release|Any CPU
{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|x86.ActiveCfg = Release|Any CPU
{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}.Release|x86.Build.0 = Release|Any CPU
{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|x86.ActiveCfg = Debug|Any CPU
{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Debug|x86.Build.0 = Debug|Any CPU
{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|Any CPU.Build.0 = Release|Any CPU
{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|x86.ActiveCfg = Release|Any CPU
{E2AB6AA2-359D-4305-92B0-D90C8F87AF9B}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {77F012B1-8E94-4F85-9450-066C6BD15000}
EndGlobalSection
EndGlobal

13
appveyor.cmd Normal file
Просмотреть файл

@ -0,0 +1,13 @@
@setlocal
@pushd %~dp0
nuget restore
msbuild -p:Configuration=Release -t:Restore
msbuild -p:Configuration=Release src\test\WixToolsetTest.Dependency\WixToolsetTest.Dependency.csproj
msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Dependency.wixext.csproj
@popd
@endlocal

42
appveyor.yml Normal file
Просмотреть файл

@ -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 2017
version: 0.0.0.{build}
configuration: Release
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
NUGET_XMLDOC_MODE: skip
build_script:
- appveyor.cmd
pull_requests:
do_not_increment_build_number: true
nuget:
disable_publish_on_pr: true
skip_branch_with_pr: true
skip_tags: true
artifacts:
- path: build\Release\**\*.nupkg
name: nuget
- path: build\Release\**\*.msi
name: msi
notifications:
- provider: Slack
incoming_webhook:
secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA=

16
nuget.config Normal file
Просмотреть файл

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="wixtoolset-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
<add key="wixtoolset-extensibility" value="https://ci.appveyor.com/nuget/wixtoolset-extensibility" />
<add key="wixtoolset-core" value="https://ci.appveyor.com/nuget/wixtoolset-core" />
<add key="wixtoolset-core-native" value="https://ci.appveyor.com/nuget/wixtoolset-core-native" />
<add key="wixtoolset-dtf" value="https://ci.appveyor.com/nuget/wixtoolset-dtf" />
<add key="wixtoolset-dutil" value="https://ci.appveyor.com/nuget/wixtoolset-dutil" />
<add key="wixtoolset-wcautil" value="https://ci.appveyor.com/nuget/wixtoolset-wcautil" />
<add key="wixtoolset-tools" value="https://ci.appveyor.com/nuget/wixtoolset-tools" />
<add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>

104
src/Cpp.Build.props Normal file
Просмотреть файл

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-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. -->
<Project>
<PropertyGroup>
<Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
<IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
<OutDir>$(OutputPath)$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'=='15.0'">
<WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
<WarningLevel>Level4</WarningLevel>
<AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
<CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention>
<TreatWarningAsError>true</TreatWarningAsError>
<ExceptionHandling>false</ExceptionHandling>
<AdditionalOptions>-YlprecompDefine</AdditionalOptions>
<AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) &gt; 4 ">true</MultiProcessorCompilation>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Lib>
<AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Link>
<SubSystem>$(ProjectSubSystem)</SubSystem>
<ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
<NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
<ClCompile>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
<ClCompile>
<CallingConvention>CDecl</CallingConvention>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
<ClCompile>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
<ClCompile>
<Optimization>Disabled</Optimization>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
<ClCompile>
<BasicRuntimeChecks></BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
<ClCompile>
<Optimization>MinSpace</Optimization>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
<ClCompile>
<BasicRuntimeChecks></BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
<Link>
<KeyFile>$(LinkKeyFile)</KeyFile>
<DelaySign>$(LinkDelaySign)</DelaySign>
</Link>
</ItemDefinitionGroup>
</Project>

28
src/Directory.Build.props Normal file
Просмотреть файл

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-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\Directory.Build.props
then update all of the repos.
-->
<Project>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
<MSBuildWarningsAsMessages>MSB3246</MSBuildWarningsAsMessages>
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
<BaseOutputPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</BaseOutputPath>
<BaseIntermediateOutputPath>$(BaseOutputPath)obj\$(ProjectName)\</BaseIntermediateOutputPath>
<OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
<Authors>WiX Toolset Team</Authors>
<Company>WiX Toolset</Company>
<Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright>
<PackageLicenseExpression>MS-RL</PackageLicenseExpression>
<Product>WiX Toolset</Product>
</PropertyGroup>
<Import Project="Cpp.Build.props" Condition=" Exists('Cpp.Build.props') And '$(MSBuildProjectExtension)'=='.vcxproj' " />
<Import Project="Wix.Build.props" Condition=" Exists('Wix.Build.props') And '$(MSBuildProjectExtension)'=='.wixproj' " />
<Import Project="Custom.Build.props" Condition=" Exists('Custom.Build.props') " />
</Project>

Просмотреть файл

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-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\Directory.Build.targets
then update all of the repos.
-->
<!--
Replace PackageReferences with ProjectReferences when the projects can be found in .sln.
See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
-->
<Project>
<PropertyGroup>
<ReplacePackageReferences>true</ReplacePackageReferences>
<TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
<TheSolutionPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalSolutionPath)</TheSolutionPath>
</PropertyGroup>
<Choose>
<When Condition="$(ReplacePackageReferences) AND '$(TheSolutionPath)' != '' AND '$(TheSolutionPath)' != '*undefined*' AND Exists('$(TheSolutionPath)')">
<PropertyGroup>
<SolutionFileContent>$([System.IO.File]::ReadAllText($(TheSolutionPath)))</SolutionFileContent>
<SmartSolutionDir>$([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) ))</SmartSolutionDir>
<RegexPattern>(?&lt;="[PackageName]", ")(.*)(?=", ")</RegexPattern>
</PropertyGroup>
<ItemGroup>
<!-- Keep the identity of the PackageReference -->
<SmartPackageReference Include="@(PackageReference)">
<PackageName>%(Identity)</PackageName>
<InSolution>$(SolutionFileContent.Contains('\%(Identity).csproj'))</InSolution>
</SmartPackageReference>
<!-- Filter them by mapping them to another ItemGroup using the WithMetadataValue item function -->
<PackageInSolution Include="@(SmartPackageReference->WithMetadataValue('InSolution', True))">
<Pattern>$(RegexPattern.Replace('[PackageName]','%(PackageName)') )</Pattern>
<SmartPath>$([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)'))</SmartPath>
</PackageInSolution>
<ProjectReference Include="@(PackageInSolution->'$(SmartSolutionDir)\%(SmartPath)' )"/>
<!-- Remove the package references that are now referenced as projects -->
<PackageReference Remove="@(PackageInSolution->'%(PackageName)' )"/>
</ItemGroup>
</When>
</Choose>
</Project>

8
src/FindLocalWix.props Normal file
Просмотреть файл

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-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. -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WixTargetsPath Condition=" '$(Configuration)' == 'Debug' And Exists('$(MSBuildThisFileDirectory)..\..\Tools\README.md') ">$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets</WixTargetsPath>
</PropertyGroup>
</Project>

5
src/ca/custommsierrors.h Normal file
Просмотреть файл

@ -0,0 +1,5 @@
#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.
#define msierrDependencyMissingDependencies 26451
#define msierrDependencyHasDependents 26452

Просмотреть файл

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-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. -->
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props')" />
<Import Project="..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B86AF46C-0F90-49CC-923F-A800B088D015}</ProjectGuid>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<TargetName>dependencyca</TargetName>
<ProjectModuleDefinitionFile>wixdepca.def</ProjectModuleDefinitionFile>
<Description>WiX Toolset Dependency CustomAction</Description>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="wixdepca.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="precomp.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="wixdepca.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props'))" />
<Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props'))" />
</Target>
</Project>

Просмотреть файл

@ -27,11 +27,6 @@
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="wixdepca.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="wixdepca.def">
<Filter>Source Files</Filter>

5
src/ca/packages.config Normal file
Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WixToolset.DUtil" version="4.0.16" targetFramework="native" />
<package id="WixToolset.WcaUtil" version="4.0.2" targetFramework="native" />
</packages>

Просмотреть файл

@ -1,7 +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 "wixdepca"
LIBRARY "dependencyca"
EXPORTS
WixDependencyRequire

Просмотреть файл

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="utf-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. -->
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B86AF46C-0F90-49CC-923F-A800B088D015}</ProjectGuid>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<TargetName>WixDepCA</TargetName>
<ProjectModuleDefinitionFile>wixdepca.def</ProjectModuleDefinitionFile>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.props" />
<PropertyGroup>
<ProjectAdditionalIncludeDirectories>$(WixRoot)src\libs\dutil\inc;$(WixRoot)src\libs\wcautil;$(WixRoot)src\libs\deputil\inc</ProjectAdditionalIncludeDirectories>
<ProjectAdditionalLinkLibraries>msi.lib;dutil.lib;deputil.lib;wcautil.lib</ProjectAdditionalLinkLibraries>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="wixdepca.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="precomp.h" />
</ItemGroup>
<ItemGroup>
<None Include="wixdepca.def" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="wixdepca.rc" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,32 @@
// 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.Dependency
{
using System.Linq;
using WixBuildTools.TestSupport;
using WixToolset.Core.TestPackage;
using WixToolset.Dependency;
using Xunit;
public class DependencyExtensionFixture
{
[Fact]
public void CanBuildUsingProvides()
{
var folder = TestData.Get(@"TestData\UsingProvides");
var build = new Builder(folder, typeof(DependencyExtensionFactory), new[] { folder });
var results = build.BuildAndQuery(Build, "WixDependencyProvider");
Assert.Equal(new[]
{
"WixDependencyProvider:depJQsOasf1FRUsKxq8THB9sXk8yws\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t0",
}, results.OrderBy(s => s).ToArray());
}
private static void Build(string[] args)
{
var result = WixRunner.Execute(args)
.AssertSuccess();
}
}
}

Просмотреть файл

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains the declaration of all the localizable strings.
-->
<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
<String Id="DowngradeError">A newer version of [ProductName] is already installed.</String>
<String Id="FeatureTitle">MsiPackage</String>
</WixLocalization>

Просмотреть файл

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
<Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
<MediaTemplate />
<Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="MsiPackage" />
</Directory>
</Directory>
</Fragment>
</Wix>

Просмотреть файл

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:dep="http://wixtoolset.org/schemas/v4/wxs/dependency">
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component>
<File Source="example.txt" />
<dep:Provides Key="UsingProvides" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>

Просмотреть файл

@ -0,0 +1 @@
This is example.txt.

Просмотреть файл

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-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. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<NoWarn>NU1701</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="TestData\UsingProvides\example.txt" CopyToOutputDirectory="PreserveNewest" />
<Content Include="TestData\UsingProvides\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
<Content Include="TestData\UsingProvides\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
<Content Include="TestData\UsingProvides\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\wixext\WixToolset.Dependency.wixext.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -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.Dependency
{
using System;
using WixToolset;

Просмотреть файл

@ -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.Dependency
{
using System;
using System.Collections.Generic;
@ -9,11 +9,12 @@ namespace WixToolset.Extensions
using System.Xml.Linq;
using WixToolset.Data;
using WixToolset.Extensibility;
using WixToolset.Extensibility.Data;
/// <summary>
/// The compiler for the WiX toolset dependency extension.
/// The compiler for the WiX Toolset Dependency Extension.
/// </summary>
public sealed class DependencyCompiler : CompilerExtension
public sealed class DependencyCompiler : BaseCompilerExtension
{
/// <summary>
/// Package type when parsing the Provides element.
@ -27,10 +28,7 @@ namespace WixToolset.Extensions
MsuPackage
}
public DependencyCompiler()
{
this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/dependency";
}
public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/dependency";
/// <summary>
/// Processes an attribute for the Compiler.
@ -38,24 +36,24 @@ namespace WixToolset.Extensions
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
/// <param name="parentElement">Parent element of attribute.</param>
/// <param name="attribute">Attribute to process.</param>
public override void ParseAttribute(XElement parentElement, XAttribute attribute, IDictionary<string, string> context)
public override void ParseAttribute(Intermediate intermediate, IntermediateSection section, XElement parentElement, XAttribute attribute, IDictionary<string, string> context)
{
SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(parentElement);
SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(parentElement);
switch (parentElement.Name.LocalName)
{
case "Bundle":
switch (attribute.Name.LocalName)
{
case "ProviderKey":
this.ParseProviderKeyAttribute(sourceLineNumbers, parentElement, attribute);
this.ParseProviderKeyAttribute(section, sourceLineNumbers, parentElement, attribute);
break;
default:
this.Core.UnexpectedAttribute(parentElement, attribute);
this.ParseHelper.UnexpectedAttribute(parentElement, attribute);
break;
}
break;
default:
this.Core.UnexpectedAttribute(parentElement, attribute);
this.ParseHelper.UnexpectedAttribute(parentElement, attribute);
break;
}
}
@ -67,7 +65,7 @@ namespace WixToolset.Extensions
/// <param name="parentElement">Parent element of element to process.</param>
/// <param name="element">Element to process.</param>
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context)
public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
{
PackageType packageType = PackageType.None;
@ -80,10 +78,10 @@ namespace WixToolset.Extensions
switch (element.Name.LocalName)
{
case "Requires":
this.ParseRequiresElement(element, null, false);
this.ParseRequiresElement(intermediate, section, element, null, false);
break;
default:
this.Core.UnexpectedElement(parentElement, element);
this.ParseHelper.UnexpectedElement(parentElement, element);
break;
}
break;
@ -100,7 +98,7 @@ namespace WixToolset.Extensions
packageType = PackageType.MsuPackage;
break;
default:
this.Core.UnexpectedElement(parentElement, element);
this.ParseHelper.UnexpectedElement(parentElement, element);
break;
}
@ -111,10 +109,10 @@ namespace WixToolset.Extensions
switch (element.Name.LocalName)
{
case "Provides":
this.ParseProvidesElement(element, packageType, packageId);
this.ParseProvidesElement(intermediate, section, element, packageType, packageId);
break;
default:
this.Core.UnexpectedElement(parentElement, element);
this.ParseHelper.UnexpectedElement(parentElement, element);
break;
}
}
@ -127,9 +125,9 @@ namespace WixToolset.Extensions
/// <param name="element">Element to process.</param>
/// <param name="context">Extra information about the context in which this element is being parsed.</param>
/// <returns>The component key path type if set.</returns>
public override ComponentKeyPath ParsePossibleKeyPathElement(XElement parentElement, XElement element, IDictionary<string, string> context)
public override ComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
{
SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(parentElement);
SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(parentElement);
ComponentKeyPath keyPath = null;
switch (parentElement.Name.LocalName)
@ -146,18 +144,18 @@ namespace WixToolset.Extensions
case "Provides":
if (win64)
{
this.Core.OnMessage(DependencyWarnings.Win64Component(sourceLineNumbers, componentId));
this.Messaging.Write(DependencyWarnings.Win64Component(sourceLineNumbers, componentId));
}
keyPath = this.ParseProvidesElement(element, PackageType.None, componentId);
keyPath = this.ParseProvidesElement(intermediate, section, element, PackageType.None, componentId);
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;
}
@ -170,7 +168,7 @@ namespace WixToolset.Extensions
/// <param name="sourceLineNumbers">Source line number for the parent element.</param>
/// <param name="parentElement">Parent element of attribute.</param>
/// <param name="attribute">The XML attribute for the ProviderKey attribute.</param>
private void ParseProviderKeyAttribute(SourceLineNumber sourceLineNumbers, XElement parentElement, XAttribute attribute)
private void ParseProviderKeyAttribute(IntermediateSection section, SourceLineNumber sourceLineNumbers, XElement parentElement, XAttribute attribute)
{
Identifier id = null;
string providerKey = null;
@ -179,41 +177,41 @@ namespace WixToolset.Extensions
switch (attribute.Name.LocalName)
{
case "ProviderKey":
providerKey = this.Core.GetAttributeValue(sourceLineNumbers, attribute);
providerKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attribute);
break;
default:
this.Core.UnexpectedAttribute(parentElement, attribute);
this.ParseHelper.UnexpectedAttribute(parentElement, attribute);
break;
}
// Make sure the key does not contain any illegal characters or values.
if (String.IsNullOrEmpty(providerKey))
{
this.Core.OnMessage(WixErrors.IllegalEmptyAttributeValue(sourceLineNumbers, parentElement.Name.LocalName, attribute.Name.LocalName));
this.Messaging.Write(ErrorMessages.IllegalEmptyAttributeValue(sourceLineNumbers, parentElement.Name.LocalName, attribute.Name.LocalName));
}
else if (0 <= (illegalChar = providerKey.IndexOfAny(DependencyCommon.InvalidCharacters)))
{
StringBuilder sb = new StringBuilder(DependencyCommon.InvalidCharacters.Length * 2);
Array.ForEach<char>(DependencyCommon.InvalidCharacters, c => sb.Append(c).Append(" "));
this.Core.OnMessage(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString()));
this.Messaging.Write(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString()));
}
else if ("ALL" == providerKey)
{
this.Core.OnMessage(DependencyErrors.ReservedValue(sourceLineNumbers, parentElement.Name.LocalName, "ProviderKey", providerKey));
this.Messaging.Write(DependencyErrors.ReservedValue(sourceLineNumbers, parentElement.Name.LocalName, "ProviderKey", providerKey));
}
// Generate the primary key for the row.
id = this.Core.CreateIdentifier("dep", attribute.Name.LocalName, providerKey);
id = this.ParseHelper.CreateIdentifier("dep", attribute.Name.LocalName, providerKey);
if (!this.Core.EncounteredError)
if (!this.Messaging.EncounteredError)
{
// Create the provider row for the bundle. The Component_ field is required
// in the table definition but unused for bundles, so just set it to the valid ID.
Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyProvider", id);
row[1] = id.Id;
row[2] = providerKey;
row[5] = DependencyCommon.ProvidesAttributesBundle;
var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyProvider", id);
row.Set(1, id.Id);
row.Set(2, providerKey);
row.Set(5, DependencyCommon.ProvidesAttributesBundle);
}
}
@ -225,9 +223,9 @@ namespace WixToolset.Extensions
/// <param name="keyPath">Explicit key path.</param>
/// <param name="parentId">The identifier of the parent component or package.</param>
/// <returns>The type of key path if set.</returns>
private ComponentKeyPath ParseProvidesElement(XElement node, PackageType packageType, string parentId)
private ComponentKeyPath ParseProvidesElement(Intermediate intermediate, IntermediateSection section, XElement node, PackageType packageType, string parentId)
{
SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
ComponentKeyPath keyPath = null;
Identifier id = null;
string key = null;
@ -243,25 +241,25 @@ namespace WixToolset.Extensions
switch (attrib.Name.LocalName)
{
case "Id":
id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
break;
case "Key":
key = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
key = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "Version":
version = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib);
version = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib);
break;
case "DisplayName":
displayName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
displayName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
break;
default:
this.Core.UnexpectedAttribute(node, attrib);
this.ParseHelper.UnexpectedAttribute(node, attrib);
break;
}
}
else
{
this.Core.ParseExtensionAttribute(node, attrib);
this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
}
}
@ -275,22 +273,22 @@ namespace WixToolset.Extensions
StringBuilder sb = new StringBuilder(DependencyCommon.InvalidCharacters.Length * 2);
Array.ForEach<char>(DependencyCommon.InvalidCharacters, c => sb.Append(c).Append(" "));
this.Core.OnMessage(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "Key", key[illegalChar], sb.ToString()));
this.Messaging.Write(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "Key", key[illegalChar], sb.ToString()));
}
else if ("ALL" == key)
{
this.Core.OnMessage(DependencyErrors.ReservedValue(sourceLineNumbers, node.Name.LocalName, "Key", key));
this.Messaging.Write(DependencyErrors.ReservedValue(sourceLineNumbers, node.Name.LocalName, "Key", key));
}
}
else if (PackageType.ExePackage == packageType || PackageType.MsuPackage == packageType)
{
// Must specify the provider key when authored for a package.
this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Key"));
}
else if (PackageType.None == packageType)
{
// Make sure the ProductCode is authored and set the key.
this.Core.CreateSimpleReference(sourceLineNumbers, "Property", "ProductCode");
this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Property", "ProductCode");
key = "!(bind.property.ProductCode)";
}
@ -300,23 +298,23 @@ namespace WixToolset.Extensions
switch (packageType)
{
case PackageType.None:
this.Core.OnMessage(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers));
this.Messaging.Write(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers));
break;
case PackageType.MsiPackage:
this.Core.OnMessage(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers, parentId));
this.Messaging.Write(DependencyWarnings.DiscouragedVersionAttribute(sourceLineNumbers, parentId));
break;
}
}
else if (PackageType.MspPackage == packageType || PackageType.MsuPackage == packageType)
{
// Must specify the Version when authored for packages that do not contain a version.
this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version"));
this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Version"));
}
// Need the element ID for child element processing, so generate now if not authored.
if (null == id)
{
id = this.Core.CreateIdentifier("dep", node.Name.LocalName, parentId, key);
id = this.ParseHelper.CreateIdentifier("dep", node.Name.LocalName, parentId, key);
}
foreach (XElement child in node.Elements())
@ -326,94 +324,93 @@ namespace WixToolset.Extensions
switch (child.Name.LocalName)
{
case "Requires":
this.ParseRequiresElement(child, id.Id, PackageType.None == packageType);
this.ParseRequiresElement(intermediate, section, child, id.Id, PackageType.None == packageType);
break;
case "RequiresRef":
this.ParseRequiresRefElement(child, id.Id, PackageType.None == packageType);
this.ParseRequiresRefElement(intermediate, section, child, id.Id, PackageType.None == packageType);
break;
default:
this.Core.UnexpectedElement(node, child);
this.ParseHelper.UnexpectedElement(node, child);
break;
}
}
else
{
this.Core.ParseExtensionElement(node, child);
this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child);
}
}
if (!this.Core.EncounteredError)
if (!this.Messaging.EncounteredError)
{
// Create the row in the provider table.
Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyProvider", id);
row[1] = parentId;
row[2] = key;
var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyProvider", id);
row.Set(1, parentId);
row.Set(2, key);
if (!String.IsNullOrEmpty(version))
{
row[3] = version;
row.Set(3, version);
}
if (!String.IsNullOrEmpty(displayName))
{
row[4] = displayName;
row.Set(4, displayName);
}
if (0 != attributes)
{
row[5] = attributes;
row.Set(5, attributes);
}
if (PackageType.None == packageType)
{
// Reference the Check custom action to check for dependencies on the current provider.
if (Platform.ARM == this.Core.CurrentPlatform)
if (Platform.ARM == this.Context.Platform)
{
// Ensure the ARM version of the CA is referenced.
this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyCheck_ARM");
this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyCheck_ARM");
}
else
{
// All other supported platforms use x86.
this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyCheck");
this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyCheck");
}
// Generate registry rows for the provider using binder properties.
string keyProvides = String.Concat(DependencyCommon.RegistryRoot, key);
row = this.Core.CreateRow(sourceLineNumbers, "Registry", this.Core.CreateIdentifier("reg", id.Id, "(Default)"));
row[1] = -1;
row[2] = keyProvides;
row[3] = null;
row[4] = "[ProductCode]";
row[5] = parentId;
row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", this.ParseHelper.CreateIdentifier("reg", id.Id, "(Default)"));
row.Set(1, -1);
row.Set(2, keyProvides);
row.Set(4, "[ProductCode]");
row.Set(5, parentId);
// Use the Version registry value and use that as a potential key path.
Identifier idVersion = this.Core.CreateIdentifier("reg", id.Id, "Version");
Identifier idVersion = this.ParseHelper.CreateIdentifier("reg", id.Id, "Version");
keyPath = new ComponentKeyPath() { Id = idVersion.Id, Explicit = false, Type = ComponentKeyPathType.Registry };
row = this.Core.CreateRow(sourceLineNumbers, "Registry", idVersion);
row[1] = -1;
row[2] = keyProvides;
row[3] = "Version";
row[4] = !String.IsNullOrEmpty(version) ? version : "[ProductVersion]";
row[5] = parentId;
row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", idVersion);
row.Set(1, -1);
row.Set(2, keyProvides);
row.Set(3, "Version");
row.Set(4, !String.IsNullOrEmpty(version) ? version : "[ProductVersion]");
row.Set(5, parentId);
row = this.Core.CreateRow(sourceLineNumbers, "Registry", this.Core.CreateIdentifier("reg", id.Id, "DisplayName"));
row[1] = -1;
row[2] = keyProvides;
row[3] = "DisplayName";
row[4] = !String.IsNullOrEmpty(displayName) ? displayName : "[ProductName]";
row[5] = parentId;
row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", this.ParseHelper.CreateIdentifier("reg", id.Id, "DisplayName"));
row.Set(1, -1);
row.Set(2, keyProvides);
row.Set(3, "DisplayName");
row.Set(4, !String.IsNullOrEmpty(displayName) ? displayName : "[ProductName]");
row.Set(5, parentId);
if (0 != attributes)
{
row = this.Core.CreateRow(sourceLineNumbers, "Registry", this.Core.CreateIdentifier("reg", id.Id, "Attributes"));
row[1] = -1;
row[2] = keyProvides;
row[3] = "Attributes";
row[4] = String.Concat("#", attributes.ToString(CultureInfo.InvariantCulture.NumberFormat));
row[5] = parentId;
row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Registry", this.ParseHelper.CreateIdentifier("reg", id.Id, "Attributes"));
row.Set(1, -1);
row.Set(2, keyProvides);
row.Set(3, "Attributes");
row.Set(4, String.Concat("#", attributes.ToString(CultureInfo.InvariantCulture.NumberFormat)));
row.Set(5, parentId);
}
}
}
@ -427,9 +424,9 @@ namespace WixToolset.Extensions
/// <param name="node">The XML node for the Requires element.</param>
/// <param name="providerId">The parent provider identifier.</param>
/// <param name="requiresAction">Whether the Requires custom action should be referenced.</param>
private void ParseRequiresElement(XElement node, string providerId, bool requiresAction)
private void ParseRequiresElement(Intermediate intermediate, IntermediateSection section, XElement node, string providerId, bool requiresAction)
{
SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
Identifier id = null;
string providerKey = null;
string minVersion = null;
@ -444,41 +441,41 @@ namespace WixToolset.Extensions
switch (attrib.Name.LocalName)
{
case "Id":
id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
break;
case "ProviderKey":
providerKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
providerKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
break;
case "Minimum":
minVersion = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib);
minVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib);
break;
case "Maximum":
maxVersion = this.Core.GetAttributeVersionValue(sourceLineNumbers, attrib);
maxVersion = this.ParseHelper.GetAttributeVersionValue(sourceLineNumbers, attrib);
break;
case "IncludeMinimum":
if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
{
attributes |= DependencyCommon.RequiresAttributesMinVersionInclusive;
}
break;
case "IncludeMaximum":
if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
{
attributes |= DependencyCommon.RequiresAttributesMaxVersionInclusive;
}
break;
default:
this.Core.UnexpectedAttribute(node, attrib);
this.ParseHelper.UnexpectedAttribute(node, attrib);
break;
}
}
else
{
this.Core.ParseExtensionAttribute(node, attrib);
this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
}
}
this.Core.ParseForExtensionElements(node);
this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
if (null == id)
{
@ -486,18 +483,18 @@ namespace WixToolset.Extensions
// element will be necessary and the Id attribute will be required.
if (!String.IsNullOrEmpty(providerId))
{
id = this.Core.CreateIdentifier("dep", node.Name.LocalName, providerKey);
id = this.ParseHelper.CreateIdentifier("dep", node.Name.LocalName, providerKey);
}
else
{
this.Core.OnMessage(WixErrors.ExpectedAttributeWhenElementNotUnderElement(sourceLineNumbers, node.Name.LocalName, "Id", "Provides"));
this.Messaging.Write(ErrorMessages.ExpectedAttributeWhenElementNotUnderElement(sourceLineNumbers, node.Name.LocalName, "Id", "Provides"));
id = Identifier.Invalid;
}
}
if (String.IsNullOrEmpty(providerKey))
{
this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProviderKey"));
this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ProviderKey"));
}
// Make sure the key does not contain any illegal characters.
else if (0 <= (illegalChar = providerKey.IndexOfAny(DependencyCommon.InvalidCharacters)))
@ -505,44 +502,44 @@ namespace WixToolset.Extensions
StringBuilder sb = new StringBuilder(DependencyCommon.InvalidCharacters.Length * 2);
Array.ForEach<char>(DependencyCommon.InvalidCharacters, c => sb.Append(c).Append(" "));
this.Core.OnMessage(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString()));
this.Messaging.Write(DependencyErrors.IllegalCharactersInProvider(sourceLineNumbers, "ProviderKey", providerKey[illegalChar], sb.ToString()));
}
if (!this.Core.EncounteredError)
if (!this.Messaging.EncounteredError)
{
// Reference the Require custom action if required.
if (requiresAction)
{
if (Platform.ARM == this.Core.CurrentPlatform)
if (Platform.ARM == this.Context.Platform)
{
// Ensure the ARM version of the CA is referenced.
this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM");
this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM");
}
else
{
// All other supported platforms use x86.
this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire");
this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire");
}
}
Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependency", id);
row[1] = providerKey;
row[2] = minVersion;
row[3] = maxVersion;
var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependency", id);
row.Set(1, providerKey);
row.Set(2, minVersion);
row.Set(3, maxVersion);
if (0 != attributes)
{
row[4] = attributes;
row.Set(4, attributes);
}
// Create the relationship between this WixDependency row and the WixDependencyProvider row.
if (!String.IsNullOrEmpty(providerId))
{
// Create the relationship between the WixDependency row and the parent WixDependencyProvider row.
row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyRef");
row[0] = providerId;
row[1] = id.Id;
row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyRef");
row.Set(0, providerId);
row.Set(1, id.Id);
}
}
}
@ -553,9 +550,9 @@ namespace WixToolset.Extensions
/// <param name="node">The XML node for the RequiresRef element.</param>
/// <param name="providerId">The parent provider identifier.</param>
/// <param name="requiresAction">Whether the Requires custom action should be referenced.</param>
private void ParseRequiresRefElement(XElement node, string providerId, bool requiresAction)
private void ParseRequiresRefElement(Intermediate intermediate, IntermediateSection section, XElement node, string providerId, bool requiresAction)
{
SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
string id = null;
foreach (XAttribute attrib in node.Attributes())
@ -565,50 +562,50 @@ namespace WixToolset.Extensions
switch (attrib.Name.LocalName)
{
case "Id":
id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
break;
default:
this.Core.UnexpectedAttribute(node, attrib);
this.ParseHelper.UnexpectedAttribute(node, attrib);
break;
}
}
else
{
this.Core.ParseExtensionAttribute(node, attrib);
this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
}
}
this.Core.ParseForExtensionElements(node);
this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
if (String.IsNullOrEmpty(id))
{
this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
}
if (!this.Core.EncounteredError)
if (!this.Messaging.EncounteredError)
{
// Reference the Require custom action if required.
if (requiresAction)
{
if (Platform.ARM == this.Core.CurrentPlatform)
if (Platform.ARM == this.Context.Platform)
{
// Ensure the ARM version of the CA is referenced.
this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM");
this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire_ARM");
}
else
{
// All other supported platforms use x86.
this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixDependencyRequire");
this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixDependencyRequire");
}
}
// Create a link dependency on the row that contains information we'll need during bind.
this.Core.CreateSimpleReference(sourceLineNumbers, "WixDependency", id);
this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixDependency", id);
// Create the relationship between the WixDependency row and the parent WixDependencyProvider row.
Row row = this.Core.CreateRow(sourceLineNumbers, "WixDependencyRef");
row[0] = providerId;
row[1] = id;
var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixDependencyRef");
row.Set(0, providerId);
row.Set(1, id);
}
}
}

Просмотреть файл

@ -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.Dependency
{
#if TODO_CONSIDER_DECOMPILER
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@ -342,4 +343,5 @@ namespace WixToolset.Extensions
}
}
}
#endif
}

Просмотреть файл

@ -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.
namespace WixToolset.Dependency
{
using System;
using System.Resources;
using WixToolset.Data;
public static class DependencyErrors
{
public static Message IllegalCharactersInProvider(SourceLineNumber sourceLineNumbers, string attributeName, Char illegalChar, string illegalChars)
{
return Message(sourceLineNumbers, Ids.IllegalCharactersInProvider, "The provider key authored into the {0} attribute contains an illegal character, '{1}'. Please author the provider key without any of the following characters: {2}", attributeName, illegalChar, illegalChars);
}
public static Message ReservedValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
{
return Message(sourceLineNumbers, Ids.ReservedValue, "The {0}/@{1} attribute value '{2}' is reserved and cannot be used here. Please choose a different value.", elementName, attributeName, attributeValue);
}
private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
{
return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
}
private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
{
return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args);
}
public enum Ids
{
IllegalCharactersInProvider = 5400,
ReservedValue = 5401,
}
}
}

Просмотреть файл

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="utf-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. -->
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProjectGuid>{A0B6D3F1-AE5E-423B-BA92-60C9926CA498}</ProjectGuid>
<AssemblyName>WixDependencyExtension</AssemblyName>
<OutputType>Library</OutputType>
<RootNamespace>WixToolset.Extensions</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="DependencyBinder.cs" />
<Compile Include="DependencyCommon.cs" />
<Compile Include="DependencyCompiler.cs" />
<Compile Include="DependencyDecompiler.cs" />
<Compile Include="DependencyExtensionData.cs" />
<EmbeddedFlattenedResource Include="Data\tables.xml">
<LogicalName>$(RootNamespace).Data.tables.xml</LogicalName>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedFlattenedResource>
<MsgGenSource Include="Data\messages.xml">
<ResourcesLogicalName>$(RootNamespace).Data.Messages.resources</ResourcesLogicalName>
</MsgGenSource>
<EmbeddedFlattenedResource Include="Xsd\Dependency.xsd">
<LogicalName>$(RootNamespace).Xsd.Dependency.xsd</LogicalName>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedFlattenedResource>
<XsdGenSource Include="Xsd\Dependency.xsd">
<CommonNamespace>WixToolset.Data.Serialize</CommonNamespace>
<Namespace>WixToolset.Extensions.Serialize.Dependency</Namespace>
</XsdGenSource>
<EmbeddedResource Include="$(OutputPath)Dependency.wixlib">
<Link>Data\Dependency.wixlib</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<ProjectReference Include="..\..\..\libs\WixToolset.Data\WixToolset.Data.csproj" />
<ProjectReference Include="..\..\..\libs\WixToolset.Extensibility\WixToolset.Extensibility.csproj" />
<ProjectReference Include="..\..\..\tools\wix\Wix.csproj" />
<ProjectReference Include="..\wixlib\DependencyExtension.wixproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
</Project>

Просмотреть файл

@ -1,64 +1,30 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
namespace WixToolset.Extensions
namespace WixToolset.Dependency
{
using System;
using System.Reflection;
using WixToolset.Data;
using WixToolset.Extensibility;
/// <summary>
/// The WiX toolset dependency extension.
/// The WiX Toolset Dependency Extension.
/// </summary>
public sealed class DependencyExtensionData : ExtensionData
public sealed class DependencyExtensionData : BaseExtensionData
{
/// <summary>
/// Gets the default culture.
/// </summary>
/// <value>The default culture.</value>
public override string DefaultCulture
public override string DefaultCulture => "en-US";
public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
{
get { return "en-us"; }
tupleDefinition = DependencyTupleDefinitions.ByName(name);
return tupleDefinition != null;
}
/// <summary>
/// Gets the optional table definitions for this extension.
/// </summary>
/// <value>The optional table definitions for this extension.</value>
public override TableDefinitionCollection TableDefinitions
public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
{
get
{
return DependencyExtensionData.GetExtensionTableDefinitions();
}
}
/// <summary>
/// Gets the library associated with this extension.
/// </summary>
/// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
/// <returns>The loaded library.</returns>
public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
{
return DependencyExtensionData.GetExtensionLibrary(tableDefinitions);
}
/// <summary>
/// Internal mechanism to access the extension's table definitions.
/// </summary>
/// <returns>Extension's table definitions.</returns>
internal static TableDefinitionCollection GetExtensionTableDefinitions()
{
return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml");
}
/// <summary>
/// Internal mechanism to access the extension's library.
/// </summary>
/// <returns>Extension's library.</returns>
internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
{
return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.Dependency.wixlib", tableDefinitions);
return Intermediate.Load(typeof(DependencyExtensionData).Assembly, "WixToolset.Dependency.dependency.wixlib", tupleDefinitions);
}
}
}

Просмотреть файл

@ -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.Dependency
{
using System;
using System.Collections.Generic;
using WixToolset.Extensibility;
public class DependencyExtensionFactory : BaseExtensionFactory
{
protected override IEnumerable<Type> ExtensionTypes => new[]
{
typeof(DependencyCompiler),
typeof(DependencyExtensionData),
typeof(DependencyWindowsInstallerBackendBinderExtension),
};
}
}

Просмотреть файл

@ -0,0 +1,60 @@
// 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.Dependency
{
using System;
using System.Resources;
using WixToolset.Data;
public static class DependencyWarnings
{
public static Message DiscouragedVersionAttribute(SourceLineNumber sourceLineNumbers)
{
return Message(sourceLineNumbers, Ids.DiscouragedVersionAttribute, "The Provides/@Version attribute should not be specified in an MSI package. The ProductVersion will be used by default.");
}
public static Message DiscouragedVersionAttribute(SourceLineNumber sourceLineNumbers, string id)
{
return Message(sourceLineNumbers, Ids.DiscouragedVersionAttribute, "The Provides/@Version attribute should not be specified for MSI package {0}. The ProductVersion will be used by default.", id);
}
public static Message PropertyRemoved(string name)
{
return Message(null, Ids.PropertyRemoved, "The property {0} was authored in the package with a value and will be removed. The property should not be authored.", name);
}
public static Message ProvidesKeyNotFound(SourceLineNumber sourceLineNumbers, string id)
{
return Message(sourceLineNumbers, Ids.ProvidesKeyNotFound, "The provider key with identifier {0} was not found in the WixDependencyProvider table. Related registry rows will not be removed from authoring.", id);
}
public static Message RequiresKeyNotFound(SourceLineNumber sourceLineNumbers, string id)
{
return Message(sourceLineNumbers, Ids.RequiresKeyNotFound, "The dependency key with identifier {0} was not found in the WixDependency table. Related registry rows will not be removed from authoring.", id);
}
public static Message Win64Component(SourceLineNumber sourceLineNumbers, string componentId)
{
return Message(sourceLineNumbers, Ids.Win64Component, "The Provides element should not be authored in the 64-bit component with identifier {0}. The dependency feature may not work if installing this package on 64-bit Windows operating systems prior to Windows 7 and Windows Server 2008 R2. Set the Component/@Win64 attribute to \"no\" to make sure the dependency feature works correctly on all supported operating systems.", componentId);
}
private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
{
return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
}
private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
{
return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args);
}
public enum Ids
{
ProvidesKeyNotFound = 5431,
RequiresKeyNotFound = 5432,
PropertyRemoved = 5433,
DiscouragedVersionAttribute = 5434,
Win64Component = 5435,
}
}
}

Просмотреть файл

@ -1,24 +1,35 @@
// 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.Dependency
{
using System;
using System.Collections.ObjectModel;
using System.Globalization;
using WixToolset.Data;
using System.Linq;
using System.Xml;
using WixToolset.Data.WindowsInstaller;
using WixToolset.Extensibility;
/// <summary>
/// The compiler for the WiX toolset dependency extension.
/// </summary>
public sealed class DependencyBinder : BinderExtension
public class DependencyWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension
{
private static readonly TableDefinition[] Tables = LoadTables();
protected override TableDefinition[] TableDefinitionsForTuples => Tables;
private static TableDefinition[] LoadTables()
{
using (var resourceStream = typeof(DependencyWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Dependency.tables.xml"))
using (var reader = XmlReader.Create(resourceStream))
{
var tables = TableDefinitionCollection.Load(reader);
return tables.ToArray();
}
}
#if TODO_TAG_BINDER_EXTENSION
private Output output;
/// <summary>
/// Called after all output changes occur and right before the output is bound into its final format.
/// </summary>
public override void Finish(Output output)
public void Finish(Output output)
{
// Only process MSI packages.
if (OutputType.Product != output.Type)
@ -165,5 +176,6 @@ namespace WixToolset.Extensions
return row.GetPrimaryKey('/');
}
}
#endif
}
}

Просмотреть файл

@ -0,0 +1,47 @@
// 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.Dependency
{
using System;
using WixToolset.Data;
public enum DependencyTupleDefinitionType
{
WixDependency,
WixDependencyProvider,
WixDependencyRef,
}
public static partial class DependencyTupleDefinitions
{
public static readonly Version Version = new Version("4.0.0");
public static IntermediateTupleDefinition ByName(string name)
{
if (!Enum.TryParse(name, out DependencyTupleDefinitionType type))
{
return null;
}
return ByType(type);
}
public static IntermediateTupleDefinition ByType(DependencyTupleDefinitionType type)
{
switch (type)
{
case DependencyTupleDefinitionType.WixDependency:
return DependencyTupleDefinitions.WixDependency;
case DependencyTupleDefinitionType.WixDependencyProvider:
return DependencyTupleDefinitions.WixDependencyProvider;
case DependencyTupleDefinitionType.WixDependencyRef:
return DependencyTupleDefinitions.WixDependencyRef;
default:
throw new ArgumentOutOfRangeException(nameof(type));
}
}
}
}

Просмотреть файл

@ -0,0 +1,87 @@
// 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.Dependency
{
using WixToolset.Data;
using WixToolset.Dependency.Tuples;
public static partial class DependencyTupleDefinitions
{
public static readonly IntermediateTupleDefinition WixDependencyProvider = new IntermediateTupleDefinition(
DependencyTupleDefinitionType.WixDependencyProvider.ToString(),
new[]
{
new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.WixDependencyProvider), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.Component_), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.ProviderKey), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.Version), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.DisplayName), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(WixDependencyProviderTupleFields.Attributes), IntermediateFieldType.Number),
},
typeof(WixDependencyProviderTuple));
}
}
namespace WixToolset.Dependency.Tuples
{
using WixToolset.Data;
public enum WixDependencyProviderTupleFields
{
WixDependencyProvider,
Component_,
ProviderKey,
Version,
DisplayName,
Attributes,
}
public class WixDependencyProviderTuple : IntermediateTuple
{
public WixDependencyProviderTuple() : base(DependencyTupleDefinitions.WixDependencyProvider, null, null)
{
}
public WixDependencyProviderTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependencyProvider, sourceLineNumber, id)
{
}
public IntermediateField this[WixDependencyProviderTupleFields index] => this.Fields[(int)index];
public string WixDependencyProvider
{
get => this.Fields[(int)WixDependencyProviderTupleFields.WixDependencyProvider].AsString();
set => this.Set((int)WixDependencyProviderTupleFields.WixDependencyProvider, value);
}
public string Component_
{
get => this.Fields[(int)WixDependencyProviderTupleFields.Component_].AsString();
set => this.Set((int)WixDependencyProviderTupleFields.Component_, value);
}
public string ProviderKey
{
get => this.Fields[(int)WixDependencyProviderTupleFields.ProviderKey].AsString();
set => this.Set((int)WixDependencyProviderTupleFields.ProviderKey, value);
}
public string Version
{
get => this.Fields[(int)WixDependencyProviderTupleFields.Version].AsString();
set => this.Set((int)WixDependencyProviderTupleFields.Version, value);
}
public string DisplayName
{
get => this.Fields[(int)WixDependencyProviderTupleFields.DisplayName].AsString();
set => this.Set((int)WixDependencyProviderTupleFields.DisplayName, value);
}
public int Attributes
{
get => this.Fields[(int)WixDependencyProviderTupleFields.Attributes].AsNumber();
set => this.Set((int)WixDependencyProviderTupleFields.Attributes, value);
}
}
}

Просмотреть файл

@ -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.Dependency
{
using WixToolset.Data;
using WixToolset.Dependency.Tuples;
public static partial class DependencyTupleDefinitions
{
public static readonly IntermediateTupleDefinition WixDependencyRef = new IntermediateTupleDefinition(
DependencyTupleDefinitionType.WixDependencyRef.ToString(),
new[]
{
new IntermediateFieldDefinition(nameof(WixDependencyRefTupleFields.WixDependencyProvider_), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(WixDependencyRefTupleFields.WixDependency_), IntermediateFieldType.String),
},
typeof(WixDependencyRefTuple));
}
}
namespace WixToolset.Dependency.Tuples
{
using WixToolset.Data;
public enum WixDependencyRefTupleFields
{
WixDependencyProvider_,
WixDependency_,
}
public class WixDependencyRefTuple : IntermediateTuple
{
public WixDependencyRefTuple() : base(DependencyTupleDefinitions.WixDependencyRef, null, null)
{
}
public WixDependencyRefTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependencyRef, sourceLineNumber, id)
{
}
public IntermediateField this[WixDependencyRefTupleFields index] => this.Fields[(int)index];
public string WixDependencyProvider_
{
get => this.Fields[(int)WixDependencyRefTupleFields.WixDependencyProvider_].AsString();
set => this.Set((int)WixDependencyRefTupleFields.WixDependencyProvider_, value);
}
public string WixDependency_
{
get => this.Fields[(int)WixDependencyRefTupleFields.WixDependency_].AsString();
set => this.Set((int)WixDependencyRefTupleFields.WixDependency_, value);
}
}
}

Просмотреть файл

@ -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.Dependency
{
using WixToolset.Data;
using WixToolset.Dependency.Tuples;
public static partial class DependencyTupleDefinitions
{
public static readonly IntermediateTupleDefinition WixDependency = new IntermediateTupleDefinition(
DependencyTupleDefinitionType.WixDependency.ToString(),
new[]
{
new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.WixDependency), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.ProviderKey), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.MinVersion), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.MaxVersion), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(WixDependencyTupleFields.Attributes), IntermediateFieldType.Number),
},
typeof(WixDependencyTuple));
}
}
namespace WixToolset.Dependency.Tuples
{
using WixToolset.Data;
public enum WixDependencyTupleFields
{
WixDependency,
ProviderKey,
MinVersion,
MaxVersion,
Attributes,
}
public class WixDependencyTuple : IntermediateTuple
{
public WixDependencyTuple() : base(DependencyTupleDefinitions.WixDependency, null, null)
{
}
public WixDependencyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DependencyTupleDefinitions.WixDependency, sourceLineNumber, id)
{
}
public IntermediateField this[WixDependencyTupleFields index] => this.Fields[(int)index];
public string WixDependency
{
get => this.Fields[(int)WixDependencyTupleFields.WixDependency].AsString();
set => this.Set((int)WixDependencyTupleFields.WixDependency, value);
}
public string ProviderKey
{
get => this.Fields[(int)WixDependencyTupleFields.ProviderKey].AsString();
set => this.Set((int)WixDependencyTupleFields.ProviderKey, value);
}
public string MinVersion
{
get => this.Fields[(int)WixDependencyTupleFields.MinVersion].AsString();
set => this.Set((int)WixDependencyTupleFields.MinVersion, value);
}
public string MaxVersion
{
get => this.Fields[(int)WixDependencyTupleFields.MaxVersion].AsString();
set => this.Set((int)WixDependencyTupleFields.MaxVersion, value);
}
public int Attributes
{
get => this.Fields[(int)WixDependencyTupleFields.Attributes].AsNumber();
set => this.Set((int)WixDependencyTupleFields.Attributes, value);
}
}
}

Просмотреть файл

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-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. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>WixToolset.Dependency</RootNamespace>
<Description>WiX Toolset Dependency Extension</Description>
<Title>WiX Toolset Dependency Extension</Title>
<IsTool>true</IsTool>
<ContentTargetFolders>build</ContentTargetFolders>
</PropertyGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileName).targets" />
<Content Include="dependency.xsd" PackagePath="tools" />
<EmbeddedResource Include="tables.xml" />
<EmbeddedResource Include="$(OutputPath)..\dependency.wixlib" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" />
<PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\wixlib\dependency.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-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. -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<WixToolsetDepedencyWixextPath Condition=" '$(WixToolsetDepedencyWixextPath)' == '' ">$(MSBuildThisFileDirectory)..\tools\WixToolset.Depedency.wixext.dll</WixToolsetDepedencyWixextPath>
</PropertyGroup>
<ItemGroup>
<WixExtension Include="$(WixToolsetDepedencyWixextPath)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,60 +0,0 @@
<?xml version='1.0' encoding='utf-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. -->
<Messages Namespace="WixToolset.Extensions" Resources="Data.Messages" xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages">
<Class Name="DependencyErrors" ContainerName="DependencyErrorEventArgs" BaseContainerName="MessageEventArgs">
<Message Id="IllegalCharactersInProvider" Number="5400">
<Instance>
The provider key authored into the {0} attribute contains an illegal character, '{1}'. Please author the provider key without any of the following characters: {2}
<Parameter Type="System.String" Name="attributeName" />
<Parameter Type="System.Char" Name="illegalChar" />
<Parameter Type="System.String" Name="illegalChars" />
</Instance>
</Message>
<Message Id="ReservedValue" Number="5401">
<Instance>
The {0}/@{1} attribute value '{2}' is reserved and cannot be used here. Please choose a different value.
<Parameter Type="System.String" Name="elementName" />
<Parameter Type="System.String" Name="attributeName" />
<Parameter Type="System.String" Name="attributeValue" />
</Instance>
</Message>
</Class>
<Class Name="DependencyWarnings" ContainerName="DependencyWarningEventArgs" BaseContainerName="MessageEventArgs">
<Message Id="ProvidesKeyNotFound" Number="5431">
<Instance>
The provider key with identifier {0} was not found in the WixDependencyProvider table. Related registry rows will not be removed from authoring.
<Parameter Type="System.String" Name="id" />
</Instance>
</Message>
<Message Id="RequiresKeyNotFound" Number="5432">
<Instance>
The dependency key with identifier {0} was not found in the WixDependency table. Related registry rows will not be removed from authoring.
<Parameter Type="System.String" Name="id" />
</Instance>
</Message>
<Message Id="PropertyRemoved" Number="5433" SourceLineNumbers="no">
<Instance>
The property {0} was authored in the package with a value and will be removed. The property should not be authored.
<Parameter Type="System.String" Name="name" />
</Instance>
</Message>
<Message Id="DiscouragedVersionAttribute" Number="5434">
<Instance>
The Provides/@Version attribute should not be specified in an MSI package. The ProductVersion will be used by default.
</Instance>
<Instance>
The Provides/@Version attribute should not be specified for MSI package {0}. The ProductVersion will be used by default.
<Parameter Type="System.String" Name="id" />
</Instance>
</Message>
<Message Id="Win64Component" Number="5435">
<Instance>
The Provides element should not be authored in the 64-bit component with identifier {0}. The dependency feature may not work if installing this package on 64-bit Windows operating systems prior to Windows 7 and Windows Server 2008 R2. Set the Component/@Win64 attribute to "no" to make sure the dependency feature works correctly on all supported operating systems.
<Parameter Type="System.String" Name="componentId" />
</Instance>
</Message>
</Class>
<Class Name="DependencyVerboses" ContainerName="DependencyVerboseEventArgs" BaseContainerName="MessageEventArgs" />
</Messages>

Просмотреть файл

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-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. -->
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<ProjectGuid>{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}</ProjectGuid>
<OutputName>dependency</OutputName>
<OutputType>Library</OutputType>
<BindFiles>true</BindFiles>
<Pedantic>true</Pedantic>
<SuppressSpecificWarnings>1086</SuppressSpecificWarnings>
<Cultures>en-us</Cultures>
</PropertyGroup>
<ItemGroup>
<Compile Include="DependencyExtension.wxs" />
<Compile Include="DependencyExtension_x86.wxs" />
<EmbeddedResource Include="en-us.wxl" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ca\wixdepca.vcxproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
</Project>

Просмотреть файл

@ -5,7 +5,7 @@
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include caSuffix.wxi ?>
<Fragment>
<CustomAction Id="WixDependencyRequire$(var.Suffix)" BinaryKey="WixDepCA$(var.Suffix)" DllEntry="WixDependencyRequire" Execute="immediate" Return="check" SuppressModularization="yes"/>
<CustomAction Id="WixDependencyRequire$(var.Suffix)" BinaryKey="DependencyCA$(var.Suffix)" DllEntry="WixDependencyRequire" Execute="immediate" Return="check" SuppressModularization="yes"/>
<InstallExecuteSequence>
<Custom Action="WixDependencyRequire$(var.Suffix)" Before="WixDependencyCheck$(var.Suffix)" Overridable="yes"><![CDATA[NOT DISABLEDEPENDENCYCHECK]]></Custom>
</InstallExecuteSequence>
@ -13,7 +13,7 @@
<PropertyRef Id="DISABLEDEPENDENCYCHECK"/>
</Fragment>
<Fragment>
<CustomAction Id="WixDependencyCheck$(var.Suffix)" BinaryKey="WixDepCA$(var.Suffix)" DllEntry="WixDependencyCheck" Execute="immediate" Return="check" SuppressModularization="yes"/>
<CustomAction Id="WixDependencyCheck$(var.Suffix)" BinaryKey="DependencyCA$(var.Suffix)" DllEntry="WixDependencyCheck" Execute="immediate" Return="check" SuppressModularization="yes"/>
<InstallExecuteSequence>
<Custom Action="WixDependencyCheck$(var.Suffix)" Before="InstallInitialize" Overridable="yes"><![CDATA[(REMOVE OR MsiPatchRemovalList) AND NOT (UPGRADINGPRODUCTCODE OR IGNOREDEPENDENCIES="ALL")]]></Custom>
</InstallExecuteSequence>
@ -21,6 +21,6 @@
<PropertyRef Id="IGNOREDEPENDENCIES"/>
</Fragment>
<Fragment>
<Binary Id="WixDepCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))wixdepca.dll"/>
<Binary Id="DependencyCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))dependencyca.dll"/>
</Fragment>
</Include>

28
src/wixlib/caSuffix.wxi Normal file
Просмотреть файл

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-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. -->
<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?ifndef platform ?>
<?error Required value "platform" not defined in include caSuffix.wxi ?>
<?endif ?>
<?ifdef Suffix ?>
<?undef Suffix ?>
<?undef DeferredSuffix ?>
<?endif ?>
<?if $(var.platform)="x86" ?>
<?define Suffix="" ?>
<?define DeferredSuffix="" ?>
<?endif ?>
<?if $(var.platform)="x64" ?>
<?define Suffix="_x64" ?>
<?define DeferredSuffix="_64" ?>
<?endif ?>
<?if $(var.platform)="arm" ?>
<?define Suffix="_ARM" ?>
<?define DeferredSuffix="_ARM" ?>
<?endif ?>
</Include>

96
src/wixlib/caerr.wxi Normal file
Просмотреть файл

@ -0,0 +1,96 @@
<Include>
<?define msierrSecureObjectsFailedCreateSD = 25520?>
<?define msierrSecureObjectsFailedSet = 25521?>
<?define msierrSecureObjectsUnknownType = 25522?>
<?define msierrXmlFileFailedRead = 25530?>
<?define msierrXmlFileFailedOpen = 25531?>
<?define msierrXmlFileFailedSelect = 25532?>
<?define msierrXmlFileFailedSave = 25533?>
<?define msierrXmlConfigFailedRead = 25540?>
<?define msierrXmlConfigFailedOpen = 25541?>
<?define msierrXmlConfigFailedSelect = 25542?>
<?define msierrXmlConfigFailedSave = 25543?>
<?define msierrFirewallCannotConnect = 25580?>
<?define msierrIISCannotConnect = 26001?>
<?define msierrIISFailedReadWebSite = 26002?>
<?define msierrIISFailedReadWebDirs = 26003?>
<?define msierrIISFailedReadVDirs = 26004?>
<?define msierrIISFailedReadFilters = 26005?>
<?define msierrIISFailedReadAppPool = 26006?>
<?define msierrIISFailedReadMimeMap = 26007?>
<?define msierrIISFailedReadProp = 26008?>
<?define msierrIISFailedReadWebSvcExt = 26009?>
<?define msierrIISFailedReadWebError = 26010?>
<?define msierrIISFailedReadHttpHeader = 26011?>
<?define msierrIISFailedSchedTransaction = 26031?>
<?define msierrIISFailedSchedInstallWebs = 26032?>
<?define msierrIISFailedSchedInstallWebDirs = 26033?>
<?define msierrIISFailedSchedInstallVDirs = 26034?>
<?define msierrIISFailedSchedInstallFilters = 26035?>
<?define msierrIISFailedSchedInstallAppPool = 26036?>
<?define msierrIISFailedSchedInstallProp = 26037?>
<?define msierrIISFailedSchedInstallWebSvcExt = 26038?>
<?define msierrIISFailedSchedUninstallWebs = 26051?>
<?define msierrIISFailedSchedUninstallWebDirs = 26052?>
<?define msierrIISFailedSchedUninstallVDirs = 26053?>
<?define msierrIISFailedSchedUninstallFilters = 26054?>
<?define msierrIISFailedSchedUninstallAppPool = 26055?>
<?define msierrIISFailedSchedUninstallProp = 26056?>
<?define msierrIISFailedSchedUninstallWebSvcExt = 26057?>
<?define msierrIISFailedStartTransaction = 26101?>
<?define msierrIISFailedOpenKey = 26102?>
<?define msierrIISFailedCreateKey = 26103?>
<?define msierrIISFailedWriteData = 26104?>
<?define msierrIISFailedCreateApp = 26105?>
<?define msierrIISFailedDeleteKey = 26106?>
<?define msierrIISFailedDeleteApp = 26107?>
<?define msierrIISFailedDeleteValue = 26108?>
<?define msierrIISFailedCommitInUse = 26109?>
<?define msierrSQLFailedCreateDatabase = 26201?>
<?define msierrSQLFailedDropDatabase = 26202?>
<?define msierrSQLFailedConnectDatabase = 26203?>
<?define msierrSQLFailedExecString = 26204?>
<?define msierrSQLDatabaseAlreadyExists = 26205?>
<?define msierrPERFMONFailedRegisterDLL = 26251?>
<?define msierrPERFMONFailedUnregisterDLL = 26252?>
<?define msierrInstallPerfCounterData = 26253?>
<?define msierrUninstallPerfCounterData = 26254?>
<?define msierrSMBFailedCreate = 26301?>
<?define msierrSMBFailedDrop = 26302?>
<?define msierrCERTFailedOpen = 26351?>
<?define msierrCERTFailedAdd = 26352?>
<?define msierrUSRFailedUserCreate = 26401?>
<?define msierrUSRFailedUserCreatePswd = 26402?>
<?define msierrUSRFailedUserGroupAdd = 26403?>
<?define msierrUSRFailedUserCreateExists = 26404?>
<?define msierrUSRFailedGrantLogonAsService = 26405?>
<?define msierrDependencyMissingDependencies = 26451?>
<?define msierrDependencyHasDependents = 26452?>
<?define msierrDotNetRuntimeRequired = 27000?>
<?define msierrComPlusCannotConnect = 28001?>
<?define msierrComPlusPartitionReadFailed = 28002?>
<?define msierrComPlusPartitionRoleReadFailed = 28003?>
<?define msierrComPlusUserInPartitionRoleReadFailed = 28004?>
<?define msierrComPlusPartitionUserReadFailed = 28005?>
<?define msierrComPlusApplicationReadFailed = 28006?>
<?define msierrComPlusApplicationRoleReadFailed = 28007?>
<?define msierrComPlusUserInApplicationRoleReadFailed = 28008?>
<?define msierrComPlusAssembliesReadFailed = 28009?>
<?define msierrComPlusSubscriptionReadFailed = 28010?>
<?define msierrComPlusPartitionDependency = 28011?>
<?define msierrComPlusPartitionNotFound = 28012?>
<?define msierrComPlusPartitionIdConflict = 28013?>
<?define msierrComPlusPartitionNameConflict = 28014?>
<?define msierrComPlusApplicationDependency = 28015?>
<?define msierrComPlusApplicationNotFound = 28016?>
<?define msierrComPlusApplicationIdConflict = 28017?>
<?define msierrComPlusApplicationNameConflict = 28018?>
<?define msierrComPlusApplicationRoleDependency = 28019?>
<?define msierrComPlusApplicationRoleNotFound = 28020?>
<?define msierrComPlusApplicationRoleConflict = 28021?>
<?define msierrComPlusAssemblyDependency = 28022?>
<?define msierrComPlusSubscriptionIdConflict = 28023?>
<?define msierrComPlusSubscriptionNameConflict = 28024?>
<?define msierrComPlusFailedLookupNames = 28025?>
<?define msierrMsmqCannotConnect = 28101?>
</Include>

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-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. -->
<Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
<Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" />
<Import Project="..\FindLocalWix.props" />
<PropertyGroup>
<ProjectGuid>{58ED0EC8-73F8-4EE1-8664-A53486D38EC8}</ProjectGuid>
<OutputName>dependency</OutputName>
<OutputType>Library</OutputType>
<BindFiles>true</BindFiles>
<Pedantic>true</Pedantic>
<SuppressSpecificWarnings>1086</SuppressSpecificWarnings>
<Cultures>en-us</Cultures>
</PropertyGroup>
<ItemGroup>
<Compile Include="DependencyExtension.wxs" />
<Compile Include="DependencyExtension_x86.wxs" />
<EmbeddedResource Include="en-us.wxl" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ca\dependencyca.vcxproj">
<Name>dependencyca</Name>
<Project>{B86AF46C-0F90-49CC-923F-A800B088D015}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="WiX Toolset build tools (v4.0 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." />
</Target>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
<Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props'))" />
</Target>
<Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
</Project>

Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" />
<package id="WixToolset.MSBuild" version="4.0.0-build-0005" developmentDependency="true" targetFramework="net40" />
</packages>

11
version.json Normal file
Просмотреть файл

@ -0,0 +1,11 @@
{
"version": "4.0",
"publicReleaseRefSpec": [
"^refs/heads/master$"
],
"cloudBuild": {
"buildNumber": {
"enabled": true
}
}
}