Skip to content

Commit 2ccff5a

Browse files
authored
Merge pull request #5264 from bclothier/BuildFix
Build quote path everywhere and add some comments.
2 parents 5c7c292 + cfa694d commit 2ccff5a

File tree

2 files changed

+46
-4
lines changed

2 files changed

+46
-4
lines changed

Rubberduck.Deployment.Build/RubberduckPostBuildTask.cs

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,51 @@ internal DllFileParameters(string dllFile, string sourceDir, string targetDir)
4848

4949
public class RubberduckPostBuildTask : AppDomainIsolatedTask
5050
{
51+
/// <summary>
52+
/// Visual Studio Build Configuration (e.g. Debug or Release)
53+
/// </summary>
5154
[Required]
5255
public string Config { get; set; }
5356

57+
/// <summary>
58+
/// Full path to NetFX SDK directory
59+
/// </summary>
5460
[Required]
5561
public string NetToolsDir { get; set; }
5662

63+
/// <summary>
64+
/// Full path to WiX SDK directory
65+
/// </summary>
5766
[Required]
5867
public string WixToolsDir { get; set; }
5968

69+
/// <summary>
70+
/// Full path to the directory containing all the source files we want to deploy.
71+
/// </summary>
6072
[Required]
6173
public string SourceDir { get; set; }
6274

75+
/// <summary>
76+
/// Full path to the directory we want to write our modified files into.
77+
/// </summary>
6378
[Required]
6479
public string TargetDir { get; set; }
6580

81+
/// <summary>
82+
/// Root path of the project executing the build task.
83+
/// </summary>
6684
[Required]
6785
public string ProjectDir { get; set; }
6886

87+
/// <summary>
88+
/// Full path to the Inno Setup's include files.
89+
/// </summary>
6990
[Required]
7091
public string IncludeDir { get; set; }
7192

93+
/// <summary>
94+
/// Pipe-delimited list of DLL to generate TLBs from. Should contain only name &amp; extension and exist in <see cref="SourceDir"/>.
95+
/// </summary>
7296
[Required]
7397
public string FilesToExtract { get; set; }
7498

@@ -77,6 +101,12 @@ public class RubberduckPostBuildTask : AppDomainIsolatedTask
77101
private string RegFilePath =>
78102
Path.Combine(Path.Combine(ProjectDir, "LocalRegistryEntries"), "DebugRegistryEntries.reg");
79103

104+
/// <remarks>
105+
/// Entry point for the build task. To use the build task in a csproj, the <c>UsingTask</c> element must be specified before defining the task. The task will
106+
/// have the same name as the class, followed by the parameters. In this case, it would be <see cref="RubberduckPreBuildTask"/> element. See <c>Rubberduck.Deployment.csproj</c>
107+
/// for usage example. The public properties are used as a parameter in the MSBuild task and are both settable and gettable. Thus, we must read from the properties when
108+
/// we run the <c>Execute</c> which influences the behvaior of the task.
109+
/// </remarks>
80110
public override bool Execute()
81111
{
82112
var result = true;
@@ -191,7 +221,7 @@ private void UpdateAddInRegistration()
191221
{
192222
this.LogMessage("Updating addin registration...");
193223
var addInRegFile = Path.Combine(Path.GetDirectoryName(RegFilePath), "RubberduckAddinRegistry.reg");
194-
var command = $"reg.exe import \"{addInRegFile}";
224+
var command = $"reg.exe import \"{addInRegFile}\"";
195225
ExecuteTask(command);
196226
}
197227

@@ -336,14 +366,14 @@ private void RemovePreviousDebugRegistration()
336366
var now = DateTime.UtcNow;
337367
if (Environment.Is64BitOperatingSystem)
338368
{
339-
var command = $"reg.exe import {lastRegFile} /reg:32";
369+
var command = $"reg.exe import \"{lastRegFile}\" /reg:32";
340370
ExecuteTask(command);
341-
command = $"reg.exe import {lastRegFile} /reg:64";
371+
command = $"reg.exe import \"{lastRegFile}\" /reg:64";
342372
ExecuteTask(command);
343373
}
344374
else
345375
{
346-
var command = $"reg.exe import {lastRegFile}";
376+
var command = $"reg.exe import \"{lastRegFile}\"";
347377
ExecuteTask(command);
348378
}
349379

Rubberduck.Deployment.Build/RubberduckPreBuildTask.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,24 @@ namespace Rubberduck.Deployment.Build
77
{
88
public class RubberduckPreBuildTask : AppDomainIsolatedTask
99
{
10+
/// <summary>
11+
/// Full path to the directory containing the templates we need to modify.
12+
/// </summary>
1013
[Required]
1114
public string WorkingDir { get; set; }
1215

16+
/// <summary>
17+
/// Full path to the directory where we want to place our modified files.
18+
/// </summary>
1319
[Required]
1420
public string OutputDir { get; set; }
1521

22+
/// <remarks>
23+
/// Entry point for the build task. To use the build task in a csproj, the <c>UsingTask</c> element must be specified before defining the task. The task will
24+
/// have the same name as the class, followed by the parameters. In this case, it would be <see cref="RubberduckPreBuildTask"/> element. See <c>Rubberduck.Deployment.csproj</c>
25+
/// for usage example. The public properties are used as a parameter in the MSBuild task and are both settable and gettable. Thus, we must read from the properties when
26+
/// we run the <c>Execute</c> which influences the behvaior of the task.
27+
/// </remarks>
1628
public override bool Execute()
1729
{
1830
var result = true;

0 commit comments

Comments
 (0)