diff options
| author | Bob Arnson <bob@firegiant.com> | 2020-10-23 17:32:44 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-10-24 19:44:44 -0400 |
| commit | 8b5505cd13367d48bce4ec8a6018e370ed3755b1 (patch) | |
| tree | 97fb50229aff208bce91b160d11ffeee9b1e783a /src/WixToolset.Core.WindowsInstaller/Bind | |
| parent | 95188080c8005c01c39bb071459b36f8660bcfcd (diff) | |
| download | wix-8b5505cd13367d48bce4ec8a6018e370ed3755b1.tar.gz wix-8b5505cd13367d48bce4ec8a6018e370ed3755b1.tar.bz2 wix-8b5505cd13367d48bce4ec8a6018e370ed3755b1.zip | |
Reorganize Product/Package to Package/SummaryInformation.
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs index 6af2dc7a..a496c7ce 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindSummaryInfoCommand.cs | |||
| @@ -46,9 +46,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 46 | this.InstallerVersion = 0; | 46 | this.InstallerVersion = 0; |
| 47 | this.ModularizationSuffix = null; | 47 | this.ModularizationSuffix = null; |
| 48 | 48 | ||
| 49 | var foundCreateDataTime = false; | 49 | var foundCreateDateTime = false; |
| 50 | var foundLastSaveDataTime = false; | 50 | var foundLastSaveDataTime = false; |
| 51 | var foundCreatingApplication = false; | 51 | var foundCreatingApplication = false; |
| 52 | var foundPackageCode = false; | ||
| 52 | var now = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture); | 53 | var now = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss", CultureInfo.InvariantCulture); |
| 53 | 54 | ||
| 54 | foreach (var summaryInformationSymbol in this.Section.Symbols.OfType<SummaryInformationSymbol>()) | 55 | foreach (var summaryInformationSymbol in this.Section.Symbols.OfType<SummaryInformationSymbol>()) |
| @@ -73,20 +74,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 73 | break; | 74 | break; |
| 74 | 75 | ||
| 75 | case SummaryInformationType.PackageCode: // PID_REVNUMBER | 76 | case SummaryInformationType.PackageCode: // PID_REVNUMBER |
| 77 | foundPackageCode = true; | ||
| 76 | var packageCode = summaryInformationSymbol.Value; | 78 | var packageCode = summaryInformationSymbol.Value; |
| 77 | 79 | ||
| 78 | if (SectionType.Module == this.Section.Type) | 80 | if (SectionType.Module == this.Section.Type) |
| 79 | { | 81 | { |
| 80 | this.ModularizationSuffix = "." + packageCode.Substring(1, 36).Replace('-', '_'); | 82 | this.ModularizationSuffix = "." + packageCode.Substring(1, 36).Replace('-', '_'); |
| 81 | } | 83 | } |
| 82 | else if ("*" == packageCode) | ||
| 83 | { | ||
| 84 | // set the revision number (package/patch code) if it should be automatically generated | ||
| 85 | summaryInformationSymbol.Value = Common.GenerateGuid(); | ||
| 86 | } | ||
| 87 | break; | 84 | break; |
| 88 | case SummaryInformationType.Created: | 85 | case SummaryInformationType.Created: |
| 89 | foundCreateDataTime = true; | 86 | foundCreateDateTime = true; |
| 90 | break; | 87 | break; |
| 91 | case SummaryInformationType.LastSaved: | 88 | case SummaryInformationType.LastSaved: |
| 92 | foundLastSaveDataTime = true; | 89 | foundLastSaveDataTime = true; |
| @@ -113,8 +110,18 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 113 | } | 110 | } |
| 114 | } | 111 | } |
| 115 | 112 | ||
| 113 | // set the revision number (package/patch code) if it should be automatically generated | ||
| 114 | if (!foundPackageCode) | ||
| 115 | { | ||
| 116 | this.Section.AddSymbol(new SummaryInformationSymbol(null) | ||
| 117 | { | ||
| 118 | PropertyId = SummaryInformationType.PackageCode, | ||
| 119 | Value = Common.GenerateGuid(), | ||
| 120 | }); | ||
| 121 | } | ||
| 122 | |||
| 116 | // add a summary information row for the create time/date property if its not already set | 123 | // add a summary information row for the create time/date property if its not already set |
| 117 | if (!foundCreateDataTime) | 124 | if (!foundCreateDateTime) |
| 118 | { | 125 | { |
| 119 | this.Section.AddSymbol(new SummaryInformationSymbol(null) | 126 | this.Section.AddSymbol(new SummaryInformationSymbol(null) |
| 120 | { | 127 | { |
