Inscribe no longer a global backend concept
The support steps around signing are specialized for each output type. Trying to normalize the process across backends was not a fruitful endeavor.
Rob Mensching committed
Jan 10, 2022 at 14:51 UTC
284f7df20bd0402daeb559343aa4bd003a9ab71e
10 files changed
+1
-194
src/api/wix/WixToolset.Extensibility/Data/IInscribeContext.cs
deleted
-21
@@ -1,21 +0,0 @@
1
-// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
-
3
-namespace WixToolset.Extensibility.Data
4
-{
5
- using System;
6
- using WixToolset.Extensibility.Services;
7
-
8
-#pragma warning disable 1591 // TODO: add documentation
9
- public interface IInscribeContext
10
- {
11
- IServiceProvider ServiceProvider { get; }
12
-
13
- string InputFilePath { get; set; }
14
-
15
- string IntermediateFolder { get; set; }
16
-
17
- string OutputFile { get; set; }
18
-
19
- string SignedEngineFile { get; set; }
20
- }
21
-}
src/api/wix/WixToolset.Extensibility/IBackend.cs
-2
@@ -13,7 +13,5 @@ namespace WixToolset.Extensibility
13
IDecompileResult Decompile(IDecompileContext context);
14
15
Intermediate Unbind(IUnbindContext context);
16
-
17
- bool Inscribe(IInscribeContext context);
16
}
17
}
src/wix/WixToolset.BuildTasks/Insignia.cs
deleted
-120
@@ -1,120 +0,0 @@
1
-// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
-
3
-namespace WixToolset.BuildTasks
4
-{
5
- using System;
6
- using System.Diagnostics;
7
- using System.Globalization;
8
- using System.IO;
9
- using System.Text;
10
-
11
- using Microsoft.Build.Framework;
12
- using Microsoft.Build.Utilities;
13
-
14
-#if false
15
- /// <summary>
16
- /// An MSBuild task to run the WiX transform generator.
17
- /// </summary>
18
- public sealed class Insignia : WixToolTask
19
- {
20
- private const string InsigniaToolName = "insignia.exe";
21
-
22
- /// <summary>
23
- /// Gets or sets the path to the database to inscribe.
24
- /// </summary>
25
- public ITaskItem DatabaseFile { get; set; }
26
-
27
- /// <summary>
28
- /// Gets or sets the path to the bundle to inscribe.
29
- /// </summary>
30
- public ITaskItem BundleFile { get; set; }
31
-
32
- /// <summary>
33
- /// Gets or sets the path to the original bundle that contains the attached container.
34
- /// </summary>
35
- public ITaskItem OriginalBundleFile { get; set; }
36
-
37
- /// <summary>
38
- /// Gets or sets the path to output the inscribed result.
39
- /// </summary>
40
- [Required]
41
- public ITaskItem OutputFile { get; set; }
42
-
43
- /// <summary>
44
- /// Gets or sets the output. Only set if insignia does work.
45
- /// </summary>
46
- [Output]
47
- public ITaskItem Output { get; set; }
48
-
49
- /// <summary>
50
- /// Get the name of the executable.
51
- /// </summary>
52
- /// <remarks>The ToolName is used with the ToolPath to get the location of Insignia.exe.</remarks>
53
- /// <value>The name of the executable.</value>
54
- protected override string ToolName
55
- {
56
- get { return InsigniaToolName; }
57
- }
58
-
59
- /// <summary>
60
- /// Get the path to the executable.
61
- /// </summary>
62
- /// <remarks>GetFullPathToTool is only called when the ToolPath property is not set (see the ToolName remarks above).</remarks>
63
- /// <returns>The full path to the executable or simply Insignia.exe if it's expected to be in the system path.</returns>
64
- protected override string GenerateFullPathToTool()
65
- {
66
- // If there's not a ToolPath specified, it has to be in the system path.
67
- if (String.IsNullOrEmpty(this.ToolPath))
68
- {
69
- return InsigniaToolName;
70
- }
71
-
72
- return Path.Combine(Path.GetFullPath(this.ToolPath), InsigniaToolName);
73
- }
74
-
75
- /// <summary>
76
- /// Builds a command line from options in this task.
77
- /// </summary>
78
- protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
79
- {
80
- base.BuildCommandLine(commandLineBuilder);
81
-
82
- commandLineBuilder.AppendSwitchIfNotNull("-im ", this.DatabaseFile);
83
- if (null != this.OriginalBundleFile)
84
- {
85
- commandLineBuilder.AppendSwitchIfNotNull("-ab ", this.BundleFile);
86
- commandLineBuilder.AppendFileNameIfNotNull(this.OriginalBundleFile);
87
- }
88
- else
89
- {
90
- commandLineBuilder.AppendSwitchIfNotNull("-ib ", this.BundleFile);
91
- }
92
-
93
- commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
94
- commandLineBuilder.AppendTextIfNotNull(this.AdditionalOptions);
95
- }
96
-
97
- /// <summary>
98
- /// Executes a tool in-process by loading the tool assembly and invoking its entrypoint.
99
- /// </summary>
100
- /// <param name="pathToTool">Path to the tool to be executed; must be a managed executable.</param>
101
- /// <param name="responseFileCommands">Commands to be written to a response file.</param>
102
- /// <param name="commandLineCommands">Commands to be passed directly on the command-line.</param>
103
- /// <returns>The tool exit code.</returns>
104
- protected override int ExecuteTool(string pathToTool, string responseFileCommands, string commandLineCommands)
105
- {
106
- int returnCode = base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands);
107
- if (0 == returnCode) // successfully did work.
108
- {
109
- this.Output = this.OutputFile;
110
- }
111
- else if (-1 == returnCode) // no work done.
112
- {
113
- returnCode = 0;
114
- }
115
-
116
- return returnCode;
117
- }
118
- }
119
-#endif
120
-}
src/wix/WixToolset.Core.Burn/BundleBackend.cs
-5
@@ -45,11 +45,6 @@ namespace WixToolset.Core.Burn
45
throw new NotImplementedException();
46
}
47
48
- public bool Inscribe(IInscribeContext context)
49
- {
50
- return false;
51
- }
52
-
48
public Intermediate Unbind(IUnbindContext context)
49
{
50
var uxExtractPath = Path.Combine(context.ExportBasePath, "UX");
src/wix/WixToolset.Core.WindowsInstaller/MsiBackend.cs
-9
@@ -2,10 +2,8 @@
2
3
namespace WixToolset.Core.WindowsInstaller
4
{
5
- using System;
5
using WixToolset.Core.WindowsInstaller.Bind;
6
using WixToolset.Core.WindowsInstaller.Decompile;
8
- using WixToolset.Core.WindowsInstaller.Inscribe;
7
using WixToolset.Core.WindowsInstaller.Unbind;
8
using WixToolset.Data;
9
using WixToolset.Extensibility;
@@ -71,13 +69,6 @@ namespace WixToolset.Core.WindowsInstaller
69
return result;
70
}
71
74
- public bool Inscribe(IInscribeContext context)
75
- {
76
- //var command = new InscribeMsiPackageCommand(context);
77
- //return command.Execute();
78
- throw new NotImplementedException();
79
- }
80
-
72
public Intermediate Unbind(IUnbindContext context)
73
{
74
var command = new UnbindMsiOrMsmCommand(context);
src/wix/WixToolset.Core.WindowsInstaller/MsmBackend.cs
-2
@@ -65,8 +65,6 @@ namespace WixToolset.Core.WindowsInstaller
65
return result;
66
}
67
68
- public bool Inscribe(IInscribeContext context) => false;
69
-
68
public Intermediate Unbind(IUnbindContext context)
69
{
70
var command = new UnbindMsiOrMsmCommand(context);
src/wix/WixToolset.Core.WindowsInstaller/MspBackend.cs
-2
@@ -71,8 +71,6 @@ namespace WixToolset.Core.WindowsInstaller
71
72
public IDecompileResult Decompile(IDecompileContext context) => throw new NotImplementedException();
73
74
- public bool Inscribe(IInscribeContext context) => throw new NotImplementedException();
75
-
74
public Intermediate Unbind(IUnbindContext context)
75
{
76
#if TODO_PATCHING
src/wix/WixToolset.Core.WindowsInstaller/MstBackend.cs
+1
-6
@@ -30,15 +30,10 @@ namespace WixToolset.Core.WindowsInstaller
30
throw new NotImplementedException();
31
}
32
33
- public bool Inscribe(IInscribeContext context)
34
- {
35
- throw new NotImplementedException();
36
- }
37
-
33
public Intermediate Unbind(IUnbindContext context)
34
{
35
var command = new UnbindMsiOrMsmCommand(context);
36
return command.Execute();
37
}
38
}
44
-}
\ No newline at end of file
39
+}
src/wix/WixToolset.Core/IncribeContext.cs
deleted
-26
@@ -1,26 +0,0 @@
1
-// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
-
3
-namespace WixToolset.Core
4
-{
5
- using System;
6
- using WixToolset.Extensibility.Data;
7
- using WixToolset.Extensibility.Services;
8
-
9
- internal class InscribeContext : IInscribeContext
10
- {
11
- public InscribeContext(IServiceProvider serviceProvider)
12
- {
13
- this.ServiceProvider = serviceProvider;
14
- }
15
-
16
- public IServiceProvider ServiceProvider { get; }
17
-
18
- public string IntermediateFolder { get; set; }
19
-
20
- public string InputFilePath { get; set; }
21
-
22
- public string SignedEngineFile { get; set; }
23
-
24
- public string OutputFile { get; set; }
25
- }
26
-}
src/wix/WixToolset.Core/WixToolsetServiceProvider.cs
-1
@@ -40,7 +40,6 @@ namespace WixToolset.Core
40
this.AddService<IBindContext>((provider, singletons) => new BindContext(provider));
41
this.AddService<IDecompileContext>((provider, singletons) => new DecompileContext(provider));
42
this.AddService<ILayoutContext>((provider, singletons) => new LayoutContext(provider));
43
- this.AddService<IInscribeContext>((provider, singletons) => new InscribeContext(provider));
43
this.AddService<IUnbindContext>((provider, singletons) => new UnbindContext(provider));
44
45
this.AddService<IBindFileWithPath>((provider, singletons) => new BindFileWithPath());