diff options
author | Rob Mensching <rob@firegiant.com> | 2017-10-01 14:26:14 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-10-01 14:26:14 -0700 |
commit | e08086b633b701906ec7bc6246eec3148bc1d9d6 (patch) | |
tree | d1a5bdd1f9d98f9c22ea85fe6d0b1e7a5c81f6a9 | |
parent | 39c7e2bb0399802e65a3025c4a73db211e730479 (diff) | |
download | wix-e08086b633b701906ec7bc6246eec3148bc1d9d6.tar.gz wix-e08086b633b701906ec7bc6246eec3148bc1d9d6.tar.bz2 wix-e08086b633b701906ec7bc6246eec3148bc1d9d6.zip |
Minor code cleanup
-rw-r--r-- | src/WixToolset.BuildTasks/WixCommandLineBuilder.cs | 7 | ||||
-rw-r--r-- | src/WixToolset.BuildTasks/wix.targets | 28 | ||||
-rw-r--r-- | src/WixToolset.Core/Linker.cs | 13 | ||||
-rw-r--r-- | src/wix/Program.cs | 2 |
4 files changed, 21 insertions, 29 deletions
diff --git a/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs b/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs index 3f3084a3..a979dbb0 100644 --- a/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs +++ b/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs | |||
@@ -3,10 +3,9 @@ | |||
3 | namespace WixToolset.BuildTasks | 3 | namespace WixToolset.BuildTasks |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Diagnostics; | 6 | using System.Collections.Generic; |
7 | using System.Globalization; | 7 | using System.Globalization; |
8 | using System.IO; | 8 | using System.IO; |
9 | using System.Text; | ||
10 | 9 | ||
11 | using Microsoft.Build.Framework; | 10 | using Microsoft.Build.Framework; |
12 | using Microsoft.Build.Utilities; | 11 | using Microsoft.Build.Utilities; |
@@ -17,7 +16,7 @@ namespace WixToolset.BuildTasks | |||
17 | public class WixCommandLineBuilder : CommandLineBuilder | 16 | public class WixCommandLineBuilder : CommandLineBuilder |
18 | { | 17 | { |
19 | internal const int Unspecified = -1; | 18 | internal const int Unspecified = -1; |
20 | 19 | ||
21 | /// <summary> | 20 | /// <summary> |
22 | /// Append a switch to the command line if the value has been specified. | 21 | /// Append a switch to the command line if the value has been specified. |
23 | /// </summary> | 22 | /// </summary> |
@@ -131,7 +130,7 @@ namespace WixToolset.BuildTasks | |||
131 | 130 | ||
132 | if (!File.Exists(resolvedPath)) | 131 | if (!File.Exists(resolvedPath)) |
133 | { | 132 | { |
134 | // Extesnion wasn't found, just set it to the extension name passed in | 133 | // Extension wasn't found, just set it to the extension name passed in |
135 | resolvedPath = extension.ItemSpec; | 134 | resolvedPath = extension.ItemSpec; |
136 | } | 135 | } |
137 | } | 136 | } |
diff --git a/src/WixToolset.BuildTasks/wix.targets b/src/WixToolset.BuildTasks/wix.targets index bcf0163b..4da03c6f 100644 --- a/src/WixToolset.BuildTasks/wix.targets +++ b/src/WixToolset.BuildTasks/wix.targets | |||
@@ -441,9 +441,9 @@ | |||
441 | <Output TaskParameter="TargetOutputs" ItemName="_BuiltProjectReferencePaths" /> | 441 | <Output TaskParameter="TargetOutputs" ItemName="_BuiltProjectReferencePaths" /> |
442 | </MSBuild> | 442 | </MSBuild> |
443 | 443 | ||
444 | <!-- | 444 | <!-- |
445 | VC project references must build GetNativeTargetPath because neither GetTargetPath nor the return of the default build | 445 | VC project references must build GetNativeTargetPath because neither GetTargetPath nor the return of the default build |
446 | target return the output for a native .vcxproj. | 446 | target return the output for a native .vcxproj. |
447 | --> | 447 | --> |
448 | <MSBuild | 448 | <MSBuild |
449 | Projects="@(_MSBuildProjectReferenceExistent)" | 449 | Projects="@(_MSBuildProjectReferenceExistent)" |
@@ -485,7 +485,7 @@ | |||
485 | 485 | ||
486 | [IN] | 486 | [IN] |
487 | @(WixLibrary) - The list of .wixlib files. | 487 | @(WixLibrary) - The list of .wixlib files. |
488 | 488 | ||
489 | [OUT] | 489 | [OUT] |
490 | @(_ResolvedWixLibraryPaths) - Item group with full paths to libraries | 490 | @(_ResolvedWixLibraryPaths) - Item group with full paths to libraries |
491 | ================================================================================================ | 491 | ================================================================================================ |
@@ -629,10 +629,10 @@ | |||
629 | AfterCompile | 629 | AfterCompile |
630 | </DoItDependsOn> | 630 | </DoItDependsOn> |
631 | </PropertyGroup> | 631 | </PropertyGroup> |
632 | <Target | 632 | <Target |
633 | Name="DoIt" | 633 | Name="DoIt" |
634 | DependsOnTargets="$(DoItDependsOn)" /> | 634 | DependsOnTargets="$(DoItDependsOn)" /> |
635 | 635 | ||
636 | <Target | 636 | <Target |
637 | Name="ActuallyDoIt" | 637 | Name="ActuallyDoIt" |
638 | 638 | ||
@@ -692,7 +692,7 @@ | |||
692 | 692 | ||
693 | UnreferencedSymbolsFile="$(UnreferencedSymbolsFile)" | 693 | UnreferencedSymbolsFile="$(UnreferencedSymbolsFile)" |
694 | WixProjectFile="$(ProjectPath)" | 694 | WixProjectFile="$(ProjectPath)" |
695 | WixVariables="$(WixVariables)" | 695 | WixVariables="$(WixVariables)" |
696 | 696 | ||
697 | SuppressValidation="$(SuppressValidation)" | 697 | SuppressValidation="$(SuppressValidation)" |
698 | SuppressIces="$(SuppressIces)" | 698 | SuppressIces="$(SuppressIces)" |
@@ -945,21 +945,21 @@ | |||
945 | AssignCultures | 945 | AssignCultures |
946 | 946 | ||
947 | Determines the final list of culture groups to build based on either the Cultures property or | 947 | Determines the final list of culture groups to build based on either the Cultures property or |
948 | those specified in .wxl files. | 948 | those specified in .wxl files. |
949 | 949 | ||
950 | Culture groups specified in the Cultures property must be specified as a semi-colon | 950 | Culture groups specified in the Cultures property must be specified as a semi-colon |
951 | delimited list of groups, with comma-delimited cultures within a group. | 951 | delimited list of groups, with comma-delimited cultures within a group. |
952 | For example: | 952 | For example: |
953 | <Cultures>en-US,en;en-GB,en</Cultures> | 953 | <Cultures>en-US,en;en-GB,en</Cultures> |
954 | This will build 2 targets, outputing to en-US and en-GB sub-folders. Light will first look | 954 | This will build 2 targets, outputing to en-US and en-GB sub-folders. Light will first look |
955 | for strings in the first culture (en-US or en-GB) then the second (en). | 955 | for strings in the first culture (en-US or en-GB) then the second (en). |
956 | 956 | ||
957 | Cultures of .wxl files will be used when the Culture property is not set. The culture of a | 957 | Cultures of .wxl files will be used when the Culture property is not set. The culture of a |
958 | .wxl file is determined by the Culture attribute in the WixLocalization element in the file | 958 | .wxl file is determined by the Culture attribute in the WixLocalization element in the file |
959 | 959 | ||
960 | Sets the OutputFolder metadata on each culture group. In most cases this is the same as the | 960 | Sets the OutputFolder metadata on each culture group. In most cases this is the same as the |
961 | first culture in the culture group. When the Culture's property is unspecified and no .wxl | 961 | first culture in the culture group. When the Culture's property is unspecified and no .wxl |
962 | files are provided this is the same as the output directory. When the Culture's property | 962 | files are provided this is the same as the output directory. When the Culture's property |
963 | specifies a single culture group and no .wxl files are provided this is the same as the output | 963 | specifies a single culture group and no .wxl files are provided this is the same as the output |
964 | directory. | 964 | directory. |
965 | 965 | ||
@@ -1206,7 +1206,7 @@ | |||
1206 | SourceFilesProjectOutputGroup; | 1206 | SourceFilesProjectOutputGroup; |
1207 | ContentFilesProjectOutputGroup" /> | 1207 | ContentFilesProjectOutputGroup" /> |
1208 | 1208 | ||
1209 | <!-- | 1209 | <!-- |
1210 | This is the key output for the BuiltProjectOutputGroup and is meant to be read directly from the IDE. | 1210 | This is the key output for the BuiltProjectOutputGroup and is meant to be read directly from the IDE. |
1211 | Reading an item is faster than invoking a target. | 1211 | Reading an item is faster than invoking a target. |
1212 | --> | 1212 | --> |
diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs index 166894b9..1e5b6e96 100644 --- a/src/WixToolset.Core/Linker.cs +++ b/src/WixToolset.Core/Linker.cs | |||
@@ -30,7 +30,6 @@ namespace WixToolset | |||
30 | private List<InspectorExtension> inspectorExtensions; | 30 | private List<InspectorExtension> inspectorExtensions; |
31 | private bool sectionIdOnRows; | 31 | private bool sectionIdOnRows; |
32 | private WixActionRowCollection standardActions; | 32 | private WixActionRowCollection standardActions; |
33 | private Localizer localizer; | ||
34 | private Output activeOutput; | 33 | private Output activeOutput; |
35 | private TableDefinitionCollection tableDefinitions; | 34 | private TableDefinitionCollection tableDefinitions; |
36 | 35 | ||
@@ -52,11 +51,7 @@ namespace WixToolset | |||
52 | /// Gets or sets the localizer. | 51 | /// Gets or sets the localizer. |
53 | /// </summary> | 52 | /// </summary> |
54 | /// <value>The localizer.</value> | 53 | /// <value>The localizer.</value> |
55 | public Localizer Localizer | 54 | public Localizer Localizer { get; set; } |
56 | { | ||
57 | get { return this.localizer; } | ||
58 | set { this.localizer = value; } | ||
59 | } | ||
60 | 55 | ||
61 | /// <summary> | 56 | /// <summary> |
62 | /// Gets or sets the path to output unreferenced symbols to. If null or empty, there is no output. | 57 | /// Gets or sets the path to output unreferenced symbols to. If null or empty, there is no output. |
@@ -202,9 +197,9 @@ namespace WixToolset | |||
202 | // now that we know where we're starting from, create the output object | 197 | // now that we know where we're starting from, create the output object |
203 | output = new Output(null); | 198 | output = new Output(null); |
204 | output.EntrySection = find.EntrySection; // Note: this entry section will get added to the Output.Sections collection later | 199 | output.EntrySection = find.EntrySection; // Note: this entry section will get added to the Output.Sections collection later |
205 | if (null != this.localizer && -1 != this.localizer.Codepage) | 200 | if (null != this.Localizer && -1 != this.Localizer.Codepage) |
206 | { | 201 | { |
207 | output.Codepage = this.localizer.Codepage; | 202 | output.Codepage = this.Localizer.Codepage; |
208 | } | 203 | } |
209 | this.activeOutput = output; | 204 | this.activeOutput = output; |
210 | 205 | ||
@@ -1707,7 +1702,7 @@ namespace WixToolset | |||
1707 | int localizedColumnCount = 0; | 1702 | int localizedColumnCount = 0; |
1708 | 1703 | ||
1709 | // if there are localization strings, figure out which columns can be localized in this table | 1704 | // if there are localization strings, figure out which columns can be localized in this table |
1710 | if (null != this.localizer) | 1705 | if (null != this.Localizer) |
1711 | { | 1706 | { |
1712 | for (int i = 0; i < table.Definition.Columns.Count; i++) | 1707 | for (int i = 0; i < table.Definition.Columns.Count; i++) |
1713 | { | 1708 | { |
diff --git a/src/wix/Program.cs b/src/wix/Program.cs index 477f05ff..277f99fe 100644 --- a/src/wix/Program.cs +++ b/src/wix/Program.cs | |||
@@ -3,8 +3,6 @@ | |||
3 | namespace WixToolset.Core | 3 | namespace WixToolset.Core |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Collections.Generic; | ||
7 | using System.IO; | ||
8 | using WixToolset.Data; | 6 | using WixToolset.Data; |
9 | 7 | ||
10 | /// <summary> | 8 | /// <summary> |