@joebigelow / wix / commits / 87527d58

Integrate into latest v4.

Sean Hall committed Jan 20, 2019 at 11:09 UTC 87527d58d18fa719dc7a5ce512369485d907cba4
42 files changed +1103 -264
.editorconfig new
+37
@@ -0,0 +1,37 @@
1 +# 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.
2 +#
3 +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig
4 +# then update all of the repos.
5 +
6 +root = true
7 +
8 +[*]
9 +charset = utf-8
10 +indent_style = space
11 +indent_size = 4
12 +trim_trailing_whitespace = true
13 +
14 +[*.{cs,vb}]
15 +dotnet_sort_system_directives_first = true
16 +
17 +[*.cs]
18 +csharp_indent_case_contents = true : error
19 +csharp_indent_switch_labels = true : error
20 +csharp_new_line_before_open_brace = all
21 +csharp_prefer_braces = true : error
22 +csharp_style_expression_bodied_methods = when_on_single_line : suggestion
23 +csharp_style_expression_bodied_constructors = when_on_single_line : suggestion
24 +csharp_style_expression_bodied_operators = when_on_single_line : suggestion
25 +csharp_style_expression_bodied_properties = when_on_single_line : suggestion
26 +csharp_style_expression_bodied_indexers = when_on_single_line : suggestion
27 +csharp_style_expression_bodied_accessors = when_on_single_line : suggestion
28 +csharp_style_var_elsewhere = true : suggestion
29 +csharp_style_var_for_built_in_types = true : suggestion
30 +csharp_style_var_when_type_is_apparent = true : suggestion
31 +dotnet_style_qualification_for_event = true : error
32 +dotnet_style_qualification_for_field = true : error
33 +dotnet_style_qualification_for_method = true : error
34 +dotnet_style_qualification_for_property = true : error
35 +
36 +[*.targets]
37 +indent_size = 2
Http.wixext.sln new
+61
@@ -0,0 +1,61 @@
1 +
2 +Microsoft Visual Studio Solution File, Format Version 12.00
3 +# Visual Studio 15
4 +VisualStudioVersion = 15.0.28010.2016
5 +MinimumVisualStudioVersion = 10.0.40219.1
6 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "httpca", "src\ca\httpca.vcxproj", "{90743805-C043-47C7-B5FF-8F5EE5C8A2DE}"
7 +EndProject
8 +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "http", "src\wixlib\http.wixproj", "{055C1517-4CED-4199-BCDE-A383E5C4EF78}"
9 +EndProject
10 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Http.wixext", "src\wixext\WixToolset.Http.wixext.csproj", "{AAFC3C7F-D818-4B1D-AF3F-A331EA917F3F}"
11 +EndProject
12 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Http", "src\test\WixToolsetTest.Http\WixToolsetTest.Http.csproj", "{6379EBAA-B5FE-4468-89A3-EF0B5D30B87E}"
13 +EndProject
14 +Global
15 + GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 + Debug|Any CPU = Debug|Any CPU
17 + Debug|x86 = Debug|x86
18 + Release|Any CPU = Release|Any CPU
19 + Release|x86 = Release|x86
20 + EndGlobalSection
21 + GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 + {90743805-C043-47C7-B5FF-8F5EE5C8A2DE}.Debug|Any CPU.ActiveCfg = Debug|Win32
23 + {90743805-C043-47C7-B5FF-8F5EE5C8A2DE}.Debug|Any CPU.Build.0 = Debug|Win32
24 + {90743805-C043-47C7-B5FF-8F5EE5C8A2DE}.Debug|x86.ActiveCfg = Debug|Win32
25 + {90743805-C043-47C7-B5FF-8F5EE5C8A2DE}.Debug|x86.Build.0 = Debug|Win32
26 + {90743805-C043-47C7-B5FF-8F5EE5C8A2DE}.Release|Any CPU.ActiveCfg = Release|Win32
27 + {90743805-C043-47C7-B5FF-8F5EE5C8A2DE}.Release|Any CPU.Build.0 = Release|Win32
28 + {90743805-C043-47C7-B5FF-8F5EE5C8A2DE}.Release|x86.ActiveCfg = Release|Win32
29 + {90743805-C043-47C7-B5FF-8F5EE5C8A2DE}.Release|x86.Build.0 = Release|Win32
30 + {055C1517-4CED-4199-BCDE-A383E5C4EF78}.Debug|Any CPU.ActiveCfg = Debug|x86
31 + {055C1517-4CED-4199-BCDE-A383E5C4EF78}.Debug|Any CPU.Build.0 = Debug|x86
32 + {055C1517-4CED-4199-BCDE-A383E5C4EF78}.Debug|x86.ActiveCfg = Debug|x86
33 + {055C1517-4CED-4199-BCDE-A383E5C4EF78}.Debug|x86.Build.0 = Debug|x86
34 + {055C1517-4CED-4199-BCDE-A383E5C4EF78}.Release|Any CPU.ActiveCfg = Release|x86
35 + {055C1517-4CED-4199-BCDE-A383E5C4EF78}.Release|Any CPU.Build.0 = Release|x86
36 + {055C1517-4CED-4199-BCDE-A383E5C4EF78}.Release|x86.ActiveCfg = Release|x86
37 + {055C1517-4CED-4199-BCDE-A383E5C4EF78}.Release|x86.Build.0 = Release|x86
38 + {AAFC3C7F-D818-4B1D-AF3F-A331EA917F3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39 + {AAFC3C7F-D818-4B1D-AF3F-A331EA917F3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
40 + {AAFC3C7F-D818-4B1D-AF3F-A331EA917F3F}.Debug|x86.ActiveCfg = Debug|Any CPU
41 + {AAFC3C7F-D818-4B1D-AF3F-A331EA917F3F}.Debug|x86.Build.0 = Debug|Any CPU
42 + {AAFC3C7F-D818-4B1D-AF3F-A331EA917F3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
43 + {AAFC3C7F-D818-4B1D-AF3F-A331EA917F3F}.Release|Any CPU.Build.0 = Release|Any CPU
44 + {AAFC3C7F-D818-4B1D-AF3F-A331EA917F3F}.Release|x86.ActiveCfg = Release|Any CPU
45 + {AAFC3C7F-D818-4B1D-AF3F-A331EA917F3F}.Release|x86.Build.0 = Release|Any CPU
46 + {6379EBAA-B5FE-4468-89A3-EF0B5D30B87E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47 + {6379EBAA-B5FE-4468-89A3-EF0B5D30B87E}.Debug|Any CPU.Build.0 = Debug|Any CPU
48 + {6379EBAA-B5FE-4468-89A3-EF0B5D30B87E}.Debug|x86.ActiveCfg = Debug|Any CPU
49 + {6379EBAA-B5FE-4468-89A3-EF0B5D30B87E}.Debug|x86.Build.0 = Debug|Any CPU
50 + {6379EBAA-B5FE-4468-89A3-EF0B5D30B87E}.Release|Any CPU.ActiveCfg = Release|Any CPU
51 + {6379EBAA-B5FE-4468-89A3-EF0B5D30B87E}.Release|Any CPU.Build.0 = Release|Any CPU
52 + {6379EBAA-B5FE-4468-89A3-EF0B5D30B87E}.Release|x86.ActiveCfg = Release|Any CPU
53 + {6379EBAA-B5FE-4468-89A3-EF0B5D30B87E}.Release|x86.Build.0 = Release|Any CPU
54 + EndGlobalSection
55 + GlobalSection(SolutionProperties) = preSolution
56 + HideSolutionNode = FALSE
57 + EndGlobalSection
58 + GlobalSection(ExtensibilityGlobals) = postSolution
59 + SolutionGuid = {570B1B57-B310-4493-A3A3-B40D7374EFC3}
60 + EndGlobalSection
61 +EndGlobal
appveyor.cmd new
+13
@@ -0,0 +1,13 @@
1 +@setlocal
2 +@pushd %~dp0
3 +
4 +nuget restore
5 +
6 +msbuild -p:Configuration=Release -t:Restore
7 +
8 +msbuild -p:Configuration=Release src\test\WixToolsetTest.Http\WixToolsetTest.Http.csproj
9 +
10 +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Http.wixext.csproj
11 +
12 +@popd
13 +@endlocal
\ No newline at end of file
appveyor.yml new
+35
@@ -0,0 +1,35 @@
1 +# 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.
2 +#
3 +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml
4 +# then update all of the repos.
5 +
6 +image: Visual Studio 2017
7 +
8 +version: 0.0.0.{build}
9 +configuration: Release
10 +
11 +environment:
12 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
13 + DOTNET_CLI_TELEMETRY_OPTOUT: 1
14 + NUGET_XMLDOC_MODE: skip
15 +
16 +build_script:
17 + - appveyor.cmd
18 +
19 +pull_requests:
20 + do_not_increment_build_number: true
21 +
22 +nuget:
23 + disable_publish_on_pr: true
24 +
25 +skip_branch_with_pr: true
26 +skip_tags: true
27 +
28 +artifacts:
29 +- path: build\Release\**\*.nupkg
30 + name: nuget
31 +
32 +notifications:
33 +- provider: Slack
34 + incoming_webhook:
35 + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA=
nuget.config new
+16
@@ -0,0 +1,16 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<configuration>
3 + <packageSources>
4 + <clear />
5 + <add key="wixtoolset-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
6 + <add key="wixtoolset-extensibility" value="https://ci.appveyor.com/nuget/wixtoolset-extensibility" />
7 + <add key="wixtoolset-core" value="https://ci.appveyor.com/nuget/wixtoolset-core" />
8 + <add key="wixtoolset-core-native" value="https://ci.appveyor.com/nuget/wixtoolset-core-native" />
9 + <add key="wixtoolset-dtf" value="https://ci.appveyor.com/nuget/wixtoolset-dtf" />
10 + <add key="wixtoolset-dutil" value="https://ci.appveyor.com/nuget/wixtoolset-dutil" />
11 + <add key="wixtoolset-wcautil" value="https://ci.appveyor.com/nuget/wixtoolset-wcautil" />
12 + <add key="wixtoolset-tools" value="https://ci.appveyor.com/nuget/wixtoolset-tools" />
13 + <add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
14 + <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
15 + </packageSources>
16 +</configuration>
\ No newline at end of file
src/Cpp.Build.props new
+104
@@ -0,0 +1,104 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project>
5 + <PropertyGroup>
6 + <Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7 + <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
8 + <OutDir>$(OutputPath)$(Platform)\</OutDir>
9 + </PropertyGroup>
10 +
11 + <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'=='15.0'">
12 + <WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
13 + </PropertyGroup>
14 +
15 + <ItemDefinitionGroup>
16 + <ClCompile>
17 + <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
18 + <WarningLevel>Level4</WarningLevel>
19 + <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
20 + <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
21 + <PrecompiledHeader>Use</PrecompiledHeader>
22 + <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
23 + <CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention>
24 + <TreatWarningAsError>true</TreatWarningAsError>
25 + <ExceptionHandling>false</ExceptionHandling>
26 + <AdditionalOptions>-YlprecompDefine</AdditionalOptions>
27 + <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
28 + <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) &gt; 4 ">true</MultiProcessorCompilation>
29 + </ClCompile>
30 + <ResourceCompile>
31 + <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
32 + <AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
33 + </ResourceCompile>
34 + <Lib>
35 + <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
36 + </Lib>
37 + <Link>
38 + <SubSystem>$(ProjectSubSystem)</SubSystem>
39 + <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
40 + <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
41 + <GenerateDebugInformation>true</GenerateDebugInformation>
42 + <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
43 + <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
44 + <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
45 + </Link>
46 + </ItemDefinitionGroup>
47 +
48 + <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
49 + <ClCompile>
50 + <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
51 + </ClCompile>
52 + </ItemDefinitionGroup>
53 + <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
54 + <ClCompile>
55 + <CallingConvention>CDecl</CallingConvention>
56 + </ClCompile>
57 + </ItemDefinitionGroup>
58 + <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
59 + <ClCompile>
60 + <DebugInformationFormat>OldStyle</DebugInformationFormat>
61 + <OmitDefaultLibName>true</OmitDefaultLibName>
62 + <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
63 + </ClCompile>
64 + </ItemDefinitionGroup>
65 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
66 + <ClCompile>
67 + <Optimization>Disabled</Optimization>
68 + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
69 + <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
70 + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
71 + </ClCompile>
72 + </ItemDefinitionGroup>
73 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
74 + <ClCompile>
75 + <BasicRuntimeChecks></BasicRuntimeChecks>
76 + <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
77 + </ClCompile>
78 + </ItemDefinitionGroup>
79 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
80 + <ClCompile>
81 + <Optimization>MinSpace</Optimization>
82 + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
83 + <FunctionLevelLinking>true</FunctionLevelLinking>
84 + <IntrinsicFunctions>true</IntrinsicFunctions>
85 + <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
86 + </ClCompile>
87 + <Link>
88 + <EnableCOMDATFolding>true</EnableCOMDATFolding>
89 + <OptimizeReferences>true</OptimizeReferences>
90 + </Link>
91 + </ItemDefinitionGroup>
92 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
93 + <ClCompile>
94 + <BasicRuntimeChecks></BasicRuntimeChecks>
95 + <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
96 + </ClCompile>
97 + </ItemDefinitionGroup>
98 + <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
99 + <Link>
100 + <KeyFile>$(LinkKeyFile)</KeyFile>
101 + <DelaySign>$(LinkDelaySign)</DelaySign>
102 + </Link>
103 + </ItemDefinitionGroup>
104 +</Project>
src/Directory.Build.props new
+26
@@ -0,0 +1,26 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +<!--
4 + Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.props
5 + then update all of the repos.
6 +-->
7 +<Project>
8 + <PropertyGroup>
9 + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10 + <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
11 +
12 + <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
13 + <BaseOutputPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</BaseOutputPath>
14 + <BaseIntermediateOutputPath>$(BaseOutputPath)obj\$(ProjectName)\</BaseIntermediateOutputPath>
15 + <OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
16 +
17 + <Authors>WiX Toolset Team</Authors>
18 + <Company>WiX Toolset</Company>
19 + <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright>
20 + <PackageLicenseExpression>MS-RL</PackageLicenseExpression>
21 + <Product>WiX Toolset</Product>
22 + </PropertyGroup>
23 +
24 + <Import Project="Cpp.Build.props" Condition=" '$(MSBuildProjectExtension)'=='.vcxproj' " />
25 + <Import Project="Custom.Build.props" Condition=" Exists('Custom.Build.props') " />
26 +</Project>
src/Directory.Build.targets new
+48
@@ -0,0 +1,48 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +<!--
4 + Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.targets
5 + then update all of the repos.
6 +-->
7 +<!--
8 + Replace PackageReferences with ProjectReferences when the projects can be found in .sln.
9 + See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
10 +-->
11 +<Project>
12 + <PropertyGroup>
13 + <ReplacePackageReferences>true</ReplacePackageReferences>
14 + <TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
15 + <TheSolutionPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalSolutionPath)</TheSolutionPath>
16 + </PropertyGroup>
17 +
18 + <Choose>
19 + <When Condition="$(ReplacePackageReferences) AND '$(TheSolutionPath)' != '' AND '$(TheSolutionPath)' != '*undefined*' AND Exists('$(TheSolutionPath)')">
20 +
21 + <PropertyGroup>
22 + <SolutionFileContent>$([System.IO.File]::ReadAllText($(TheSolutionPath)))</SolutionFileContent>
23 + <SmartSolutionDir>$([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) ))</SmartSolutionDir>
24 + <RegexPattern>(?&lt;="[PackageName]", ")(.*)(?=", ")</RegexPattern>
25 + </PropertyGroup>
26 +
27 + <ItemGroup>
28 + <!-- Keep the identity of the PackageReference -->
29 + <SmartPackageReference Include="@(PackageReference)">
30 + <PackageName>%(Identity)</PackageName>
31 + <InSolution>$(SolutionFileContent.Contains('\%(Identity).csproj'))</InSolution>
32 + </SmartPackageReference>
33 +
34 + <!-- Filter them by mapping them to another ItemGroup using the WithMetadataValue item function -->
35 + <PackageInSolution Include="@(SmartPackageReference->WithMetadataValue('InSolution', True))">
36 + <Pattern>$(RegexPattern.Replace('[PackageName]','%(PackageName)') )</Pattern>
37 + <SmartPath>$([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)'))</SmartPath>
38 + </PackageInSolution>
39 +
40 + <ProjectReference Include="@(PackageInSolution->'$(SmartSolutionDir)\%(SmartPath)' )"/>
41 +
42 + <!-- Remove the package references that are now referenced as projects -->
43 + <PackageReference Remove="@(PackageInSolution->'%(PackageName)' )"/>
44 + </ItemGroup>
45 +
46 + </When>
47 + </Choose>
48 +</Project>
src/FindLocalWix.props new
+8
@@ -0,0 +1,8 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 + <PropertyGroup>
6 + <WixTargetsPath Condition=" '$(Configuration)' == 'Debug' And Exists('$(MSBuildThisFileDirectory)..\..\Tools\README.md') ">$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets</WixTargetsPath>
7 + </PropertyGroup>
8 +</Project>
src/ca/httpca.vcxproj new
+62
@@ -0,0 +1,62 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 + <Import Project="..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props')" />
6 + <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" />
7 +
8 + <ItemGroup Label="ProjectConfigurations">
9 + <ProjectConfiguration Include="Debug|Win32">
10 + <Configuration>Debug</Configuration>
11 + <Platform>Win32</Platform>
12 + </ProjectConfiguration>
13 + <ProjectConfiguration Include="Release|Win32">
14 + <Configuration>Release</Configuration>
15 + <Platform>Win32</Platform>
16 + </ProjectConfiguration>
17 + </ItemGroup>
18 +
19 + <PropertyGroup Label="Globals">
20 + <ProjectGuid>{90743805-C043-47C7-B5FF-8F5EE5C8A2DE}</ProjectGuid>
21 + <ConfigurationType>DynamicLibrary</ConfigurationType>
22 + <PlatformToolset>v141</PlatformToolset>
23 + <CharacterSet>Unicode</CharacterSet>
24 + <TargetName>httpca</TargetName>
25 + <ProjectModuleDefinitionFile>wixhttpca.def</ProjectModuleDefinitionFile>
26 + <Description>WiX Toolset Http CustomAction</Description>
27 + </PropertyGroup>
28 +
29 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
30 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
31 +
32 + <PropertyGroup>
33 + <ProjectAdditionalLinkLibraries>crypt32.lib;httpapi.lib;msi.lib</ProjectAdditionalLinkLibraries>
34 + </PropertyGroup>
35 +
36 + <ItemGroup>
37 + <ClCompile Include="dllmain.cpp">
38 + <PrecompiledHeader>Create</PrecompiledHeader>
39 + </ClCompile>
40 + <ClCompile Include="wixhttpca.cpp" />
41 + </ItemGroup>
42 +
43 + <ItemGroup>
44 + <ClInclude Include="cost.h" />
45 + <ClInclude Include="precomp.h" />
46 + </ItemGroup>
47 +
48 + <ItemGroup>
49 + <None Include="packages.config" />
50 + <None Include="wixhttpca.def" />
51 + </ItemGroup>
52 +
53 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
54 +
55 + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
56 + <PropertyGroup>
57 + <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>
58 + </PropertyGroup>
59 + <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props'))" />
60 + <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'))" />
61 + </Target>
62 +</Project>
src/ca/httpca.vcxproj.filters renamed
-5
@@ -27,11 +27,6 @@
27 <Filter>Header Files</Filter>
28 </ClInclude>
29 </ItemGroup>
30 - <ItemGroup>
31 - <ResourceCompile Include="wixhttpca.rc">
32 - <Filter>Resource Files</Filter>
33 - </ResourceCompile>
34 - </ItemGroup>
30 <ItemGroup>
31 <None Include="wixhttpca.def">
32 <Filter>Source Files</Filter>
src/ca/packages.config new
+5
@@ -0,0 +1,5 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<packages>
3 + <package id="WixToolset.DUtil" version="4.0.6" targetFramework="native" />
4 + <package id="WixToolset.WcaUtil" version="4.0.2" targetFramework="native" />
5 +</packages>
\ No newline at end of file
src/ca/precomp.h
-1
@@ -13,5 +13,4 @@
13 #include "strutil.h"
14 #include "aclutil.h"
15
16 -#include "CustomMsiErrors.h"
16 #include "cost.h"
src/ca/wixhttpca.def
+1 -1
@@ -1,7 +1,7 @@
1 ; 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.
2
3
4 -LIBRARY "wixhttpca"
4 +LIBRARY "httpca"
5
6 EXPORTS
7 SchedHttpUrlReservationsInstall
src/ca/wixhttpca.vcxproj deleted
-58
@@ -1,58 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<!-- 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. -->
3 -
4 -
5 -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 - <ItemGroup Label="ProjectConfigurations">
7 - <ProjectConfiguration Include="Debug|Win32">
8 - <Configuration>Debug</Configuration>
9 - <Platform>Win32</Platform>
10 - </ProjectConfiguration>
11 - <ProjectConfiguration Include="Release|Win32">
12 - <Configuration>Release</Configuration>
13 - <Platform>Win32</Platform>
14 - </ProjectConfiguration>
15 - </ItemGroup>
16 - <ItemGroup Label="ProjectConfigurations">
17 - <ProjectConfiguration Include="Debug|ARM">
18 - <Configuration>Debug</Configuration>
19 - <Platform>ARM</Platform>
20 - </ProjectConfiguration>
21 - <ProjectConfiguration Include="Release|ARM">
22 - <Configuration>Release</Configuration>
23 - <Platform>ARM</Platform>
24 - </ProjectConfiguration>
25 - </ItemGroup>
26 -
27 - <PropertyGroup Label="Globals">
28 - <ProjectGuid>{90743805-C043-47C7-B5FF-8F5EE5C8A2DE}</ProjectGuid>
29 - <ConfigurationType>DynamicLibrary</ConfigurationType>
30 - <CharacterSet>Unicode</CharacterSet>
31 - <TargetName>wixhttpca</TargetName>
32 - <ProjectModuleDefinitionFile>wixhttpca.def</ProjectModuleDefinitionFile>
33 - </PropertyGroup>
34 -
35 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.props" />
36 -
37 - <PropertyGroup>
38 - <ProjectAdditionalIncludeDirectories>$(WixRoot)src\libs\dutil\inc;$(WixRoot)src\libs\wcautil</ProjectAdditionalIncludeDirectories>
39 - <ProjectAdditionalLinkLibraries>crypt32.lib;httpapi.lib;msi.lib;dutil.lib;wcautil.lib</ProjectAdditionalLinkLibraries>
40 - </PropertyGroup>
41 -
42 - <ItemGroup>
43 - <ClCompile Include="dllmain.cpp" />
44 - <ClCompile Include="wixhttpca.cpp" />
45 - </ItemGroup>
46 - <ItemGroup>
47 - <ClInclude Include="cost.h" />
48 - <ClInclude Include="precomp.h" />
49 - </ItemGroup>
50 - <ItemGroup>
51 - <None Include="wixhttpca.def" />
52 - </ItemGroup>
53 - <ItemGroup>
54 - <ResourceCompile Include="wixhttpca.rc" />
55 - </ItemGroup>
56 -
57 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
58 -</Project>
src/test/WixToolsetTest.Http/HttpExtensionFixture.cs new
+33
@@ -0,0 +1,33 @@
1 +// 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.
2 +
3 +namespace WixToolsetTest.Http
4 +{
5 + using System.Linq;
6 + using WixBuildTools.TestSupport;
7 + using WixToolset.Core.TestPackage;
8 + using WixToolset.Http;
9 + using Xunit;
10 +
11 + public class HttpExtensionFixture
12 + {
13 + [Fact]
14 + public void CanBuildUsingMessageQueue()
15 + {
16 + var folder = TestData.Get(@"TestData\UsingUrlReservation");
17 + var build = new Builder(folder, typeof(HttpExtensionFactory), new[] { folder });
18 +
19 + var results = build.BuildAndQuery(Build, "WixHttpUrlAce", "WixHttpUrlReservation");
20 + Assert.Equal(new[]
21 + {
22 + "WixHttpUrlAce:ace3u9zYtPm8dLIoYgB0bARb0dbB9w\turlt8sDcF469vDrZNldk0moxI25IGM\tNT SERVICE\\TestService\t268435456",
23 + "WixHttpUrlReservation:urlt8sDcF469vDrZNldk0moxI25IGM\t0\t\thttp://+:80/vroot/\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo",
24 + }, results.OrderBy(s => s).ToArray());
25 + }
26 +
27 + private static void Build(string[] args)
28 + {
29 + var result = WixRunner.Execute(args)
30 + .AssertSuccess();
31 + }
32 + }
33 +}
src/test/WixToolsetTest.Http/TestData/UsingUrlReservation/Package.en-us.wxl new
+11
@@ -0,0 +1,11 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +
3 +<!--
4 +This file contains the declaration of all the localizable strings.
5 +-->
6 +<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7 +
8 + <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String>
9 + <String Id="FeatureTitle">MsiPackage</String>
10 +
11 +</WixLocalization>
src/test/WixToolsetTest.Http/TestData/UsingUrlReservation/Package.wxs new
+22
@@ -0,0 +1,22 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
4 + <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" />
5 +
6 + <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7 + <MediaTemplate />
8 +
9 + <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
10 + <ComponentGroupRef Id="ProductComponents" />
11 + </Feature>
12 +
13 + </Product>
14 +
15 + <Fragment>
16 + <Directory Id="TARGETDIR" Name="SourceDir">
17 + <Directory Id="ProgramFilesFolder">
18 + <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
19 + </Directory>
20 + </Directory>
21 + </Fragment>
22 +</Wix>
src/test/WixToolsetTest.Http/TestData/UsingUrlReservation/PackageComponents.wxs new
+16
@@ -0,0 +1,16 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 + xmlns:http="http://wixtoolset.org/schemas/v4/wxs/http">
4 + <Fragment>
5 + <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
6 + <Component>
7 + <File Source="example.txt" />
8 + <ServiceInstall Name="TestService" Type="ownProcess" Start="auto" ErrorControl="ignore">
9 + <http:UrlReservation Url="http://+:80/vroot/">
10 + <http:UrlAce Rights="all" />
11 + </http:UrlReservation>
12 + </ServiceInstall>
13 + </Component>
14 + </ComponentGroup>
15 + </Fragment>
16 +</Wix>
src/test/WixToolsetTest.Http/TestData/UsingUrlReservation/example.txt new
+1
@@ -0,0 +1 @@
1 +This is example.txt.
\ No newline at end of file
src/test/WixToolsetTest.Http/WixToolsetTest.Http.csproj new
+38
@@ -0,0 +1,38 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project Sdk="Microsoft.NET.Sdk">
5 + <PropertyGroup>
6 + <TargetFramework>netcoreapp2.1</TargetFramework>
7 + <IsPackable>false</IsPackable>
8 + </PropertyGroup>
9 +
10 + <PropertyGroup>
11 + <NoWarn>NU1701</NoWarn>
12 + </PropertyGroup>
13 +
14 + <ItemGroup>
15 + <Content Include="TestData\UsingUrlReservation\example.txt" CopyToOutputDirectory="PreserveNewest" />
16 + <Content Include="TestData\UsingUrlReservation\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
17 + <Content Include="TestData\UsingUrlReservation\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
18 + <Content Include="TestData\UsingUrlReservation\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
19 + </ItemGroup>
20 +
21 + <ItemGroup>
22 + <ProjectReference Include="..\..\wixext\WixToolset.Http.wixext.csproj" />
23 + </ItemGroup>
24 +
25 + <ItemGroup>
26 + <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" PrivateAssets="all" />
27 + </ItemGroup>
28 +
29 + <ItemGroup>
30 + <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
31 + </ItemGroup>
32 +
33 + <ItemGroup>
34 + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
35 + <PackageReference Include="xunit" Version="2.4.0" />
36 + <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
37 + </ItemGroup>
38 +</Project>
src/wixext/HttpCompiler.cs
+53 -61
@@ -1,26 +1,20 @@
1 // 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.
2
3 -namespace WixToolset.Extensions
3 +namespace WixToolset.Http
4 {
5 using System;
6 using System.Collections.Generic;
7 - using System.Globalization;
7 using System.Xml.Linq;
8 using WixToolset.Data;
9 using WixToolset.Extensibility;
10 + using WixToolset.Http.Tuples;
11
12 /// <summary>
13 /// The compiler for the WiX Toolset Http Extension.
14 /// </summary>
15 - public sealed class HttpCompiler : CompilerExtension
15 + public sealed class HttpCompiler : BaseCompilerExtension
16 {
17 - /// <summary>
18 - /// Instantiate a new HttpCompiler.
19 - /// </summary>
20 - public HttpCompiler()
21 - {
22 - this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/http";
23 - }
17 + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/http";
18
19 /// <summary>
20 /// Processes an element for the Compiler.
@@ -29,7 +23,7 @@ namespace WixToolset.Extensions
23 /// <param name="parentElement">Parent element of element to process.</param>
24 /// <param name="element">Element to process.</param>
25 /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
32 - public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context)
26 + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
27 {
28 switch (parentElement.Name.LocalName)
29 {
@@ -41,10 +35,10 @@ namespace WixToolset.Extensions
35 switch (element.Name.LocalName)
36 {
37 case "UrlReservation":
44 - this.ParseUrlReservationElement(element, serviceComponentId, serviceUser);
38 + this.ParseUrlReservationElement(intermediate, section, element, serviceComponentId, serviceUser);
39 break;
40 default:
47 - this.Core.UnexpectedElement(parentElement, element);
41 + this.ParseHelper.UnexpectedElement(parentElement, element);
42 break;
43 }
44 break;
@@ -54,15 +48,15 @@ namespace WixToolset.Extensions
48 switch (element.Name.LocalName)
49 {
50 case "UrlReservation":
57 - this.ParseUrlReservationElement(element, componentId, null);
51 + this.ParseUrlReservationElement(intermediate, section, element, componentId, null);
52 break;
53 default:
60 - this.Core.UnexpectedElement(parentElement, element);
54 + this.ParseHelper.UnexpectedElement(parentElement, element);
55 break;
56 }
57 break;
58 default:
65 - this.Core.UnexpectedElement(parentElement, element);
59 + this.ParseHelper.UnexpectedElement(parentElement, element);
60 break;
61 }
62 }
@@ -73,9 +67,9 @@ namespace WixToolset.Extensions
67 /// <param name="node">The element to parse.</param>
68 /// <param name="componentId">Identifier of the component that owns this URL reservation.</param>
69 /// <param name="securityPrincipal">The security principal of the parent element (null if nested under Component).</param>
76 - private void ParseUrlReservationElement(XElement node, string componentId, string securityPrincipal)
70 + private void ParseUrlReservationElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId, string securityPrincipal)
71 {
78 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
72 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
73 Identifier id = null;
74 int handleExisting = HttpConstants.heReplace;
75 string handleExistingValue = null;
@@ -90,10 +84,10 @@ namespace WixToolset.Extensions
84 switch (attrib.Name.LocalName)
85 {
86 case "Id":
93 - id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
87 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
88 break;
89 case "HandleExisting":
96 - handleExistingValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
90 + handleExistingValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
91 switch (handleExistingValue)
92 {
93 case "replace":
@@ -106,31 +100,31 @@ namespace WixToolset.Extensions
100 handleExisting = HttpConstants.heFail;
101 break;
102 default:
109 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "HandleExisting", handleExistingValue, "replace", "ignore", "fail"));
103 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "HandleExisting", handleExistingValue, "replace", "ignore", "fail"));
104 break;
105 }
106 break;
107 case "Sddl":
114 - sddl = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
108 + sddl = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
109 break;
110 case "Url":
117 - url = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
111 + url = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
112 break;
113 default:
120 - this.Core.UnexpectedAttribute(node, attrib);
114 + this.ParseHelper.UnexpectedAttribute(node, attrib);
115 break;
116 }
117 }
118 else
119 {
126 - this.Core.ParseExtensionAttribute(node, attrib);
120 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
121 }
122 }
123
124 // Need the element ID for child element processing, so generate now if not authored.
125 if (null == id)
126 {
133 - id = this.Core.CreateIdentifier("url", componentId, securityPrincipal, url);
127 + id = this.ParseHelper.CreateIdentifier("url", componentId, securityPrincipal, url);
128 }
129
130 // Parse UrlAce children.
@@ -143,57 +137,56 @@ namespace WixToolset.Extensions
137 case "UrlAce":
138 if (null != sddl)
139 {
146 - this.Core.OnMessage(WixErrors.IllegalParentAttributeWhenNested(sourceLineNumbers, "UrlReservation", "Sddl", "UrlAce"));
140 + this.Messaging.Write(ErrorMessages.IllegalParentAttributeWhenNested(sourceLineNumbers, "UrlReservation", "Sddl", "UrlAce"));
141 }
142 else
143 {
144 foundACE = true;
151 - this.ParseUrlAceElement(child, id.Id, securityPrincipal);
145 + this.ParseUrlAceElement(intermediate, section, child, id.Id, securityPrincipal);
146 }
147 break;
148 default:
155 - this.Core.UnexpectedElement(node, child);
149 + this.ParseHelper.UnexpectedElement(node, child);
150 break;
151 }
152 }
153 else
154 {
161 - this.Core.ParseExtensionElement(node, child);
155 + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child);
156 }
157 }
158
159 // Url is required.
160 if (null == url)
161 {
168 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Url"));
162 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Url"));
163 }
164
165 // Security is required.
166 if (null == sddl && !foundACE)
167 {
174 - this.Core.OnMessage(HttpErrors.NoSecuritySpecified(sourceLineNumbers));
168 + this.Messaging.Write(HttpErrors.NoSecuritySpecified(sourceLineNumbers));
169 }
170
177 - if (!this.Core.EncounteredError)
171 + if (!this.Messaging.EncounteredError)
172 {
179 - Row row = this.Core.CreateRow(sourceLineNumbers, "WixHttpUrlReservation");
180 - row[0] = id.Id;
181 - row[1] = handleExisting;
182 - row[2] = sddl;
183 - row[3] = url;
184 - row[4] = componentId;
173 + var row = (WixHttpUrlReservationTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixHttpUrlReservation", id);
174 + row.HandleExisting = handleExisting;
175 + row.Sddl = sddl;
176 + row.Url = url;
177 + row.Component_ = componentId;
178
186 - if (this.Core.CurrentPlatform == Platform.ARM)
179 + if (this.Context.Platform == Platform.ARM)
180 {
181 // Ensure ARM version of the CA is referenced.
189 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsInstall_ARM");
190 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsUninstall_ARM");
182 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsInstall_ARM");
183 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsUninstall_ARM");
184 }
185 else
186 {
187 // All other supported platforms use x86.
195 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsInstall");
196 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsUninstall");
188 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsInstall");
189 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsUninstall");
190 }
191 }
192 }
@@ -204,9 +197,9 @@ namespace WixToolset.Extensions
197 /// <param name="node">The element to parse.</param>
198 /// <param name="urlReservationId">The URL reservation ID.</param>
199 /// <param name="defaultSecurityPrincipal">The default security principal.</param>
207 - private void ParseUrlAceElement(XElement node, string urlReservationId, string defaultSecurityPrincipal)
200 + private void ParseUrlAceElement(Intermediate intermediate, IntermediateSection section, XElement node, string urlReservationId, string defaultSecurityPrincipal)
201 {
209 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
202 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
203 Identifier id = null;
204 string securityPrincipal = defaultSecurityPrincipal;
205 int rights = HttpConstants.GENERIC_ALL;
@@ -219,13 +212,13 @@ namespace WixToolset.Extensions
212 switch (attrib.Name.LocalName)
213 {
214 case "Id":
222 - id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
215 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
216 break;
217 case "SecurityPrincipal":
225 - securityPrincipal = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
218 + securityPrincipal = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
219 break;
220 case "Rights":
228 - rightsValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
221 + rightsValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
222 switch (rightsValue)
223 {
224 case "all":
@@ -238,42 +231,41 @@ namespace WixToolset.Extensions
231 rights = HttpConstants.GENERIC_EXECUTE;
232 break;
233 default:
241 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Rights", rightsValue, "all", "delegate", "register"));
234 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Rights", rightsValue, "all", "delegate", "register"));
235 break;
236 }
237 break;
238 default:
246 - this.Core.UnexpectedAttribute(node, attrib);
239 + this.ParseHelper.UnexpectedAttribute(node, attrib);
240 break;
241 }
242 }
243 else
244 {
252 - this.Core.ParseExtensionAttribute(node, attrib);
245 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
246 }
247 }
248
249 // Generate Id now if not authored.
250 if (null == id)
251 {
259 - id = this.Core.CreateIdentifier("ace", urlReservationId, securityPrincipal, rightsValue);
252 + id = this.ParseHelper.CreateIdentifier("ace", urlReservationId, securityPrincipal, rightsValue);
253 }
254
262 - this.Core.ParseForExtensionElements(node);
255 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
256
257 // SecurityPrincipal is required.
258 if (null == securityPrincipal)
259 {
267 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SecurityPrincipal"));
260 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SecurityPrincipal"));
261 }
262
270 - if (!this.Core.EncounteredError)
263 + if (!this.Messaging.EncounteredError)
264 {
272 - Row row = this.Core.CreateRow(sourceLineNumbers, "WixHttpUrlAce");
273 - row[0] = id.Id;
274 - row[1] = urlReservationId;
275 - row[2] = securityPrincipal;
276 - row[3] = rights;
265 + var row = (WixHttpUrlAceTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixHttpUrlAce", id);
266 + row.WixHttpUrlReservation_ = urlReservationId;
267 + row.SecurityPrincipal = securityPrincipal;
268 + row.Rights = rights;
269 }
270 }
271 }
src/wixext/HttpConstants.cs
+1 -1
@@ -1,6 +1,6 @@
1 // 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.
2
3 -namespace WixToolset.Extensions
3 +namespace WixToolset.Http
4 {
5 using System;
6
src/wixext/HttpDecompiler.cs
+3 -1
@@ -1,7 +1,8 @@
1 // 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.
2
3 -namespace WixToolset.Extensions
3 +namespace WixToolset.Http
4 {
5 +#if TODO_CONSIDER_DECOMPILER
6 using System;
7 using System.Collections;
8 using System.Diagnostics;
@@ -132,4 +133,5 @@ namespace WixToolset.Extensions
133 }
134 }
135 }
136 +#endif
137 }
src/wixext/HttpErrors.cs new
+31
@@ -0,0 +1,31 @@
1 +// 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.
2 +
3 +namespace WixToolset.Http
4 +{
5 + using System;
6 + using System.Resources;
7 + using WixToolset.Data;
8 +
9 + public static class HttpErrors
10 + {
11 + public static Message NoSecuritySpecified(SourceLineNumber sourceLineNumbers)
12 + {
13 + return Message(sourceLineNumbers, Ids.NoSecuritySpecified, "The UrlReservation element doesn't identify the security for the reservation. You must either specify the Sddl attribute, or provide child UrlAce elements.");
14 + }
15 +
16 + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
17 + {
18 + return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
19 + }
20 +
21 + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
22 + {
23 + return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args);
24 + }
25 +
26 + public enum Ids
27 + {
28 + NoSecuritySpecified = 6701,
29 + }
30 + }
31 +}
src/wixext/HttpExtensionData.cs
+8 -42
@@ -1,64 +1,30 @@
1 // 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.
2
3 -namespace WixToolset.Extensions
3 +namespace WixToolset.Http
4 {
5 - using System;
6 - using System.Reflection;
5 using WixToolset.Data;
6 using WixToolset.Extensibility;
7
8 /// <summary>
9 /// The WiX Toolset Http Extension.
10 /// </summary>
13 - public sealed class HttpExtensionData : ExtensionData
11 + public sealed class HttpExtensionData : BaseExtensionData
12 {
13 /// <summary>
14 /// Gets the default culture.
15 /// </summary>
16 /// <value>The default culture.</value>
19 - public override string DefaultCulture
20 - {
21 - get { return "en-us"; }
22 - }
23 -
24 - /// <summary>
25 - /// Gets the optional table definitions for this extension.
26 - /// </summary>
27 - /// <value>The optional table definitions for this extension.</value>
28 - public override TableDefinitionCollection TableDefinitions
29 - {
30 - get
31 - {
32 - return HttpExtensionData.GetExtensionTableDefinitions();
33 - }
34 - }
35 -
36 - /// <summary>
37 - /// Gets the library associated with this extension.
38 - /// </summary>
39 - /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
40 - /// <returns>The loaded library.</returns>
41 - public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
42 - {
43 - return HttpExtensionData.GetExtensionLibrary(tableDefinitions);
44 - }
17 + public override string DefaultCulture => "en-US";
18
46 - /// <summary>
47 - /// Internal mechanism to access the extension's table definitions.
48 - /// </summary>
49 - /// <returns>Extension's table definitions.</returns>
50 - internal static TableDefinitionCollection GetExtensionTableDefinitions()
19 + public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
20 {
52 - return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml");
21 + tupleDefinition = HttpTupleDefinitions.ByName(name);
22 + return tupleDefinition != null;
23 }
24
55 - /// <summary>
56 - /// Internal mechanism to access the extension's library.
57 - /// </summary>
58 - /// <returns>Extension's library.</returns>
59 - internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
25 + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
26 {
61 - return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.http.wixlib", tableDefinitions);
27 + return Intermediate.Load(typeof(HttpExtensionData).Assembly, "WixToolset.Http.http.wixlib", tupleDefinitions);
28 }
29 }
30 }
src/wixext/HttpExtensionFactory.cs new
+18
@@ -0,0 +1,18 @@
1 +// 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.
2 +
3 +namespace WixToolset.Http
4 +{
5 + using System;
6 + using System.Collections.Generic;
7 + using WixToolset.Extensibility;
8 +
9 + public class HttpExtensionFactory : BaseExtensionFactory
10 + {
11 + protected override IEnumerable<Type> ExtensionTypes => new[]
12 + {
13 + typeof(HttpCompiler),
14 + typeof(HttpExtensionData),
15 + typeof(HttpWindowsInstallerBackendBinderExtension),
16 + };
17 + }
18 +}
src/wixext/HttpWindowsInstallerBackendBinderExtension.cs new
+26
@@ -0,0 +1,26 @@
1 +// 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.
2 +
3 +namespace WixToolset.Http
4 +{
5 + using System.Linq;
6 + using System.Xml;
7 + using WixToolset.Data.WindowsInstaller;
8 + using WixToolset.Extensibility;
9 +
10 + public class HttpWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension
11 + {
12 + private static readonly TableDefinition[] Tables = LoadTables();
13 +
14 + protected override TableDefinition[] TableDefinitionsForTuples => Tables;
15 +
16 + private static TableDefinition[] LoadTables()
17 + {
18 + using (var resourceStream = typeof(HttpWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Http.tables.xml"))
19 + using (var reader = XmlReader.Create(resourceStream))
20 + {
21 + var tables = TableDefinitionCollection.Load(reader);
22 + return tables.ToArray();
23 + }
24 + }
25 + }
26 +}
src/wixext/Tuples/HttpTupleDefinitions.cs new
+43
@@ -0,0 +1,43 @@
1 +// 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.
2 +
3 +namespace WixToolset.Http
4 +{
5 + using System;
6 + using WixToolset.Data;
7 +
8 + public enum HttpTupleDefinitionType
9 + {
10 + WixHttpUrlAce,
11 + WixHttpUrlReservation,
12 + }
13 +
14 + public static partial class HttpTupleDefinitions
15 + {
16 + public static readonly Version Version = new Version("4.0.0");
17 +
18 + public static IntermediateTupleDefinition ByName(string name)
19 + {
20 + if (!Enum.TryParse(name, out HttpTupleDefinitionType type))
21 + {
22 + return null;
23 + }
24 +
25 + return ByType(type);
26 + }
27 +
28 + public static IntermediateTupleDefinition ByType(HttpTupleDefinitionType type)
29 + {
30 + switch (type)
31 + {
32 + case HttpTupleDefinitionType.WixHttpUrlAce:
33 + return HttpTupleDefinitions.WixHttpUrlAce;
34 +
35 + case HttpTupleDefinitionType.WixHttpUrlReservation:
36 + return HttpTupleDefinitions.WixHttpUrlReservation;
37 +
38 + default:
39 + throw new ArgumentOutOfRangeException(nameof(type));
40 + }
41 + }
42 + }
43 +}
src/wixext/Tuples/WixHttpUrlAceTuple.cs new
+71
@@ -0,0 +1,71 @@
1 +// 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.
2 +
3 +namespace WixToolset.Http
4 +{
5 + using WixToolset.Data;
6 + using WixToolset.Http.Tuples;
7 +
8 + public static partial class HttpTupleDefinitions
9 + {
10 + public static readonly IntermediateTupleDefinition WixHttpUrlAce = new IntermediateTupleDefinition(
11 + HttpTupleDefinitionType.WixHttpUrlAce.ToString(),
12 + new[]
13 + {
14 + new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.WixHttpUrlAce), IntermediateFieldType.String),
15 + new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.WixHttpUrlReservation_), IntermediateFieldType.String),
16 + new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.SecurityPrincipal), IntermediateFieldType.String),
17 + new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.Rights), IntermediateFieldType.Number),
18 + },
19 + typeof(WixHttpUrlAceTuple));
20 + }
21 +}
22 +
23 +namespace WixToolset.Http.Tuples
24 +{
25 + using WixToolset.Data;
26 +
27 + public enum WixHttpUrlAceTupleFields
28 + {
29 + WixHttpUrlAce,
30 + WixHttpUrlReservation_,
31 + SecurityPrincipal,
32 + Rights,
33 + }
34 +
35 + public class WixHttpUrlAceTuple : IntermediateTuple
36 + {
37 + public WixHttpUrlAceTuple() : base(HttpTupleDefinitions.WixHttpUrlAce, null, null)
38 + {
39 + }
40 +
41 + public WixHttpUrlAceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(HttpTupleDefinitions.WixHttpUrlAce, sourceLineNumber, id)
42 + {
43 + }
44 +
45 + public IntermediateField this[WixHttpUrlAceTupleFields index] => this.Fields[(int)index];
46 +
47 + public string WixHttpUrlAce
48 + {
49 + get => this.Fields[(int)WixHttpUrlAceTupleFields.WixHttpUrlAce].AsString();
50 + set => this.Set((int)WixHttpUrlAceTupleFields.WixHttpUrlAce, value);
51 + }
52 +
53 + public string WixHttpUrlReservation_
54 + {
55 + get => this.Fields[(int)WixHttpUrlAceTupleFields.WixHttpUrlReservation_].AsString();
56 + set => this.Set((int)WixHttpUrlAceTupleFields.WixHttpUrlReservation_, value);
57 + }
58 +
59 + public string SecurityPrincipal
60 + {
61 + get => this.Fields[(int)WixHttpUrlAceTupleFields.SecurityPrincipal].AsString();
62 + set => this.Set((int)WixHttpUrlAceTupleFields.SecurityPrincipal, value);
63 + }
64 +
65 + public int Rights
66 + {
67 + get => this.Fields[(int)WixHttpUrlAceTupleFields.Rights].AsNumber();
68 + set => this.Set((int)WixHttpUrlAceTupleFields.Rights, value);
69 + }
70 + }
71 +}
\ No newline at end of file
src/wixext/Tuples/WixHttpUrlReservationTuple.cs new
+79
@@ -0,0 +1,79 @@
1 +// 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.
2 +
3 +namespace WixToolset.Http
4 +{
5 + using WixToolset.Data;
6 + using WixToolset.Http.Tuples;
7 +
8 + public static partial class HttpTupleDefinitions
9 + {
10 + public static readonly IntermediateTupleDefinition WixHttpUrlReservation = new IntermediateTupleDefinition(
11 + HttpTupleDefinitionType.WixHttpUrlReservation.ToString(),
12 + new[]
13 + {
14 + new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.WixHttpUrlReservation), IntermediateFieldType.String),
15 + new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.HandleExisting), IntermediateFieldType.Number),
16 + new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.Sddl), IntermediateFieldType.String),
17 + new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.Url), IntermediateFieldType.String),
18 + new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.Component_), IntermediateFieldType.String),
19 + },
20 + typeof(WixHttpUrlReservationTuple));
21 + }
22 +}
23 +
24 +namespace WixToolset.Http.Tuples
25 +{
26 + using WixToolset.Data;
27 +
28 + public enum WixHttpUrlReservationTupleFields
29 + {
30 + WixHttpUrlReservation,
31 + HandleExisting,
32 + Sddl,
33 + Url,
34 + Component_,
35 + }
36 +
37 + public class WixHttpUrlReservationTuple : IntermediateTuple
38 + {
39 + public WixHttpUrlReservationTuple() : base(HttpTupleDefinitions.WixHttpUrlReservation, null, null)
40 + {
41 + }
42 +
43 + public WixHttpUrlReservationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(HttpTupleDefinitions.WixHttpUrlReservation, sourceLineNumber, id)
44 + {
45 + }
46 +
47 + public IntermediateField this[WixHttpUrlReservationTupleFields index] => this.Fields[(int)index];
48 +
49 + public string WixHttpUrlReservation
50 + {
51 + get => this.Fields[(int)WixHttpUrlReservationTupleFields.WixHttpUrlReservation].AsString();
52 + set => this.Set((int)WixHttpUrlReservationTupleFields.WixHttpUrlReservation, value);
53 + }
54 +
55 + public int HandleExisting
56 + {
57 + get => this.Fields[(int)WixHttpUrlReservationTupleFields.HandleExisting].AsNumber();
58 + set => this.Set((int)WixHttpUrlReservationTupleFields.HandleExisting, value);
59 + }
60 +
61 + public string Sddl
62 + {
63 + get => this.Fields[(int)WixHttpUrlReservationTupleFields.Sddl].AsString();
64 + set => this.Set((int)WixHttpUrlReservationTupleFields.Sddl, value);
65 + }
66 +
67 + public string Url
68 + {
69 + get => this.Fields[(int)WixHttpUrlReservationTupleFields.Url].AsString();
70 + set => this.Set((int)WixHttpUrlReservationTupleFields.Url, value);
71 + }
72 +
73 + public string Component_
74 + {
75 + get => this.Fields[(int)WixHttpUrlReservationTupleFields.Component_].AsString();
76 + set => this.Set((int)WixHttpUrlReservationTupleFields.Component_, value);
77 + }
78 + }
79 +}
\ No newline at end of file
src/wixext/WixHttpExtension.csproj deleted
-48
@@ -1,48 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<!-- 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. -->
3 -
4 -
5 -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
6 - <PropertyGroup>
7 - <ProjectGuid>{AAFC3C7F-D818-4B1D-AF3F-A331EA917F3F}</ProjectGuid>
8 - <AssemblyName>WixHttpExtension</AssemblyName>
9 - <OutputType>Library</OutputType>
10 - <RootNamespace>WixToolset.Extensions</RootNamespace>
11 - </PropertyGroup>
12 - <ItemGroup>
13 - <Compile Include="AssemblyInfo.cs" />
14 - <Compile Include="HttpCompiler.cs" />
15 - <Compile Include="HttpConstants.cs" />
16 - <Compile Include="HttpDecompiler.cs" />
17 - <Compile Include="HttpExtensionData.cs" />
18 - <MsgGenSource Include="Data\messages.xml">
19 - <ResourcesLogicalName>$(RootNamespace).Data.Messages.resources</ResourcesLogicalName>
20 - </MsgGenSource>
21 - <EmbeddedFlattenedResource Include="Data\tables.xml">
22 - <LogicalName>$(RootNamespace).Data.tables.xml</LogicalName>
23 - </EmbeddedFlattenedResource>
24 - <EmbeddedFlattenedResource Include="Xsd\http.xsd">
25 - <LogicalName>$(RootNamespace).Xsd.http.xsd</LogicalName>
26 - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
27 - </EmbeddedFlattenedResource>
28 - <XsdGenSource Include="Xsd\http.xsd">
29 - <CommonNamespace>WixToolset.Data.Serialize</CommonNamespace>
30 - <Namespace>WixToolset.Extensions.Serialize.Http</Namespace>
31 - </XsdGenSource>
32 - <EmbeddedResource Include="$(OutputPath)\http.wixlib">
33 - <Link>Data\http.wixlib</Link>
34 - </EmbeddedResource>
35 - </ItemGroup>
36 - <ItemGroup>
37 - <Reference Include="System" />
38 - <Reference Include="System.Xml" />
39 - <Reference Include="System.Xml.Linq" />
40 - <ProjectReference Include="..\..\..\libs\WixToolset.Data\WixToolset.Data.csproj" />
41 - <ProjectReference Include="..\..\..\libs\WixToolset.Extensibility\WixToolset.Extensibility.csproj" />
42 - <ProjectReference Include="..\..\..\tools\wix\Wix.csproj" />
43 - <ProjectReference Include="..\wixlib\HttpExtension.wixproj">
44 - <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
45 - </ProjectReference>
46 - </ItemGroup>
47 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
48 -</Project>
src/wixext/WixToolset.Http.wixext.csproj new
+33
@@ -0,0 +1,33 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project Sdk="Microsoft.NET.Sdk">
5 + <PropertyGroup>
6 + <TargetFramework>netstandard2.0</TargetFramework>
7 + <RootNamespace>WixToolset.Http</RootNamespace>
8 + <Description>WiX Toolset Http Extension</Description>
9 + <Title>WiX Toolset Http Extension</Title>
10 + <IsTool>true</IsTool>
11 + <ContentTargetFolders>build</ContentTargetFolders>
12 + </PropertyGroup>
13 +
14 + <ItemGroup>
15 + <Content Include="$(MSBuildThisFileName).targets" />
16 + <Content Include="http.xsd" PackagePath="tools" />
17 + <EmbeddedResource Include="tables.xml" />
18 + <EmbeddedResource Include="$(OutputPath)..\http.wixlib" />
19 + </ItemGroup>
20 +
21 + <ItemGroup>
22 + <PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" />
23 + <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
24 + </ItemGroup>
25 +
26 + <ItemGroup>
27 + <ProjectReference Include="..\wixlib\http.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " />
28 + </ItemGroup>
29 +
30 + <ItemGroup>
31 + <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
32 + </ItemGroup>
33 +</Project>
src/wixext/WixToolset.Http.wixext.targets new
+11
@@ -0,0 +1,11 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
5 + <PropertyGroup>
6 + <WixToolsetHttpWixextPath Condition=" '$(WixToolsetHttpWixextPath)' == '' ">$(MSBuildThisFileDirectory)..\tools\WixToolset.Http.wixext.dll</WixToolsetHttpWixextPath>
7 + </PropertyGroup>
8 + <ItemGroup>
9 + <WixExtension Include="$(WixToolsetHttpWixextPath)" />
10 + </ItemGroup>
11 +</Project>
src/wixext/messages.xml deleted
-13
@@ -1,13 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<!-- 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. -->
3 -
4 -
5 -<Messages Namespace="WixToolset.Extensions" Resources="Data.Messages" xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages">
6 - <Class Name="HttpErrors" ContainerName="HttpErrorEventArgs" BaseContainerName="MessageEventArgs" Level="Error">
7 - <Message Id="NoSecuritySpecified" Number="6701">
8 - <Instance>
9 - The UrlReservation element doesn't identify the security for the reservation. You must either specify the Sddl attribute, or provide child UrlAce elements.
10 - </Instance>
11 - </Message>
12 - </Class>
13 -</Messages>
src/wixlib/HttpExtension.wixproj deleted
-26
@@ -1,26 +0,0 @@
1 -<?xml version="1.0" encoding="utf-8" ?>
2 -<!-- 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. -->
3 -
4 -
5 -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
6 - <PropertyGroup>
7 - <ProjectGuid>{055C1517-4CED-4199-BCDE-A383E5C4EF78}</ProjectGuid>
8 - <OutputName>http</OutputName>
9 - <OutputType>Library</OutputType>
10 - <BindFiles>true</BindFiles>
11 - <Pedantic>true</Pedantic>
12 - <Cultures>en-us</Cultures>
13 - </PropertyGroup>
14 -
15 - <ItemGroup>
16 - <Compile Include="HttpExtension.wxs" />
17 - <Compile Include="HttpExtension_x86.wxs" />
18 - <EmbeddedResource Include="en-us.wxl" />
19 - </ItemGroup>
20 -
21 - <ItemGroup>
22 - <ProjectReference Include="..\ca\wixhttpca.vcxproj" />
23 - </ItemGroup>
24 -
25 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
26 -</Project>
src/wixlib/HttpExtension_Platform.wxi
+7 -7
@@ -15,12 +15,12 @@
15 <ProgressText Action="WixExecHttpUrlReservationsUninstall$(var.DeferredSuffix)">!(loc.WixExecHttpUrlReservationsUninstall)</ProgressText>
16 </UI>
17
18 - <CustomAction Id="WixSchedHttpUrlReservationsInstall$(var.Suffix)" BinaryKey="WixHttpCA$(var.Suffix)" DllEntry="SchedHttpUrlReservationsInstall" Execute="immediate" Return="check" SuppressModularization="yes" />
19 - <CustomAction Id="WixSchedHttpUrlReservationsUninstall$(var.Suffix)" BinaryKey="WixHttpCA$(var.Suffix)" DllEntry="SchedHttpUrlReservationsUninstall" Execute="immediate" Return="check" SuppressModularization="yes" />
20 - <CustomAction Id="WixRollbackHttpUrlReservationsInstall$(var.DeferredSuffix)" BinaryKey="WixHttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" />
21 - <CustomAction Id="WixExecHttpUrlReservationsInstall$(var.DeferredSuffix)" BinaryKey="WixHttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" />
22 - <CustomAction Id="WixRollbackHttpUrlReservationsUninstall$(var.DeferredSuffix)" BinaryKey="WixHttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" />
23 - <CustomAction Id="WixExecHttpUrlReservationsUninstall$(var.DeferredSuffix)" BinaryKey="WixHttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" />
18 + <CustomAction Id="WixSchedHttpUrlReservationsInstall$(var.Suffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="SchedHttpUrlReservationsInstall" Execute="immediate" Return="check" SuppressModularization="yes" />
19 + <CustomAction Id="WixSchedHttpUrlReservationsUninstall$(var.Suffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="SchedHttpUrlReservationsUninstall" Execute="immediate" Return="check" SuppressModularization="yes" />
20 + <CustomAction Id="WixRollbackHttpUrlReservationsInstall$(var.DeferredSuffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" />
21 + <CustomAction Id="WixExecHttpUrlReservationsInstall$(var.DeferredSuffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" />
22 + <CustomAction Id="WixRollbackHttpUrlReservationsUninstall$(var.DeferredSuffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="rollback" Impersonate="no" Return="check" SuppressModularization="yes" />
23 + <CustomAction Id="WixExecHttpUrlReservationsUninstall$(var.DeferredSuffix)" BinaryKey="HttpCA$(var.Suffix)" DllEntry="ExecHttpUrlReservations" Execute="deferred" Impersonate="no" Return="check" SuppressModularization="yes" />
24
25 <!--
26 We need the HTTP server on Windows XP SP2 or later.
@@ -35,6 +35,6 @@
35 </InstallExecuteSequence>
36 </Fragment>
37 <Fragment>
38 - <Binary Id="WixHttpCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))wixhttpca.dll" />
38 + <Binary Id="HttpCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))httpca.dll" />
39 </Fragment>
40 </Include>
src/wixlib/caSuffix.wxi new
+28
@@ -0,0 +1,28 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 + <?ifndef platform ?>
6 + <?error Required value "platform" not defined in include caSuffix.wxi ?>
7 + <?endif ?>
8 +
9 + <?ifdef Suffix ?>
10 + <?undef Suffix ?>
11 + <?undef DeferredSuffix ?>
12 + <?endif ?>
13 +
14 + <?if $(var.platform)="x86" ?>
15 + <?define Suffix="" ?>
16 + <?define DeferredSuffix="" ?>
17 + <?endif ?>
18 +
19 + <?if $(var.platform)="x64" ?>
20 + <?define Suffix="_x64" ?>
21 + <?define DeferredSuffix="_64" ?>
22 + <?endif ?>
23 +
24 + <?if $(var.platform)="arm" ?>
25 + <?define Suffix="_ARM" ?>
26 + <?define DeferredSuffix="_ARM" ?>
27 + <?endif ?>
28 +</Include>
src/wixlib/caerr.wxi new
+96
@@ -0,0 +1,96 @@
1 +<Include>
2 + <?define msierrSecureObjectsFailedCreateSD = 25520?>
3 + <?define msierrSecureObjectsFailedSet = 25521?>
4 + <?define msierrSecureObjectsUnknownType = 25522?>
5 + <?define msierrXmlFileFailedRead = 25530?>
6 + <?define msierrXmlFileFailedOpen = 25531?>
7 + <?define msierrXmlFileFailedSelect = 25532?>
8 + <?define msierrXmlFileFailedSave = 25533?>
9 + <?define msierrXmlConfigFailedRead = 25540?>
10 + <?define msierrXmlConfigFailedOpen = 25541?>
11 + <?define msierrXmlConfigFailedSelect = 25542?>
12 + <?define msierrXmlConfigFailedSave = 25543?>
13 + <?define msierrFirewallCannotConnect = 25580?>
14 + <?define msierrIISCannotConnect = 26001?>
15 + <?define msierrIISFailedReadWebSite = 26002?>
16 + <?define msierrIISFailedReadWebDirs = 26003?>
17 + <?define msierrIISFailedReadVDirs = 26004?>
18 + <?define msierrIISFailedReadFilters = 26005?>
19 + <?define msierrIISFailedReadAppPool = 26006?>
20 + <?define msierrIISFailedReadMimeMap = 26007?>
21 + <?define msierrIISFailedReadProp = 26008?>
22 + <?define msierrIISFailedReadWebSvcExt = 26009?>
23 + <?define msierrIISFailedReadWebError = 26010?>
24 + <?define msierrIISFailedReadHttpHeader = 26011?>
25 + <?define msierrIISFailedSchedTransaction = 26031?>
26 + <?define msierrIISFailedSchedInstallWebs = 26032?>
27 + <?define msierrIISFailedSchedInstallWebDirs = 26033?>
28 + <?define msierrIISFailedSchedInstallVDirs = 26034?>
29 + <?define msierrIISFailedSchedInstallFilters = 26035?>
30 + <?define msierrIISFailedSchedInstallAppPool = 26036?>
31 + <?define msierrIISFailedSchedInstallProp = 26037?>
32 + <?define msierrIISFailedSchedInstallWebSvcExt = 26038?>
33 + <?define msierrIISFailedSchedUninstallWebs = 26051?>
34 + <?define msierrIISFailedSchedUninstallWebDirs = 26052?>
35 + <?define msierrIISFailedSchedUninstallVDirs = 26053?>
36 + <?define msierrIISFailedSchedUninstallFilters = 26054?>
37 + <?define msierrIISFailedSchedUninstallAppPool = 26055?>
38 + <?define msierrIISFailedSchedUninstallProp = 26056?>
39 + <?define msierrIISFailedSchedUninstallWebSvcExt = 26057?>
40 + <?define msierrIISFailedStartTransaction = 26101?>
41 + <?define msierrIISFailedOpenKey = 26102?>
42 + <?define msierrIISFailedCreateKey = 26103?>
43 + <?define msierrIISFailedWriteData = 26104?>
44 + <?define msierrIISFailedCreateApp = 26105?>
45 + <?define msierrIISFailedDeleteKey = 26106?>
46 + <?define msierrIISFailedDeleteApp = 26107?>
47 + <?define msierrIISFailedDeleteValue = 26108?>
48 + <?define msierrIISFailedCommitInUse = 26109?>
49 + <?define msierrSQLFailedCreateDatabase = 26201?>
50 + <?define msierrSQLFailedDropDatabase = 26202?>
51 + <?define msierrSQLFailedConnectDatabase = 26203?>
52 + <?define msierrSQLFailedExecString = 26204?>
53 + <?define msierrSQLDatabaseAlreadyExists = 26205?>
54 + <?define msierrPERFMONFailedRegisterDLL = 26251?>
55 + <?define msierrPERFMONFailedUnregisterDLL = 26252?>
56 + <?define msierrInstallPerfCounterData = 26253?>
57 + <?define msierrUninstallPerfCounterData = 26254?>
58 + <?define msierrSMBFailedCreate = 26301?>
59 + <?define msierrSMBFailedDrop = 26302?>
60 + <?define msierrCERTFailedOpen = 26351?>
61 + <?define msierrCERTFailedAdd = 26352?>
62 + <?define msierrUSRFailedUserCreate = 26401?>
63 + <?define msierrUSRFailedUserCreatePswd = 26402?>
64 + <?define msierrUSRFailedUserGroupAdd = 26403?>
65 + <?define msierrUSRFailedUserCreateExists = 26404?>
66 + <?define msierrUSRFailedGrantLogonAsService = 26405?>
67 + <?define msierrDependencyMissingDependencies = 26451?>
68 + <?define msierrDependencyHasDependents = 26452?>
69 + <?define msierrDotNetRuntimeRequired = 27000?>
70 + <?define msierrComPlusCannotConnect = 28001?>
71 + <?define msierrComPlusPartitionReadFailed = 28002?>
72 + <?define msierrComPlusPartitionRoleReadFailed = 28003?>
73 + <?define msierrComPlusUserInPartitionRoleReadFailed = 28004?>
74 + <?define msierrComPlusPartitionUserReadFailed = 28005?>
75 + <?define msierrComPlusApplicationReadFailed = 28006?>
76 + <?define msierrComPlusApplicationRoleReadFailed = 28007?>
77 + <?define msierrComPlusUserInApplicationRoleReadFailed = 28008?>
78 + <?define msierrComPlusAssembliesReadFailed = 28009?>
79 + <?define msierrComPlusSubscriptionReadFailed = 28010?>
80 + <?define msierrComPlusPartitionDependency = 28011?>
81 + <?define msierrComPlusPartitionNotFound = 28012?>
82 + <?define msierrComPlusPartitionIdConflict = 28013?>
83 + <?define msierrComPlusPartitionNameConflict = 28014?>
84 + <?define msierrComPlusApplicationDependency = 28015?>
85 + <?define msierrComPlusApplicationNotFound = 28016?>
86 + <?define msierrComPlusApplicationIdConflict = 28017?>
87 + <?define msierrComPlusApplicationNameConflict = 28018?>
88 + <?define msierrComPlusApplicationRoleDependency = 28019?>
89 + <?define msierrComPlusApplicationRoleNotFound = 28020?>
90 + <?define msierrComPlusApplicationRoleConflict = 28021?>
91 + <?define msierrComPlusAssemblyDependency = 28022?>
92 + <?define msierrComPlusSubscriptionIdConflict = 28023?>
93 + <?define msierrComPlusSubscriptionNameConflict = 28024?>
94 + <?define msierrComPlusFailedLookupNames = 28025?>
95 + <?define msierrMsmqCannotConnect = 28101?>
96 +</Include>
\ No newline at end of file
src/wixlib/http.wixproj new
+42
@@ -0,0 +1,42 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +<Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
4 + <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')" />
5 + <Import Project="..\FindLocalWix.props" />
6 + <PropertyGroup>
7 + <ProjectGuid>{055C1517-4CED-4199-BCDE-A383E5C4EF78}</ProjectGuid>
8 + <OutputName>http</OutputName>
9 + <OutputType>Library</OutputType>
10 + <BindFiles>true</BindFiles>
11 + <Pedantic>true</Pedantic>
12 + <Cultures>en-us</Cultures>
13 + </PropertyGroup>
14 +
15 + <ItemGroup>
16 + <Compile Include="HttpExtension.wxs" />
17 + <Compile Include="HttpExtension_x86.wxs" />
18 + <EmbeddedResource Include="en-us.wxl" />
19 + </ItemGroup>
20 + <ItemGroup>
21 + <None Include="packages.config" />
22 + </ItemGroup>
23 + <ItemGroup>
24 + <ProjectReference Include="..\ca\httpca.vcxproj">
25 + <Name>httpca</Name>
26 + <Project>{90743805-C043-47C7-B5FF-8F5EE5C8A2DE}</Project>
27 + </ProjectReference>
28 + </ItemGroup>
29 + <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " />
30 + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " />
31 + <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
32 + <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/." />
33 + </Target>
34 + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
35 + <PropertyGroup>
36 + <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>
37 + </PropertyGroup>
38 + <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'))" />
39 + <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'))" />
40 + </Target>
41 + <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
42 +</Project>
src/wixlib/packages.config new
+5
@@ -0,0 +1,5 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<packages>
3 + <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" />
4 + <package id="WixToolset.MSBuild" version="4.0.0-build-0005" developmentDependency="true" targetFramework="net40" />
5 +</packages>
\ No newline at end of file
version.json new
+11
@@ -0,0 +1,11 @@
1 +{
2 + "version": "4.0",
3 + "publicReleaseRefSpec": [
4 + "^refs/heads/master$"
5 + ],
6 + "cloudBuild": {
7 + "buildNumber": {
8 + "enabled": true
9 + }
10 + }
11 +}