@joebigelow / wix-1 / commits / ea864b56

Integrate into latest v4.

Sean Hall committed Dec 31, 2018 at 23:57 UTC ea864b56d115e4f7a7205827ecaaba0e1db81d41
40 files changed +1329 -491
.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
Bal.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}") = "mbahost", "src\mbahost\mbahost.vcxproj", "{12C87C77-3547-44F8-8134-29BC915CB19D}"
7 +EndProject
8 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixstdba", "src\wixstdba\wixstdba.vcxproj", "{41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}"
9 +EndProject
10 +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "bal", "src\wixlib\bal.wixproj", "{3444D952-F21C-496F-AB6B-56435BFD0787}"
11 +EndProject
12 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Bal.wixext", "src\wixext\WixToolset.Bal.wixext.csproj", "{BF720A63-9D7B-456E-B60C-8122852D9FED}"
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 + {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|Any CPU.ActiveCfg = Debug|Win32
23 + {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|Any CPU.Build.0 = Debug|Win32
24 + {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|x86.ActiveCfg = Debug|Win32
25 + {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|x86.Build.0 = Debug|Win32
26 + {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|Any CPU.ActiveCfg = Release|Win32
27 + {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|Any CPU.Build.0 = Release|Win32
28 + {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|x86.ActiveCfg = Release|Win32
29 + {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|x86.Build.0 = Release|Win32
30 + {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Any CPU.ActiveCfg = Debug|Win32
31 + {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Any CPU.Build.0 = Debug|Win32
32 + {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|x86.ActiveCfg = Debug|Win32
33 + {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|x86.Build.0 = Debug|Win32
34 + {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Release|Any CPU.ActiveCfg = Release|Win32
35 + {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Release|Any CPU.Build.0 = Release|Win32
36 + {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Release|x86.ActiveCfg = Release|Win32
37 + {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Release|x86.Build.0 = Release|Win32
38 + {3444D952-F21C-496F-AB6B-56435BFD0787}.Debug|Any CPU.ActiveCfg = Debug|x86
39 + {3444D952-F21C-496F-AB6B-56435BFD0787}.Debug|Any CPU.Build.0 = Debug|x86
40 + {3444D952-F21C-496F-AB6B-56435BFD0787}.Debug|x86.ActiveCfg = Debug|x86
41 + {3444D952-F21C-496F-AB6B-56435BFD0787}.Debug|x86.Build.0 = Debug|x86
42 + {3444D952-F21C-496F-AB6B-56435BFD0787}.Release|Any CPU.ActiveCfg = Release|x86
43 + {3444D952-F21C-496F-AB6B-56435BFD0787}.Release|Any CPU.Build.0 = Release|x86
44 + {3444D952-F21C-496F-AB6B-56435BFD0787}.Release|x86.ActiveCfg = Release|x86
45 + {3444D952-F21C-496F-AB6B-56435BFD0787}.Release|x86.Build.0 = Release|x86
46 + {BF720A63-9D7B-456E-B60C-8122852D9FED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47 + {BF720A63-9D7B-456E-B60C-8122852D9FED}.Debug|Any CPU.Build.0 = Debug|Any CPU
48 + {BF720A63-9D7B-456E-B60C-8122852D9FED}.Debug|x86.ActiveCfg = Debug|Any CPU
49 + {BF720A63-9D7B-456E-B60C-8122852D9FED}.Debug|x86.Build.0 = Debug|Any CPU
50 + {BF720A63-9D7B-456E-B60C-8122852D9FED}.Release|Any CPU.ActiveCfg = Release|Any CPU
51 + {BF720A63-9D7B-456E-B60C-8122852D9FED}.Release|Any CPU.Build.0 = Release|Any CPU
52 + {BF720A63-9D7B-456E-B60C-8122852D9FED}.Release|x86.ActiveCfg = Release|Any CPU
53 + {BF720A63-9D7B-456E-B60C-8122852D9FED}.Release|x86.Build.0 = Release|Any CPU
54 + EndGlobalSection
55 + GlobalSection(SolutionProperties) = preSolution
56 + HideSolutionNode = FALSE
57 + EndGlobalSection
58 + GlobalSection(ExtensibilityGlobals) = postSolution
59 + SolutionGuid = {74046961-48BF-467A-A6C2-F886C75CE0BE}
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
9 +
10 +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Bal.wixext.csproj
11 +
12 +@popd
13 +@endlocal
\ No newline at end of file
appveyor.yml new
+40
@@ -0,0 +1,40 @@
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 +branches:
7 + only:
8 + - master
9 + - develop
10 +
11 +image: Visual Studio 2017
12 +
13 +version: 0.0.0.{build}
14 +configuration: Release
15 +
16 +environment:
17 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
18 + DOTNET_CLI_TELEMETRY_OPTOUT: 1
19 + NUGET_XMLDOC_MODE: skip
20 +
21 +build_script:
22 + - appveyor.cmd
23 +
24 +pull_requests:
25 + do_not_increment_build_number: true
26 +
27 +nuget:
28 + disable_publish_on_pr: true
29 +
30 +skip_branch_with_pr: true
31 +skip_tags: true
32 +
33 +artifacts:
34 +- path: build\Release\**\*.nupkg
35 + name: nuget
36 +
37 +notifications:
38 +- provider: Slack
39 + incoming_webhook:
40 + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA=
nuget.config new
+18
@@ -0,0 +1,18 @@
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-balutil" value="https://ci.appveyor.com/nuget/wixtoolset-balutil" />
11 + <add key="wixtoolset-dutil" value="https://ci.appveyor.com/nuget/wixtoolset-dutil" />
12 + <add key="wixtoolset-wcautil" value="https://ci.appveyor.com/nuget/wixtoolset-wcautil" />
13 + <add key="wixtoolset-tools" value="https://ci.appveyor.com/nuget/wixtoolset-tools" />
14 + <add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
15 + <add key="localNuget" value="C:\src\mynewwix4\localNuget" />
16 + <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
17 + </packageSources>
18 +</configuration>
\ No newline at end of file
src/Cpp.Build.props new
+100
@@ -0,0 +1,100 @@
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 + <ItemDefinitionGroup>
12 + <ClCompile>
13 + <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
14 + <WarningLevel>Level4</WarningLevel>
15 + <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
16 + <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
17 + <PrecompiledHeader>Use</PrecompiledHeader>
18 + <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
19 + <CallingConvention>StdCall</CallingConvention>
20 + <TreatWarningAsError>true</TreatWarningAsError>
21 + <ExceptionHandling>false</ExceptionHandling>
22 + <AdditionalOptions>-YlprecompDefine</AdditionalOptions>
23 + <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
24 + <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) &gt; 4 ">true</MultiProcessorCompilation>
25 + </ClCompile>
26 + <ResourceCompile>
27 + <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
28 + <AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
29 + </ResourceCompile>
30 + <Lib>
31 + <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
32 + </Lib>
33 + <Link>
34 + <SubSystem>$(ProjectSubSystem)</SubSystem>
35 + <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
36 + <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
37 + <GenerateDebugInformation>true</GenerateDebugInformation>
38 + <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
39 + <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
40 + <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
41 + </Link>
42 + </ItemDefinitionGroup>
43 +
44 + <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
45 + <ClCompile>
46 + <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
47 + </ClCompile>
48 + </ItemDefinitionGroup>
49 + <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
50 + <ClCompile>
51 + <CallingConvention>CDecl</CallingConvention>
52 + </ClCompile>
53 + </ItemDefinitionGroup>
54 + <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
55 + <ClCompile>
56 + <DebugInformationFormat>OldStyle</DebugInformationFormat>
57 + <OmitDefaultLibName>true</OmitDefaultLibName>
58 + <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
59 + </ClCompile>
60 + </ItemDefinitionGroup>
61 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
62 + <ClCompile>
63 + <Optimization>Disabled</Optimization>
64 + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
65 + <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
66 + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
67 + </ClCompile>
68 + </ItemDefinitionGroup>
69 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
70 + <ClCompile>
71 + <BasicRuntimeChecks></BasicRuntimeChecks>
72 + <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
73 + </ClCompile>
74 + </ItemDefinitionGroup>
75 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
76 + <ClCompile>
77 + <Optimization>MinSpace</Optimization>
78 + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
79 + <FunctionLevelLinking>true</FunctionLevelLinking>
80 + <IntrinsicFunctions>true</IntrinsicFunctions>
81 + <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
82 + </ClCompile>
83 + <Link>
84 + <EnableCOMDATFolding>true</EnableCOMDATFolding>
85 + <OptimizeReferences>true</OptimizeReferences>
86 + </Link>
87 + </ItemDefinitionGroup>
88 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
89 + <ClCompile>
90 + <BasicRuntimeChecks></BasicRuntimeChecks>
91 + <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
92 + </ClCompile>
93 + </ItemDefinitionGroup>
94 + <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
95 + <Link>
96 + <KeyFile>$(LinkKeyFile)</KeyFile>
97 + <DelaySign>$(LinkDelaySign)</DelaySign>
98 + </Link>
99 + </ItemDefinitionGroup>
100 +</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/mbahost/host.vcxproj deleted
-51
@@ -1,51 +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 -
17 - <PropertyGroup Label="Globals">
18 - <ProjectGuid>{12C87C77-3547-44F8-8134-29BC915CB19D}</ProjectGuid>
19 - <ConfigurationType>DynamicLibrary</ConfigurationType>
20 - <CharacterSet>Unicode</CharacterSet>
21 - <TargetName>mbahost</TargetName>
22 - <ProjectModuleDefinitionFile>host.def</ProjectModuleDefinitionFile>
23 - </PropertyGroup>
24 -
25 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.props" />
26 -
27 - <PropertyGroup>
28 - <ProjectAdditionalIncludeDirectories>$(WixRoot)src\libs\dutil\inc;$(WixRoot)src\burn\inc;$(WixRoot)src\libs\balutil\inc;$(BaseIntermediateOutputPath)\core</ProjectAdditionalIncludeDirectories>
29 - <ProjectAdditionalLinkLibraries>dutil.lib;balutil.lib;shlwapi.lib</ProjectAdditionalLinkLibraries>
30 - </PropertyGroup>
31 -
32 - <ItemGroup>
33 - <ClCompile Include="host.cpp" />
34 - </ItemGroup>
35 - <ItemGroup>
36 - <ClInclude Include="IBootstrapperApplicationFactory.h" />
37 - <ClInclude Include="precomp.h" />
38 - </ItemGroup>
39 - <ItemGroup>
40 - <None Include="host.def" />
41 - </ItemGroup>
42 - <ItemGroup>
43 - <ResourceCompile Include="host.rc" />
44 - </ItemGroup>
45 -
46 - <ItemGroup>
47 - <ProjectReference Include="..\core\core.csproj" />
48 - </ItemGroup>
49 -
50 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
51 -</Project>
src/mbahost/mbahost.cpp renamed
+4 -4
@@ -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 #include "precomp.h"
4 -#include <BootstrapperCore.h> // includes the generated assembly name macros.
4 +#include <WixToolset.BootstrapperCore.h> // includes the generated assembly name macros.
5 #include "BalBaseBootstrapperApplicationProc.h"
6
7 static const DWORD NET452_RELEASE = 379893;
@@ -185,7 +185,7 @@ static HRESULT GetAppDomain(
185 hr = GetAppBase(&sczAppBase);
186 ExitOnFailure(hr, "Failed to get the host base path.");
187
188 - hr = PathConcat(sczAppBase, L"BootstrapperCore.config", &sczConfigPath);
188 + hr = PathConcat(sczAppBase, L"WixToolset.BootstrapperCore.config", &sczConfigPath);
189 ExitOnFailure(hr, "Failed to get the full path to the application configuration file.");
190
191 // Check that the supported framework is installed.
@@ -554,10 +554,10 @@ static HRESULT CreateManagedBootstrapperApplicationFactory(
554
555 ::VariantInit(&vtBAFactory);
556
557 - bstrAssemblyName = ::SysAllocString(MUX_ASSEMBLY_FULL_NAME);
557 + bstrAssemblyName = ::SysAllocString(MBA_ASSEMBLY_FULL_NAME);
558 ExitOnNull(bstrAssemblyName, hr, E_OUTOFMEMORY, "Failed to allocate the full assembly name for the bootstrapper application factory.");
559
560 - bstrTypeName = ::SysAllocString(L"WixToolset.Bootstrapper.BootstrapperApplicationFactory");
560 + bstrTypeName = ::SysAllocString(L"WixToolset.BootstrapperCore.BootstrapperApplicationFactory");
561 ExitOnNull(bstrTypeName, hr, E_OUTOFMEMORY, "Failed to allocate the full type name for the BA factory.");
562
563 hr = pAppDomain->CreateInstance(bstrAssemblyName, bstrTypeName, &pObj);
src/mbahost/mbahost.def renamed
src/mbahost/mbahost.vcxproj new
+64
@@ -0,0 +1,64 @@
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.BalUtil.4.0.4\build\WixToolset.BalUtil.props" Condition="Exists('..\..\packages\WixToolset.BalUtil.4.0.4\build\WixToolset.BalUtil.props')" />
6 + <Import Project="..\..\packages\WixToolset.BootstrapperCore.4.0.3\build\WixToolset.BootstrapperCore.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.4.0.1\build\WixToolset.BootstrapperCore.props')" />
7 + <Import Project="..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props')" />
8 +
9 + <ItemGroup Label="ProjectConfigurations">
10 + <ProjectConfiguration Include="Debug|Win32">
11 + <Configuration>Debug</Configuration>
12 + <Platform>Win32</Platform>
13 + </ProjectConfiguration>
14 + <ProjectConfiguration Include="Release|Win32">
15 + <Configuration>Release</Configuration>
16 + <Platform>Win32</Platform>
17 + </ProjectConfiguration>
18 + </ItemGroup>
19 +
20 + <PropertyGroup Label="Globals">
21 + <ProjectGuid>{12C87C77-3547-44F8-8134-29BC915CB19D}</ProjectGuid>
22 + <ConfigurationType>DynamicLibrary</ConfigurationType>
23 + <PlatformToolset>v141</PlatformToolset>
24 + <CharacterSet>Unicode</CharacterSet>
25 + <TargetName>mbahost</TargetName>
26 + <ProjectModuleDefinitionFile>mbahost.def</ProjectModuleDefinitionFile>
27 + </PropertyGroup>
28 +
29 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
30 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
31 +
32 + <PropertyGroup>
33 + <ProjectAdditionalLinkLibraries>shlwapi.lib</ProjectAdditionalLinkLibraries>
34 + </PropertyGroup>
35 +
36 + <ItemGroup>
37 + <ClCompile Include="mbahost.cpp" />
38 + <ClCompile Include="precomp.cpp">
39 + <PrecompiledHeader>Create</PrecompiledHeader>
40 + </ClCompile>
41 + </ItemGroup>
42 + <ItemGroup>
43 + <ClInclude Include="precomp.h" />
44 + </ItemGroup>
45 + <ItemGroup>
46 + <None Include="mbahost.def" />
47 + </ItemGroup>
48 +
49 + <ItemGroup>
50 + <None Include="packages.config" />
51 + </ItemGroup>
52 +
53 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
54 + <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
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.BalUtil.4.0.4\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BalUtil.4.0.4\build\WixToolset.BalUtil.props'))" />
60 + <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.4.0.3\build\WixToolset.BootstrapperCore.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.4.0.3\build\WixToolset.BootstrapperCore.props'))" />
61 + <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props'))" />
62 + <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'))" />
63 + </Target>
64 +</Project>
src/mbahost/packages.config new
+7
@@ -0,0 +1,7 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<packages>
3 + <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" />
4 + <package id="WixToolset.BootstrapperCore" version="4.0.3" targetFramework="native" />
5 + <package id="WixToolset.BalUtil" version="4.0.4" targetFramework="native" />
6 + <package id="WixToolset.DUtil" version="4.0.13" targetFramework="native" />
7 +</packages>
\ No newline at end of file
src/mbahost/precomp.cpp new
+3
@@ -0,0 +1,3 @@
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 +#include "precomp.h"
src/wixext/BalBinder.cs deleted
-125
@@ -1,125 +0,0 @@
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
4 -{
5 - using System;
6 - using System.Collections.Generic;
7 - using System.Linq;
8 - using System.Text;
9 - using WixToolset;
10 - using WixToolset.Data;
11 - using WixToolset.Data.Rows;
12 - using WixToolset.Extensibility;
13 -
14 - public class BalBinder : BinderExtension
15 - {
16 - public override void Finish(Output output)
17 - {
18 - // Only process Bundles.
19 - if (OutputType.Bundle != output.Type)
20 - {
21 - return;
22 - }
23 -
24 - Table baTable = output.Tables["WixBootstrapperApplication"];
25 - Row baRow = baTable.Rows[0];
26 - string baId = (string)baRow[0];
27 - if (null == baId)
28 - {
29 - return;
30 - }
31 -
32 - bool isStdBA = baId.StartsWith("WixStandardBootstrapperApplication");
33 - bool isMBA = baId.StartsWith("ManagedBootstrapperApplicationHost");
34 -
35 - if (isStdBA || isMBA)
36 - {
37 - VerifyBAFunctions(output);
38 - }
39 -
40 - if (isMBA)
41 - {
42 - VerifyPrereqPackages(output);
43 - }
44 - }
45 -
46 - private void VerifyBAFunctions(Output output)
47 - {
48 - Row baFunctionsRow = null;
49 - Table baFunctionsTable = output.Tables["WixBalBAFunctions"];
50 - foreach (Row row in baFunctionsTable.RowsAs<Row>())
51 - {
52 - if (null == baFunctionsRow)
53 - {
54 - baFunctionsRow = row;
55 - }
56 - else
57 - {
58 - this.Core.OnMessage(BalErrors.MultipleBAFunctions(row.SourceLineNumbers));
59 - }
60 - }
61 -
62 - Table payloadPropertiesTable = output.Tables["WixPayloadProperties"];
63 - IEnumerable<WixPayloadPropertiesRow> payloadPropertiesRows = payloadPropertiesTable.RowsAs<WixPayloadPropertiesRow>();
64 - if (null == baFunctionsRow)
65 - {
66 - foreach (WixPayloadPropertiesRow payloadPropertiesRow in payloadPropertiesRows)
67 - {
68 - // TODO: Make core WiX canonicalize Name (this won't catch '.\bafunctions.dll').
69 - if (String.Equals(payloadPropertiesRow.Name, "bafunctions.dll", StringComparison.OrdinalIgnoreCase))
70 - {
71 - this.Core.OnMessage(BalWarnings.UnmarkedBAFunctionsDLL(payloadPropertiesRow.SourceLineNumbers));
72 - }
73 - }
74 - }
75 - else
76 - {
77 - // TODO: May need to revisit this depending on the outcome of #5273.
78 - string payloadId = (string)baFunctionsRow[0];
79 - WixPayloadPropertiesRow bundlePayloadRow = payloadPropertiesRows.Single(x => payloadId == x.Id);
80 - if (Compiler.BurnUXContainerId != bundlePayloadRow.Container)
81 - {
82 - this.Core.OnMessage(BalErrors.BAFunctionsPayloadRequiredInUXContainer(baFunctionsRow.SourceLineNumbers));
83 - }
84 - }
85 - }
86 -
87 - private void VerifyPrereqPackages(Output output)
88 - {
89 - Table prereqInfoTable = output.Tables["WixMbaPrereqInformation"];
90 - if (null == prereqInfoTable || prereqInfoTable.Rows.Count == 0)
91 - {
92 - this.Core.OnMessage(BalErrors.MissingPrereq());
93 - return;
94 - }
95 -
96 - bool foundLicenseFile = false;
97 - bool foundLicenseUrl = false;
98 -
99 - foreach (Row prereqInfoRow in prereqInfoTable.Rows)
100 - {
101 - if (null != prereqInfoRow[1])
102 - {
103 - if (foundLicenseFile || foundLicenseUrl)
104 - {
105 - this.Core.OnMessage(BalErrors.MultiplePrereqLicenses(prereqInfoRow.SourceLineNumbers));
106 - return;
107 - }
108 -
109 - foundLicenseFile = true;
110 - }
111 -
112 - if (null != prereqInfoRow[2])
113 - {
114 - if (foundLicenseFile || foundLicenseUrl)
115 - {
116 - this.Core.OnMessage(BalErrors.MultiplePrereqLicenses(prereqInfoRow.SourceLineNumbers));
117 - return;
118 - }
119 -
120 - foundLicenseUrl = true;
121 - }
122 - }
123 - }
124 - }
125 -}
src/wixext/BalCompiler.cs
+135 -131
@@ -1,21 +1,22 @@
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.Bal
4 {
5 using System;
6 using System.Collections.Generic;
7 using System.Xml.Linq;
8 + using WixToolset.Bal.Tuples;
9 using WixToolset.Data;
9 - using WixToolset.Data.Rows;
10 + using WixToolset.Data.Tuples;
11 using WixToolset.Extensibility;
12
13 /// <summary>
14 /// The compiler for the WiX Toolset Bal Extension.
15 /// </summary>
15 - public sealed class BalCompiler : CompilerExtension
16 + public sealed class BalCompiler : BaseCompilerExtension
17 {
18 private SourceLineNumber addedConditionLineNumber;
18 - private Dictionary<string, Row> prereqInfoRows;
19 + private Dictionary<string, WixMbaPrereqInformationTuple> prereqInfoRows;
20
21 /// <summary>
22 /// Instantiate a new BalCompiler.
@@ -23,17 +24,20 @@ namespace WixToolset.Extensions
24 public BalCompiler()
25 {
26 this.addedConditionLineNumber = null;
26 - prereqInfoRows = new Dictionary<string, Row>();
27 - this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/bal";
27 + this.prereqInfoRows = new Dictionary<string, WixMbaPrereqInformationTuple>();
28 }
29
30 + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/bal";
31 +
32 /// <summary>
33 /// Processes an element for the Compiler.
34 /// </summary>
35 + /// <param name="intermediate"></param>
36 + /// <param name="section"></param>
37 /// <param name="parentElement">Parent element of element to process.</param>
38 /// <param name="element">Element to process.</param>
35 - /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
36 - public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context)
39 + /// <param name="context">Extra information about the context in which this element is being parsed.</param>
40 + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
41 {
42 switch (parentElement.Name.LocalName)
43 {
@@ -42,10 +46,10 @@ namespace WixToolset.Extensions
46 switch (element.Name.LocalName)
47 {
48 case "Condition":
45 - this.ParseConditionElement(element);
49 + this.ParseConditionElement(intermediate, section, element);
50 break;
51 default:
48 - this.Core.UnexpectedElement(parentElement, element);
52 + this.ParseHelper.UnexpectedElement(parentElement, element);
53 break;
54 }
55 break;
@@ -53,18 +57,18 @@ namespace WixToolset.Extensions
57 switch (element.Name.LocalName)
58 {
59 case "WixStandardBootstrapperApplication":
56 - this.ParseWixStandardBootstrapperApplicationElement(element);
60 + this.ParseWixStandardBootstrapperApplicationElement(intermediate, section, element);
61 break;
62 case "WixManagedBootstrapperApplicationHost":
59 - this.ParseWixManagedBootstrapperApplicationHostElement(element);
63 + this.ParseWixManagedBootstrapperApplicationHostElement(intermediate, section, element);
64 break;
65 default:
62 - this.Core.UnexpectedElement(parentElement, element);
66 + this.ParseHelper.UnexpectedElement(parentElement, element);
67 break;
68 }
69 break;
70 default:
67 - this.Core.UnexpectedElement(parentElement, element);
71 + this.ParseHelper.UnexpectedElement(parentElement, element);
72 break;
73 }
74 }
@@ -76,10 +80,10 @@ namespace WixToolset.Extensions
80 /// <param name="parentElement">Parent element of element to process.</param>
81 /// <param name="attribute">Attribute to process.</param>
82 /// <param name="context">Extra information about the context in which this element is being parsed.</param>
79 - public override void ParseAttribute(XElement parentElement, XAttribute attribute, IDictionary<string, string> context)
83 + public override void ParseAttribute(Intermediate intermediate, IntermediateSection section, XElement parentElement, XAttribute attribute, IDictionary<string, string> context)
84 {
81 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(parentElement);
82 - Row row;
85 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(parentElement);
86 + WixMbaPrereqInformationTuple prereqInfo;
87
88 switch (parentElement.Name.LocalName)
89 {
@@ -90,7 +94,7 @@ namespace WixToolset.Extensions
94 string packageId;
95 if (!context.TryGetValue("PackageId", out packageId) || String.IsNullOrEmpty(packageId))
96 {
93 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, parentElement.Name.LocalName, "Id", attribute.Name.LocalName));
97 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, parentElement.Name.LocalName, "Id", attribute.Name.LocalName));
98 }
99 else
100 {
@@ -98,80 +102,80 @@ namespace WixToolset.Extensions
102 {
103 case "PrereqLicenseFile":
104
101 - if (!prereqInfoRows.TryGetValue(packageId, out row))
105 + if (!this.prereqInfoRows.TryGetValue(packageId, out prereqInfo))
106 {
107 // at the time the extension attribute is parsed, the compiler might not yet have
108 // parsed the PrereqPackage attribute, so we need to get it directly from the parent element.
109 XAttribute prereqPackage = parentElement.Attribute(this.Namespace + "PrereqPackage");
110
107 - if (null != prereqPackage && YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, prereqPackage))
111 + if (null != prereqPackage && YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, prereqPackage))
112 {
109 - row = this.Core.CreateRow(sourceLineNumbers, "WixMbaPrereqInformation");
110 - row[0] = packageId;
113 + prereqInfo = (WixMbaPrereqInformationTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixMbaPrereqInformation");
114 + prereqInfo.PackageId = packageId;
115
112 - prereqInfoRows.Add(packageId, row);
116 + this.prereqInfoRows.Add(packageId, prereqInfo);
117 }
118 else
119 {
116 - this.Core.OnMessage(BalErrors.AttributeRequiresPrereqPackage(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseFile"));
120 + this.Messaging.Write(BalErrors.AttributeRequiresPrereqPackage(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseFile"));
121 break;
122 }
123 }
124
121 - if (null != row[2])
125 + if (null != prereqInfo.LicenseUrl)
126 {
123 - this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseFile", "PrereqLicenseUrl"));
127 + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseFile", "PrereqLicenseUrl"));
128 }
129 else
130 {
127 - row[1] = this.Core.GetAttributeValue(sourceLineNumbers, attribute);
131 + prereqInfo.LicenseFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attribute);
132 }
133 break;
134 case "PrereqLicenseUrl":
135
132 - if (!prereqInfoRows.TryGetValue(packageId, out row))
136 + if (!this.prereqInfoRows.TryGetValue(packageId, out prereqInfo))
137 {
138 // at the time the extension attribute is parsed, the compiler might not yet have
139 // parsed the PrereqPackage attribute, so we need to get it directly from the parent element.
140 XAttribute prereqPackage = parentElement.Attribute(this.Namespace + "PrereqPackage");
141
138 - if (null != prereqPackage && YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, prereqPackage))
142 + if (null != prereqPackage && YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, prereqPackage))
143 {
140 - row = this.Core.CreateRow(sourceLineNumbers, "WixMbaPrereqInformation");
141 - row[0] = packageId;
144 + prereqInfo = (WixMbaPrereqInformationTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixMbaPrereqInformation");
145 + prereqInfo.PackageId = packageId;
146
143 - prereqInfoRows.Add(packageId, row);
147 + this.prereqInfoRows.Add(packageId, prereqInfo);
148 }
149 else
150 {
147 - this.Core.OnMessage(BalErrors.AttributeRequiresPrereqPackage(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseUrl"));
151 + this.Messaging.Write(BalErrors.AttributeRequiresPrereqPackage(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseUrl"));
152 break;
153 }
154 }
155
152 - if (null != row[1])
156 + if (null != prereqInfo.LicenseFile)
157 {
154 - this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseUrl", "PrereqLicenseFile"));
158 + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, parentElement.Name.LocalName, "PrereqLicenseUrl", "PrereqLicenseFile"));
159 }
160 else
161 {
158 - row[2] = this.Core.GetAttributeValue(sourceLineNumbers, attribute);
162 + prereqInfo.LicenseUrl = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attribute);
163 }
164 break;
165 case "PrereqPackage":
162 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute))
166 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute))
167 {
164 - if (!prereqInfoRows.TryGetValue(packageId, out row))
168 + if (!this.prereqInfoRows.TryGetValue(packageId, out prereqInfo))
169 {
166 - row = this.Core.CreateRow(sourceLineNumbers, "WixMbaPrereqInformation");
167 - row[0] = packageId;
170 + prereqInfo = (WixMbaPrereqInformationTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixMbaPrereqInformation");
171 + prereqInfo.PackageId = packageId;
172
169 - prereqInfoRows.Add(packageId, row);
173 + this.prereqInfoRows.Add(packageId, prereqInfo);
174 }
175 }
176 break;
177 default:
174 - this.Core.UnexpectedAttribute(parentElement, attribute);
178 + this.ParseHelper.UnexpectedAttribute(parentElement, attribute);
179 break;
180 }
181 }
@@ -180,21 +184,21 @@ namespace WixToolset.Extensions
184 string payloadId;
185 if (!context.TryGetValue("Id", out payloadId) || String.IsNullOrEmpty(payloadId))
186 {
183 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, parentElement.Name.LocalName, "Id", attribute.Name.LocalName));
187 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, parentElement.Name.LocalName, "Id", attribute.Name.LocalName));
188 }
189 else
190 {
191 switch (attribute.Name.LocalName)
192 {
193 case "BAFunctions":
190 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute))
194 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute))
195 {
192 - row = this.Core.CreateRow(sourceLineNumbers, "WixBalBAFunctions");
193 - row[0] = payloadId;
196 + var tuple = (WixBalBAFunctionsTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBalBAFunctions");
197 + tuple.PayloadId = payloadId;
198 }
199 break;
200 default:
197 - this.Core.UnexpectedAttribute(parentElement, attribute);
201 + this.ParseHelper.UnexpectedAttribute(parentElement, attribute);
202 break;
203 }
204 }
@@ -205,21 +209,21 @@ namespace WixToolset.Extensions
209 XAttribute variableName = parentElement.Attribute("Name");
210 if (null == variableName)
211 {
208 - this.Core.OnMessage(WixErrors.ExpectedParentWithAttribute(sourceLineNumbers, "Variable", "Overridable", "Name"));
212 + this.Messaging.Write(ErrorMessages.ExpectedParentWithAttribute(sourceLineNumbers, "Variable", "Overridable", "Name"));
213 }
214 else
215 {
216 switch (attribute.Name.LocalName)
217 {
218 case "Overridable":
215 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attribute))
219 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute))
220 {
217 - row = this.Core.CreateRow(sourceLineNumbers, "WixStdbaOverridableVariable");
218 - row[0] = variableName;
221 + var tuple = (WixStdbaOverridableVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixStdbaOverridableVariable");
222 + tuple.Name = variableName.Value;
223 }
224 break;
225 default:
222 - this.Core.UnexpectedAttribute(parentElement, attribute);
226 + this.ParseHelper.UnexpectedAttribute(parentElement, attribute);
227 break;
228 }
229 }
@@ -231,10 +235,10 @@ namespace WixToolset.Extensions
235 /// Parses a Condition element for Bundles.
236 /// </summary>
237 /// <param name="node">The element to parse.</param>
234 - private void ParseConditionElement(XElement node)
238 + private void ParseConditionElement(Intermediate intermediate, IntermediateSection section, XElement node)
239 {
236 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
237 - string condition = this.Core.GetConditionInnerText(node); // condition is the inner text of the element.
240 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
241 + string condition = this.ParseHelper.GetConditionInnerText(node); // condition is the inner text of the element.
242 string message = null;
243
244 foreach (XAttribute attrib in node.Attributes())
@@ -244,37 +248,37 @@ namespace WixToolset.Extensions
248 switch (attrib.Name.LocalName)
249 {
250 case "Message":
247 - message = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
251 + message = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
252 break;
253 default:
250 - this.Core.UnexpectedAttribute(node, attrib);
254 + this.ParseHelper.UnexpectedAttribute(node, attrib);
255 break;
256 }
257 }
258 else
259 {
256 - this.Core.ParseExtensionAttribute(node, attrib);
260 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
261 }
262 }
263
260 - this.Core.ParseForExtensionElements(node);
264 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
265
266 // Error check the values.
267 if (String.IsNullOrEmpty(condition))
268 {
265 - this.Core.OnMessage(WixErrors.ConditionExpected(sourceLineNumbers, node.Name.LocalName));
269 + this.Messaging.Write(ErrorMessages.ConditionExpected(sourceLineNumbers, node.Name.LocalName));
270 }
271
272 if (null == message)
273 {
270 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Message"));
274 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Message"));
275 }
276
273 - if (!this.Core.EncounteredError)
277 + if (!this.Messaging.EncounteredError)
278 {
275 - Row row = this.Core.CreateRow(sourceLineNumbers, "WixBalCondition");
276 - row[0] = condition;
277 - row[1] = message;
279 + var tuple = (WixBalConditionTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBalCondition");
280 + tuple.Condition = condition;
281 + tuple.Message = message;
282
283 if (null == this.addedConditionLineNumber)
284 {
@@ -287,9 +291,9 @@ namespace WixToolset.Extensions
291 /// Parses a WixStandardBootstrapperApplication element for Bundles.
292 /// </summary>
293 /// <param name="node">The element to parse.</param>
290 - private void ParseWixStandardBootstrapperApplicationElement(XElement node)
294 + private void ParseWixStandardBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node)
295 {
292 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
296 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
297 string launchTarget = null;
298 string launchTargetElevatedId = null;
299 string launchArguments = null;
@@ -314,101 +318,101 @@ namespace WixToolset.Extensions
318 switch (attrib.Name.LocalName)
319 {
320 case "LaunchTarget":
317 - launchTarget = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
321 + launchTarget = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
322 break;
323 case "LaunchTargetElevatedId":
320 - launchTargetElevatedId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
324 + launchTargetElevatedId = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
325 break;
326 case "LaunchArguments":
323 - launchArguments = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
327 + launchArguments = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
328 break;
329 case "LaunchHidden":
326 - launchHidden = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
330 + launchHidden = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
331 break;
332 case "LaunchWorkingFolder":
329 - launchWorkingDir = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
333 + launchWorkingDir = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
334 break;
335 case "LicenseFile":
332 - licenseFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
336 + licenseFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
337 break;
338 case "LicenseUrl":
335 - licenseUrl = this.Core.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
339 + licenseUrl = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib, EmptyRule.CanBeEmpty);
340 break;
341 case "LogoFile":
338 - logoFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
342 + logoFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
343 break;
344 case "LogoSideFile":
341 - logoSideFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
345 + logoSideFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
346 break;
347 case "ThemeFile":
344 - themeFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
348 + themeFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
349 break;
350 case "LocalizationFile":
347 - localizationFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
351 + localizationFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
352 break;
353 case "SuppressOptionsUI":
350 - suppressOptionsUI = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
354 + suppressOptionsUI = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
355 break;
356 case "SuppressDowngradeFailure":
353 - suppressDowngradeFailure = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
357 + suppressDowngradeFailure = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
358 break;
359 case "SuppressRepair":
356 - suppressRepair = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
360 + suppressRepair = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
361 break;
362 case "ShowVersion":
359 - showVersion = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
363 + showVersion = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
364 break;
365 case "SupportCacheOnly":
362 - supportCacheOnly = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
366 + supportCacheOnly = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
367 break;
368 default:
365 - this.Core.UnexpectedAttribute(node, attrib);
369 + this.ParseHelper.UnexpectedAttribute(node, attrib);
370 break;
371 }
372 }
373 else
374 {
371 - this.Core.ParseExtensionAttribute(node, attrib);
375 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
376 }
377 }
378
375 - this.Core.ParseForExtensionElements(node);
379 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
380
381 if (String.IsNullOrEmpty(licenseFile) && null == licenseUrl)
382 {
379 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "LicenseFile", "LicenseUrl", true));
383 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "LicenseFile", "LicenseUrl", true));
384 }
385
382 - if (!this.Core.EncounteredError)
386 + if (!this.Messaging.EncounteredError)
387 {
388 if (!String.IsNullOrEmpty(launchTarget))
389 {
386 - WixBundleVariableRow row = (WixBundleVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixBundleVariable");
387 - row.Id = "LaunchTarget";
390 + var row = (WixBundleVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBundleVariable");
391 + row.Id = new Identifier("LaunchTarget", AccessModifier.Public);
392 row.Value = launchTarget;
393 row.Type = "string";
394 }
395
396 if (!String.IsNullOrEmpty(launchTargetElevatedId))
397 {
394 - WixBundleVariableRow row = (WixBundleVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixBundleVariable");
395 - row.Id = "LaunchTargetElevatedId";
398 + var row = (WixBundleVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBundleVariable");
399 + row.Id = new Identifier("LaunchTargetElevatedId", AccessModifier.Public);
400 row.Value = launchTargetElevatedId;
401 row.Type = "string";
402 }
403
404 if (!String.IsNullOrEmpty(launchArguments))
405 {
402 - WixBundleVariableRow row = (WixBundleVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixBundleVariable");
403 - row.Id = "LaunchArguments";
406 + var row = (WixBundleVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBundleVariable");
407 + row.Id = new Identifier("LaunchArguments", AccessModifier.Public);
408 row.Value = launchArguments;
409 row.Type = "string";
410 }
411
412 if (YesNoType.Yes == launchHidden)
413 {
410 - WixBundleVariableRow row = (WixBundleVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixBundleVariable");
411 - row.Id = "LaunchHidden";
414 + var row = (WixBundleVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixBundleVariable");
415 + row.Id = new Identifier("LaunchHidden", AccessModifier.Public);
416 row.Value = "yes";
417 row.Type = "string";
418 }
@@ -416,80 +420,80 @@ namespace WixToolset.Extensions
420
421 if (!String.IsNullOrEmpty(launchWorkingDir))
422 {
419 - WixBundleVariableRow row = (WixBundleVariableRow)this.Core.CreateRow(sourceLineNumbers, "Variable");
420 - row.Id = "LaunchWorkingFolder";
423 + var row = (WixBundleVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "Variable");
424 + row.Id = new Identifier("LaunchWorkingFolder", AccessModifier.Public);
425 row.Value = launchWorkingDir;
426 row.Type = "string";
427 }
428
429 if (!String.IsNullOrEmpty(licenseFile))
430 {
427 - WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
428 - wixVariableRow.Id = "WixStdbaLicenseRtf";
431 + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable");
432 + wixVariableRow.Id = new Identifier("WixStdbaLicenseRtf", AccessModifier.Public);
433 wixVariableRow.Value = licenseFile;
434 }
435
436 if (null != licenseUrl)
437 {
434 - WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
435 - wixVariableRow.Id = "WixStdbaLicenseUrl";
438 + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable");
439 + wixVariableRow.Id = new Identifier("WixStdbaLicenseUrl", AccessModifier.Public);
440 wixVariableRow.Value = licenseUrl;
441 }
442
443 if (!String.IsNullOrEmpty(logoFile))
444 {
441 - WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
442 - wixVariableRow.Id = "WixStdbaLogo";
445 + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable");
446 + wixVariableRow.Id = new Identifier("WixStdbaLogo", AccessModifier.Public);
447 wixVariableRow.Value = logoFile;
448 }
449
450 if (!String.IsNullOrEmpty(logoSideFile))
451 {
448 - WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
449 - wixVariableRow.Id = "WixStdbaLogoSide";
452 + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable");
453 + wixVariableRow.Id = new Identifier("WixStdbaLogoSide", AccessModifier.Public);
454 wixVariableRow.Value = logoSideFile;
455 }
456
457 if (!String.IsNullOrEmpty(themeFile))
458 {
455 - WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
456 - wixVariableRow.Id = "WixStdbaThemeXml";
459 + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable");
460 + wixVariableRow.Id = new Identifier("WixStdbaThemeXml", AccessModifier.Public);
461 wixVariableRow.Value = themeFile;
462 }
463
464 if (!String.IsNullOrEmpty(localizationFile))
465 {
462 - WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
463 - wixVariableRow.Id = "WixStdbaThemeWxl";
466 + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable");
467 + wixVariableRow.Id = new Identifier("WixStdbaThemeWxl", AccessModifier.Public);
468 wixVariableRow.Value = localizationFile;
469 }
470
471 if (YesNoType.Yes == suppressOptionsUI || YesNoType.Yes == suppressDowngradeFailure || YesNoType.Yes == suppressRepair || YesNoType.Yes == showVersion || YesNoType.Yes == supportCacheOnly)
472 {
469 - Row row = this.Core.CreateRow(sourceLineNumbers, "WixStdbaOptions");
473 + var tuple = (WixStdbaOptionsTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixStdbaOptions");
474 if (YesNoType.Yes == suppressOptionsUI)
475 {
472 - row[0] = 1;
476 + tuple.SuppressOptionsUI = 1;
477 }
478
479 if (YesNoType.Yes == suppressDowngradeFailure)
480 {
477 - row[1] = 1;
481 + tuple.SuppressDowngradeFailure = 1;
482 }
483
484 if (YesNoType.Yes == suppressRepair)
485 {
482 - row[2] = 1;
486 + tuple.SuppressRepair = 1;
487 }
488
489 if (YesNoType.Yes == showVersion)
490 {
487 - row[3] = 1;
491 + tuple.ShowVersion = 1;
492 }
493
494 if (YesNoType.Yes == supportCacheOnly)
495 {
492 - row[4] = 1;
496 + tuple.SupportCacheOnly = 1;
497 }
498 }
499 }
@@ -499,9 +503,9 @@ namespace WixToolset.Extensions
503 /// Parses a WixManagedBootstrapperApplicationHost element for Bundles.
504 /// </summary>
505 /// <param name="node">The element to parse.</param>
502 - private void ParseWixManagedBootstrapperApplicationHostElement(XElement node)
506 + private void ParseWixManagedBootstrapperApplicationHostElement(Intermediate intermediate, IntermediateSection section, XElement node)
507 {
504 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
508 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
509 string logoFile = null;
510 string themeFile = null;
511 string localizationFile = null;
@@ -513,47 +517,47 @@ namespace WixToolset.Extensions
517 switch (attrib.Name.LocalName)
518 {
519 case "LogoFile":
516 - logoFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
520 + logoFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
521 break;
522 case "ThemeFile":
519 - themeFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
523 + themeFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
524 break;
525 case "LocalizationFile":
522 - localizationFile = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
526 + localizationFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
527 break;
528 default:
525 - this.Core.UnexpectedAttribute(node, attrib);
529 + this.ParseHelper.UnexpectedAttribute(node, attrib);
530 break;
531 }
532 }
533 else
534 {
531 - this.Core.ParseExtensionAttribute(node, attrib);
535 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
536 }
537 }
538
535 - this.Core.ParseForExtensionElements(node);
539 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
540
537 - if (!this.Core.EncounteredError)
541 + if (!this.Messaging.EncounteredError)
542 {
543 if (!String.IsNullOrEmpty(logoFile))
544 {
541 - WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
542 - wixVariableRow.Id = "PreqbaLogo";
545 + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable");
546 + wixVariableRow.Id = new Identifier("PreqbaLogo", AccessModifier.Public);
547 wixVariableRow.Value = logoFile;
548 }
549
550 if (!String.IsNullOrEmpty(themeFile))
551 {
548 - WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
549 - wixVariableRow.Id = "PreqbaThemeXml";
552 + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable");
553 + wixVariableRow.Id = new Identifier("PreqbaThemeXml", AccessModifier.Public);
554 wixVariableRow.Value = themeFile;
555 }
556
557 if (!String.IsNullOrEmpty(localizationFile))
558 {
555 - WixVariableRow wixVariableRow = (WixVariableRow)this.Core.CreateRow(sourceLineNumbers, "WixVariable");
556 - wixVariableRow.Id = "PreqbaThemeWxl";
559 + var wixVariableRow = (WixVariableTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixVariable");
560 + wixVariableRow.Id = new Identifier("PreqbaThemeWxl", AccessModifier.Public);
561 wixVariableRow.Value = localizationFile;
562 }
563 }
src/wixext/BalErrors.cs new
+55
@@ -0,0 +1,55 @@
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.Bal
4 +{
5 + using System;
6 + using System.Resources;
7 + using WixToolset.Data;
8 +
9 + public static class BalErrors
10 + {
11 + public static Message AttributeRequiresPrereqPackage(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
12 + {
13 + return Message(sourceLineNumbers, Ids.AttributeRequiresPrereqPackage, "When the {0}/@{1} attribute is specified, the {0}/@PrereqPackage attribute must be set to \"yes\".", elementName, attributeName);
14 + }
15 +
16 + public static Message BAFunctionsPayloadRequiredInUXContainer(SourceLineNumber sourceLineNumbers)
17 + {
18 + return Message(sourceLineNumbers, Ids.BAFunctionsPayloadRequiredInUXContainer, "The BAFunctions DLL Payload element must be located inside the BootstrapperApplication container.");
19 + }
20 +
21 + public static Message MissingPrereq()
22 + {
23 + return Message(null, Ids.MissingPrereq, "There must be at least one PrereqPackage when using the ManagedBootstrapperApplicationHost.\nThis is typically done by using the WixNetFxExtension and referencing one of the NetFxAsPrereq package groups.");
24 + }
25 +
26 + public static Message MultipleBAFunctions(SourceLineNumber sourceLineNumbers)
27 + {
28 + return Message(sourceLineNumbers, Ids.MultipleBAFunctions, "WixStandardBootstrapperApplication doesn't support multiple BAFunctions DLLs.");
29 + }
30 +
31 + public static Message MultiplePrereqLicenses(SourceLineNumber sourceLineNumbers)
32 + {
33 + return Message(sourceLineNumbers, Ids.MultiplePrereqLicenses, "There may only be one package in the bundle that has either the PrereqLicenseFile attribute or the PrereqLicenseUrl attribute.");
34 + }
35 +
36 + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
37 + {
38 + return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
39 + }
40 +
41 + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
42 + {
43 + return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args);
44 + }
45 +
46 + public enum Ids
47 + {
48 + AttributeRequiresPrereqPackage = 6801,
49 + MissingPrereq = 6802,
50 + MultiplePrereqLicenses = 6803,
51 + MultipleBAFunctions = 6804,
52 + BAFunctionsPayloadRequiredInUXContainer = 6805,
53 + }
54 + }
55 +}
src/wixext/BalExtensionData.cs
+10 -35
@@ -1,55 +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.Bal
4 {
5 - using System;
6 - using System.Reflection;
5 using WixToolset.Data;
6 using WixToolset.Extensibility;
7
8 /// <summary>
9 /// The WiX Toolset Bal Extension.
10 /// </summary>
13 - public sealed class BalExtensionData : ExtensionData
11 + public sealed class BalExtensionData : BaseExtensionData
12 {
13 /// <summary>
16 - /// Gets the optional table definitions for this extension.
14 + /// Gets the default culture.
15 /// </summary>
18 - /// <value>The optional table definitions for this extension.</value>
19 - public override TableDefinitionCollection TableDefinitions
20 - {
21 - get
22 - {
23 - return BalExtensionData.GetExtensionTableDefinitions();
24 - }
25 - }
16 + /// <value>The default culture.</value>
17 + public override string DefaultCulture => "en-US";
18
27 - /// <summary>
28 - /// Gets the library associated with this extension.
29 - /// </summary>
30 - /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
31 - /// <returns>The loaded library.</returns>
32 - public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
19 + public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
20 {
34 - return BalExtensionData.GetExtensionLibrary(tableDefinitions);
21 + tupleDefinition = BalTupleDefinitions.ByName(name);
22 + return tupleDefinition != null;
23 }
24
37 - /// <summary>
38 - /// Internal mechanism to access the extension's table definitions.
39 - /// </summary>
40 - /// <returns>Extension's table definitions.</returns>
41 - internal static TableDefinitionCollection GetExtensionTableDefinitions()
42 - {
43 - return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml");
44 - }
45 -
46 - /// <summary>
47 - /// Internal mechanism to access the extension's library.
48 - /// </summary>
49 - /// <returns>Extension's library.</returns>
50 - internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
25 + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
26 {
52 - return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.bal.wixlib", tableDefinitions);
27 + return Intermediate.Load(typeof(BalExtensionData).Assembly, "WixToolset.Bal.bal.wixlib", tupleDefinitions);
28 }
29 }
30 }
src/wixext/BalExtensionFactory.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.Bal
4 +{
5 + using System;
6 + using System.Collections.Generic;
7 + using WixToolset.Extensibility;
8 +
9 + public class BalExtensionFactory : BaseExtensionFactory
10 + {
11 + protected override IEnumerable<Type> ExtensionTypes => new[]
12 + {
13 + typeof(BalCompiler),
14 + typeof(BalExtensionData),
15 + typeof(BalWindowsInstallerBackendBinderExtension),
16 + };
17 + }
18 +}
src/wixext/BalWarnings.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.Bal
4 +{
5 + using System;
6 + using System.Resources;
7 + using WixToolset.Data;
8 +
9 + public static class BalWarnings
10 + {
11 + public static Message UnmarkedBAFunctionsDLL(SourceLineNumber sourceLineNumbers)
12 + {
13 + return Message(sourceLineNumbers, Ids.UnmarkedBAFunctionsDLL, "WixStandardBootstrapperApplication doesn't automatically load BAFunctions.dll. Use the bal:BAFunctions attribute to indicate that it should be loaded.");
14 + }
15 +
16 + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
17 + {
18 + return new Message(sourceLineNumber, MessageLevel.Warning, (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.Warning, (int)id, resourceManager, resourceName, args);
24 + }
25 +
26 + public enum Ids
27 + {
28 + UnmarkedBAFunctionsDLL = 6501,
29 + }
30 + }
31 +}
src/wixext/BalWindowsInstallerBackendBinderExtension.cs new
+146
@@ -0,0 +1,146 @@
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.Bal
4 +{
5 + using System;
6 + using System.Linq;
7 + using System.Xml;
8 + using WixToolset.Data;
9 + using WixToolset.Data.WindowsInstaller;
10 + using WixToolset.Data.WindowsInstaller.Rows;
11 + using WixToolset.Extensibility;
12 + using WixToolset.Extensibility.Data;
13 +
14 + public class BalWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension
15 + {
16 + // TODO: don't duplicate this from WixToolset.Core.Compiler
17 + public const string BurnUXContainerId = "WixUXContainer";
18 +
19 + private static readonly TableDefinition[] Tables = LoadTables();
20 +
21 + protected override TableDefinition[] TableDefinitionsForTuples => Tables;
22 +
23 + private static TableDefinition[] LoadTables()
24 + {
25 + using (var resourceStream = typeof(BalWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Bal.tables.xml"))
26 + using (var reader = XmlReader.Create(resourceStream))
27 + {
28 + var tables = TableDefinitionCollection.Load(reader);
29 + return tables.ToArray();
30 + }
31 + }
32 +
33 + public override void PostBackendBind(BindResult result, Pdb pdb)
34 + {
35 + base.PostBackendBind(result, pdb);
36 +
37 + var output = pdb.Output;
38 +
39 + // Only process Bundles.
40 + if (OutputType.Bundle != output.Type)
41 + {
42 + return;
43 + }
44 +
45 + var baTable = output.Tables["WixBootstrapperApplication"];
46 + var baRow = baTable.Rows[0];
47 + var baId = (string)baRow[0];
48 + if (null == baId)
49 + {
50 + return;
51 + }
52 +
53 + var isStdBA = baId.StartsWith("WixStandardBootstrapperApplication");
54 + var isMBA = baId.StartsWith("ManagedBootstrapperApplicationHost");
55 +
56 + if (isStdBA || isMBA)
57 + {
58 + this.VerifyBAFunctions(output);
59 + }
60 +
61 + if (isMBA)
62 + {
63 + this.VerifyPrereqPackages(output);
64 + }
65 + }
66 +
67 + private void VerifyBAFunctions(Output output)
68 + {
69 + Row baFunctionsRow = null;
70 + var baFunctionsTable = output.Tables["WixBalBAFunctions"];
71 + foreach (var row in baFunctionsTable.Rows)
72 + {
73 + if (null == baFunctionsRow)
74 + {
75 + baFunctionsRow = row;
76 + }
77 + else
78 + {
79 + this.Messaging.Write(BalErrors.MultipleBAFunctions(row.SourceLineNumbers));
80 + }
81 + }
82 +
83 + var payloadPropertiesTable = output.Tables["WixPayloadProperties"];
84 + var payloadPropertiesRows = payloadPropertiesTable.Rows.Cast<WixPayloadPropertiesRow>();
85 + if (null == baFunctionsRow)
86 + {
87 + foreach (var payloadPropertiesRow in payloadPropertiesRows)
88 + {
89 + // TODO: Make core WiX canonicalize Name (this won't catch '.\bafunctions.dll').
90 + if (string.Equals(payloadPropertiesRow.Name, "bafunctions.dll", StringComparison.OrdinalIgnoreCase))
91 + {
92 + this.Messaging.Write(BalWarnings.UnmarkedBAFunctionsDLL(payloadPropertiesRow.SourceLineNumbers));
93 + }
94 + }
95 + }
96 + else
97 + {
98 + // TODO: May need to revisit this depending on the outcome of #5273.
99 + var payloadId = (string)baFunctionsRow[0];
100 + var bundlePayloadRow = payloadPropertiesRows.Single(x => payloadId == x.Id);
101 + if (BurnUXContainerId != bundlePayloadRow.Container)
102 + {
103 + this.Messaging.Write(BalErrors.BAFunctionsPayloadRequiredInUXContainer(baFunctionsRow.SourceLineNumbers));
104 + }
105 + }
106 + }
107 +
108 + private void VerifyPrereqPackages(Output output)
109 + {
110 + var prereqInfoTable = output.Tables["WixMbaPrereqInformation"];
111 + if (null == prereqInfoTable || prereqInfoTable.Rows.Count == 0)
112 + {
113 + this.Messaging.Write(BalErrors.MissingPrereq());
114 + return;
115 + }
116 +
117 + var foundLicenseFile = false;
118 + var foundLicenseUrl = false;
119 +
120 + foreach (Row prereqInfoRow in prereqInfoTable.Rows)
121 + {
122 + if (null != prereqInfoRow[1])
123 + {
124 + if (foundLicenseFile || foundLicenseUrl)
125 + {
126 + this.Messaging.Write(BalErrors.MultiplePrereqLicenses(prereqInfoRow.SourceLineNumbers));
127 + return;
128 + }
129 +
130 + foundLicenseFile = true;
131 + }
132 +
133 + if (null != prereqInfoRow[2])
134 + {
135 + if (foundLicenseFile || foundLicenseUrl)
136 + {
137 + this.Messaging.Write(BalErrors.MultiplePrereqLicenses(prereqInfoRow.SourceLineNumbers));
138 + return;
139 + }
140 +
141 + foundLicenseUrl = true;
142 + }
143 + }
144 + }
145 + }
146 +}
src/wixext/Tuples/BalTupleDefinitions.cs new
+55
@@ -0,0 +1,55 @@
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.Bal
4 +{
5 + using System;
6 + using WixToolset.Data;
7 +
8 + public enum BalTupleDefinitionType
9 + {
10 + WixBalBAFunctions,
11 + WixBalCondition,
12 + WixMbaPrereqInformation,
13 + WixStdbaOptions,
14 + WixStdbaOverridableVariable,
15 + }
16 +
17 + public static partial class BalTupleDefinitions
18 + {
19 + public static readonly Version Version = new Version("4.0.0");
20 +
21 + public static IntermediateTupleDefinition ByName(string name)
22 + {
23 + if (!Enum.TryParse(name, out BalTupleDefinitionType type))
24 + {
25 + return null;
26 + }
27 +
28 + return ByType(type);
29 + }
30 +
31 + public static IntermediateTupleDefinition ByType(BalTupleDefinitionType type)
32 + {
33 + switch (type)
34 + {
35 + case BalTupleDefinitionType.WixBalBAFunctions:
36 + return BalTupleDefinitions.WixBalBAFunctions;
37 +
38 + case BalTupleDefinitionType.WixBalCondition:
39 + return BalTupleDefinitions.WixBalCondition;
40 +
41 + case BalTupleDefinitionType.WixMbaPrereqInformation:
42 + return BalTupleDefinitions.WixMbaPrereqInformation;
43 +
44 + case BalTupleDefinitionType.WixStdbaOptions:
45 + return BalTupleDefinitions.WixStdbaOptions;
46 +
47 + case BalTupleDefinitionType.WixStdbaOverridableVariable:
48 + return BalTupleDefinitions.WixStdbaOverridableVariable;
49 +
50 + default:
51 + throw new ArgumentOutOfRangeException(nameof(type));
52 + }
53 + }
54 + }
55 +}
src/wixext/Tuples/WixBalBAFunctionsTuple.cs new
+47
@@ -0,0 +1,47 @@
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.Bal
4 +{
5 + using WixToolset.Data;
6 + using WixToolset.Bal.Tuples;
7 +
8 + public static partial class BalTupleDefinitions
9 + {
10 + public static readonly IntermediateTupleDefinition WixBalBAFunctions = new IntermediateTupleDefinition(
11 + BalTupleDefinitionType.WixBalBAFunctions.ToString(),
12 + new[]
13 + {
14 + new IntermediateFieldDefinition(nameof(WixBalBAFunctionsTupleFields.PayloadId), IntermediateFieldType.String),
15 + },
16 + typeof(WixBalBAFunctionsTuple));
17 + }
18 +}
19 +
20 +namespace WixToolset.Bal.Tuples
21 +{
22 + using WixToolset.Data;
23 +
24 + public enum WixBalBAFunctionsTupleFields
25 + {
26 + PayloadId,
27 + }
28 +
29 + public class WixBalBAFunctionsTuple : IntermediateTuple
30 + {
31 + public WixBalBAFunctionsTuple() : base(BalTupleDefinitions.WixBalBAFunctions, null, null)
32 + {
33 + }
34 +
35 + public WixBalBAFunctionsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalTupleDefinitions.WixBalBAFunctions, sourceLineNumber, id)
36 + {
37 + }
38 +
39 + public IntermediateField this[WixBalBAFunctionsTupleFields index] => this.Fields[(int)index];
40 +
41 + public string PayloadId
42 + {
43 + get => this.Fields[(int)WixBalBAFunctionsTupleFields.PayloadId].AsString();
44 + set => this.Set((int)WixBalBAFunctionsTupleFields.PayloadId, value);
45 + }
46 + }
47 +}
\ No newline at end of file
src/wixext/Tuples/WixBalConditionTuple.cs new
+55
@@ -0,0 +1,55 @@
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.Bal
4 +{
5 + using WixToolset.Data;
6 + using WixToolset.Bal.Tuples;
7 +
8 + public static partial class BalTupleDefinitions
9 + {
10 + public static readonly IntermediateTupleDefinition WixBalCondition = new IntermediateTupleDefinition(
11 + BalTupleDefinitionType.WixBalCondition.ToString(),
12 + new[]
13 + {
14 + new IntermediateFieldDefinition(nameof(WixBalConditionTupleFields.Condition), IntermediateFieldType.String),
15 + new IntermediateFieldDefinition(nameof(WixBalConditionTupleFields.Message), IntermediateFieldType.String),
16 + },
17 + typeof(WixBalConditionTuple));
18 + }
19 +}
20 +
21 +namespace WixToolset.Bal.Tuples
22 +{
23 + using WixToolset.Data;
24 +
25 + public enum WixBalConditionTupleFields
26 + {
27 + Condition,
28 + Message,
29 + }
30 +
31 + public class WixBalConditionTuple : IntermediateTuple
32 + {
33 + public WixBalConditionTuple() : base(BalTupleDefinitions.WixBalCondition, null, null)
34 + {
35 + }
36 +
37 + public WixBalConditionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalTupleDefinitions.WixBalCondition, sourceLineNumber, id)
38 + {
39 + }
40 +
41 + public IntermediateField this[WixBalConditionTupleFields index] => this.Fields[(int)index];
42 +
43 + public string Condition
44 + {
45 + get => this.Fields[(int)WixBalConditionTupleFields.Condition].AsString();
46 + set => this.Set((int)WixBalConditionTupleFields.Condition, value);
47 + }
48 +
49 + public string Message
50 + {
51 + get => this.Fields[(int)WixBalConditionTupleFields.Message].AsString();
52 + set => this.Set((int)WixBalConditionTupleFields.Message, value);
53 + }
54 + }
55 +}
\ No newline at end of file
src/wixext/Tuples/WixMbaPrereqInformationTuple.cs new
+63
@@ -0,0 +1,63 @@
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.Bal
4 +{
5 + using WixToolset.Data;
6 + using WixToolset.Bal.Tuples;
7 +
8 + public static partial class BalTupleDefinitions
9 + {
10 + public static readonly IntermediateTupleDefinition WixMbaPrereqInformation = new IntermediateTupleDefinition(
11 + BalTupleDefinitionType.WixMbaPrereqInformation.ToString(),
12 + new[]
13 + {
14 + new IntermediateFieldDefinition(nameof(WixMbaPrereqInformationTupleFields.PackageId), IntermediateFieldType.String),
15 + new IntermediateFieldDefinition(nameof(WixMbaPrereqInformationTupleFields.LicenseFile), IntermediateFieldType.String),
16 + new IntermediateFieldDefinition(nameof(WixMbaPrereqInformationTupleFields.LicenseUrl), IntermediateFieldType.String),
17 + },
18 + typeof(WixMbaPrereqInformationTuple));
19 + }
20 +}
21 +
22 +namespace WixToolset.Bal.Tuples
23 +{
24 + using WixToolset.Data;
25 +
26 + public enum WixMbaPrereqInformationTupleFields
27 + {
28 + PackageId,
29 + LicenseFile,
30 + LicenseUrl,
31 + }
32 +
33 + public class WixMbaPrereqInformationTuple : IntermediateTuple
34 + {
35 + public WixMbaPrereqInformationTuple() : base(BalTupleDefinitions.WixMbaPrereqInformation, null, null)
36 + {
37 + }
38 +
39 + public WixMbaPrereqInformationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalTupleDefinitions.WixMbaPrereqInformation, sourceLineNumber, id)
40 + {
41 + }
42 +
43 + public IntermediateField this[WixMbaPrereqInformationTupleFields index] => this.Fields[(int)index];
44 +
45 + public string PackageId
46 + {
47 + get => this.Fields[(int)WixMbaPrereqInformationTupleFields.PackageId].AsString();
48 + set => this.Set((int)WixMbaPrereqInformationTupleFields.PackageId, value);
49 + }
50 +
51 + public string LicenseFile
52 + {
53 + get => this.Fields[(int)WixMbaPrereqInformationTupleFields.LicenseFile].AsString();
54 + set => this.Set((int)WixMbaPrereqInformationTupleFields.LicenseFile, value);
55 + }
56 +
57 + public string LicenseUrl
58 + {
59 + get => this.Fields[(int)WixMbaPrereqInformationTupleFields.LicenseUrl].AsString();
60 + set => this.Set((int)WixMbaPrereqInformationTupleFields.LicenseUrl, value);
61 + }
62 + }
63 +}
\ No newline at end of file
src/wixext/Tuples/WixStdbaOptionsTuple.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.Bal
4 +{
5 + using WixToolset.Data;
6 + using WixToolset.Bal.Tuples;
7 +
8 + public static partial class BalTupleDefinitions
9 + {
10 + public static readonly IntermediateTupleDefinition WixStdbaOptions = new IntermediateTupleDefinition(
11 + BalTupleDefinitionType.WixStdbaOptions.ToString(),
12 + new[]
13 + {
14 + new IntermediateFieldDefinition(nameof(WixStdbaOptionsTupleFields.SuppressOptionsUI), IntermediateFieldType.Number),
15 + new IntermediateFieldDefinition(nameof(WixStdbaOptionsTupleFields.SuppressDowngradeFailure), IntermediateFieldType.Number),
16 + new IntermediateFieldDefinition(nameof(WixStdbaOptionsTupleFields.SuppressRepair), IntermediateFieldType.Number),
17 + new IntermediateFieldDefinition(nameof(WixStdbaOptionsTupleFields.ShowVersion), IntermediateFieldType.Number),
18 + new IntermediateFieldDefinition(nameof(WixStdbaOptionsTupleFields.SupportCacheOnly), IntermediateFieldType.Number),
19 + },
20 + typeof(WixStdbaOptionsTuple));
21 + }
22 +}
23 +
24 +namespace WixToolset.Bal.Tuples
25 +{
26 + using WixToolset.Data;
27 +
28 + public enum WixStdbaOptionsTupleFields
29 + {
30 + SuppressOptionsUI,
31 + SuppressDowngradeFailure,
32 + SuppressRepair,
33 + ShowVersion,
34 + SupportCacheOnly,
35 + }
36 +
37 + public class WixStdbaOptionsTuple : IntermediateTuple
38 + {
39 + public WixStdbaOptionsTuple() : base(BalTupleDefinitions.WixStdbaOptions, null, null)
40 + {
41 + }
42 +
43 + public WixStdbaOptionsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalTupleDefinitions.WixStdbaOptions, sourceLineNumber, id)
44 + {
45 + }
46 +
47 + public IntermediateField this[WixStdbaOptionsTupleFields index] => this.Fields[(int)index];
48 +
49 + public int SuppressOptionsUI
50 + {
51 + get => this.Fields[(int)WixStdbaOptionsTupleFields.SuppressOptionsUI].AsNumber();
52 + set => this.Set((int)WixStdbaOptionsTupleFields.SuppressOptionsUI, value);
53 + }
54 +
55 + public int SuppressDowngradeFailure
56 + {
57 + get => this.Fields[(int)WixStdbaOptionsTupleFields.SuppressDowngradeFailure].AsNumber();
58 + set => this.Set((int)WixStdbaOptionsTupleFields.SuppressDowngradeFailure, value);
59 + }
60 +
61 + public int SuppressRepair
62 + {
63 + get => this.Fields[(int)WixStdbaOptionsTupleFields.SuppressRepair].AsNumber();
64 + set => this.Set((int)WixStdbaOptionsTupleFields.SuppressRepair, value);
65 + }
66 +
67 + public int ShowVersion
68 + {
69 + get => this.Fields[(int)WixStdbaOptionsTupleFields.ShowVersion].AsNumber();
70 + set => this.Set((int)WixStdbaOptionsTupleFields.ShowVersion, value);
71 + }
72 +
73 + public int SupportCacheOnly
74 + {
75 + get => this.Fields[(int)WixStdbaOptionsTupleFields.SupportCacheOnly].AsNumber();
76 + set => this.Set((int)WixStdbaOptionsTupleFields.SupportCacheOnly, value);
77 + }
78 + }
79 +}
\ No newline at end of file
src/wixext/Tuples/WixStdbaOverridableVariableTuple.cs new
+47
@@ -0,0 +1,47 @@
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.Bal
4 +{
5 + using WixToolset.Data;
6 + using WixToolset.Bal.Tuples;
7 +
8 + public static partial class BalTupleDefinitions
9 + {
10 + public static readonly IntermediateTupleDefinition WixStdbaOverridableVariable = new IntermediateTupleDefinition(
11 + BalTupleDefinitionType.WixStdbaOverridableVariable.ToString(),
12 + new[]
13 + {
14 + new IntermediateFieldDefinition(nameof(WixStdbaOverridableVariableTupleFields.Name), IntermediateFieldType.String),
15 + },
16 + typeof(WixStdbaOverridableVariableTuple));
17 + }
18 +}
19 +
20 +namespace WixToolset.Bal.Tuples
21 +{
22 + using WixToolset.Data;
23 +
24 + public enum WixStdbaOverridableVariableTupleFields
25 + {
26 + Name,
27 + }
28 +
29 + public class WixStdbaOverridableVariableTuple : IntermediateTuple
30 + {
31 + public WixStdbaOverridableVariableTuple() : base(BalTupleDefinitions.WixStdbaOverridableVariable, null, null)
32 + {
33 + }
34 +
35 + public WixStdbaOverridableVariableTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalTupleDefinitions.WixStdbaOverridableVariable, sourceLineNumber, id)
36 + {
37 + }
38 +
39 + public IntermediateField this[WixStdbaOverridableVariableTupleFields index] => this.Fields[(int)index];
40 +
41 + public string Name
42 + {
43 + get => this.Fields[(int)WixStdbaOverridableVariableTupleFields.Name].AsString();
44 + set => this.Set((int)WixStdbaOverridableVariableTupleFields.Name, value);
45 + }
46 + }
47 +}
\ No newline at end of file
src/wixext/WixBalExtension.csproj deleted
-47
@@ -1,47 +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>{BF720A63-9D7B-456E-B60C-8122852D9FED}</ProjectGuid>
8 - <AssemblyName>WixBalExtension</AssemblyName>
9 - <OutputType>Library</OutputType>
10 - <RootNamespace>WixToolset.Extensions</RootNamespace>
11 - </PropertyGroup>
12 - <ItemGroup>
13 - <Compile Include="AssemblyInfo.cs" />
14 - <Compile Include="BalBinder.cs" />
15 - <Compile Include="BalCompiler.cs" />
16 - <Compile Include="BalExtensionData.cs" />
17 - <MsgGenSource Include="Data\messages.xml">
18 - <ResourcesLogicalName>$(RootNamespace).Data.Messages.resources</ResourcesLogicalName>
19 - </MsgGenSource>
20 - <EmbeddedFlattenedResource Include="Data\tables.xml">
21 - <LogicalName>$(RootNamespace).Data.tables.xml</LogicalName>
22 - </EmbeddedFlattenedResource>
23 - <EmbeddedFlattenedResource Include="Xsd\bal.xsd">
24 - <LogicalName>$(RootNamespace).Xsd.bal.xsd</LogicalName>
25 - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
26 - </EmbeddedFlattenedResource>
27 - <XsdGenSource Include="Xsd\bal.xsd">
28 - <CommonNamespace>WixToolset.Data.Serialize</CommonNamespace>
29 - <Namespace>WixToolset.Extensions.Serialize.Bal</Namespace>
30 - </XsdGenSource>
31 - <EmbeddedResource Include="$(OutputPath)\bal.wixlib">
32 - <Link>Data\bal.wixlib</Link>
33 - </EmbeddedResource>
34 - </ItemGroup>
35 - <ItemGroup>
36 - <Reference Include="System" />
37 - <Reference Include="System.Xml" />
38 - <Reference Include="System.Xml.Linq" />
39 - <ProjectReference Include="..\..\..\libs\WixToolset.Data\WixToolset.Data.csproj" />
40 - <ProjectReference Include="..\..\..\libs\WixToolset.Extensibility\WixToolset.Extensibility.csproj" />
41 - <ProjectReference Include="..\..\..\tools\wix\Wix.csproj" />
42 - <ProjectReference Include="..\wixlib\BalExtension.wixproj">
43 - <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
44 - </ProjectReference>
45 - </ItemGroup>
46 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
47 -</Project>
src/wixext/WixToolset.Bal.wixext.csproj new
+30
@@ -0,0 +1,30 @@
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.Bal</RootNamespace>
8 + <Description>WiX Toolset Bal Extension</Description>
9 + <Title>WiX Toolset Bal Extension</Title>
10 + <IsTool>true</IsTool>
11 + <ContentTargetFolders>build</ContentTargetFolders>
12 + </PropertyGroup>
13 + <ItemGroup>
14 + <Content Include="$(MSBuildThisFileName).targets" />
15 + <Content Include="bal.xsd" PackagePath="tools" />
16 + <EmbeddedResource Include="tables.xml" />
17 + <EmbeddedResource Include="$(OutputPath)..\bal.wixlib" />
18 + </ItemGroup>
19 + <ItemGroup>
20 + <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
21 + </ItemGroup>
22 +
23 + <ItemGroup>
24 + <ProjectReference Include="..\wixlib\bal.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " />
25 + </ItemGroup>
26 +
27 + <ItemGroup>
28 + <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
29 + </ItemGroup>
30 +</Project>
src/wixext/WixToolset.Bal.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 + <WixToolsetBalWixextPath Condition=" '$(WixToolsetBalWixextPath)' == '' ">$(MSBuildThisFileDirectory)..\tools\WixToolset.Bal.wixext.dll</WixToolsetBalWixextPath>
7 + </PropertyGroup>
8 + <ItemGroup>
9 + <WixExtension Include="$(WixToolsetBalWixextPath)" />
10 + </ItemGroup>
11 +</Project>
src/wixext/messages.xml deleted
-43
@@ -1,43 +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="BalErrors" ContainerName="BalErrorEventArgs" BaseContainerName="MessageEventArgs" Level="Error">
7 - <Message Id="AttributeRequiresPrereqPackage" Number="6801">
8 - <Instance>
9 - When the {0}/@{1} attribute is specified, the {0}/@PrereqPackage attribute must be set to "yes".
10 - <Parameter Type="System.String" Name="elementName" />
11 - <Parameter Type="System.String" Name="attributeName" />
12 - </Instance>
13 - </Message>
14 - <Message Id="MissingPrereq" Number="6802" SourceLineNumbers="no">
15 - <Instance>
16 - There must be at least one PrereqPackage when using the ManagedBootstrapperApplicationHost.
17 - This is typically done by using the WixNetFxExtension and referencing one of the NetFxAsPrereq package groups.
18 - </Instance>
19 - </Message>
20 - <Message Id="MultiplePrereqLicenses" Number="6803">
21 - <Instance>
22 - There may only be one package in the bundle that has either the PrereqLicenseFile attribute or the PrereqLicenseUrl attribute.
23 - </Instance>
24 - </Message>
25 - <Message Id="MultipleBAFunctions" Number="6804">
26 - <Instance>
27 - WixStandardBootstrapperApplication doesn't support multiple BAFunctions DLLs.
28 - </Instance>
29 - </Message>
30 - <Message Id="BAFunctionsPayloadRequiredInUXContainer" Number="6805">
31 - <Instance>
32 - The BAFunctions DLL Payload element must be located inside the BootstrapperApplication container.
33 - </Instance>
34 - </Message>
35 - </Class>
36 - <Class Name="BalWarnings" ContainerName="BalWarningEventArgs" BaseContainerName="MessageEventArgs" Level="Warning">
37 - <Message Id="UnmarkedBAFunctionsDLL" Number="6501">
38 - <Instance>
39 - WixStandardBootstrapperApplication doesn't automatically load BAFunctions.dll. Use the bal:BAFunctions attribute to indicate that it should be loaded.
40 - </Instance>
41 - </Message>
42 - </Class>
43 -</Messages>
src/wixlib/BalExtension.wixproj deleted
-39
@@ -1,39 +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>{3444D952-F21C-496F-AB6B-56435BFD0787}</ProjectGuid>
8 - <OutputName>bal</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="BalExtension.wxs" />
17 - <Compile Include="Mba.wxs" />
18 - <Compile Include="NetFx4AsPrereq.wxs" />
19 - <Compile Include="NetFx45AsPrereq.wxs" />
20 - <Compile Include="NetFx451AsPrereq.wxs" />
21 - <Compile Include="NetFx452AsPrereq.wxs" />
22 - <Compile Include="NetFx46AsPrereq.wxs" />
23 - <Compile Include="NetFx461AsPrereq.wxs" />
24 - <Compile Include="NetFx462AsPrereq.wxs" />
25 - <Compile Include="wixstdba.wxs" />
26 - <Compile Include="wixstdba_x86.wxs" />
27 - </ItemGroup>
28 -
29 - <ItemGroup>
30 - <BindInputPaths Include="$(OutputPath)WixstdbaResources\" />
31 - </ItemGroup>
32 -
33 - <ItemGroup>
34 - <ProjectReference Include="..\mba\host\host.vcxproj" />
35 - <ProjectReference Include="..\wixstdba\wixstdba.vcxproj" />
36 - </ItemGroup>
37 -
38 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
39 -</Project>
src/wixlib/bal.wixproj 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 +<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-0035\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0035\build\WixToolset.MSBuild.props')" />
5 + <Import Project="..\FindLocalWix.props" />
6 + <PropertyGroup>
7 + <ProjectGuid>{3444D952-F21C-496F-AB6B-56435BFD0787}</ProjectGuid>
8 + <OutputName>bal</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="BalExtension.wxs" />
17 + <!-- TODO: Reenable when compiling Bundle elements is supported
18 + <Compile Include="Mba.wxs" />
19 + <Compile Include="NetFx4AsPrereq.wxs" />
20 + <Compile Include="NetFx45AsPrereq.wxs" />
21 + <Compile Include="NetFx451AsPrereq.wxs" />
22 + <Compile Include="NetFx452AsPrereq.wxs" />
23 + <Compile Include="NetFx46AsPrereq.wxs" />
24 + <Compile Include="NetFx461AsPrereq.wxs" />
25 + <Compile Include="NetFx462AsPrereq.wxs" />
26 + <Compile Include="wixstdba.wxs" />
27 + <Compile Include="wixstdba_x86.wxs" />
28 + -->
29 + </ItemGroup>
30 +
31 + <ItemGroup>
32 + <None Include="packages.config" />
33 + </ItemGroup>
34 +
35 + <ItemGroup>
36 + <BindInputPaths Include="$(OutputPath)WixstdbaResources\" />
37 + </ItemGroup>
38 +
39 + <ItemGroup>
40 + <ProjectReference Include="..\mbahost\mbahost.vcxproj">
41 + <Name>mbahost</Name>
42 + <Project>{12C87C77-3547-44F8-8134-29BC915CB19D}</Project>
43 + </ProjectReference>
44 + <ProjectReference Include="..\wixstdba\wixstdba.vcxproj">
45 + <Name>wixstdba</Name>
46 + <Project>{41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}</Project>
47 + </ProjectReference>
48 + </ItemGroup>
49 + <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " />
50 + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " />
51 + <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
52 + <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/." />
53 + </Target>
54 + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
55 + <PropertyGroup>
56 + <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>
57 + </PropertyGroup>
58 + <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'))" />
59 + <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0035\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0035\build\WixToolset.MSBuild.props'))" />
60 + </Target>
61 + <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
62 +</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-0035" developmentDependency="true" targetFramework="net40" />
5 +</packages>
\ No newline at end of file
src/wixstdba/packages.config new
+7
@@ -0,0 +1,7 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<packages>
3 + <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" />
4 + <package id="WixToolset.BootstrapperCore" version="4.0.3" targetFramework="native" />
5 + <package id="WixToolset.BalUtil" version="4.0.4" targetFramework="native" />
6 + <package id="WixToolset.DUtil" version="4.0.13" targetFramework="native" />
7 +</packages>
\ No newline at end of file
src/wixstdba/precomp.cpp new
+3
@@ -0,0 +1,3 @@
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 +#include "precomp.h"
src/wixstdba/precomp.h
+5
@@ -3,7 +3,12 @@
3
4
5 #include <windows.h>
6 +
7 +#pragma warning(push)
8 +#pragma warning(disable:4458) // declaration of 'xxx' hides class member
9 #include <gdiplus.h>
10 +#pragma warning(pop)
11 +
12 #include <msiquery.h>
13 #include <objbase.h>
14 #include <shlobj.h>
src/wixstdba/wixstdba.vcxproj
+25 -16
@@ -1,8 +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 DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 + <Import Project="..\..\packages\WixToolset.BalUtil.4.0.4\build\WixToolset.BalUtil.props" Condition="Exists('..\..\packages\WixToolset.BalUtil.4.0.4\build\WixToolset.BalUtil.props')" />
6 + <Import Project="..\..\packages\WixToolset.BootstrapperCore.4.0.3\build\WixToolset.BootstrapperCore.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.4.0.1\build\WixToolset.BootstrapperCore.props')" />
7 + <Import Project="..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props')" />
8
5 -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
9 <ItemGroup Label="ProjectConfigurations">
10 <ProjectConfiguration Include="Debug|Win32">
11 <Configuration>Debug</Configuration>
@@ -13,33 +16,27 @@
16 <Platform>Win32</Platform>
17 </ProjectConfiguration>
18 </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>
19
20 <PropertyGroup Label="Globals">
21 <ProjectGuid>{41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}</ProjectGuid>
22 <ConfigurationType>DynamicLibrary</ConfigurationType>
23 + <PlatformToolset>v141</PlatformToolset>
24 <CharacterSet>Unicode</CharacterSet>
25 <TargetName>WixStdBA</TargetName>
26 <ProjectModuleDefinitionFile>wixstdba.def</ProjectModuleDefinitionFile>
27 </PropertyGroup>
28
35 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.props" />
29 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
30 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
31
32 <PropertyGroup>
38 - <ProjectAdditionalIncludeDirectories>$(WixRoot)src\libs\dutil\inc;$(WixRoot)src\burn\inc;$(WixRoot)src\libs\balutil\inc</ProjectAdditionalIncludeDirectories>
39 - <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib;dutil.lib;balutil.lib;wixstdba.res</ProjectAdditionalLinkLibraries>
33 + <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib;wixstdba.res</ProjectAdditionalLinkLibraries>
34 </PropertyGroup>
35
36 <ItemGroup>
37 + <ClCompile Include="precomp.cpp">
38 + <PrecompiledHeader>Create</PrecompiledHeader>
39 + </ClCompile>
40 <ClCompile Include="WixStandardBootstrapperApplication.cpp" />
41 <ClCompile Include="wixstdba.cpp" />
42 </ItemGroup>
@@ -93,7 +90,9 @@
90 <None Include="wixstdba.def" />
91 </ItemGroup>
92 <ItemGroup>
96 - <ResourceCompile Include="wixstdba.rc" />
93 + <None Include="packages.config" />
94 + </ItemGroup>
95 + <ItemGroup>
96 <CustomBuild Include="wixstdba.mc">
97 <Message>Compiling message file...</Message>
98 <Command>mc.exe -h "$(IntDir)." -r "$(IntDir)." -A -c -z wixstdba.messages "$(InputDir)wixstdba.mc"
@@ -102,5 +101,15 @@ rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc"</Command>
101 </CustomBuild>
102 </ItemGroup>
103
105 - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
104 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
105 + <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
106 + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
107 + <PropertyGroup>
108 + <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>
109 + </PropertyGroup>
110 + <Error Condition="!Exists('..\..\packages\WixToolset.BalUtil.4.0.4\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BalUtil.4.0.4\build\WixToolset.BalUtil.props'))" />
111 + <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.4.0.3\build\WixToolset.BootstrapperCore.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.4.0.3\build\WixToolset.BootstrapperCore.props'))" />
112 + <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.13\build\WixToolset.DUtil.props'))" />
113 + <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'))" />
114 + </Target>
115 </Project>
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 +}