diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2019-01-19 20:31:52 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2019-01-19 20:35:55 -0600 |
commit | 74ca49020e2f382437337f166711ea87556865bd (patch) | |
tree | 4534fb7535e96bb6bfc68d73669b58f48b57624c | |
parent | a12b13c36d1da707cf541595cf5f38338f37cc68 (diff) | |
download | wix-74ca49020e2f382437337f166711ea87556865bd.tar.gz wix-74ca49020e2f382437337f166711ea87556865bd.tar.bz2 wix-74ca49020e2f382437337f166711ea87556865bd.zip |
Integrate into latest v4.
48 files changed, 1407 insertions, 367 deletions
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..1d72e683 --- /dev/null +++ b/.editorconfig | |||
@@ -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 | ||
diff --git a/Msmq.wixext.sln b/Msmq.wixext.sln new file mode 100644 index 00000000..e3ebed6d --- /dev/null +++ b/Msmq.wixext.sln | |||
@@ -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 | ||
diff --git a/appveyor.cmd b/appveyor.cmd new file mode 100644 index 00000000..365f9ac2 --- /dev/null +++ b/appveyor.cmd | |||
@@ -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 | ||
diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..d55322da --- /dev/null +++ b/appveyor.yml | |||
@@ -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= | ||
diff --git a/nuget.config b/nuget.config new file mode 100644 index 00000000..aaee3228 --- /dev/null +++ b/nuget.config | |||
@@ -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 | ||
diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props new file mode 100644 index 00000000..0e00132b --- /dev/null +++ b/src/Cpp.Build.props | |||
@@ -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> | ||
diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..e853e22d --- /dev/null +++ b/src/Directory.Build.props | |||
@@ -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> | ||
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..dac7452a --- /dev/null +++ b/src/Directory.Build.targets | |||
@@ -0,0 +1,48 @@ | |||
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> | ||
diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props new file mode 100644 index 00000000..a784e352 --- /dev/null +++ b/src/FindLocalWix.props | |||
@@ -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> | ||
diff --git a/src/ca/custommsierrors.h b/src/ca/custommsierrors.h new file mode 100644 index 00000000..0c1b23b7 --- /dev/null +++ b/src/ca/custommsierrors.h | |||
@@ -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 | ||
diff --git a/src/ca/dllmain.cpp b/src/ca/dllmain.cpp new file mode 100644 index 00000000..35ae6d1c --- /dev/null +++ b/src/ca/dllmain.cpp | |||
@@ -0,0 +1,26 @@ | |||
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 | } | ||
diff --git a/src/ca/mqexec.cpp b/src/ca/mqexec.cpp index bac54f31..ff7e9b14 100644 --- a/src/ca/mqexec.cpp +++ b/src/ca/mqexec.cpp | |||
@@ -2,28 +2,6 @@ | |||
2 | 2 | ||
3 | #include "precomp.h" | 3 | #include "precomp.h" |
4 | 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 | } | ||
27 | 5 | ||
28 | /******************************************************************** | 6 | /******************************************************************** |
29 | MessageQueuingExecuteInstall - CUSTOM ACTION ENTRY POINT | 7 | MessageQueuingExecuteInstall - CUSTOM ACTION ENTRY POINT |
@@ -42,7 +20,7 @@ extern "C" UINT __stdcall MessageQueuingExecuteInstall(MSIHANDLE hInstall) | |||
42 | hr = WcaInitialize(hInstall, "MessageQueuingExecuteInstall"); | 20 | hr = WcaInitialize(hInstall, "MessageQueuingExecuteInstall"); |
43 | ExitOnFailure(hr, "Failed to initialize MessageQueuingExecuteInstall"); | 21 | ExitOnFailure(hr, "Failed to initialize MessageQueuingExecuteInstall"); |
44 | 22 | ||
45 | hr = MqiInitialize(); | 23 | hr = MqiExecInitialize(); |
46 | ExitOnFailure(hr, "Failed to initialize"); | 24 | ExitOnFailure(hr, "Failed to initialize"); |
47 | 25 | ||
48 | // get custom action data | 26 | // get custom action data |
@@ -67,7 +45,7 @@ LExit: | |||
67 | ReleaseStr(pwzCustomActionData); | 45 | ReleaseStr(pwzCustomActionData); |
68 | 46 | ||
69 | // uninitialize | 47 | // uninitialize |
70 | MqiUninitialize(); | 48 | MqiExecUninitialize(); |
71 | 49 | ||
72 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; | 50 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; |
73 | return WcaFinalize(er); | 51 | return WcaFinalize(er); |
@@ -90,7 +68,7 @@ extern "C" UINT __stdcall MessageQueuingRollbackInstall(MSIHANDLE hInstall) | |||
90 | hr = WcaInitialize(hInstall, "MessageQueuingRollbackInstall"); | 68 | hr = WcaInitialize(hInstall, "MessageQueuingRollbackInstall"); |
91 | ExitOnFailure(hr, "Failed to initialize MessageQueuingRollbackInstall"); | 69 | ExitOnFailure(hr, "Failed to initialize MessageQueuingRollbackInstall"); |
92 | 70 | ||
93 | hr = MqiInitialize(); | 71 | hr = MqiExecInitialize(); |
94 | ExitOnFailure(hr, "Failed to initialize"); | 72 | ExitOnFailure(hr, "Failed to initialize"); |
95 | 73 | ||
96 | // get custom action data | 74 | // get custom action data |
@@ -113,7 +91,7 @@ LExit: | |||
113 | ReleaseStr(pwzCustomActionData); | 91 | ReleaseStr(pwzCustomActionData); |
114 | 92 | ||
115 | // uninitialize | 93 | // uninitialize |
116 | MqiUninitialize(); | 94 | MqiExecUninitialize(); |
117 | 95 | ||
118 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; | 96 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; |
119 | return WcaFinalize(er); | 97 | return WcaFinalize(er); |
@@ -136,7 +114,7 @@ extern "C" UINT __stdcall MessageQueuingExecuteUninstall(MSIHANDLE hInstall) | |||
136 | hr = WcaInitialize(hInstall, "MessageQueuingExecuteUninstall"); | 114 | hr = WcaInitialize(hInstall, "MessageQueuingExecuteUninstall"); |
137 | ExitOnFailure(hr, "Failed to initialize MessageQueuingExecuteUninstall"); | 115 | ExitOnFailure(hr, "Failed to initialize MessageQueuingExecuteUninstall"); |
138 | 116 | ||
139 | hr = MqiInitialize(); | 117 | hr = MqiExecInitialize(); |
140 | ExitOnFailure(hr, "Failed to initialize"); | 118 | ExitOnFailure(hr, "Failed to initialize"); |
141 | 119 | ||
142 | // get custom action data | 120 | // get custom action data |
@@ -161,7 +139,7 @@ LExit: | |||
161 | ReleaseStr(pwzCustomActionData); | 139 | ReleaseStr(pwzCustomActionData); |
162 | 140 | ||
163 | // uninitialize | 141 | // uninitialize |
164 | MqiUninitialize(); | 142 | MqiExecUninitialize(); |
165 | 143 | ||
166 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; | 144 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; |
167 | return WcaFinalize(er); | 145 | return WcaFinalize(er); |
@@ -184,7 +162,7 @@ extern "C" UINT __stdcall MessageQueuingRollbackUninstall(MSIHANDLE hInstall) | |||
184 | hr = WcaInitialize(hInstall, "MessageQueuingRollbackUninstall"); | 162 | hr = WcaInitialize(hInstall, "MessageQueuingRollbackUninstall"); |
185 | ExitOnFailure(hr, "Failed to initialize MessageQueuingRollbackUninstall"); | 163 | ExitOnFailure(hr, "Failed to initialize MessageQueuingRollbackUninstall"); |
186 | 164 | ||
187 | hr = MqiInitialize(); | 165 | hr = MqiExecInitialize(); |
188 | ExitOnFailure(hr, "Failed to initialize"); | 166 | ExitOnFailure(hr, "Failed to initialize"); |
189 | 167 | ||
190 | // get custom action data | 168 | // get custom action data |
@@ -207,7 +185,7 @@ LExit: | |||
207 | ReleaseStr(pwzCustomActionData); | 185 | ReleaseStr(pwzCustomActionData); |
208 | 186 | ||
209 | // uninitialize | 187 | // uninitialize |
210 | MqiUninitialize(); | 188 | MqiExecUninitialize(); |
211 | 189 | ||
212 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; | 190 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; |
213 | return WcaFinalize(er); | 191 | return WcaFinalize(er); |
diff --git a/src/ca/mqqueueexec.cpp b/src/ca/mqqueueexec.cpp index f5b99da7..e4304ab8 100644 --- a/src/ca/mqqueueexec.cpp +++ b/src/ca/mqqueueexec.cpp | |||
@@ -119,7 +119,7 @@ static MQSetQueueSecurityFunc gpfnMQSetQueueSecurity; | |||
119 | 119 | ||
120 | // function definitions | 120 | // function definitions |
121 | 121 | ||
122 | HRESULT MqiInitialize() | 122 | HRESULT MqiExecInitialize() |
123 | { | 123 | { |
124 | HRESULT hr = S_OK; | 124 | HRESULT hr = S_OK; |
125 | 125 | ||
@@ -153,7 +153,7 @@ LExit: | |||
153 | return hr; | 153 | return hr; |
154 | } | 154 | } |
155 | 155 | ||
156 | void MqiUninitialize() | 156 | void MqiExecUninitialize() |
157 | { | 157 | { |
158 | if (ghMQRT) | 158 | if (ghMQRT) |
159 | ::FreeLibrary(ghMQRT); | 159 | ::FreeLibrary(ghMQRT); |
diff --git a/src/ca/mqqueueexec.h b/src/ca/mqqueueexec.h index 37ceea50..76bc2023 100644 --- a/src/ca/mqqueueexec.h +++ b/src/ca/mqqueueexec.h | |||
@@ -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. | 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 | 3 | ||
4 | 4 | ||
5 | HRESULT MqiInitialize(); | 5 | HRESULT MqiExecInitialize(); |
6 | void MqiUninitialize(); | 6 | void MqiExecUninitialize(); |
7 | HRESULT MqiCreateMessageQueues( | 7 | HRESULT MqiCreateMessageQueues( |
8 | LPWSTR* ppwzData | 8 | LPWSTR* ppwzData |
9 | ); | 9 | ); |
diff --git a/src/ca/mqqueuesched.cpp b/src/ca/mqqueuesched.cpp index 4f40a4aa..01777ea4 100644 --- a/src/ca/mqqueuesched.cpp +++ b/src/ca/mqqueuesched.cpp | |||
@@ -51,7 +51,7 @@ static MQPathNameToFormatNameFunc gpfnMQPathNameToFormatName; | |||
51 | 51 | ||
52 | // function definitions | 52 | // function definitions |
53 | 53 | ||
54 | HRESULT MqiInitialize() | 54 | HRESULT MqiSchedInitialize() |
55 | { | 55 | { |
56 | HRESULT hr = S_OK; | 56 | HRESULT hr = S_OK; |
57 | 57 | ||
@@ -72,7 +72,7 @@ LExit: | |||
72 | return hr; | 72 | return hr; |
73 | } | 73 | } |
74 | 74 | ||
75 | void MqiUninitialize() | 75 | void MqiSchedUninitialize() |
76 | { | 76 | { |
77 | if (ghMQRT) | 77 | if (ghMQRT) |
78 | { | 78 | { |
diff --git a/src/ca/mqqueuesched.h b/src/ca/mqqueuesched.h index b063ca28..c9381e0a 100644 --- a/src/ca/mqqueuesched.h +++ b/src/ca/mqqueuesched.h | |||
@@ -54,8 +54,8 @@ struct MQI_MESSAGE_QUEUE_PERMISSION_LIST | |||
54 | 54 | ||
55 | // function prototypes | 55 | // function prototypes |
56 | 56 | ||
57 | HRESULT MqiInitialize(); | 57 | HRESULT MqiSchedInitialize(); |
58 | void MqiUninitialize(); | 58 | void MqiSchedUninitialize(); |
59 | HRESULT MqiMessageQueueRead( | 59 | HRESULT MqiMessageQueueRead( |
60 | MQI_MESSAGE_QUEUE_LIST* pList | 60 | MQI_MESSAGE_QUEUE_LIST* pList |
61 | ); | 61 | ); |
diff --git a/src/ca/mqsched.cpp b/src/ca/mqsched.cpp index cefce853..4c994901 100644 --- a/src/ca/mqsched.cpp +++ b/src/ca/mqsched.cpp | |||
@@ -4,29 +4,6 @@ | |||
4 | 4 | ||
5 | 5 | ||
6 | /******************************************************************** | 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 | |||
29 | /******************************************************************** | ||
30 | MessageQueuingInstall - CUSTOM ACTION ENTRY POINT for installing MSMQ message queues | 7 | MessageQueuingInstall - CUSTOM ACTION ENTRY POINT for installing MSMQ message queues |
31 | 8 | ||
32 | ********************************************************************/ | 9 | ********************************************************************/ |
@@ -51,7 +28,7 @@ extern "C" UINT __stdcall MessageQueuingInstall(MSIHANDLE hInstall) | |||
51 | 28 | ||
52 | do | 29 | do |
53 | { | 30 | { |
54 | hr = MqiInitialize(); | 31 | hr = MqiSchedInitialize(); |
55 | if (S_FALSE == hr) | 32 | if (S_FALSE == hr) |
56 | { | 33 | { |
57 | WcaLog(LOGMSG_STANDARD, "Failed to load mqrt.dll."); | 34 | WcaLog(LOGMSG_STANDARD, "Failed to load mqrt.dll."); |
@@ -118,7 +95,7 @@ LExit: | |||
118 | ReleaseStr(pwzExecuteActionData); | 95 | ReleaseStr(pwzExecuteActionData); |
119 | 96 | ||
120 | // uninitialize | 97 | // uninitialize |
121 | MqiUninitialize(); | 98 | MqiSchedUninitialize(); |
122 | 99 | ||
123 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; | 100 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; |
124 | return WcaFinalize(er); | 101 | return WcaFinalize(er); |
@@ -150,7 +127,7 @@ extern "C" UINT __stdcall MessageQueuingUninstall(MSIHANDLE hInstall) | |||
150 | 127 | ||
151 | do | 128 | do |
152 | { | 129 | { |
153 | hr = MqiInitialize(); | 130 | hr = MqiSchedInitialize(); |
154 | if (S_FALSE == hr) | 131 | if (S_FALSE == hr) |
155 | { | 132 | { |
156 | WcaLog(LOGMSG_STANDARD, "Failed to load mqrt.dll."); | 133 | WcaLog(LOGMSG_STANDARD, "Failed to load mqrt.dll."); |
@@ -212,7 +189,7 @@ LExit: | |||
212 | ReleaseStr(pwzExecuteActionData); | 189 | ReleaseStr(pwzExecuteActionData); |
213 | 190 | ||
214 | // uninitialize | 191 | // uninitialize |
215 | MqiUninitialize(); | 192 | MqiSchedUninitialize(); |
216 | 193 | ||
217 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; | 194 | er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; |
218 | return WcaFinalize(er); | 195 | return WcaFinalize(er); |
diff --git a/src/ca/msmqca.def b/src/ca/msmqca.def new file mode 100644 index 00000000..4902858f --- /dev/null +++ b/src/ca/msmqca.def | |||
@@ -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 | ||
diff --git a/src/ca/msmqca.vcxproj b/src/ca/msmqca.vcxproj new file mode 100644 index 00000000..507a2f93 --- /dev/null +++ b/src/ca/msmqca.vcxproj | |||
@@ -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> | ||
diff --git a/src/ca/packages.config b/src/ca/packages.config new file mode 100644 index 00000000..b87f9ab4 --- /dev/null +++ b/src/ca/packages.config | |||
@@ -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 | ||
diff --git a/src/ca/precomp.h b/src/ca/precomp.h new file mode 100644 index 00000000..cbbff6ea --- /dev/null +++ b/src/ca/precomp.h | |||
@@ -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" | ||
diff --git a/src/test/WixToolsetTest.Msmq/MsmqExtensionFixture.cs b/src/test/WixToolsetTest.Msmq/MsmqExtensionFixture.cs new file mode 100644 index 00000000..af64517d --- /dev/null +++ b/src/test/WixToolsetTest.Msmq/MsmqExtensionFixture.cs | |||
@@ -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 | } | ||
diff --git a/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/Package.en-us.wxl b/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/Package.en-us.wxl | |||
@@ -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> | ||
diff --git a/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/Package.wxs b/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/Package.wxs new file mode 100644 index 00000000..68ff98fd --- /dev/null +++ b/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/Package.wxs | |||
@@ -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> | ||
diff --git a/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/PackageComponents.wxs b/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/PackageComponents.wxs new file mode 100644 index 00000000..ff9f7d92 --- /dev/null +++ b/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/PackageComponents.wxs | |||
@@ -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> | ||
diff --git a/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/example.txt b/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.Msmq/TestData/UsingMessageQueue/example.txt | |||
@@ -0,0 +1 @@ | |||
This is example.txt. \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.Msmq/WixToolsetTest.Msmq.csproj b/src/test/WixToolsetTest.Msmq/WixToolsetTest.Msmq.csproj new file mode 100644 index 00000000..bb03f716 --- /dev/null +++ b/src/test/WixToolsetTest.Msmq/WixToolsetTest.Msmq.csproj | |||
@@ -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> | ||
diff --git a/src/wixext/MsmqCompiler.cs b/src/wixext/MsmqCompiler.cs index b40e2dc1..5365f0fb 100644 --- a/src/wixext/MsmqCompiler.cs +++ b/src/wixext/MsmqCompiler.cs | |||
@@ -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. | 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 | 2 | ||
3 | namespace WixToolset.Extensions | 3 | namespace WixToolset.Msmq |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Collections; | ||
7 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
8 | using System.Globalization; | ||
9 | using System.Reflection; | ||
10 | using System.Xml; | ||
11 | using System.Xml.Linq; | 7 | using System.Xml.Linq; |
12 | using System.Xml.Schema; | ||
13 | using WixToolset.Data; | 8 | using WixToolset.Data; |
14 | using WixToolset.Extensibility; | 9 | using WixToolset.Extensibility; |
15 | 10 | ||
16 | /// <summary> | 11 | /// <summary> |
17 | /// The compiler for the WiX Toolset Internet Information Services Extension. | 12 | /// The compiler for the WiX Toolset MSMQ Extension. |
18 | /// </summary> | 13 | /// </summary> |
19 | public sealed class MsmqCompiler : CompilerExtension | 14 | public sealed class MsmqCompiler : BaseCompilerExtension |
20 | { | 15 | { |
21 | /// <summary> | 16 | public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/msmq"; |
22 | /// Instantiate a new MsmqCompiler. | ||
23 | /// </summary> | ||
24 | public MsmqCompiler() | ||
25 | { | ||
26 | this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/msmq"; | ||
27 | } | ||
28 | 17 | ||
29 | /// <summary> | 18 | /// <summary> |
30 | /// </summary> | 19 | /// </summary> |
@@ -75,7 +64,7 @@ namespace WixToolset.Extensions | |||
75 | /// <param name="parentElement">Parent element of element to process.</param> | 64 | /// <param name="parentElement">Parent element of element to process.</param> |
76 | /// <param name="element">Element to process.</param> | 65 | /// <param name="element">Element to process.</param> |
77 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</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) |
79 | { | 68 | { |
80 | switch (parentElement.Name.LocalName) | 69 | switch (parentElement.Name.LocalName) |
81 | { | 70 | { |
@@ -86,18 +75,18 @@ namespace WixToolset.Extensions | |||
86 | switch (element.Name.LocalName) | 75 | switch (element.Name.LocalName) |
87 | { | 76 | { |
88 | case "MessageQueue": | 77 | case "MessageQueue": |
89 | this.ParseMessageQueueElement(element, componentId); | 78 | this.ParseMessageQueueElement(intermediate, section, element, componentId); |
90 | break; | 79 | break; |
91 | case "MessageQueuePermission": | 80 | case "MessageQueuePermission": |
92 | this.ParseMessageQueuePermissionElement(element, componentId, null); | 81 | this.ParseMessageQueuePermissionElement(intermediate, section, element, componentId, null); |
93 | break; | 82 | break; |
94 | default: | 83 | default: |
95 | this.Core.UnexpectedElement(parentElement, element); | 84 | this.ParseHelper.UnexpectedElement(parentElement, element); |
96 | break; | 85 | break; |
97 | } | 86 | } |
98 | break; | 87 | break; |
99 | default: | 88 | default: |
100 | this.Core.UnexpectedElement(parentElement, element); | 89 | this.ParseHelper.UnexpectedElement(parentElement, element); |
101 | break; | 90 | break; |
102 | } | 91 | } |
103 | } | 92 | } |
@@ -107,11 +96,11 @@ namespace WixToolset.Extensions | |||
107 | /// </summary> | 96 | /// </summary> |
108 | /// <param name="node">Element to parse.</param> | 97 | /// <param name="node">Element to parse.</param> |
109 | /// <param name="componentKey">Identifier of parent component.</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) |
111 | { | 100 | { |
112 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 101 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
113 | 102 | ||
114 | string id = null; | 103 | Identifier id = null; |
115 | int basePriority = CompilerConstants.IntegerNotSet; | 104 | int basePriority = CompilerConstants.IntegerNotSet; |
116 | int journalQuota = CompilerConstants.IntegerNotSet; | 105 | int journalQuota = CompilerConstants.IntegerNotSet; |
117 | string label = null; | 106 | string label = null; |
@@ -129,10 +118,10 @@ namespace WixToolset.Extensions | |||
129 | switch (attrib.Name.LocalName) | 118 | switch (attrib.Name.LocalName) |
130 | { | 119 | { |
131 | case "Id": | 120 | case "Id": |
132 | id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 121 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
133 | break; | 122 | break; |
134 | case "Authenticate": | 123 | case "Authenticate": |
135 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 124 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
136 | { | 125 | { |
137 | attributes |= (int)MqiMessageQueueAttributes.Authenticate; | 126 | attributes |= (int)MqiMessageQueueAttributes.Authenticate; |
138 | } | 127 | } |
@@ -142,10 +131,10 @@ namespace WixToolset.Extensions | |||
142 | } | 131 | } |
143 | break; | 132 | break; |
144 | case "BasePriority": | 133 | case "BasePriority": |
145 | basePriority = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); | 134 | basePriority = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); |
146 | break; | 135 | break; |
147 | case "Journal": | 136 | case "Journal": |
148 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 137 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
149 | { | 138 | { |
150 | attributes |= (int)MqiMessageQueueAttributes.Journal; | 139 | attributes |= (int)MqiMessageQueueAttributes.Journal; |
151 | } | 140 | } |
@@ -155,19 +144,19 @@ namespace WixToolset.Extensions | |||
155 | } | 144 | } |
156 | break; | 145 | break; |
157 | case "JournalQuota": | 146 | case "JournalQuota": |
158 | journalQuota = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | 147 | journalQuota = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); |
159 | break; | 148 | break; |
160 | case "Label": | 149 | case "Label": |
161 | label = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 150 | label = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
162 | break; | 151 | break; |
163 | case "MulticastAddress": | 152 | case "MulticastAddress": |
164 | multicastAddress = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 153 | multicastAddress = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
165 | break; | 154 | break; |
166 | case "PathName": | 155 | case "PathName": |
167 | pathName = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 156 | pathName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
168 | break; | 157 | break; |
169 | case "PrivLevel": | 158 | case "PrivLevel": |
170 | string privLevelAttr = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 159 | string privLevelAttr = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
171 | switch (privLevelAttr) | 160 | switch (privLevelAttr) |
172 | { | 161 | { |
173 | case "none": | 162 | case "none": |
@@ -180,15 +169,15 @@ namespace WixToolset.Extensions | |||
180 | privLevel = (int)MqiMessageQueuePrivacyLevel.Body; | 169 | privLevel = (int)MqiMessageQueuePrivacyLevel.Body; |
181 | break; | 170 | break; |
182 | default: | 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")); |
184 | break; | 173 | break; |
185 | } | 174 | } |
186 | break; | 175 | break; |
187 | case "Quota": | 176 | case "Quota": |
188 | quota = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); | 177 | quota = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); |
189 | break; | 178 | break; |
190 | case "Transactional": | 179 | case "Transactional": |
191 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 180 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
192 | { | 181 | { |
193 | attributes |= (int)MqiMessageQueueAttributes.Transactional; | 182 | attributes |= (int)MqiMessageQueueAttributes.Transactional; |
194 | } | 183 | } |
@@ -198,16 +187,16 @@ namespace WixToolset.Extensions | |||
198 | } | 187 | } |
199 | break; | 188 | break; |
200 | case "ServiceTypeGuid": | 189 | case "ServiceTypeGuid": |
201 | serviceTypeGuid = TryFormatGuidValue(this.Core.GetAttributeValue(sourceLineNumbers, attrib)); | 190 | serviceTypeGuid = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); |
202 | break; | 191 | break; |
203 | default: | 192 | default: |
204 | this.Core.UnexpectedAttribute(node, attrib); | 193 | this.ParseHelper.UnexpectedAttribute(node, attrib); |
205 | break; | 194 | break; |
206 | } | 195 | } |
207 | } | 196 | } |
208 | else | 197 | else |
209 | { | 198 | { |
210 | this.Core.ParseExtensionAttribute(node, attrib); | 199 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); |
211 | } | 200 | } |
212 | } | 201 | } |
213 | 202 | ||
@@ -218,46 +207,45 @@ namespace WixToolset.Extensions | |||
218 | switch (child.Name.LocalName) | 207 | switch (child.Name.LocalName) |
219 | { | 208 | { |
220 | case "MessageQueuePermission": | 209 | case "MessageQueuePermission": |
221 | this.ParseMessageQueuePermissionElement(child, componentId, id); | 210 | this.ParseMessageQueuePermissionElement(intermediate, section, child, componentId, id?.Id); |
222 | break; | 211 | break; |
223 | default: | 212 | default: |
224 | this.Core.UnexpectedElement(node, child); | 213 | this.ParseHelper.UnexpectedElement(node, child); |
225 | break; | 214 | break; |
226 | } | 215 | } |
227 | } | 216 | } |
228 | else | 217 | else |
229 | { | 218 | { |
230 | this.Core.ParseExtensionElement(node, child); | 219 | this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); |
231 | } | 220 | } |
232 | } | 221 | } |
233 | 222 | ||
234 | Row row = this.Core.CreateRow(sourceLineNumbers, "MessageQueue"); | 223 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "MessageQueue", id); |
235 | row[0] = id; | 224 | row.Set(1, componentId); |
236 | row[1] = componentId; | ||
237 | if (CompilerConstants.IntegerNotSet != basePriority) | 225 | if (CompilerConstants.IntegerNotSet != basePriority) |
238 | { | 226 | { |
239 | row[2] = basePriority; | 227 | row.Set(2, basePriority); |
240 | } | 228 | } |
241 | if (CompilerConstants.IntegerNotSet != journalQuota) | 229 | if (CompilerConstants.IntegerNotSet != journalQuota) |
242 | { | 230 | { |
243 | row[3] = journalQuota; | 231 | row.Set(3, journalQuota); |
244 | } | 232 | } |
245 | row[4] = label; | 233 | row.Set(4, label); |
246 | row[5] = multicastAddress; | 234 | row.Set(5, multicastAddress); |
247 | row[6] = pathName; | 235 | row.Set(6, pathName); |
248 | if (CompilerConstants.IntegerNotSet != privLevel) | 236 | if (CompilerConstants.IntegerNotSet != privLevel) |
249 | { | 237 | { |
250 | row[7] = privLevel; | 238 | row.Set(7, privLevel); |
251 | } | 239 | } |
252 | if (CompilerConstants.IntegerNotSet != quota) | 240 | if (CompilerConstants.IntegerNotSet != quota) |
253 | { | 241 | { |
254 | row[8] = quota; | 242 | row.Set(8, quota); |
255 | } | 243 | } |
256 | row[9] = serviceTypeGuid; | 244 | row.Set(9, serviceTypeGuid); |
257 | row[10] = attributes; | 245 | row.Set(10, attributes); |
258 | 246 | ||
259 | this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "MessageQueuingInstall"); | 247 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MessageQueuingInstall"); |
260 | this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "MessageQueuingUninstall"); | 248 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MessageQueuingUninstall"); |
261 | } | 249 | } |
262 | 250 | ||
263 | /// <summary> | 251 | /// <summary> |
@@ -266,11 +254,11 @@ namespace WixToolset.Extensions | |||
266 | /// <param name="node">Element to parse.</param> | 254 | /// <param name="node">Element to parse.</param> |
267 | /// <param name="componentKey">Identifier of parent component.</param> | 255 | /// <param name="componentKey">Identifier of parent component.</param> |
268 | /// <param name="applicationKey">Optional identifier of parent message queue.</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) |
270 | { | 258 | { |
271 | SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 259 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
272 | 260 | ||
273 | string id = null; | 261 | Identifier id = null; |
274 | string user = null; | 262 | string user = null; |
275 | string group = null; | 263 | string group = null; |
276 | int permissions = 0; | 264 | int permissions = 0; |
@@ -282,34 +270,34 @@ namespace WixToolset.Extensions | |||
282 | switch (attrib.Name.LocalName) | 270 | switch (attrib.Name.LocalName) |
283 | { | 271 | { |
284 | case "Id": | 272 | case "Id": |
285 | id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 273 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
286 | break; | 274 | break; |
287 | case "MessageQueue": | 275 | case "MessageQueue": |
288 | if (null != messageQueueId) | 276 | if (null != messageQueueId) |
289 | { | 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)); |
291 | } | 279 | } |
292 | messageQueueId = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 280 | messageQueueId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
293 | this.Core.CreateSimpleReference(sourceLineNumbers, "MessageQueue", messageQueueId); | 281 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "MessageQueue", messageQueueId); |
294 | break; | 282 | break; |
295 | case "User": | 283 | case "User": |
296 | if (null != group) | 284 | if (null != group) |
297 | { | 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")); |
299 | } | 287 | } |
300 | user = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 288 | user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
301 | this.Core.CreateSimpleReference(sourceLineNumbers, "User", user); | 289 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user); |
302 | break; | 290 | break; |
303 | case "Group": | 291 | case "Group": |
304 | if (null != user) | 292 | if (null != user) |
305 | { | 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")); |
307 | } | 295 | } |
308 | group = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 296 | group = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
309 | this.Core.CreateSimpleReference(sourceLineNumbers, "Group", group); | 297 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Group", group); |
310 | break; | 298 | break; |
311 | case "DeleteMessage": | 299 | case "DeleteMessage": |
312 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 300 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
313 | { | 301 | { |
314 | permissions |= (int)MqiMessageQueuePermission.DeleteMessage; | 302 | permissions |= (int)MqiMessageQueuePermission.DeleteMessage; |
315 | } | 303 | } |
@@ -319,7 +307,7 @@ namespace WixToolset.Extensions | |||
319 | } | 307 | } |
320 | break; | 308 | break; |
321 | case "PeekMessage": | 309 | case "PeekMessage": |
322 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 310 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
323 | { | 311 | { |
324 | permissions |= (int)MqiMessageQueuePermission.PeekMessage; | 312 | permissions |= (int)MqiMessageQueuePermission.PeekMessage; |
325 | } | 313 | } |
@@ -329,7 +317,7 @@ namespace WixToolset.Extensions | |||
329 | } | 317 | } |
330 | break; | 318 | break; |
331 | case "WriteMessage": | 319 | case "WriteMessage": |
332 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 320 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
333 | { | 321 | { |
334 | permissions |= (int)MqiMessageQueuePermission.WriteMessage; | 322 | permissions |= (int)MqiMessageQueuePermission.WriteMessage; |
335 | } | 323 | } |
@@ -339,7 +327,7 @@ namespace WixToolset.Extensions | |||
339 | } | 327 | } |
340 | break; | 328 | break; |
341 | case "DeleteJournalMessage": | 329 | case "DeleteJournalMessage": |
342 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 330 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
343 | { | 331 | { |
344 | permissions |= (int)MqiMessageQueuePermission.DeleteJournalMessage; | 332 | permissions |= (int)MqiMessageQueuePermission.DeleteJournalMessage; |
345 | } | 333 | } |
@@ -349,7 +337,7 @@ namespace WixToolset.Extensions | |||
349 | } | 337 | } |
350 | break; | 338 | break; |
351 | case "SetQueueProperties": | 339 | case "SetQueueProperties": |
352 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 340 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
353 | { | 341 | { |
354 | permissions |= (int)MqiMessageQueuePermission.SetQueueProperties; | 342 | permissions |= (int)MqiMessageQueuePermission.SetQueueProperties; |
355 | } | 343 | } |
@@ -359,7 +347,7 @@ namespace WixToolset.Extensions | |||
359 | } | 347 | } |
360 | break; | 348 | break; |
361 | case "GetQueueProperties": | 349 | case "GetQueueProperties": |
362 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 350 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
363 | { | 351 | { |
364 | permissions |= (int)MqiMessageQueuePermission.GetQueueProperties; | 352 | permissions |= (int)MqiMessageQueuePermission.GetQueueProperties; |
365 | } | 353 | } |
@@ -369,7 +357,7 @@ namespace WixToolset.Extensions | |||
369 | } | 357 | } |
370 | break; | 358 | break; |
371 | case "DeleteQueue": | 359 | case "DeleteQueue": |
372 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 360 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
373 | { | 361 | { |
374 | permissions |= (int)MqiMessageQueuePermission.DeleteQueue; | 362 | permissions |= (int)MqiMessageQueuePermission.DeleteQueue; |
375 | } | 363 | } |
@@ -379,7 +367,7 @@ namespace WixToolset.Extensions | |||
379 | } | 367 | } |
380 | break; | 368 | break; |
381 | case "GetQueuePermissions": | 369 | case "GetQueuePermissions": |
382 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 370 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
383 | { | 371 | { |
384 | permissions |= (int)MqiMessageQueuePermission.GetQueuePermissions; | 372 | permissions |= (int)MqiMessageQueuePermission.GetQueuePermissions; |
385 | } | 373 | } |
@@ -389,7 +377,7 @@ namespace WixToolset.Extensions | |||
389 | } | 377 | } |
390 | break; | 378 | break; |
391 | case "ChangeQueuePermissions": | 379 | case "ChangeQueuePermissions": |
392 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 380 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
393 | { | 381 | { |
394 | permissions |= (int)MqiMessageQueuePermission.ChangeQueuePermissions; | 382 | permissions |= (int)MqiMessageQueuePermission.ChangeQueuePermissions; |
395 | } | 383 | } |
@@ -399,7 +387,7 @@ namespace WixToolset.Extensions | |||
399 | } | 387 | } |
400 | break; | 388 | break; |
401 | case "TakeQueueOwnership": | 389 | case "TakeQueueOwnership": |
402 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 390 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
403 | { | 391 | { |
404 | permissions |= (int)MqiMessageQueuePermission.TakeQueueOwnership; | 392 | permissions |= (int)MqiMessageQueuePermission.TakeQueueOwnership; |
405 | } | 393 | } |
@@ -409,7 +397,7 @@ namespace WixToolset.Extensions | |||
409 | } | 397 | } |
410 | break; | 398 | break; |
411 | case "ReceiveMessage": | 399 | case "ReceiveMessage": |
412 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 400 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
413 | { | 401 | { |
414 | permissions |= (int)MqiMessageQueuePermission.ReceiveMessage; | 402 | permissions |= (int)MqiMessageQueuePermission.ReceiveMessage; |
415 | } | 403 | } |
@@ -419,7 +407,7 @@ namespace WixToolset.Extensions | |||
419 | } | 407 | } |
420 | break; | 408 | break; |
421 | case "ReceiveJournalMessage": | 409 | case "ReceiveJournalMessage": |
422 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 410 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
423 | { | 411 | { |
424 | permissions |= (int)MqiMessageQueuePermission.ReceiveJournalMessage; | 412 | permissions |= (int)MqiMessageQueuePermission.ReceiveJournalMessage; |
425 | } | 413 | } |
@@ -429,7 +417,7 @@ namespace WixToolset.Extensions | |||
429 | } | 417 | } |
430 | break; | 418 | break; |
431 | case "QueueGenericRead": | 419 | case "QueueGenericRead": |
432 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 420 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
433 | { | 421 | { |
434 | permissions |= (int)MqiMessageQueuePermission.QueueGenericRead; | 422 | permissions |= (int)MqiMessageQueuePermission.QueueGenericRead; |
435 | } | 423 | } |
@@ -439,7 +427,7 @@ namespace WixToolset.Extensions | |||
439 | } | 427 | } |
440 | break; | 428 | break; |
441 | case "QueueGenericWrite": | 429 | case "QueueGenericWrite": |
442 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 430 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
443 | { | 431 | { |
444 | permissions |= (int)MqiMessageQueuePermission.QueueGenericWrite; | 432 | permissions |= (int)MqiMessageQueuePermission.QueueGenericWrite; |
445 | } | 433 | } |
@@ -449,7 +437,7 @@ namespace WixToolset.Extensions | |||
449 | } | 437 | } |
450 | break; | 438 | break; |
451 | case "QueueGenericExecute": | 439 | case "QueueGenericExecute": |
452 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 440 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
453 | { | 441 | { |
454 | permissions |= (int)MqiMessageQueuePermission.QueueGenericExecute; | 442 | permissions |= (int)MqiMessageQueuePermission.QueueGenericExecute; |
455 | } | 443 | } |
@@ -459,7 +447,7 @@ namespace WixToolset.Extensions | |||
459 | } | 447 | } |
460 | break; | 448 | break; |
461 | case "QueueGenericAll": | 449 | case "QueueGenericAll": |
462 | if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) | 450 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) |
463 | { | 451 | { |
464 | permissions |= (int)MqiMessageQueuePermission.QueueGenericAll; | 452 | permissions |= (int)MqiMessageQueuePermission.QueueGenericAll; |
465 | } | 453 | } |
@@ -469,44 +457,42 @@ namespace WixToolset.Extensions | |||
469 | } | 457 | } |
470 | break; | 458 | break; |
471 | default: | 459 | default: |
472 | this.Core.UnexpectedAttribute(node, attrib); | 460 | this.ParseHelper.UnexpectedAttribute(node, attrib); |
473 | break; | 461 | break; |
474 | } | 462 | } |
475 | } | 463 | } |
476 | else | 464 | else |
477 | { | 465 | { |
478 | this.Core.ParseExtensionAttribute(node, attrib); | 466 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); |
479 | } | 467 | } |
480 | } | 468 | } |
481 | 469 | ||
482 | if (null == messageQueueId) | 470 | if (null == messageQueueId) |
483 | { | 471 | { |
484 | this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "MessageQueue")); | 472 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "MessageQueue")); |
485 | } | 473 | } |
486 | if (null == user && null == group) | 474 | if (null == user && null == group) |
487 | { | 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")); |
489 | } | 477 | } |
490 | 478 | ||
491 | this.Core.ParseForExtensionElements(node); | 479 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); |
492 | 480 | ||
493 | if (null != user) | 481 | if (null != user) |
494 | { | 482 | { |
495 | Row row = this.Core.CreateRow(sourceLineNumbers, "MessageQueueUserPermission"); | 483 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "MessageQueueUserPermission", id); |
496 | row[0] = id; | 484 | row.Set(1, componentId); |
497 | row[1] = componentId; | 485 | row.Set(2, messageQueueId); |
498 | row[2] = messageQueueId; | 486 | row.Set(3, user); |
499 | row[3] = user; | 487 | row.Set(4, permissions); |
500 | row[4] = permissions; | ||
501 | } | 488 | } |
502 | if (null != group) | 489 | if (null != group) |
503 | { | 490 | { |
504 | Row row = this.Core.CreateRow(sourceLineNumbers, "MessageQueueGroupPermission"); | 491 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "MessageQueueGroupPermission", id); |
505 | row[0] = id; | 492 | row.Set(1, componentId); |
506 | row[1] = componentId; | 493 | row.Set(2, messageQueueId); |
507 | row[2] = messageQueueId; | 494 | row.Set(3, group); |
508 | row[3] = group; | 495 | row.Set(4, permissions); |
509 | row[4] = permissions; | ||
510 | } | 496 | } |
511 | } | 497 | } |
512 | 498 | ||
diff --git a/src/wixext/MsmqDecompiler.cs b/src/wixext/MsmqDecompiler.cs index 396fc49a..aa8c34b6 100644 --- a/src/wixext/MsmqDecompiler.cs +++ b/src/wixext/MsmqDecompiler.cs | |||
@@ -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. | 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 | 2 | ||
3 | namespace WixToolset.Extensions | 3 | namespace WixToolset.Msmq |
4 | { | 4 | { |
5 | #if TODO_CONSIDER_DECOMPILER | ||
5 | using System; | 6 | using System; |
6 | using System.Collections; | 7 | using System.Collections; |
7 | using System.Globalization; | 8 | using System.Globalization; |
@@ -300,4 +301,5 @@ namespace WixToolset.Extensions | |||
300 | } | 301 | } |
301 | } | 302 | } |
302 | } | 303 | } |
304 | #endif | ||
303 | } | 305 | } |
diff --git a/src/wixext/MsmqErrors.cs b/src/wixext/MsmqErrors.cs new file mode 100644 index 00000000..4342e1cf --- /dev/null +++ b/src/wixext/MsmqErrors.cs | |||
@@ -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 | } | ||
diff --git a/src/wixext/MsmqExtensionData.cs b/src/wixext/MsmqExtensionData.cs index 81d53ce7..dd1694f4 100644 --- a/src/wixext/MsmqExtensionData.cs +++ b/src/wixext/MsmqExtensionData.cs | |||
@@ -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. | 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 | 2 | ||
3 | namespace WixToolset.Extensions | 3 | namespace WixToolset.Msmq |
4 | { | 4 | { |
5 | using System; | ||
6 | using System.Reflection; | ||
7 | using WixToolset.Data; | 5 | using WixToolset.Data; |
8 | using WixToolset.Extensibility; | 6 | using WixToolset.Extensibility; |
9 | 7 | ||
10 | /// <summary> | 8 | /// <summary> |
11 | /// The WiX Toolset MSMQ Extension. | 9 | /// The WiX Toolset MSMQ Extension. |
12 | /// </summary> | 10 | /// </summary> |
13 | public sealed class MsmqExtensionData : ExtensionData | 11 | public sealed class MsmqExtensionData : BaseExtensionData |
14 | { | 12 | { |
15 | /// <summary> | 13 | /// <summary> |
16 | /// Gets the default culture. | 14 | /// Gets the default culture. |
17 | /// </summary> | 15 | /// </summary> |
18 | /// <value>The default culture.</value> | 16 | /// <value>The default culture.</value> |
19 | public override string DefaultCulture | 17 | public override string DefaultCulture => "en-US"; |
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 | } | ||
45 | 18 | ||
46 | /// <summary> | 19 | public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) |
47 | /// Internal mechanism to access the extension's table definitions. | ||
48 | /// </summary> | ||
49 | /// <returns>Extension's table definitions.</returns> | ||
50 | internal static TableDefinitionCollection GetExtensionTableDefinitions() | ||
51 | { | 20 | { |
52 | return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml"); | 21 | tupleDefinition = MsmqTupleDefinitions.ByName(name); |
22 | return tupleDefinition != null; | ||
53 | } | 23 | } |
54 | 24 | ||
55 | /// <summary> | 25 | public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) |
56 | /// Internal mechanism to access the extension's library. | ||
57 | /// </summary> | ||
58 | /// <returns>Extension's library.</returns> | ||
59 | internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions) | ||
60 | { | 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); |
62 | } | 28 | } |
63 | } | 29 | } |
64 | } | 30 | } |
diff --git a/src/wixext/MsmqExtensionFactory.cs b/src/wixext/MsmqExtensionFactory.cs new file mode 100644 index 00000000..14dd5188 --- /dev/null +++ b/src/wixext/MsmqExtensionFactory.cs | |||
@@ -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 | } | ||
diff --git a/src/wixext/MsmqWarnings.cs b/src/wixext/MsmqWarnings.cs new file mode 100644 index 00000000..41d160e9 --- /dev/null +++ b/src/wixext/MsmqWarnings.cs | |||
@@ -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 | } | ||
diff --git a/src/wixext/MsmqWindowsInstallerBackendExtension.cs b/src/wixext/MsmqWindowsInstallerBackendExtension.cs new file mode 100644 index 00000000..d7e5c4e1 --- /dev/null +++ b/src/wixext/MsmqWindowsInstallerBackendExtension.cs | |||
@@ -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 | } | ||
diff --git a/src/wixext/Tuples/MessageQueueGroupPermissionTuple.cs b/src/wixext/Tuples/MessageQueueGroupPermissionTuple.cs new file mode 100644 index 00000000..cc690f9a --- /dev/null +++ b/src/wixext/Tuples/MessageQueueGroupPermissionTuple.cs | |||
@@ -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 | ||
diff --git a/src/wixext/Tuples/MessageQueueTuple.cs b/src/wixext/Tuples/MessageQueueTuple.cs new file mode 100644 index 00000000..86f7f2a4 --- /dev/null +++ b/src/wixext/Tuples/MessageQueueTuple.cs | |||
@@ -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 | ||
diff --git a/src/wixext/Tuples/MessageQueueUserPermissionTuple.cs b/src/wixext/Tuples/MessageQueueUserPermissionTuple.cs new file mode 100644 index 00000000..8c5e6ade --- /dev/null +++ b/src/wixext/Tuples/MessageQueueUserPermissionTuple.cs | |||
@@ -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 | ||
diff --git a/src/wixext/Tuples/MsmqTupleDefinitions.cs b/src/wixext/Tuples/MsmqTupleDefinitions.cs new file mode 100644 index 00000000..e6accdc6 --- /dev/null +++ b/src/wixext/Tuples/MsmqTupleDefinitions.cs | |||
@@ -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 | } | ||
diff --git a/src/wixext/WixMsmqExtension.csproj b/src/wixext/WixMsmqExtension.csproj deleted file mode 100644 index e37d62a3..00000000 --- a/src/wixext/WixMsmqExtension.csproj +++ /dev/null | |||
@@ -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> | ||
diff --git a/src/wixext/WixToolset.Msmq.wixext.csproj b/src/wixext/WixToolset.Msmq.wixext.csproj new file mode 100644 index 00000000..2db75ff7 --- /dev/null +++ b/src/wixext/WixToolset.Msmq.wixext.csproj | |||
@@ -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> | ||
diff --git a/src/wixext/WixToolset.Msmq.wixext.targets b/src/wixext/WixToolset.Msmq.wixext.targets new file mode 100644 index 00000000..5f69fe48 --- /dev/null +++ b/src/wixext/WixToolset.Msmq.wixext.targets | |||
@@ -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> | ||
diff --git a/src/wixext/messages.xml b/src/wixext/messages.xml deleted file mode 100644 index 5ab6417f..00000000 --- a/src/wixext/messages.xml +++ /dev/null | |||
@@ -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> | ||
diff --git a/src/wixlib/MsmqExtension.wixproj b/src/wixlib/MsmqExtension.wixproj deleted file mode 100644 index 6dcdfbc7..00000000 --- a/src/wixlib/MsmqExtension.wixproj +++ /dev/null | |||
@@ -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> | ||
diff --git a/src/wixlib/MsmqExtension.wxs b/src/wixlib/MsmqExtension.wxs index b8622580..eecdb22e 100644 --- a/src/wixlib/MsmqExtension.wxs +++ b/src/wixlib/MsmqExtension.wxs | |||
@@ -11,12 +11,12 @@ | |||
11 | <ProgressText Action="MessageQueuingExecuteUninstall" Template="!(loc.MessageQueuingExecuteUninstallTemplate)">!(loc.MessageQueuingExecuteUninstall)</ProgressText> | 11 | <ProgressText Action="MessageQueuingExecuteUninstall" Template="!(loc.MessageQueuingExecuteUninstallTemplate)">!(loc.MessageQueuingExecuteUninstall)</ProgressText> |
12 | </UI> | 12 | </UI> |
13 | 13 | ||
14 | <CustomAction Id="MessageQueuingInstall" BinaryKey="WixMsmqSched" DllEntry="MessageQueuingInstall" Execute="immediate" Return="check" SuppressModularization="yes"/> | 14 | <CustomAction Id="MessageQueuingInstall" BinaryKey="MsmqCA" DllEntry="MessageQueuingInstall" Execute="immediate" Return="check" SuppressModularization="yes"/> |
15 | <CustomAction Id="MessageQueuingUninstall" BinaryKey="WixMsmqSched" DllEntry="MessageQueuingUninstall" 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="WixMsmqExec" DllEntry="MessageQueuingExecuteInstall" Execute="deferred" Return="check" Impersonate="no" SuppressModularization="yes"/> | 16 | <CustomAction Id="MessageQueuingExecuteInstall" BinaryKey="MsmqCA" 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"/> | 17 | <CustomAction Id="MessageQueuingRollbackInstall" BinaryKey="MsmqCA" 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"/> | 18 | <CustomAction Id="MessageQueuingExecuteUninstall" BinaryKey="MsmqCA" 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"/> | 19 | <CustomAction Id="MessageQueuingRollbackUninstall" BinaryKey="MsmqCA" DllEntry="MessageQueuingRollbackUninstall" Execute="rollback" Return="check" Impersonate="no" SuppressModularization="yes"/> |
20 | 20 | ||
21 | <InstallExecuteSequence> | 21 | <InstallExecuteSequence> |
22 | <Custom Action="MessageQueuingUninstall" After="DeleteServices" Overridable="yes">VersionNT >= 500</Custom> | 22 | <Custom Action="MessageQueuingUninstall" After="DeleteServices" Overridable="yes">VersionNT >= 500</Custom> |
@@ -25,7 +25,6 @@ | |||
25 | </Fragment> | 25 | </Fragment> |
26 | 26 | ||
27 | <Fragment> | 27 | <Fragment> |
28 | <Binary Id="WixMsmqExec" SourceFile="mqexec.dll"/> | 28 | <Binary Id="MsmqCA" SourceFile="msmqca.dll"/> |
29 | <Binary Id="WixMsmqSched" SourceFile="mqsched.dll"/> | ||
30 | </Fragment> | 29 | </Fragment> |
31 | </Wix> | 30 | </Wix> |
diff --git a/src/wixlib/caerr.wxi b/src/wixlib/caerr.wxi new file mode 100644 index 00000000..141942f2 --- /dev/null +++ b/src/wixlib/caerr.wxi | |||
@@ -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 | ||
diff --git a/src/wixlib/msmq.wixproj b/src/wixlib/msmq.wixproj new file mode 100644 index 00000000..a0e28ba7 --- /dev/null +++ b/src/wixlib/msmq.wixproj | |||
@@ -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> | ||
diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config new file mode 100644 index 00000000..f3d424e1 --- /dev/null +++ b/src/wixlib/packages.config | |||
@@ -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 | ||
diff --git a/version.json b/version.json new file mode 100644 index 00000000..5f857771 --- /dev/null +++ b/version.json | |||
@@ -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 | } | ||