diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-05-22 00:58:13 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-05-23 16:02:37 -0700 |
| commit | d0462be8000f18aa7dc0791d02142f000bb19fbf (patch) | |
| tree | 072aabc2bd9b8f171e17654473f85c44a8a42a66 /src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs | |
| parent | 1ed894bc0f39397ec7f7f6344370fc2123420c43 (diff) | |
| download | wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.tar.gz wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.tar.bz2 wix-d0462be8000f18aa7dc0791d02142f000bb19fbf.zip | |
Integrate latest changes to tuple definitions
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs index c9286a38..8aa6047f 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs | |||
| @@ -49,13 +49,13 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 49 | bool foundCreatingApplication = false; | 49 | bool foundCreatingApplication = false; |
| 50 | string now = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture); | 50 | string now = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture); |
| 51 | 51 | ||
| 52 | foreach (var summaryInformationRow in this.Section.Tuples.OfType<_SummaryInformationTuple>()) | 52 | foreach (var summaryInformationTuple in this.Section.Tuples.OfType<SummaryInformationTuple>()) |
| 53 | { | 53 | { |
| 54 | switch (summaryInformationRow.PropertyId) | 54 | switch (summaryInformationTuple.PropertyId) |
| 55 | { | 55 | { |
| 56 | case 1: // PID_CODEPAGE | 56 | case SumaryInformationType.Codepage: // PID_CODEPAGE |
| 57 | // make sure the code page is an int and not a web name or null | 57 | // make sure the code page is an int and not a web name or null |
| 58 | var codepage = summaryInformationRow.Value; | 58 | var codepage = summaryInformationTuple.Value; |
| 59 | 59 | ||
| 60 | if (String.IsNullOrEmpty(codepage)) | 60 | if (String.IsNullOrEmpty(codepage)) |
| 61 | { | 61 | { |
| @@ -63,11 +63,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 63 | } | 63 | } |
| 64 | else | 64 | else |
| 65 | { | 65 | { |
| 66 | summaryInformationRow.Value = Common.GetValidCodePage(codepage, false, false, summaryInformationRow.SourceLineNumbers).ToString(CultureInfo.InvariantCulture); | 66 | summaryInformationTuple.Value = Common.GetValidCodePage(codepage, false, false, summaryInformationTuple.SourceLineNumbers).ToString(CultureInfo.InvariantCulture); |
| 67 | } | 67 | } |
| 68 | break; | 68 | break; |
| 69 | case 9: // PID_REVNUMBER | 69 | case SumaryInformationType.PackageCode: // PID_REVNUMBER |
| 70 | var packageCode = summaryInformationRow.Value; | 70 | var packageCode = summaryInformationTuple.Value; |
| 71 | 71 | ||
| 72 | if (SectionType.Module == this.Section.Type) | 72 | if (SectionType.Module == this.Section.Type) |
| 73 | { | 73 | { |
| @@ -76,19 +76,19 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 76 | else if ("*" == packageCode) | 76 | else if ("*" == packageCode) |
| 77 | { | 77 | { |
| 78 | // set the revision number (package/patch code) if it should be automatically generated | 78 | // set the revision number (package/patch code) if it should be automatically generated |
| 79 | summaryInformationRow.Value = Common.GenerateGuid(); | 79 | summaryInformationTuple.Value = Common.GenerateGuid(); |
| 80 | } | 80 | } |
| 81 | break; | 81 | break; |
| 82 | case 12: // PID_CREATE_DTM | 82 | case SumaryInformationType.Created: |
| 83 | foundCreateDataTime = true; | 83 | foundCreateDataTime = true; |
| 84 | break; | 84 | break; |
| 85 | case 13: // PID_LASTSAVE_DTM | 85 | case SumaryInformationType.LastSaved: |
| 86 | foundLastSaveDataTime = true; | 86 | foundLastSaveDataTime = true; |
| 87 | break; | 87 | break; |
| 88 | case 14: | 88 | case SumaryInformationType.WindowsInstallerVersion: |
| 89 | this.InstallerVersion = summaryInformationRow[_SummaryInformationTupleFields.Value].AsNumber(); | 89 | this.InstallerVersion = summaryInformationTuple[SummaryInformationTupleFields.Value].AsNumber(); |
| 90 | break; | 90 | break; |
| 91 | case 15: // PID_WORDCOUNT | 91 | case SumaryInformationType.WordCount: |
| 92 | if (SectionType.Patch == this.Section.Type) | 92 | if (SectionType.Patch == this.Section.Type) |
| 93 | { | 93 | { |
| 94 | this.LongNames = true; | 94 | this.LongNames = true; |
| @@ -96,12 +96,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 96 | } | 96 | } |
| 97 | else | 97 | else |
| 98 | { | 98 | { |
| 99 | var attributes = summaryInformationRow[_SummaryInformationTupleFields.Value].AsNumber(); | 99 | var attributes = summaryInformationTuple[SummaryInformationTupleFields.Value].AsNumber(); |
| 100 | this.LongNames = (0 == (attributes & 1)); | 100 | this.LongNames = (0 == (attributes & 1)); |
| 101 | this.Compressed = (2 == (attributes & 2)); | 101 | this.Compressed = (2 == (attributes & 2)); |
| 102 | } | 102 | } |
| 103 | break; | 103 | break; |
| 104 | case 18: // PID_APPNAME | 104 | case SumaryInformationType.CreatingApplication: // PID_APPNAME |
| 105 | foundCreatingApplication = true; | 105 | foundCreatingApplication = true; |
| 106 | break; | 106 | break; |
| 107 | } | 107 | } |
| @@ -110,8 +110,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 110 | // add a summary information row for the create time/date property if its not already set | 110 | // add a summary information row for the create time/date property if its not already set |
| 111 | if (!foundCreateDataTime) | 111 | if (!foundCreateDataTime) |
| 112 | { | 112 | { |
| 113 | var createTimeDateRow = new _SummaryInformationTuple(null, new Identifier(12, AccessModifier.Private)); | 113 | var createTimeDateRow = new SummaryInformationTuple(null); |
| 114 | createTimeDateRow.PropertyId = 12; | 114 | createTimeDateRow.PropertyId = SumaryInformationType.Created; |
| 115 | createTimeDateRow.Value = now; | 115 | createTimeDateRow.Value = now; |
| 116 | 116 | ||
| 117 | this.Section.Tuples.Add(createTimeDateRow); | 117 | this.Section.Tuples.Add(createTimeDateRow); |
| @@ -120,8 +120,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 120 | // add a summary information row for the last save time/date property if its not already set | 120 | // add a summary information row for the last save time/date property if its not already set |
| 121 | if (!foundLastSaveDataTime) | 121 | if (!foundLastSaveDataTime) |
| 122 | { | 122 | { |
| 123 | var lastSaveTimeDateRow = new _SummaryInformationTuple(null, new Identifier(13, AccessModifier.Private)); | 123 | var lastSaveTimeDateRow = new SummaryInformationTuple(null); |
| 124 | lastSaveTimeDateRow.PropertyId = 13; | 124 | lastSaveTimeDateRow.PropertyId = SumaryInformationType.LastSaved; |
| 125 | lastSaveTimeDateRow.Value = now; | 125 | lastSaveTimeDateRow.Value = now; |
| 126 | 126 | ||
| 127 | this.Section.Tuples.Add(lastSaveTimeDateRow); | 127 | this.Section.Tuples.Add(lastSaveTimeDateRow); |
| @@ -130,8 +130,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 130 | // add a summary information row for the creating application property if its not already set | 130 | // add a summary information row for the creating application property if its not already set |
| 131 | if (!foundCreatingApplication) | 131 | if (!foundCreatingApplication) |
| 132 | { | 132 | { |
| 133 | var creatingApplicationRow = new _SummaryInformationTuple(null, new Identifier(18, AccessModifier.Private)); | 133 | var creatingApplicationRow = new SummaryInformationTuple(null); |
| 134 | creatingApplicationRow.PropertyId = 18; | 134 | creatingApplicationRow.PropertyId = SumaryInformationType.CreatingApplication; |
| 135 | creatingApplicationRow.Value = String.Format(CultureInfo.InvariantCulture, AppCommon.GetCreatingApplicationString()); | 135 | creatingApplicationRow.Value = String.Format(CultureInfo.InvariantCulture, AppCommon.GetCreatingApplicationString()); |
| 136 | 136 | ||
| 137 | this.Section.Tuples.Add(creatingApplicationRow); | 137 | this.Section.Tuples.Add(creatingApplicationRow); |
