blob: a7f58ed4b3a9b5b1cb35c4d81a7f26666f5c4fc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
namespace WixToolset.Core.WindowsInstaller
{
using System;
using System.IO;
using WixToolset.Extensibility;
using WixToolset.Extensibility.Services;
internal class WindowsInstallerBackendFactory : IBackendFactory
{
public bool TryCreateBackend(string outputType, string outputFile, IBindContext context, out IBackend backend)
{
if (String.IsNullOrEmpty(outputType))
{
outputType = Path.GetExtension(outputFile);
}
switch (outputType.ToLowerInvariant())
{
case "module":
case ".msm":
backend = new MsmBackend();
return true;
case "msipackage":
case "product":
case ".msi":
backend = new MsiBackend();
return true;
case "patch":
case ".msp":
backend = new MspBackend();
return true;
//case "patchcreation":
//case ".pcp":
// return new PatchCreationBackend();
case "transform":
case ".mst":
backend = new MstBackend();
return true;
}
backend = null;
return false;
}
}
}
|