Integrate into latest v4.
Sean Hall committed
Jan 19, 2019 at 20:31 UTC
74ca49020e2f382437337f166711ea87556865bd
48 files changed
+1407
-367
.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
Msmq.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}") = "msmqca", "src\ca\msmqca.vcxproj", "{CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}"
7
+EndProject
8
+Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "msmq", "src\wixlib\msmq.wixproj", "{42493058-5FC8-4F85-9884-FF3190E084B6}"
9
+EndProject
10
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Msmq.wixext", "src\wixext\WixToolset.Msmq.wixext.csproj", "{B990D81B-9F60-4EEE-B31D-B5D1EAA799EE}"
11
+EndProject
12
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Msmq", "src\test\WixToolsetTest.Msmq\WixToolsetTest.Msmq.csproj", "{B63DA068-338F-473B-9097-FC4E64830A2A}"
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
+ {CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}.Debug|Any CPU.ActiveCfg = Debug|Win32
23
+ {CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}.Debug|Any CPU.Build.0 = Debug|Win32
24
+ {CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}.Debug|x86.ActiveCfg = Debug|Win32
25
+ {CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}.Debug|x86.Build.0 = Debug|Win32
26
+ {CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}.Release|Any CPU.ActiveCfg = Release|Win32
27
+ {CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}.Release|Any CPU.Build.0 = Release|Win32
28
+ {CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}.Release|x86.ActiveCfg = Release|Win32
29
+ {CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}.Release|x86.Build.0 = Release|Win32
30
+ {42493058-5FC8-4F85-9884-FF3190E084B6}.Debug|Any CPU.ActiveCfg = Debug|x86
31
+ {42493058-5FC8-4F85-9884-FF3190E084B6}.Debug|Any CPU.Build.0 = Debug|x86
32
+ {42493058-5FC8-4F85-9884-FF3190E084B6}.Debug|x86.ActiveCfg = Debug|x86
33
+ {42493058-5FC8-4F85-9884-FF3190E084B6}.Debug|x86.Build.0 = Debug|x86
34
+ {42493058-5FC8-4F85-9884-FF3190E084B6}.Release|Any CPU.ActiveCfg = Release|x86
35
+ {42493058-5FC8-4F85-9884-FF3190E084B6}.Release|Any CPU.Build.0 = Release|x86
36
+ {42493058-5FC8-4F85-9884-FF3190E084B6}.Release|x86.ActiveCfg = Release|x86
37
+ {42493058-5FC8-4F85-9884-FF3190E084B6}.Release|x86.Build.0 = Release|x86
38
+ {B990D81B-9F60-4EEE-B31D-B5D1EAA799EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39
+ {B990D81B-9F60-4EEE-B31D-B5D1EAA799EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
40
+ {B990D81B-9F60-4EEE-B31D-B5D1EAA799EE}.Debug|x86.ActiveCfg = Debug|Any CPU
41
+ {B990D81B-9F60-4EEE-B31D-B5D1EAA799EE}.Debug|x86.Build.0 = Debug|Any CPU
42
+ {B990D81B-9F60-4EEE-B31D-B5D1EAA799EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
43
+ {B990D81B-9F60-4EEE-B31D-B5D1EAA799EE}.Release|Any CPU.Build.0 = Release|Any CPU
44
+ {B990D81B-9F60-4EEE-B31D-B5D1EAA799EE}.Release|x86.ActiveCfg = Release|Any CPU
45
+ {B990D81B-9F60-4EEE-B31D-B5D1EAA799EE}.Release|x86.Build.0 = Release|Any CPU
46
+ {B63DA068-338F-473B-9097-FC4E64830A2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47
+ {B63DA068-338F-473B-9097-FC4E64830A2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
48
+ {B63DA068-338F-473B-9097-FC4E64830A2A}.Debug|x86.ActiveCfg = Debug|Any CPU
49
+ {B63DA068-338F-473B-9097-FC4E64830A2A}.Debug|x86.Build.0 = Debug|Any CPU
50
+ {B63DA068-338F-473B-9097-FC4E64830A2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
51
+ {B63DA068-338F-473B-9097-FC4E64830A2A}.Release|Any CPU.Build.0 = Release|Any CPU
52
+ {B63DA068-338F-473B-9097-FC4E64830A2A}.Release|x86.ActiveCfg = Release|Any CPU
53
+ {B63DA068-338F-473B-9097-FC4E64830A2A}.Release|x86.Build.0 = Release|Any CPU
54
+ EndGlobalSection
55
+ GlobalSection(SolutionProperties) = preSolution
56
+ HideSolutionNode = FALSE
57
+ EndGlobalSection
58
+ GlobalSection(ExtensibilityGlobals) = postSolution
59
+ SolutionGuid = {5524C948-C115-4690-9BC4-44E3E963F960}
60
+ EndGlobalSection
61
+EndGlobal
appveyor.cmd
new
+13
@@ -0,0 +1,13 @@
1
+@setlocal
2
+@pushd %~dp0
3
+
4
+nuget restore
5
+
6
+msbuild -p:Configuration=Release -t:Restore
7
+
8
+msbuild -p:Configuration=Release src\test\WixToolsetTest.Msmq\WixToolsetTest.Msmq.csproj
9
+
10
+msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Msmq.wixext.csproj
11
+
12
+@popd
13
+@endlocal
\ No newline at end of file
appveyor.yml
new
+35
@@ -0,0 +1,35 @@
1
+# Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+#
3
+# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml
4
+# then update all of the repos.
5
+
6
+image: Visual Studio 2017
7
+
8
+version: 0.0.0.{build}
9
+configuration: Release
10
+
11
+environment:
12
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
13
+ DOTNET_CLI_TELEMETRY_OPTOUT: 1
14
+ NUGET_XMLDOC_MODE: skip
15
+
16
+build_script:
17
+ - appveyor.cmd
18
+
19
+pull_requests:
20
+ do_not_increment_build_number: true
21
+
22
+nuget:
23
+ disable_publish_on_pr: true
24
+
25
+skip_branch_with_pr: true
26
+skip_tags: true
27
+
28
+artifacts:
29
+- path: build\Release\**\*.nupkg
30
+ name: nuget
31
+
32
+notifications:
33
+- provider: Slack
34
+ incoming_webhook:
35
+ secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA=
nuget.config
new
+16
@@ -0,0 +1,16 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<configuration>
3
+ <packageSources>
4
+ <clear />
5
+ <add key="wixtoolset-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
6
+ <add key="wixtoolset-extensibility" value="https://ci.appveyor.com/nuget/wixtoolset-extensibility" />
7
+ <add key="wixtoolset-core" value="https://ci.appveyor.com/nuget/wixtoolset-core" />
8
+ <add key="wixtoolset-core-native" value="https://ci.appveyor.com/nuget/wixtoolset-core-native" />
9
+ <add key="wixtoolset-dtf" value="https://ci.appveyor.com/nuget/wixtoolset-dtf" />
10
+ <add key="wixtoolset-dutil" value="https://ci.appveyor.com/nuget/wixtoolset-dutil" />
11
+ <add key="wixtoolset-wcautil" value="https://ci.appveyor.com/nuget/wixtoolset-wcautil" />
12
+ <add key="wixtoolset-tools" value="https://ci.appveyor.com/nuget/wixtoolset-tools" />
13
+ <add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
14
+ <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
15
+ </packageSources>
16
+</configuration>
\ No newline at end of file
src/Cpp.Build.props
new
+104
@@ -0,0 +1,104 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+<Project>
5
+ <PropertyGroup>
6
+ <Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7
+ <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
8
+ <OutDir>$(OutputPath)$(Platform)\</OutDir>
9
+ </PropertyGroup>
10
+
11
+ <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'=='15.0'">
12
+ <WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
13
+ </PropertyGroup>
14
+
15
+ <ItemDefinitionGroup>
16
+ <ClCompile>
17
+ <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
18
+ <WarningLevel>Level4</WarningLevel>
19
+ <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
20
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
21
+ <PrecompiledHeader>Use</PrecompiledHeader>
22
+ <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
23
+ <CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention>
24
+ <TreatWarningAsError>true</TreatWarningAsError>
25
+ <ExceptionHandling>false</ExceptionHandling>
26
+ <AdditionalOptions>-YlprecompDefine</AdditionalOptions>
27
+ <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
28
+ <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) > 4 ">true</MultiProcessorCompilation>
29
+ </ClCompile>
30
+ <ResourceCompile>
31
+ <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
32
+ <AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
33
+ </ResourceCompile>
34
+ <Lib>
35
+ <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
36
+ </Lib>
37
+ <Link>
38
+ <SubSystem>$(ProjectSubSystem)</SubSystem>
39
+ <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
40
+ <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
41
+ <GenerateDebugInformation>true</GenerateDebugInformation>
42
+ <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
43
+ <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
44
+ <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
45
+ </Link>
46
+ </ItemDefinitionGroup>
47
+
48
+ <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
49
+ <ClCompile>
50
+ <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
51
+ </ClCompile>
52
+ </ItemDefinitionGroup>
53
+ <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
54
+ <ClCompile>
55
+ <CallingConvention>CDecl</CallingConvention>
56
+ </ClCompile>
57
+ </ItemDefinitionGroup>
58
+ <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
59
+ <ClCompile>
60
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
61
+ <OmitDefaultLibName>true</OmitDefaultLibName>
62
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
63
+ </ClCompile>
64
+ </ItemDefinitionGroup>
65
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
66
+ <ClCompile>
67
+ <Optimization>Disabled</Optimization>
68
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
69
+ <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
70
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
71
+ </ClCompile>
72
+ </ItemDefinitionGroup>
73
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
74
+ <ClCompile>
75
+ <BasicRuntimeChecks></BasicRuntimeChecks>
76
+ <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
77
+ </ClCompile>
78
+ </ItemDefinitionGroup>
79
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
80
+ <ClCompile>
81
+ <Optimization>MinSpace</Optimization>
82
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
83
+ <FunctionLevelLinking>true</FunctionLevelLinking>
84
+ <IntrinsicFunctions>true</IntrinsicFunctions>
85
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
86
+ </ClCompile>
87
+ <Link>
88
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
89
+ <OptimizeReferences>true</OptimizeReferences>
90
+ </Link>
91
+ </ItemDefinitionGroup>
92
+ <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
93
+ <ClCompile>
94
+ <BasicRuntimeChecks></BasicRuntimeChecks>
95
+ <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
96
+ </ClCompile>
97
+ </ItemDefinitionGroup>
98
+ <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
99
+ <Link>
100
+ <KeyFile>$(LinkKeyFile)</KeyFile>
101
+ <DelaySign>$(LinkDelaySign)</DelaySign>
102
+ </Link>
103
+ </ItemDefinitionGroup>
104
+</Project>
src/Directory.Build.props
new
+26
@@ -0,0 +1,26 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+<!--
4
+ Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.props
5
+ then update all of the repos.
6
+-->
7
+<Project>
8
+ <PropertyGroup>
9
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10
+ <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
11
+
12
+ <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
13
+ <BaseOutputPath>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))</BaseOutputPath>
14
+ <BaseIntermediateOutputPath>$(BaseOutputPath)obj\$(ProjectName)\</BaseIntermediateOutputPath>
15
+ <OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
16
+
17
+ <Authors>WiX Toolset Team</Authors>
18
+ <Company>WiX Toolset</Company>
19
+ <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright>
20
+ <PackageLicenseExpression>MS-RL</PackageLicenseExpression>
21
+ <Product>WiX Toolset</Product>
22
+ </PropertyGroup>
23
+
24
+ <Import Project="Cpp.Build.props" Condition=" '$(MSBuildProjectExtension)'=='.vcxproj' " />
25
+ <Import Project="Custom.Build.props" Condition=" Exists('Custom.Build.props') " />
26
+</Project>
src/Directory.Build.targets
new
+48
@@ -0,0 +1,48 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+<!--
4
+ Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.targets
5
+ then update all of the repos.
6
+-->
7
+<!--
8
+ Replace PackageReferences with ProjectReferences when the projects can be found in .sln.
9
+ See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
10
+-->
11
+<Project>
12
+ <PropertyGroup>
13
+ <ReplacePackageReferences>true</ReplacePackageReferences>
14
+ <TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
15
+ <TheSolutionPath Condition=" '$(NCrunch)'=='1' ">$(NCrunchOriginalSolutionPath)</TheSolutionPath>
16
+ </PropertyGroup>
17
+
18
+ <Choose>
19
+ <When Condition="$(ReplacePackageReferences) AND '$(TheSolutionPath)' != '' AND '$(TheSolutionPath)' != '*undefined*' AND Exists('$(TheSolutionPath)')">
20
+
21
+ <PropertyGroup>
22
+ <SolutionFileContent>$([System.IO.File]::ReadAllText($(TheSolutionPath)))</SolutionFileContent>
23
+ <SmartSolutionDir>$([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) ))</SmartSolutionDir>
24
+ <RegexPattern>(?<="[PackageName]", ")(.*)(?=", ")</RegexPattern>
25
+ </PropertyGroup>
26
+
27
+ <ItemGroup>
28
+ <!-- Keep the identity of the PackageReference -->
29
+ <SmartPackageReference Include="@(PackageReference)">
30
+ <PackageName>%(Identity)</PackageName>
31
+ <InSolution>$(SolutionFileContent.Contains('\%(Identity).csproj'))</InSolution>
32
+ </SmartPackageReference>
33
+
34
+ <!-- Filter them by mapping them to another ItemGroup using the WithMetadataValue item function -->
35
+ <PackageInSolution Include="@(SmartPackageReference->WithMetadataValue('InSolution', True))">
36
+ <Pattern>$(RegexPattern.Replace('[PackageName]','%(PackageName)') )</Pattern>
37
+ <SmartPath>$([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)'))</SmartPath>
38
+ </PackageInSolution>
39
+
40
+ <ProjectReference Include="@(PackageInSolution->'$(SmartSolutionDir)\%(SmartPath)' )"/>
41
+
42
+ <!-- Remove the package references that are now referenced as projects -->
43
+ <PackageReference Remove="@(PackageInSolution->'%(PackageName)' )"/>
44
+ </ItemGroup>
45
+
46
+ </When>
47
+ </Choose>
48
+</Project>
src/FindLocalWix.props
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5
+ <PropertyGroup>
6
+ <WixTargetsPath Condition=" '$(Configuration)' == 'Debug' And Exists('$(MSBuildThisFileDirectory)..\..\Tools\README.md') ">$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets</WixTargetsPath>
7
+ </PropertyGroup>
8
+</Project>
src/ca/custommsierrors.h
new
+4
@@ -0,0 +1,4 @@
1
+#pragma once
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
+#define msierrMsmqCannotConnect 28101
src/ca/dllmain.cpp
new
+26
@@ -0,0 +1,26 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+#include "precomp.h"
4
+
5
+/********************************************************************
6
+DllMain - standard entry point for all WiX custom actions
7
+
8
+********************************************************************/
9
+extern "C" BOOL WINAPI DllMain(
10
+ IN HINSTANCE hInst,
11
+ IN ULONG ulReason,
12
+ IN LPVOID)
13
+{
14
+ switch(ulReason)
15
+ {
16
+ case DLL_PROCESS_ATTACH:
17
+ WcaGlobalInitialize(hInst);
18
+ break;
19
+
20
+ case DLL_PROCESS_DETACH:
21
+ WcaGlobalFinalize();
22
+ break;
23
+ }
24
+
25
+ return TRUE;
26
+}
src/ca/mqexec.cpp
+8
-30
@@ -2,28 +2,6 @@
2
3
#include "precomp.h"
4
5
-/********************************************************************
6
- DllMain - standard entry point for all WiX CustomActions
7
-
8
-********************************************************************/
9
-extern "C" BOOL WINAPI DllMain(
10
- IN HINSTANCE hInst,
11
- IN ULONG ulReason,
12
- IN LPVOID)
13
-{
14
- switch(ulReason)
15
- {
16
- case DLL_PROCESS_ATTACH:
17
- WcaGlobalInitialize(hInst);
18
- break;
19
-
20
- case DLL_PROCESS_DETACH:
21
- WcaGlobalFinalize();
22
- break;
23
- }
24
-
25
- return TRUE;
26
-}
5
6
/********************************************************************
7
MessageQueuingExecuteInstall - CUSTOM ACTION ENTRY POINT
@@ -42,7 +20,7 @@ extern "C" UINT __stdcall MessageQueuingExecuteInstall(MSIHANDLE hInstall)
20
hr = WcaInitialize(hInstall, "MessageQueuingExecuteInstall");
21
ExitOnFailure(hr, "Failed to initialize MessageQueuingExecuteInstall");
22
45
- hr = MqiInitialize();
23
+ hr = MqiExecInitialize();
24
ExitOnFailure(hr, "Failed to initialize");
25
26
// get custom action data
@@ -67,7 +45,7 @@ LExit:
45
ReleaseStr(pwzCustomActionData);
46
47
// uninitialize
70
- MqiUninitialize();
48
+ MqiExecUninitialize();
49
50
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
51
return WcaFinalize(er);
@@ -90,7 +68,7 @@ extern "C" UINT __stdcall MessageQueuingRollbackInstall(MSIHANDLE hInstall)
68
hr = WcaInitialize(hInstall, "MessageQueuingRollbackInstall");
69
ExitOnFailure(hr, "Failed to initialize MessageQueuingRollbackInstall");
70
93
- hr = MqiInitialize();
71
+ hr = MqiExecInitialize();
72
ExitOnFailure(hr, "Failed to initialize");
73
74
// get custom action data
@@ -113,7 +91,7 @@ LExit:
91
ReleaseStr(pwzCustomActionData);
92
93
// uninitialize
116
- MqiUninitialize();
94
+ MqiExecUninitialize();
95
96
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
97
return WcaFinalize(er);
@@ -136,7 +114,7 @@ extern "C" UINT __stdcall MessageQueuingExecuteUninstall(MSIHANDLE hInstall)
114
hr = WcaInitialize(hInstall, "MessageQueuingExecuteUninstall");
115
ExitOnFailure(hr, "Failed to initialize MessageQueuingExecuteUninstall");
116
139
- hr = MqiInitialize();
117
+ hr = MqiExecInitialize();
118
ExitOnFailure(hr, "Failed to initialize");
119
120
// get custom action data
@@ -161,7 +139,7 @@ LExit:
139
ReleaseStr(pwzCustomActionData);
140
141
// uninitialize
164
- MqiUninitialize();
142
+ MqiExecUninitialize();
143
144
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
145
return WcaFinalize(er);
@@ -184,7 +162,7 @@ extern "C" UINT __stdcall MessageQueuingRollbackUninstall(MSIHANDLE hInstall)
162
hr = WcaInitialize(hInstall, "MessageQueuingRollbackUninstall");
163
ExitOnFailure(hr, "Failed to initialize MessageQueuingRollbackUninstall");
164
187
- hr = MqiInitialize();
165
+ hr = MqiExecInitialize();
166
ExitOnFailure(hr, "Failed to initialize");
167
168
// get custom action data
@@ -207,7 +185,7 @@ LExit:
185
ReleaseStr(pwzCustomActionData);
186
187
// uninitialize
210
- MqiUninitialize();
188
+ MqiExecUninitialize();
189
190
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
191
return WcaFinalize(er);
src/ca/mqqueueexec.cpp
+2
-2
@@ -119,7 +119,7 @@ static MQSetQueueSecurityFunc gpfnMQSetQueueSecurity;
119
120
// function definitions
121
122
-HRESULT MqiInitialize()
122
+HRESULT MqiExecInitialize()
123
{
124
HRESULT hr = S_OK;
125
@@ -153,7 +153,7 @@ LExit:
153
return hr;
154
}
155
156
-void MqiUninitialize()
156
+void MqiExecUninitialize()
157
{
158
if (ghMQRT)
159
::FreeLibrary(ghMQRT);
src/ca/mqqueueexec.h
+2
-2
@@ -2,8 +2,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
-HRESULT MqiInitialize();
6
-void MqiUninitialize();
5
+HRESULT MqiExecInitialize();
6
+void MqiExecUninitialize();
7
HRESULT MqiCreateMessageQueues(
8
LPWSTR* ppwzData
9
);
src/ca/mqqueuesched.cpp
+2
-2
@@ -51,7 +51,7 @@ static MQPathNameToFormatNameFunc gpfnMQPathNameToFormatName;
51
52
// function definitions
53
54
-HRESULT MqiInitialize()
54
+HRESULT MqiSchedInitialize()
55
{
56
HRESULT hr = S_OK;
57
@@ -72,7 +72,7 @@ LExit:
72
return hr;
73
}
74
75
-void MqiUninitialize()
75
+void MqiSchedUninitialize()
76
{
77
if (ghMQRT)
78
{
src/ca/mqqueuesched.h
+2
-2
@@ -54,8 +54,8 @@ struct MQI_MESSAGE_QUEUE_PERMISSION_LIST
54
55
// function prototypes
56
57
-HRESULT MqiInitialize();
58
-void MqiUninitialize();
57
+HRESULT MqiSchedInitialize();
58
+void MqiSchedUninitialize();
59
HRESULT MqiMessageQueueRead(
60
MQI_MESSAGE_QUEUE_LIST* pList
61
);
src/ca/mqsched.cpp
+4
-27
@@ -3,29 +3,6 @@
3
#include "precomp.h"
4
5
6
-/********************************************************************
7
- DllMain - standard entry point for all WiX CustomActions
8
-
9
-********************************************************************/
10
-extern "C" BOOL WINAPI DllMain(
11
- IN HINSTANCE hInst,
12
- IN ULONG ulReason,
13
- IN LPVOID)
14
-{
15
- switch(ulReason)
16
- {
17
- case DLL_PROCESS_ATTACH:
18
- WcaGlobalInitialize(hInst);
19
- break;
20
-
21
- case DLL_PROCESS_DETACH:
22
- WcaGlobalFinalize();
23
- break;
24
- }
25
-
26
- return TRUE;
27
-}
28
-
6
/********************************************************************
7
MessageQueuingInstall - CUSTOM ACTION ENTRY POINT for installing MSMQ message queues
8
@@ -51,7 +28,7 @@ extern "C" UINT __stdcall MessageQueuingInstall(MSIHANDLE hInstall)
28
29
do
30
{
54
- hr = MqiInitialize();
31
+ hr = MqiSchedInitialize();
32
if (S_FALSE == hr)
33
{
34
WcaLog(LOGMSG_STANDARD, "Failed to load mqrt.dll.");
@@ -118,7 +95,7 @@ LExit:
95
ReleaseStr(pwzExecuteActionData);
96
97
// uninitialize
121
- MqiUninitialize();
98
+ MqiSchedUninitialize();
99
100
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
101
return WcaFinalize(er);
@@ -150,7 +127,7 @@ extern "C" UINT __stdcall MessageQueuingUninstall(MSIHANDLE hInstall)
127
128
do
129
{
153
- hr = MqiInitialize();
130
+ hr = MqiSchedInitialize();
131
if (S_FALSE == hr)
132
{
133
WcaLog(LOGMSG_STANDARD, "Failed to load mqrt.dll.");
@@ -212,7 +189,7 @@ LExit:
189
ReleaseStr(pwzExecuteActionData);
190
191
// uninitialize
215
- MqiUninitialize();
192
+ MqiSchedUninitialize();
193
194
er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
195
return WcaFinalize(er);
src/ca/msmqca.def
new
+12
@@ -0,0 +1,12 @@
1
+; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+
4
+LIBRARY "msmqca"
5
+
6
+EXPORTS
7
+ MessageQueuingInstall
8
+ MessageQueuingUninstall
9
+ MessageQueuingExecuteInstall
10
+ MessageQueuingRollbackInstall
11
+ MessageQueuingExecuteUninstall
12
+ MessageQueuingRollbackUninstall
src/ca/msmqca.vcxproj
new
+71
@@ -0,0 +1,71 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5
+ <Import Project="..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props')" />
6
+ <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" />
7
+
8
+ <ItemGroup Label="ProjectConfigurations">
9
+ <ProjectConfiguration Include="Debug|Win32">
10
+ <Configuration>Debug</Configuration>
11
+ <Platform>Win32</Platform>
12
+ </ProjectConfiguration>
13
+ <ProjectConfiguration Include="Release|Win32">
14
+ <Configuration>Release</Configuration>
15
+ <Platform>Win32</Platform>
16
+ </ProjectConfiguration>
17
+ </ItemGroup>
18
+
19
+ <PropertyGroup Label="Globals">
20
+ <ProjectGuid>{CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}</ProjectGuid>
21
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
22
+ <TargetName>msmqca</TargetName>
23
+ <PlatformToolset>v141</PlatformToolset>
24
+ <CharacterSet>Unicode</CharacterSet>
25
+ <ProjectModuleDefinitionFile>msmqca.def</ProjectModuleDefinitionFile>
26
+ <Description>WiX Toolset MSMQ CustomAction</Description>
27
+ </PropertyGroup>
28
+
29
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
30
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
31
+
32
+ <PropertyGroup>
33
+ <ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries>
34
+ </PropertyGroup>
35
+
36
+ <ItemGroup>
37
+ <ClCompile Include="dllmain.cpp">
38
+ <PrecompiledHeader>Create</PrecompiledHeader>
39
+ </ClCompile>
40
+ <ClCompile Include="mqexec.cpp" />
41
+ <ClCompile Include="mqqueueexec.cpp" />
42
+ <ClCompile Include="mqqueuesched.cpp" />
43
+ <ClCompile Include="mqsched.cpp" />
44
+ <ClCompile Include="mqutilexec.cpp" />
45
+ <ClCompile Include="mqutilsched.cpp" />
46
+ </ItemGroup>
47
+
48
+ <ItemGroup>
49
+ <ClInclude Include="mqcost.h" />
50
+ <ClInclude Include="mqqueueexec.h" />
51
+ <ClInclude Include="mqqueuesched.h" />
52
+ <ClInclude Include="mqutilexec.h" />
53
+ <ClInclude Include="mqutilsched.h" />
54
+ <ClInclude Include="precomp.h" />
55
+ </ItemGroup>
56
+
57
+ <ItemGroup>
58
+ <None Include="packages.config" />
59
+ <None Include="msmqca.def" />
60
+ </ItemGroup>
61
+
62
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
63
+
64
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
65
+ <PropertyGroup>
66
+ <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>
67
+ </PropertyGroup>
68
+ <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props'))" />
69
+ <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props'))" />
70
+ </Target>
71
+</Project>
src/ca/packages.config
new
+5
@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<packages>
3
+ <package id="WixToolset.DUtil" version="4.0.6" targetFramework="native" />
4
+ <package id="WixToolset.WcaUtil" version="4.0.2" targetFramework="native" />
5
+</packages>
\ No newline at end of file
src/ca/precomp.h
new
+23
@@ -0,0 +1,23 @@
1
+#pragma once
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
+#include <windows.h>
6
+#include <msiquery.h>
7
+#include <strsafe.h>
8
+#include <ntsecapi.h>
9
+#include <aclapi.h>
10
+#include <mq.h>
11
+
12
+#include "wcautil.h"
13
+#include "memutil.h"
14
+#include "strutil.h"
15
+#include "wiutil.h"
16
+
17
+#include "CustomMsiErrors.h"
18
+
19
+#include "mqcost.h"
20
+#include "mqutilsched.h"
21
+#include "mqqueuesched.h"
22
+#include "mqutilexec.h"
23
+#include "mqqueueexec.h"
src/test/WixToolsetTest.Msmq/MsmqExtensionFixture.cs
new
+32
@@ -0,0 +1,32 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+namespace WixToolsetTest.Msmq
4
+{
5
+ using System.Linq;
6
+ using WixBuildTools.TestSupport;
7
+ using WixToolset.Core.TestPackage;
8
+ using WixToolset.Msmq;
9
+ using Xunit;
10
+
11
+ public class MsmqExtensionFixture
12
+ {
13
+ [Fact]
14
+ public void CanBuildUsingMessageQueue()
15
+ {
16
+ var folder = TestData.Get(@"TestData\UsingMessageQueue");
17
+ var build = new Builder(folder, typeof(MsmqExtensionFactory), new[] { folder });
18
+
19
+ var results = build.BuildAndQuery(Build, "MessageQueue");
20
+ Assert.Equal(new[]
21
+ {
22
+ "MessageQueue:TestMQ\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\t0\t0\tMQLabel\t\tMQPath\t0\t0\t\t0",
23
+ }, results.OrderBy(s => s).ToArray());
24
+ }
25
+
26
+ private static void Build(string[] args)
27
+ {
28
+ var result = WixRunner.Execute(args)
29
+ .AssertSuccess();
30
+ }
31
+ }
32
+}
src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/Package.en-us.wxl
new
+11
@@ -0,0 +1,11 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+
3
+<!--
4
+This file contains the declaration of all the localizable strings.
5
+-->
6
+<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7
+
8
+ <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String>
9
+ <String Id="FeatureTitle">MsiPackage</String>
10
+
11
+</WixLocalization>
src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/Package.wxs
new
+22
@@ -0,0 +1,22 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
+ <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
4
+ <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" />
5
+
6
+ <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7
+ <MediaTemplate />
8
+
9
+ <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
10
+ <ComponentGroupRef Id="ProductComponents" />
11
+ </Feature>
12
+
13
+ </Product>
14
+
15
+ <Fragment>
16
+ <Directory Id="TARGETDIR" Name="SourceDir">
17
+ <Directory Id="ProgramFilesFolder">
18
+ <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
19
+ </Directory>
20
+ </Directory>
21
+ </Fragment>
22
+</Wix>
src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/PackageComponents.wxs
new
+12
@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3
+ xmlns:msmq="http://wixtoolset.org/schemas/v4/wxs/msmq">
4
+ <Fragment>
5
+ <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
6
+ <Component>
7
+ <File Source="example.txt" />
8
+ <msmq:MessageQueue Id="TestMQ" Label="MQLabel" PathName="MQPath" />
9
+ </Component>
10
+ </ComponentGroup>
11
+ </Fragment>
12
+</Wix>
src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/example.txt
new
+1
@@ -0,0 +1 @@
1
+This is example.txt.
\ No newline at end of file
src/test/WixToolsetTest.Msmq/WixToolsetTest.Msmq.csproj
new
+38
@@ -0,0 +1,38 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+
4
+<Project Sdk="Microsoft.NET.Sdk">
5
+ <PropertyGroup>
6
+ <TargetFramework>netcoreapp2.1</TargetFramework>
7
+ <IsPackable>false</IsPackable>
8
+ </PropertyGroup>
9
+
10
+ <PropertyGroup>
11
+ <NoWarn>NU1701</NoWarn>
12
+ </PropertyGroup>
13
+
14
+ <ItemGroup>
15
+ <Content Include="TestData\UsingMessageQueue\example.txt" CopyToOutputDirectory="PreserveNewest" />
16
+ <Content Include="TestData\UsingMessageQueue\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
17
+ <Content Include="TestData\UsingMessageQueue\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
18
+ <Content Include="TestData\UsingMessageQueue\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
19
+ </ItemGroup>
20
+
21
+ <ItemGroup>
22
+ <ProjectReference Include="..\..\wixext\WixToolset.Msmq.wixext.csproj" />
23
+ </ItemGroup>
24
+
25
+ <ItemGroup>
26
+ <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" PrivateAssets="all" />
27
+ </ItemGroup>
28
+
29
+ <ItemGroup>
30
+ <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
31
+ </ItemGroup>
32
+
33
+ <ItemGroup>
34
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
35
+ <PackageReference Include="xunit" Version="2.4.0" />
36
+ <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
37
+ </ItemGroup>
38
+</Project>
src/wixext/MsmqCompiler.cs
+87
-101
@@ -1,30 +1,19 @@
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.Msmq
4
{
5
using System;
6
- using System.Collections;
6
using System.Collections.Generic;
8
- using System.Globalization;
9
- using System.Reflection;
10
- using System.Xml;
7
using System.Xml.Linq;
12
- using System.Xml.Schema;
8
using WixToolset.Data;
9
using WixToolset.Extensibility;
10
11
/// <summary>
17
- /// The compiler for the WiX Toolset Internet Information Services Extension.
12
+ /// The compiler for the WiX Toolset MSMQ Extension.
13
/// </summary>
19
- public sealed class MsmqCompiler : CompilerExtension
14
+ public sealed class MsmqCompiler : BaseCompilerExtension
15
{
21
- /// <summary>
22
- /// Instantiate a new MsmqCompiler.
23
- /// </summary>
24
- public MsmqCompiler()
25
- {
26
- this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/msmq";
27
- }
16
+ public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/msmq";
17
18
/// <summary>
19
/// </summary>
@@ -75,7 +64,7 @@ namespace WixToolset.Extensions
64
/// <param name="parentElement">Parent element of element to process.</param>
65
/// <param name="element">Element to process.</param>
66
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
78
- public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context)
67
+ public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
68
{
69
switch (parentElement.Name.LocalName)
70
{
@@ -86,18 +75,18 @@ namespace WixToolset.Extensions
75
switch (element.Name.LocalName)
76
{
77
case "MessageQueue":
89
- this.ParseMessageQueueElement(element, componentId);
78
+ this.ParseMessageQueueElement(intermediate, section, element, componentId);
79
break;
80
case "MessageQueuePermission":
92
- this.ParseMessageQueuePermissionElement(element, componentId, null);
81
+ this.ParseMessageQueuePermissionElement(intermediate, section, element, componentId, null);
82
break;
83
default:
95
- this.Core.UnexpectedElement(parentElement, element);
84
+ this.ParseHelper.UnexpectedElement(parentElement, element);
85
break;
86
}
87
break;
88
default:
100
- this.Core.UnexpectedElement(parentElement, element);
89
+ this.ParseHelper.UnexpectedElement(parentElement, element);
90
break;
91
}
92
}
@@ -107,11 +96,11 @@ namespace WixToolset.Extensions
96
/// </summary>
97
/// <param name="node">Element to parse.</param>
98
/// <param name="componentKey">Identifier of parent component.</param>
110
- private void ParseMessageQueueElement(XElement node, string componentId)
99
+ private void ParseMessageQueueElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId)
100
{
112
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
101
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
102
114
- string id = null;
103
+ Identifier id = null;
104
int basePriority = CompilerConstants.IntegerNotSet;
105
int journalQuota = CompilerConstants.IntegerNotSet;
106
string label = null;
@@ -129,10 +118,10 @@ namespace WixToolset.Extensions
118
switch (attrib.Name.LocalName)
119
{
120
case "Id":
132
- id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
121
+ id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
122
break;
123
case "Authenticate":
135
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
124
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
125
{
126
attributes |= (int)MqiMessageQueueAttributes.Authenticate;
127
}
@@ -142,10 +131,10 @@ namespace WixToolset.Extensions
131
}
132
break;
133
case "BasePriority":
145
- basePriority = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
134
+ basePriority = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
135
break;
136
case "Journal":
148
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
137
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
138
{
139
attributes |= (int)MqiMessageQueueAttributes.Journal;
140
}
@@ -155,19 +144,19 @@ namespace WixToolset.Extensions
144
}
145
break;
146
case "JournalQuota":
158
- journalQuota = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
147
+ journalQuota = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
148
break;
149
case "Label":
161
- label = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
150
+ label = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
151
break;
152
case "MulticastAddress":
164
- multicastAddress = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
153
+ multicastAddress = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
154
break;
155
case "PathName":
167
- pathName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
156
+ pathName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
157
break;
158
case "PrivLevel":
170
- string privLevelAttr = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
159
+ string privLevelAttr = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
160
switch (privLevelAttr)
161
{
162
case "none":
@@ -180,15 +169,15 @@ namespace WixToolset.Extensions
169
privLevel = (int)MqiMessageQueuePrivacyLevel.Body;
170
break;
171
default:
183
- this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "MessageQueue", "PrivLevel", privLevelAttr, "none", "body", "optional"));
172
+ this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "MessageQueue", "PrivLevel", privLevelAttr, "none", "body", "optional"));
173
break;
174
}
175
break;
176
case "Quota":
188
- quota = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
177
+ quota = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
178
break;
179
case "Transactional":
191
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
180
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
181
{
182
attributes |= (int)MqiMessageQueueAttributes.Transactional;
183
}
@@ -198,16 +187,16 @@ namespace WixToolset.Extensions
187
}
188
break;
189
case "ServiceTypeGuid":
201
- serviceTypeGuid = TryFormatGuidValue(this.Core.GetAttributeValue(sourceLineNumbers, attrib));
190
+ serviceTypeGuid = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib));
191
break;
192
default:
204
- this.Core.UnexpectedAttribute(node, attrib);
193
+ this.ParseHelper.UnexpectedAttribute(node, attrib);
194
break;
195
}
196
}
197
else
198
{
210
- this.Core.ParseExtensionAttribute(node, attrib);
199
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
200
}
201
}
202
@@ -218,46 +207,45 @@ namespace WixToolset.Extensions
207
switch (child.Name.LocalName)
208
{
209
case "MessageQueuePermission":
221
- this.ParseMessageQueuePermissionElement(child, componentId, id);
210
+ this.ParseMessageQueuePermissionElement(intermediate, section, child, componentId, id?.Id);
211
break;
212
default:
224
- this.Core.UnexpectedElement(node, child);
213
+ this.ParseHelper.UnexpectedElement(node, child);
214
break;
215
}
216
}
217
else
218
{
230
- this.Core.ParseExtensionElement(node, child);
219
+ this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child);
220
}
221
}
222
234
- Row row = this.Core.CreateRow(sourceLineNumbers, "MessageQueue");
235
- row[0] = id;
236
- row[1] = componentId;
223
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "MessageQueue", id);
224
+ row.Set(1, componentId);
225
if (CompilerConstants.IntegerNotSet != basePriority)
226
{
239
- row[2] = basePriority;
227
+ row.Set(2, basePriority);
228
}
229
if (CompilerConstants.IntegerNotSet != journalQuota)
230
{
243
- row[3] = journalQuota;
231
+ row.Set(3, journalQuota);
232
}
245
- row[4] = label;
246
- row[5] = multicastAddress;
247
- row[6] = pathName;
233
+ row.Set(4, label);
234
+ row.Set(5, multicastAddress);
235
+ row.Set(6, pathName);
236
if (CompilerConstants.IntegerNotSet != privLevel)
237
{
250
- row[7] = privLevel;
238
+ row.Set(7, privLevel);
239
}
240
if (CompilerConstants.IntegerNotSet != quota)
241
{
254
- row[8] = quota;
242
+ row.Set(8, quota);
243
}
256
- row[9] = serviceTypeGuid;
257
- row[10] = attributes;
244
+ row.Set(9, serviceTypeGuid);
245
+ row.Set(10, attributes);
246
259
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "MessageQueuingInstall");
260
- this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "MessageQueuingUninstall");
247
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MessageQueuingInstall");
248
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MessageQueuingUninstall");
249
}
250
251
/// <summary>
@@ -266,11 +254,11 @@ namespace WixToolset.Extensions
254
/// <param name="node">Element to parse.</param>
255
/// <param name="componentKey">Identifier of parent component.</param>
256
/// <param name="applicationKey">Optional identifier of parent message queue.</param>
269
- private void ParseMessageQueuePermissionElement(XElement node, string componentId, string messageQueueId)
257
+ private void ParseMessageQueuePermissionElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId, string messageQueueId)
258
{
271
- SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
259
+ SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node);
260
273
- string id = null;
261
+ Identifier id = null;
262
string user = null;
263
string group = null;
264
int permissions = 0;
@@ -282,34 +270,34 @@ namespace WixToolset.Extensions
270
switch (attrib.Name.LocalName)
271
{
272
case "Id":
285
- id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
273
+ id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
274
break;
275
case "MessageQueue":
276
if (null != messageQueueId)
277
{
290
- this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName));
278
+ this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName));
279
}
292
- messageQueueId = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
293
- this.Core.CreateSimpleReference(sourceLineNumbers, "MessageQueue", messageQueueId);
280
+ messageQueueId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
281
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "MessageQueue", messageQueueId);
282
break;
283
case "User":
284
if (null != group)
285
{
298
- this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "User", "Group"));
286
+ this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "User", "Group"));
287
}
300
- user = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
301
- this.Core.CreateSimpleReference(sourceLineNumbers, "User", user);
288
+ user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
289
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user);
290
break;
291
case "Group":
292
if (null != user)
293
{
306
- this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Group", "User"));
294
+ this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Group", "User"));
295
}
308
- group = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
309
- this.Core.CreateSimpleReference(sourceLineNumbers, "Group", group);
296
+ group = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
297
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Group", group);
298
break;
299
case "DeleteMessage":
312
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
300
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
301
{
302
permissions |= (int)MqiMessageQueuePermission.DeleteMessage;
303
}
@@ -319,7 +307,7 @@ namespace WixToolset.Extensions
307
}
308
break;
309
case "PeekMessage":
322
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
310
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
311
{
312
permissions |= (int)MqiMessageQueuePermission.PeekMessage;
313
}
@@ -329,7 +317,7 @@ namespace WixToolset.Extensions
317
}
318
break;
319
case "WriteMessage":
332
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
320
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
321
{
322
permissions |= (int)MqiMessageQueuePermission.WriteMessage;
323
}
@@ -339,7 +327,7 @@ namespace WixToolset.Extensions
327
}
328
break;
329
case "DeleteJournalMessage":
342
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
330
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
331
{
332
permissions |= (int)MqiMessageQueuePermission.DeleteJournalMessage;
333
}
@@ -349,7 +337,7 @@ namespace WixToolset.Extensions
337
}
338
break;
339
case "SetQueueProperties":
352
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
340
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
341
{
342
permissions |= (int)MqiMessageQueuePermission.SetQueueProperties;
343
}
@@ -359,7 +347,7 @@ namespace WixToolset.Extensions
347
}
348
break;
349
case "GetQueueProperties":
362
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
350
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
351
{
352
permissions |= (int)MqiMessageQueuePermission.GetQueueProperties;
353
}
@@ -369,7 +357,7 @@ namespace WixToolset.Extensions
357
}
358
break;
359
case "DeleteQueue":
372
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
360
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
361
{
362
permissions |= (int)MqiMessageQueuePermission.DeleteQueue;
363
}
@@ -379,7 +367,7 @@ namespace WixToolset.Extensions
367
}
368
break;
369
case "GetQueuePermissions":
382
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
370
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
371
{
372
permissions |= (int)MqiMessageQueuePermission.GetQueuePermissions;
373
}
@@ -389,7 +377,7 @@ namespace WixToolset.Extensions
377
}
378
break;
379
case "ChangeQueuePermissions":
392
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
380
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
381
{
382
permissions |= (int)MqiMessageQueuePermission.ChangeQueuePermissions;
383
}
@@ -399,7 +387,7 @@ namespace WixToolset.Extensions
387
}
388
break;
389
case "TakeQueueOwnership":
402
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
390
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
391
{
392
permissions |= (int)MqiMessageQueuePermission.TakeQueueOwnership;
393
}
@@ -409,7 +397,7 @@ namespace WixToolset.Extensions
397
}
398
break;
399
case "ReceiveMessage":
412
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
400
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
401
{
402
permissions |= (int)MqiMessageQueuePermission.ReceiveMessage;
403
}
@@ -419,7 +407,7 @@ namespace WixToolset.Extensions
407
}
408
break;
409
case "ReceiveJournalMessage":
422
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
410
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
411
{
412
permissions |= (int)MqiMessageQueuePermission.ReceiveJournalMessage;
413
}
@@ -429,7 +417,7 @@ namespace WixToolset.Extensions
417
}
418
break;
419
case "QueueGenericRead":
432
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
420
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
421
{
422
permissions |= (int)MqiMessageQueuePermission.QueueGenericRead;
423
}
@@ -439,7 +427,7 @@ namespace WixToolset.Extensions
427
}
428
break;
429
case "QueueGenericWrite":
442
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
430
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
431
{
432
permissions |= (int)MqiMessageQueuePermission.QueueGenericWrite;
433
}
@@ -449,7 +437,7 @@ namespace WixToolset.Extensions
437
}
438
break;
439
case "QueueGenericExecute":
452
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
440
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
441
{
442
permissions |= (int)MqiMessageQueuePermission.QueueGenericExecute;
443
}
@@ -459,7 +447,7 @@ namespace WixToolset.Extensions
447
}
448
break;
449
case "QueueGenericAll":
462
- if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
450
+ if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
451
{
452
permissions |= (int)MqiMessageQueuePermission.QueueGenericAll;
453
}
@@ -469,44 +457,42 @@ namespace WixToolset.Extensions
457
}
458
break;
459
default:
472
- this.Core.UnexpectedAttribute(node, attrib);
460
+ this.ParseHelper.UnexpectedAttribute(node, attrib);
461
break;
462
}
463
}
464
else
465
{
478
- this.Core.ParseExtensionAttribute(node, attrib);
466
+ this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib);
467
}
468
}
469
470
if (null == messageQueueId)
471
{
484
- this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "MessageQueue"));
472
+ this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "MessageQueue"));
473
}
474
if (null == user && null == group)
475
{
488
- this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "User", "Group"));
476
+ this.Messaging.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "User", "Group"));
477
}
478
491
- this.Core.ParseForExtensionElements(node);
479
+ this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node);
480
481
if (null != user)
482
{
495
- Row row = this.Core.CreateRow(sourceLineNumbers, "MessageQueueUserPermission");
496
- row[0] = id;
497
- row[1] = componentId;
498
- row[2] = messageQueueId;
499
- row[3] = user;
500
- row[4] = permissions;
483
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "MessageQueueUserPermission", id);
484
+ row.Set(1, componentId);
485
+ row.Set(2, messageQueueId);
486
+ row.Set(3, user);
487
+ row.Set(4, permissions);
488
}
489
if (null != group)
490
{
504
- Row row = this.Core.CreateRow(sourceLineNumbers, "MessageQueueGroupPermission");
505
- row[0] = id;
506
- row[1] = componentId;
507
- row[2] = messageQueueId;
508
- row[3] = group;
509
- row[4] = permissions;
491
+ var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "MessageQueueGroupPermission", id);
492
+ row.Set(1, componentId);
493
+ row.Set(2, messageQueueId);
494
+ row.Set(3, group);
495
+ row.Set(4, permissions);
496
}
497
}
498
src/wixext/MsmqDecompiler.cs
+3
-1
@@ -1,7 +1,8 @@
1
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3
-namespace WixToolset.Extensions
3
+namespace WixToolset.Msmq
4
{
5
+#if TODO_CONSIDER_DECOMPILER
6
using System;
7
using System.Collections;
8
using System.Globalization;
@@ -300,4 +301,5 @@ namespace WixToolset.Extensions
301
}
302
}
303
}
304
+#endif
305
}
src/wixext/MsmqErrors.cs
new
+71
@@ -0,0 +1,71 @@
1
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
+
3
+namespace WixToolset.Data
4
+{
5
+ using System;
6
+ using System.Resources;
7
+
8
+ public static class MsmqErrors
9
+ {
10
+ public static Message IllegalAttributeWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
11
+ {
12
+ return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutComponent, "The {0}/@{1} attribute cannot be specified unless the element has a component as an ancestor. A {0} that does not have a component ancestor is not installed.", elementName, attributeName);
13
+ }
14
+
15
+ public static Message IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName)
16
+ {
17
+ return Message(sourceLineNumbers, Ids.IllegalElementWithoutComponent, "The {0} element cannot be specified unless the element has a component as an ancestor. A {0} that does not have a component ancestor is not installed.", elementName);
18
+ }
19
+
20
+ public static Message RequiredAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2)
21
+ {
22
+ return Message(sourceLineNumbers, Ids.RequiredAttribute, "A {0} element must have either a {1} attribute or a {2} attribute, or both set.", elementName, attributeName1, attributeName2);
23
+ }
24
+
25
+ public static Message RequiredAttributeNotUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2)
26
+ {
27
+ return Message(sourceLineNumbers, Ids.RequiredAttributeNotUnderComponent, "A {0} element not nested under a component must have either a {1} attribute or a {2} attribute, or both set.", elementName, attributeName1, attributeName2);
28
+ }
29
+
30
+ public static Message RequiredAttributeUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
31
+ {
32
+ return Message(sourceLineNumbers, Ids.RequiredAttributeUnderComponent, "The {0}/@{1} attribute must be provided when {0} element is nested under a component.", elementName, attributeName);
33
+ }
34
+
35
+ public static Message UnexpectedAttributeWithOtherValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue)
36
+ {
37
+ return Message(sourceLineNumbers, Ids.UnexpectedAttributeWithOtherValue, "The {0}/@{1} attribute cannot coexist with the {2} attribute's value of '{3}'.", elementName, attributeName, otherAttributeName, otherValue);
38
+ }
39
+
40
+ public static Message UnexpectedAttributeWithOtherValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string otherAttributeName, string otherValue)
41
+ {
42
+ return Message(sourceLineNumbers, Ids.UnexpectedAttributeWithOtherValue, "The {0}/@{1} attribute's value, '{2}', cannot coexist with the {3} attribute's value of '{4}'.", elementName, attributeName, value, otherAttributeName, otherValue);
43
+ }
44
+
45
+ public static Message UnexpectedAttributeWithoutOtherValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue)
46
+ {
47
+ return Message(sourceLineNumbers, Ids.UnexpectedAttributeWithoutOtherValue, "The {0}/@{1} cannot be provided unless the {2} attribute is provided with a value of '{3}'.", elementName, attributeName, otherAttributeName, otherValue);
48
+ }
49
+
50
+ private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
51
+ {
52
+ return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
53
+ }
54
+
55
+ private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
56
+ {
57
+ return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args);
58
+ }
59
+
60
+ public enum Ids
61
+ {
62
+ IllegalAttributeWithoutComponent = 6000,
63
+ IllegalElementWithoutComponent = 6001,
64
+ UnexpectedAttributeWithOtherValue = 6002,
65
+ UnexpectedAttributeWithoutOtherValue = 6003,
66
+ RequiredAttributeUnderComponent = 6004,
67
+ RequiredAttribute = 6005,
68
+ RequiredAttributeNotUnderComponent = 6006,
69
+ }
70
+ }
71
+}
src/wixext/MsmqExtensionData.cs
+8
-42
@@ -1,64 +1,30 @@
1
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3
-namespace WixToolset.Extensions
3
+namespace WixToolset.Msmq
4
{
5
- using System;
6
- using System.Reflection;
5
using WixToolset.Data;
6
using WixToolset.Extensibility;
7
8
/// <summary>
9
/// The WiX Toolset MSMQ Extension.
10
/// </summary>
13
- public sealed class MsmqExtensionData : ExtensionData
11
+ public sealed class MsmqExtensionData : BaseExtensionData
12
{
13
/// <summary>
14
/// Gets the default culture.
15
/// </summary>
16
/// <value>The default culture.</value>
19
- public override string DefaultCulture
20
- {
21
- get { return "en-us"; }
22
- }
23
-
24
- /// <summary>
25
- /// Gets the optional table definitions for this extension.
26
- /// </summary>
27
- /// <value>The optional table definitions for this extension.</value>
28
- public override TableDefinitionCollection TableDefinitions
29
- {
30
- get
31
- {
32
- return MsmqExtensionData.GetExtensionTableDefinitions();
33
- }
34
- }
35
-
36
- /// <summary>
37
- /// Gets the library associated with this extension.
38
- /// </summary>
39
- /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
40
- /// <returns>The loaded library.</returns>
41
- public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
42
- {
43
- return MsmqExtensionData.GetExtensionLibrary(tableDefinitions);
44
- }
17
+ public override string DefaultCulture => "en-US";
18
46
- /// <summary>
47
- /// Internal mechanism to access the extension's table definitions.
48
- /// </summary>
49
- /// <returns>Extension's table definitions.</returns>
50
- internal static TableDefinitionCollection GetExtensionTableDefinitions()
19
+ public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
20
{
52
- return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml");
21
+ tupleDefinition = MsmqTupleDefinitions.ByName(name);
22
+ return tupleDefinition != null;
23
}
24
55
- /// <summary>
56
- /// Internal mechanism to access the extension's library.
57
- /// </summary>
58
- /// <returns>Extension's library.</returns>
59
- internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
25
+ public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
26
{
61
- return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.msmq.wixlib", tableDefinitions);
27
+ return Intermediate.Load(typeof(MsmqExtensionData).Assembly, "WixToolset.Msmq.msmq.wixlib", tupleDefinitions);
28
}
29
}
30
}
src/wixext/MsmqExtensionFactory.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.Msmq
4
+{
5
+ using System;
6
+ using System.Collections.Generic;
7
+ using WixToolset.Extensibility;
8
+
9
+ public class MsmqExtensionFactory : BaseExtensionFactory
10
+ {
11
+ protected override IEnumerable<Type> ExtensionTypes => new[]
12
+ {
13
+ typeof(MsmqCompiler),
14
+ typeof(MsmqExtensionData),
15
+ typeof(MsmqWindowsInstallerBackendBinderExtension),
16
+ };
17
+ }
18
+}
src/wixext/MsmqWarnings.cs
new
+30
@@ -0,0 +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.Data
4
+{
5
+ using System;
6
+ using System.Resources;
7
+
8
+ public static class MsmqWarnings
9
+ {
10
+ public static Message MissingComponents(SourceLineNumber sourceLineNumbers)
11
+ {
12
+ return Message(sourceLineNumbers, Ids.MissingComponents, "The MsmqAssembly element has a Type attribute with a value of 'native', but the element does not contain any MsmqComponent elements. All components contained in a native assembly must be listed, or they will not be correctly removed during uninstall.");
13
+ }
14
+
15
+ private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
16
+ {
17
+ return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
18
+ }
19
+
20
+ private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
21
+ {
22
+ return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args);
23
+ }
24
+
25
+ public enum Ids
26
+ {
27
+ MissingComponents = 6007,
28
+ }
29
+ }
30
+}
src/wixext/MsmqWindowsInstallerBackendExtension.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.Msmq
4
+{
5
+ using System.Linq;
6
+ using System.Xml;
7
+ using WixToolset.Data.WindowsInstaller;
8
+ using WixToolset.Extensibility;
9
+
10
+ public class MsmqWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension
11
+ {
12
+ public MsmqWindowsInstallerBackendBinderExtension()
13
+ {
14
+
15
+ }
16
+
17
+ private static readonly TableDefinition[] Tables = LoadTables();
18
+
19
+ protected override TableDefinition[] TableDefinitionsForTuples => Tables;
20
+
21
+ private static TableDefinition[] LoadTables()
22
+ {
23
+ using (var resourceStream = typeof(MsmqWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Msmq.tables.xml"))
24
+ using (var reader = XmlReader.Create(resourceStream))
25
+ {
26
+ var tables = TableDefinitionCollection.Load(reader);
27
+ return tables.ToArray();
28
+ }
29
+ }
30
+ }
31
+}
src/wixext/Tuples/MessageQueueGroupPermissionTuple.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.Msmq
4
+{
5
+ using WixToolset.Data;
6
+ using WixToolset.Msmq.Tuples;
7
+
8
+ public static partial class MsmqTupleDefinitions
9
+ {
10
+ public static readonly IntermediateTupleDefinition MessageQueueGroupPermission = new IntermediateTupleDefinition(
11
+ MsmqTupleDefinitionType.MessageQueueGroupPermission.ToString(),
12
+ new[]
13
+ {
14
+ new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.MessageQueueGroupPermission), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.Component_), IntermediateFieldType.String),
16
+ new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.MessageQueue_), IntermediateFieldType.String),
17
+ new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.Group_), IntermediateFieldType.String),
18
+ new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.Permissions), IntermediateFieldType.Number),
19
+ },
20
+ typeof(MessageQueueGroupPermissionTuple));
21
+ }
22
+}
23
+
24
+namespace WixToolset.Msmq.Tuples
25
+{
26
+ using WixToolset.Data;
27
+
28
+ public enum MessageQueueGroupPermissionTupleFields
29
+ {
30
+ MessageQueueGroupPermission,
31
+ Component_,
32
+ MessageQueue_,
33
+ Group_,
34
+ Permissions,
35
+ }
36
+
37
+ public class MessageQueueGroupPermissionTuple : IntermediateTuple
38
+ {
39
+ public MessageQueueGroupPermissionTuple() : base(MsmqTupleDefinitions.MessageQueueGroupPermission, null, null)
40
+ {
41
+ }
42
+
43
+ public MessageQueueGroupPermissionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(MsmqTupleDefinitions.MessageQueueGroupPermission, sourceLineNumber, id)
44
+ {
45
+ }
46
+
47
+ public IntermediateField this[MessageQueueGroupPermissionTupleFields index] => this.Fields[(int)index];
48
+
49
+ public string MessageQueueGroupPermission
50
+ {
51
+ get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.MessageQueueGroupPermission].AsString();
52
+ set => this.Set((int)MessageQueueGroupPermissionTupleFields.MessageQueueGroupPermission, value);
53
+ }
54
+
55
+ public string Component_
56
+ {
57
+ get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.Component_].AsString();
58
+ set => this.Set((int)MessageQueueGroupPermissionTupleFields.Component_, value);
59
+ }
60
+
61
+ public string MessageQueue_
62
+ {
63
+ get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.MessageQueue_].AsString();
64
+ set => this.Set((int)MessageQueueGroupPermissionTupleFields.MessageQueue_, value);
65
+ }
66
+
67
+ public string Group_
68
+ {
69
+ get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.Group_].AsString();
70
+ set => this.Set((int)MessageQueueGroupPermissionTupleFields.Group_, value);
71
+ }
72
+
73
+ public int Permissions
74
+ {
75
+ get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.Permissions].AsNumber();
76
+ set => this.Set((int)MessageQueueGroupPermissionTupleFields.Permissions, value);
77
+ }
78
+ }
79
+}
\ No newline at end of file
src/wixext/Tuples/MessageQueueTuple.cs
new
+127
@@ -0,0 +1,127 @@
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.Msmq
4
+{
5
+ using WixToolset.Data;
6
+ using WixToolset.Msmq.Tuples;
7
+
8
+ public static partial class MsmqTupleDefinitions
9
+ {
10
+ public static readonly IntermediateTupleDefinition MessageQueue = new IntermediateTupleDefinition(
11
+ MsmqTupleDefinitionType.MessageQueue.ToString(),
12
+ new[]
13
+ {
14
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.MessageQueue), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.Component_), IntermediateFieldType.String),
16
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.BasePriority), IntermediateFieldType.Number),
17
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.JournalQuota), IntermediateFieldType.Number),
18
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.Label), IntermediateFieldType.String),
19
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.MulticastAddress), IntermediateFieldType.String),
20
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.PathName), IntermediateFieldType.String),
21
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.PrivLevel), IntermediateFieldType.Number),
22
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.Quota), IntermediateFieldType.Number),
23
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.ServiceTypeGuid), IntermediateFieldType.String),
24
+ new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.Attributes), IntermediateFieldType.Number),
25
+ },
26
+ typeof(MessageQueueTuple));
27
+ }
28
+}
29
+
30
+namespace WixToolset.Msmq.Tuples
31
+{
32
+ using WixToolset.Data;
33
+
34
+ public enum MessageQueueTupleFields
35
+ {
36
+ MessageQueue,
37
+ Component_,
38
+ BasePriority,
39
+ JournalQuota,
40
+ Label,
41
+ MulticastAddress,
42
+ PathName,
43
+ PrivLevel,
44
+ Quota,
45
+ ServiceTypeGuid,
46
+ Attributes,
47
+ }
48
+
49
+ public class MessageQueueTuple : IntermediateTuple
50
+ {
51
+ public MessageQueueTuple() : base(MsmqTupleDefinitions.MessageQueue, null, null)
52
+ {
53
+ }
54
+
55
+ public MessageQueueTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(MsmqTupleDefinitions.MessageQueue, sourceLineNumber, id)
56
+ {
57
+ }
58
+
59
+ public IntermediateField this[MessageQueueTupleFields index] => this.Fields[(int)index];
60
+
61
+ public string MessageQueue
62
+ {
63
+ get => this.Fields[(int)MessageQueueTupleFields.MessageQueue].AsString();
64
+ set => this.Set((int)MessageQueueTupleFields.MessageQueue, value);
65
+ }
66
+
67
+ public string Component_
68
+ {
69
+ get => this.Fields[(int)MessageQueueTupleFields.Component_].AsString();
70
+ set => this.Set((int)MessageQueueTupleFields.Component_, value);
71
+ }
72
+
73
+ public int BasePriority
74
+ {
75
+ get => this.Fields[(int)MessageQueueTupleFields.BasePriority].AsNumber();
76
+ set => this.Set((int)MessageQueueTupleFields.BasePriority, value);
77
+ }
78
+
79
+ public int JournalQuota
80
+ {
81
+ get => this.Fields[(int)MessageQueueTupleFields.JournalQuota].AsNumber();
82
+ set => this.Set((int)MessageQueueTupleFields.JournalQuota, value);
83
+ }
84
+
85
+ public string Label
86
+ {
87
+ get => this.Fields[(int)MessageQueueTupleFields.Label].AsString();
88
+ set => this.Set((int)MessageQueueTupleFields.Label, value);
89
+ }
90
+
91
+ public string MulticastAddress
92
+ {
93
+ get => this.Fields[(int)MessageQueueTupleFields.MulticastAddress].AsString();
94
+ set => this.Set((int)MessageQueueTupleFields.MulticastAddress, value);
95
+ }
96
+
97
+ public string PathName
98
+ {
99
+ get => this.Fields[(int)MessageQueueTupleFields.PathName].AsString();
100
+ set => this.Set((int)MessageQueueTupleFields.PathName, value);
101
+ }
102
+
103
+ public int PrivLevel
104
+ {
105
+ get => this.Fields[(int)MessageQueueTupleFields.PrivLevel].AsNumber();
106
+ set => this.Set((int)MessageQueueTupleFields.PrivLevel, value);
107
+ }
108
+
109
+ public int Quota
110
+ {
111
+ get => this.Fields[(int)MessageQueueTupleFields.Quota].AsNumber();
112
+ set => this.Set((int)MessageQueueTupleFields.Quota, value);
113
+ }
114
+
115
+ public string ServiceTypeGuid
116
+ {
117
+ get => this.Fields[(int)MessageQueueTupleFields.ServiceTypeGuid].AsString();
118
+ set => this.Set((int)MessageQueueTupleFields.ServiceTypeGuid, value);
119
+ }
120
+
121
+ public int Attributes
122
+ {
123
+ get => this.Fields[(int)MessageQueueTupleFields.Attributes].AsNumber();
124
+ set => this.Set((int)MessageQueueTupleFields.Attributes, value);
125
+ }
126
+ }
127
+}
\ No newline at end of file
src/wixext/Tuples/MessageQueueUserPermissionTuple.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.Msmq
4
+{
5
+ using WixToolset.Data;
6
+ using WixToolset.Msmq.Tuples;
7
+
8
+ public static partial class MsmqTupleDefinitions
9
+ {
10
+ public static readonly IntermediateTupleDefinition MessageQueueUserPermission = new IntermediateTupleDefinition(
11
+ MsmqTupleDefinitionType.MessageQueueUserPermission.ToString(),
12
+ new[]
13
+ {
14
+ new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.MessageQueueUserPermission), IntermediateFieldType.String),
15
+ new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.Component_), IntermediateFieldType.String),
16
+ new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.MessageQueue_), IntermediateFieldType.String),
17
+ new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.User_), IntermediateFieldType.String),
18
+ new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.Permissions), IntermediateFieldType.Number),
19
+ },
20
+ typeof(MessageQueueUserPermissionTuple));
21
+ }
22
+}
23
+
24
+namespace WixToolset.Msmq.Tuples
25
+{
26
+ using WixToolset.Data;
27
+
28
+ public enum MessageQueueUserPermissionTupleFields
29
+ {
30
+ MessageQueueUserPermission,
31
+ Component_,
32
+ MessageQueue_,
33
+ User_,
34
+ Permissions,
35
+ }
36
+
37
+ public class MessageQueueUserPermissionTuple : IntermediateTuple
38
+ {
39
+ public MessageQueueUserPermissionTuple() : base(MsmqTupleDefinitions.MessageQueueUserPermission, null, null)
40
+ {
41
+ }
42
+
43
+ public MessageQueueUserPermissionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(MsmqTupleDefinitions.MessageQueueUserPermission, sourceLineNumber, id)
44
+ {
45
+ }
46
+
47
+ public IntermediateField this[MessageQueueUserPermissionTupleFields index] => this.Fields[(int)index];
48
+
49
+ public string MessageQueueUserPermission
50
+ {
51
+ get => this.Fields[(int)MessageQueueUserPermissionTupleFields.MessageQueueUserPermission].AsString();
52
+ set => this.Set((int)MessageQueueUserPermissionTupleFields.MessageQueueUserPermission, value);
53
+ }
54
+
55
+ public string Component_
56
+ {
57
+ get => this.Fields[(int)MessageQueueUserPermissionTupleFields.Component_].AsString();
58
+ set => this.Set((int)MessageQueueUserPermissionTupleFields.Component_, value);
59
+ }
60
+
61
+ public string MessageQueue_
62
+ {
63
+ get => this.Fields[(int)MessageQueueUserPermissionTupleFields.MessageQueue_].AsString();
64
+ set => this.Set((int)MessageQueueUserPermissionTupleFields.MessageQueue_, value);
65
+ }
66
+
67
+ public string User_
68
+ {
69
+ get => this.Fields[(int)MessageQueueUserPermissionTupleFields.User_].AsString();
70
+ set => this.Set((int)MessageQueueUserPermissionTupleFields.User_, value);
71
+ }
72
+
73
+ public int Permissions
74
+ {
75
+ get => this.Fields[(int)MessageQueueUserPermissionTupleFields.Permissions].AsNumber();
76
+ set => this.Set((int)MessageQueueUserPermissionTupleFields.Permissions, value);
77
+ }
78
+ }
79
+}
\ No newline at end of file
src/wixext/Tuples/MsmqTupleDefinitions.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.Msmq
4
+{
5
+ using System;
6
+ using WixToolset.Data;
7
+
8
+ public enum MsmqTupleDefinitionType
9
+ {
10
+ MessageQueue,
11
+ MessageQueueGroupPermission,
12
+ MessageQueueUserPermission,
13
+ }
14
+
15
+ public static partial class MsmqTupleDefinitions
16
+ {
17
+ public static readonly Version Version = new Version("4.0.0");
18
+
19
+ public static IntermediateTupleDefinition ByName(string name)
20
+ {
21
+ if (!Enum.TryParse(name, out MsmqTupleDefinitionType type))
22
+ {
23
+ return null;
24
+ }
25
+
26
+ return ByType(type);
27
+ }
28
+
29
+ public static IntermediateTupleDefinition ByType(MsmqTupleDefinitionType type)
30
+ {
31
+ switch (type)
32
+ {
33
+ case MsmqTupleDefinitionType.MessageQueue:
34
+ return MsmqTupleDefinitions.MessageQueue;
35
+
36
+ case MsmqTupleDefinitionType.MessageQueueGroupPermission:
37
+ return MsmqTupleDefinitions.MessageQueueGroupPermission;
38
+
39
+ case MsmqTupleDefinitionType.MessageQueueUserPermission:
40
+ return MsmqTupleDefinitions.MessageQueueUserPermission;
41
+
42
+ default:
43
+ throw new ArgumentOutOfRangeException(nameof(type));
44
+ }
45
+ }
46
+ }
47
+}
src/wixext/WixMsmqExtension.csproj
deleted
-49
@@ -1,49 +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>{B990D81B-9F60-4EEE-B31D-B5D1EAA799EE}</ProjectGuid>
8
- <AssemblyName>WixMsmqExtension</AssemblyName>
9
- <OutputType>Library</OutputType>
10
- <RootNamespace>WixToolset.Extensions</RootNamespace>
11
- </PropertyGroup>
12
- <ItemGroup>
13
- <Compile Include="AssemblyInfo.cs" />
14
- <Compile Include="MsmqCompiler.cs" />
15
- <Compile Include="MsmqDecompiler.cs" />
16
- <Compile Include="MsmqExtensionData.cs" />
17
- <EmbeddedFlattenedResource Include="Data\tables.xml">
18
- <LogicalName>$(RootNamespace).Data.tables.xml</LogicalName>
19
- </EmbeddedFlattenedResource>
20
- <EmbeddedFlattenedResource Include="Xsd\msmq.xsd">
21
- <LogicalName>$(RootNamespace).Xsd.msmq.xsd</LogicalName>
22
- </EmbeddedFlattenedResource>
23
- <XsdGenSource Include="Xsd\msmq.xsd">
24
- <CommonNamespace>WixToolset.Data.Serialize</CommonNamespace>
25
- <Namespace>WixToolset.Extensions.Serialize.Msmq</Namespace>
26
- </XsdGenSource>
27
- <None Include="Xsd\msmq.xsd">
28
- <Link>msmq.xsd</Link>
29
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
30
- </None>
31
- <EmbeddedResource Include="$(OutputPath)\msmq.wixlib">
32
- <Link>Data\msmq.wixlib</Link>
33
- </EmbeddedResource>
34
- </ItemGroup>
35
-
36
- <ItemGroup>
37
- <Reference Include="System" />
38
- <Reference Include="System.Xml" />
39
- <Reference Include="System.Xml.Linq" />
40
- <ProjectReference Include="..\..\..\libs\WixToolset.Data\WixToolset.Data.csproj" />
41
- <ProjectReference Include="..\..\..\libs\WixToolset.Extensibility\WixToolset.Extensibility.csproj" />
42
- <ProjectReference Include="..\..\..\tools\wix\Wix.csproj" />
43
- <ProjectReference Include="..\wixlib\MsmqExtension.wixproj">
44
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
45
- </ProjectReference>
46
- </ItemGroup>
47
-
48
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
49
-</Project>
src/wixext/WixToolset.Msmq.wixext.csproj
new
+32
@@ -0,0 +1,32 @@
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.Msmq</RootNamespace>
8
+ <Description>WiX Toolset MSMQ Extension</Description>
9
+ <Title>WiX Toolset MSMQ Extension</Title>
10
+ <IsTool>true</IsTool>
11
+ <ContentTargetFolders>build</ContentTargetFolders>
12
+ </PropertyGroup>
13
+
14
+ <ItemGroup>
15
+ <Content Include="$(MSBuildThisFileName).targets" />
16
+ <Content Include="msmq.xsd" PackagePath="tools" />
17
+ <EmbeddedResource Include="tables.xml" />
18
+ <EmbeddedResource Include="$(OutputPath)..\msmq.wixlib" />
19
+ </ItemGroup>
20
+
21
+ <ItemGroup>
22
+ <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
23
+ </ItemGroup>
24
+
25
+ <ItemGroup>
26
+ <ProjectReference Include="..\wixlib\msmq.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " />
27
+ </ItemGroup>
28
+
29
+ <ItemGroup>
30
+ <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
31
+ </ItemGroup>
32
+</Project>
src/wixext/WixToolset.Msmq.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
+ <WixToolsetMsmqWixextPath Condition=" '$(WixToolsetMsmqWixextPath)' == '' ">$(MSBuildThisFileDirectory)..\tools\WixToolset.Msmq.wixext.dll</WixToolsetMsmqWixextPath>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <WixExtension Include="$(WixToolsetMsmqWixextPath)" />
10
+ </ItemGroup>
11
+</Project>
src/wixext/messages.xml
deleted
-77
@@ -1,77 +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="MsmqErrors" ContainerName="MsmqErrorEventArgs" BaseContainerName="WixErrorEventArgs">
7
- <Message Id="IllegalAttributeWithoutComponent" Number="6000">
8
- <Instance>
9
- The {0}/@{1} attribute cannot be specified unless the element has a component as an ancestor. A {0} that does not have a component ancestor is not installed.
10
- <Parameter Type="System.String" Name="elementName" />
11
- <Parameter Type="System.String" Name="attributeName" />
12
- </Instance>
13
- </Message>
14
- <Message Id="IllegalElementWithoutComponent" Number="6001">
15
- <Instance>
16
- The {0} element cannot be specified unless the element has a component as an ancestor. A {0} that does not have a component ancestor is not installed.
17
- <Parameter Type="System.String" Name="elementName" />
18
- </Instance>
19
- </Message>
20
- <Message Id="UnexpectedAttributeWithOtherValue" Number="6002">
21
- <Instance>
22
- The {0}/@{1} attribute cannot coexist with the {2} attribute's value of '{3}'.
23
- <Parameter Type="System.String" Name="elementName" />
24
- <Parameter Type="System.String" Name="attributeName" />
25
- <Parameter Type="System.String" Name="otherAttributeName" />
26
- <Parameter Type="System.String" Name="otherValue" />
27
- </Instance>
28
- <Instance>
29
- The {0}/@{1} attribute's value, '{2}', cannot coexist with the {3} attribute's value of '{4}'.
30
- <Parameter Type="System.String" Name="elementName" />
31
- <Parameter Type="System.String" Name="attributeName" />
32
- <Parameter Type="System.String" Name="value" />
33
- <Parameter Type="System.String" Name="otherAttributeName" />
34
- <Parameter Type="System.String" Name="otherValue" />
35
- </Instance>
36
- </Message>
37
- <Message Id="UnexpectedAttributeWithoutOtherValue" Number="6003">
38
- <Instance>
39
- The {0}/@{1} cannot be provided unless the {2} attribute is provided with a value of '{3}'.
40
- <Parameter Type="System.String" Name="elementName" />
41
- <Parameter Type="System.String" Name="attributeName" />
42
- <Parameter Type="System.String" Name="otherAttributeName" />
43
- <Parameter Type="System.String" Name="otherValue" />
44
- </Instance>
45
- </Message>
46
- <Message Id="RequiredAttributeUnderComponent" Number="6004">
47
- <Instance>
48
- The {0}/@{1} attribute must be provided when {0} element is nested under a component.
49
- <Parameter Type="System.String" Name="elementName" />
50
- <Parameter Type="System.String" Name="attributeName" />
51
- </Instance>
52
- </Message>
53
- <Message Id="RequiredAttribute" Number="6005">
54
- <Instance>
55
- A {0} element must have either a {1} attribute or a {2} attribute, or both set.
56
- <Parameter Type="System.String" Name="elementName" />
57
- <Parameter Type="System.String" Name="attributeName1" />
58
- <Parameter Type="System.String" Name="attributeName2" />
59
- </Instance>
60
- </Message>
61
- <Message Id="RequiredAttributeNotUnderComponent" Number="6006">
62
- <Instance>
63
- A {0} element not nested under a component must have either a {1} attribute or a {2} attribute, or both set.
64
- <Parameter Type="System.String" Name="elementName" />
65
- <Parameter Type="System.String" Name="attributeName1" />
66
- <Parameter Type="System.String" Name="attributeName2" />
67
- </Instance>
68
- </Message>
69
- </Class>
70
- <Class Name="MsmqWarnings" ContainerName="MsmqWarningEventArgs" BaseContainerName="WixWarningEventArgs">
71
- <Message Id="MissingComponents" Number="6007">
72
- <Instance>The MsmqAssembly element has a Type attribute with a value of 'native', but the element does not contain any MsmqComponent elements. All components contained in a native assembly must be listed, or they will not be correctly removed during uninstall.</Instance>
73
- </Message>
74
- </Class>
75
- <Class Name="MsmqVerboses" ContainerName="MsmqVerboseEventArgs" BaseContainerName="WixVerboseEventArgs">
76
- </Class>
77
-</Messages>
src/wixlib/MsmqExtension.wixproj
deleted
-24
@@ -1,24 +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>{42493058-5FC8-4F85-9884-FF3190E084B6}</ProjectGuid>
8
- <OutputName>msmq</OutputName>
9
- <OutputType>Library</OutputType>
10
- <BindFiles>true</BindFiles>
11
- </PropertyGroup>
12
-
13
- <ItemGroup>
14
- <Compile Include="MsmqExtension.wxs" />
15
- <EmbeddedResource Include="en-us.wxl" />
16
- <EmbeddedResource Include="ja-jp.wxl" />
17
- </ItemGroup>
18
-
19
- <ItemGroup>
20
- <ProjectReference Include="..\ca\msmqca.proj" />
21
- </ItemGroup>
22
-
23
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), wix.proj))\tools\WixBuild.targets" />
24
-</Project>
src/wixlib/MsmqExtension.wxs
+7
-8
@@ -11,12 +11,12 @@
11
<ProgressText Action="MessageQueuingExecuteUninstall" Template="!(loc.MessageQueuingExecuteUninstallTemplate)">!(loc.MessageQueuingExecuteUninstall)</ProgressText>
12
</UI>
13
14
- <CustomAction Id="MessageQueuingInstall" BinaryKey="WixMsmqSched" DllEntry="MessageQueuingInstall" Execute="immediate" Return="check" SuppressModularization="yes"/>
15
- <CustomAction Id="MessageQueuingUninstall" BinaryKey="WixMsmqSched" DllEntry="MessageQueuingUninstall" Execute="immediate" Return="check" SuppressModularization="yes"/>
16
- <CustomAction Id="MessageQueuingExecuteInstall" BinaryKey="WixMsmqExec" DllEntry="MessageQueuingExecuteInstall" Execute="deferred" Return="check" Impersonate="no" SuppressModularization="yes"/>
17
- <CustomAction Id="MessageQueuingRollbackInstall" BinaryKey="WixMsmqExec" DllEntry="MessageQueuingRollbackInstall" Execute="rollback" Return="check" Impersonate="no" SuppressModularization="yes"/>
18
- <CustomAction Id="MessageQueuingExecuteUninstall" BinaryKey="WixMsmqExec" DllEntry="MessageQueuingExecuteUninstall" Execute="deferred" Return="check" Impersonate="no" SuppressModularization="yes"/>
19
- <CustomAction Id="MessageQueuingRollbackUninstall" BinaryKey="WixMsmqExec" DllEntry="MessageQueuingRollbackUninstall" Execute="rollback" Return="check" Impersonate="no" SuppressModularization="yes"/>
14
+ <CustomAction Id="MessageQueuingInstall" BinaryKey="MsmqCA" DllEntry="MessageQueuingInstall" Execute="immediate" Return="check" SuppressModularization="yes"/>
15
+ <CustomAction Id="MessageQueuingUninstall" BinaryKey="MsmqCA" DllEntry="MessageQueuingUninstall" Execute="immediate" Return="check" SuppressModularization="yes"/>
16
+ <CustomAction Id="MessageQueuingExecuteInstall" BinaryKey="MsmqCA" DllEntry="MessageQueuingExecuteInstall" Execute="deferred" Return="check" Impersonate="no" SuppressModularization="yes"/>
17
+ <CustomAction Id="MessageQueuingRollbackInstall" BinaryKey="MsmqCA" DllEntry="MessageQueuingRollbackInstall" Execute="rollback" Return="check" Impersonate="no" SuppressModularization="yes"/>
18
+ <CustomAction Id="MessageQueuingExecuteUninstall" BinaryKey="MsmqCA" DllEntry="MessageQueuingExecuteUninstall" Execute="deferred" Return="check" Impersonate="no" SuppressModularization="yes"/>
19
+ <CustomAction Id="MessageQueuingRollbackUninstall" BinaryKey="MsmqCA" DllEntry="MessageQueuingRollbackUninstall" Execute="rollback" Return="check" Impersonate="no" SuppressModularization="yes"/>
20
21
<InstallExecuteSequence>
22
<Custom Action="MessageQueuingUninstall" After="DeleteServices" Overridable="yes">VersionNT >= 500</Custom>
@@ -25,7 +25,6 @@
25
</Fragment>
26
27
<Fragment>
28
- <Binary Id="WixMsmqExec" SourceFile="mqexec.dll"/>
29
- <Binary Id="WixMsmqSched" SourceFile="mqsched.dll"/>
28
+ <Binary Id="MsmqCA" SourceFile="msmqca.dll"/>
29
</Fragment>
30
</Wix>
src/wixlib/caerr.wxi
new
+96
@@ -0,0 +1,96 @@
1
+<Include>
2
+ <?define msierrSecureObjectsFailedCreateSD = 25520?>
3
+ <?define msierrSecureObjectsFailedSet = 25521?>
4
+ <?define msierrSecureObjectsUnknownType = 25522?>
5
+ <?define msierrXmlFileFailedRead = 25530?>
6
+ <?define msierrXmlFileFailedOpen = 25531?>
7
+ <?define msierrXmlFileFailedSelect = 25532?>
8
+ <?define msierrXmlFileFailedSave = 25533?>
9
+ <?define msierrXmlConfigFailedRead = 25540?>
10
+ <?define msierrXmlConfigFailedOpen = 25541?>
11
+ <?define msierrXmlConfigFailedSelect = 25542?>
12
+ <?define msierrXmlConfigFailedSave = 25543?>
13
+ <?define msierrFirewallCannotConnect = 25580?>
14
+ <?define msierrIISCannotConnect = 26001?>
15
+ <?define msierrIISFailedReadWebSite = 26002?>
16
+ <?define msierrIISFailedReadWebDirs = 26003?>
17
+ <?define msierrIISFailedReadVDirs = 26004?>
18
+ <?define msierrIISFailedReadFilters = 26005?>
19
+ <?define msierrIISFailedReadAppPool = 26006?>
20
+ <?define msierrIISFailedReadMimeMap = 26007?>
21
+ <?define msierrIISFailedReadProp = 26008?>
22
+ <?define msierrIISFailedReadWebSvcExt = 26009?>
23
+ <?define msierrIISFailedReadWebError = 26010?>
24
+ <?define msierrIISFailedReadHttpHeader = 26011?>
25
+ <?define msierrIISFailedSchedTransaction = 26031?>
26
+ <?define msierrIISFailedSchedInstallWebs = 26032?>
27
+ <?define msierrIISFailedSchedInstallWebDirs = 26033?>
28
+ <?define msierrIISFailedSchedInstallVDirs = 26034?>
29
+ <?define msierrIISFailedSchedInstallFilters = 26035?>
30
+ <?define msierrIISFailedSchedInstallAppPool = 26036?>
31
+ <?define msierrIISFailedSchedInstallProp = 26037?>
32
+ <?define msierrIISFailedSchedInstallWebSvcExt = 26038?>
33
+ <?define msierrIISFailedSchedUninstallWebs = 26051?>
34
+ <?define msierrIISFailedSchedUninstallWebDirs = 26052?>
35
+ <?define msierrIISFailedSchedUninstallVDirs = 26053?>
36
+ <?define msierrIISFailedSchedUninstallFilters = 26054?>
37
+ <?define msierrIISFailedSchedUninstallAppPool = 26055?>
38
+ <?define msierrIISFailedSchedUninstallProp = 26056?>
39
+ <?define msierrIISFailedSchedUninstallWebSvcExt = 26057?>
40
+ <?define msierrIISFailedStartTransaction = 26101?>
41
+ <?define msierrIISFailedOpenKey = 26102?>
42
+ <?define msierrIISFailedCreateKey = 26103?>
43
+ <?define msierrIISFailedWriteData = 26104?>
44
+ <?define msierrIISFailedCreateApp = 26105?>
45
+ <?define msierrIISFailedDeleteKey = 26106?>
46
+ <?define msierrIISFailedDeleteApp = 26107?>
47
+ <?define msierrIISFailedDeleteValue = 26108?>
48
+ <?define msierrIISFailedCommitInUse = 26109?>
49
+ <?define msierrSQLFailedCreateDatabase = 26201?>
50
+ <?define msierrSQLFailedDropDatabase = 26202?>
51
+ <?define msierrSQLFailedConnectDatabase = 26203?>
52
+ <?define msierrSQLFailedExecString = 26204?>
53
+ <?define msierrSQLDatabaseAlreadyExists = 26205?>
54
+ <?define msierrPERFMONFailedRegisterDLL = 26251?>
55
+ <?define msierrPERFMONFailedUnregisterDLL = 26252?>
56
+ <?define msierrInstallPerfCounterData = 26253?>
57
+ <?define msierrUninstallPerfCounterData = 26254?>
58
+ <?define msierrSMBFailedCreate = 26301?>
59
+ <?define msierrSMBFailedDrop = 26302?>
60
+ <?define msierrCERTFailedOpen = 26351?>
61
+ <?define msierrCERTFailedAdd = 26352?>
62
+ <?define msierrUSRFailedUserCreate = 26401?>
63
+ <?define msierrUSRFailedUserCreatePswd = 26402?>
64
+ <?define msierrUSRFailedUserGroupAdd = 26403?>
65
+ <?define msierrUSRFailedUserCreateExists = 26404?>
66
+ <?define msierrUSRFailedGrantLogonAsService = 26405?>
67
+ <?define msierrDependencyMissingDependencies = 26451?>
68
+ <?define msierrDependencyHasDependents = 26452?>
69
+ <?define msierrDotNetRuntimeRequired = 27000?>
70
+ <?define msierrComPlusCannotConnect = 28001?>
71
+ <?define msierrComPlusPartitionReadFailed = 28002?>
72
+ <?define msierrComPlusPartitionRoleReadFailed = 28003?>
73
+ <?define msierrComPlusUserInPartitionRoleReadFailed = 28004?>
74
+ <?define msierrComPlusPartitionUserReadFailed = 28005?>
75
+ <?define msierrComPlusApplicationReadFailed = 28006?>
76
+ <?define msierrComPlusApplicationRoleReadFailed = 28007?>
77
+ <?define msierrComPlusUserInApplicationRoleReadFailed = 28008?>
78
+ <?define msierrComPlusAssembliesReadFailed = 28009?>
79
+ <?define msierrComPlusSubscriptionReadFailed = 28010?>
80
+ <?define msierrComPlusPartitionDependency = 28011?>
81
+ <?define msierrComPlusPartitionNotFound = 28012?>
82
+ <?define msierrComPlusPartitionIdConflict = 28013?>
83
+ <?define msierrComPlusPartitionNameConflict = 28014?>
84
+ <?define msierrComPlusApplicationDependency = 28015?>
85
+ <?define msierrComPlusApplicationNotFound = 28016?>
86
+ <?define msierrComPlusApplicationIdConflict = 28017?>
87
+ <?define msierrComPlusApplicationNameConflict = 28018?>
88
+ <?define msierrComPlusApplicationRoleDependency = 28019?>
89
+ <?define msierrComPlusApplicationRoleNotFound = 28020?>
90
+ <?define msierrComPlusApplicationRoleConflict = 28021?>
91
+ <?define msierrComPlusAssemblyDependency = 28022?>
92
+ <?define msierrComPlusSubscriptionIdConflict = 28023?>
93
+ <?define msierrComPlusSubscriptionNameConflict = 28024?>
94
+ <?define msierrComPlusFailedLookupNames = 28025?>
95
+ <?define msierrMsmqCannotConnect = 28101?>
96
+</Include>
\ No newline at end of file
src/wixlib/msmq.wixproj
new
+40
@@ -0,0 +1,40 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
+<Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
4
+ <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" />
5
+ <Import Project="..\FindLocalWix.props" />
6
+ <PropertyGroup>
7
+ <ProjectGuid>{42493058-5FC8-4F85-9884-FF3190E084B6}</ProjectGuid>
8
+ <OutputName>msmq</OutputName>
9
+ <OutputType>Library</OutputType>
10
+ <BindFiles>true</BindFiles>
11
+ </PropertyGroup>
12
+
13
+ <ItemGroup>
14
+ <Compile Include="MsmqExtension.wxs" />
15
+ <EmbeddedResource Include="en-us.wxl" />
16
+ <EmbeddedResource Include="ja-jp.wxl" />
17
+ </ItemGroup>
18
+ <ItemGroup>
19
+ <None Include="packages.config" />
20
+ </ItemGroup>
21
+ <ItemGroup>
22
+ <ProjectReference Include="..\ca\msmqca.vcxproj">
23
+ <Name>msmqca</Name>
24
+ <Project>{CAD56A7E-342B-4324-9DCB-BCEB8F3BC80D}</Project>
25
+ </ProjectReference>
26
+ </ItemGroup>
27
+ <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " />
28
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " />
29
+ <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
30
+ <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/." />
31
+ </Target>
32
+ <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
33
+ <PropertyGroup>
34
+ <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>
35
+ </PropertyGroup>
36
+ <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'))" />
37
+ <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props'))" />
38
+ </Target>
39
+ <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
40
+</Project>
src/wixlib/packages.config
new
+5
@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<packages>
3
+ <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" />
4
+ <package id="WixToolset.MSBuild" version="4.0.0-build-0005" developmentDependency="true" targetFramework="net40" />
5
+</packages>
\ No newline at end of file
version.json
new
+11
@@ -0,0 +1,11 @@
1
+{
2
+ "version": "4.0",
3
+ "publicReleaseRefSpec": [
4
+ "^refs/heads/master$"
5
+ ],
6
+ "cloudBuild": {
7
+ "buildNumber": {
8
+ "enabled": true
9
+ }
10
+ }
11
+}