diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-19 12:25:40 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-19 12:25:40 -0800 |
| commit | 155a6e96346e0cb3d9ab6f5372fa29b46ebaee89 (patch) | |
| tree | 59d1f151bfde8068b6014b05b5c8cfea3402c974 /src/WixToolset.Core.WindowsInstaller/Inscribe | |
| parent | 6f1665ed759b31bd095f186f9239232c653597cd (diff) | |
| download | wix-155a6e96346e0cb3d9ab6f5372fa29b46ebaee89.tar.gz wix-155a6e96346e0cb3d9ab6f5372fa29b46ebaee89.tar.bz2 wix-155a6e96346e0cb3d9ab6f5372fa29b46ebaee89.zip | |
Integrate simplified message handling
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Inscribe')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs b/src/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs index 5c56d9aa..93dd9d3b 100644 --- a/src/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs | |||
| @@ -36,7 +36,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe | |||
| 36 | FileAttributes attributes = File.GetAttributes(this.Context.InputFilePath); | 36 | FileAttributes attributes = File.GetAttributes(this.Context.InputFilePath); |
| 37 | if (FileAttributes.ReadOnly == (attributes & FileAttributes.ReadOnly)) | 37 | if (FileAttributes.ReadOnly == (attributes & FileAttributes.ReadOnly)) |
| 38 | { | 38 | { |
| 39 | this.Context.Messaging.OnMessage(WixErrors.ReadOnlyOutputFile(this.Context.InputFilePath)); | 39 | this.Context.Messaging.Write(ErrorMessages.ReadOnlyOutputFile(this.Context.InputFilePath)); |
| 40 | return shouldCommit; | 40 | return shouldCommit; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| @@ -179,7 +179,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe | |||
| 179 | // If the cabs aren't there, throw an error but continue to catch the other errors | 179 | // If the cabs aren't there, throw an error but continue to catch the other errors |
| 180 | if (!File.Exists(cabPath)) | 180 | if (!File.Exists(cabPath)) |
| 181 | { | 181 | { |
| 182 | this.Context.Messaging.OnMessage(WixErrors.WixFileNotFound(cabPath)); | 182 | this.Context.Messaging.Write(ErrorMessages.WixFileNotFound(cabPath)); |
| 183 | continue; | 183 | continue; |
| 184 | } | 184 | } |
| 185 | 185 | ||
| @@ -205,11 +205,11 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe | |||
| 205 | if ((5 == Environment.OSVersion.Version.Major && 2 == Environment.OSVersion.Version.Minor) || // W2K3 | 205 | if ((5 == Environment.OSVersion.Version.Major && 2 == Environment.OSVersion.Version.Minor) || // W2K3 |
| 206 | (5 == Environment.OSVersion.Version.Major && 1 == Environment.OSVersion.Version.Minor)) // XP | 206 | (5 == Environment.OSVersion.Version.Major && 1 == Environment.OSVersion.Version.Minor)) // XP |
| 207 | { | 207 | { |
| 208 | this.Context.Messaging.OnMessage(WixErrors.UnableToGetAuthenticodeCertOfFileDownlevelOS(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult))); | 208 | this.Context.Messaging.Write(ErrorMessages.UnableToGetAuthenticodeCertOfFileDownlevelOS(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult))); |
| 209 | } | 209 | } |
| 210 | else // otherwise, generic error | 210 | else // otherwise, generic error |
| 211 | { | 211 | { |
| 212 | this.Context.Messaging.OnMessage(WixErrors.UnableToGetAuthenticodeCertOfFile(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult))); | 212 | this.Context.Messaging.Write(ErrorMessages.UnableToGetAuthenticodeCertOfFile(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult))); |
| 213 | } | 213 | } |
| 214 | } | 214 | } |
| 215 | 215 | ||
| @@ -252,7 +252,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe | |||
| 252 | 252 | ||
| 253 | if (digitalCertificateTable.Rows.Count > 0) | 253 | if (digitalCertificateTable.Rows.Count > 0) |
| 254 | { | 254 | { |
| 255 | var command = new CreateIdtFileCommand(digitalCertificateTable, codepage, this.Context.IntermediateFolder, true); | 255 | var command = new CreateIdtFileCommand(this.Context.Messaging, digitalCertificateTable, codepage, this.Context.IntermediateFolder, true); |
| 256 | command.Execute(); | 256 | command.Execute(); |
| 257 | 257 | ||
| 258 | database.Import(command.IdtPath); | 258 | database.Import(command.IdtPath); |
| @@ -261,7 +261,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe | |||
| 261 | 261 | ||
| 262 | if (digitalSignatureTable.Rows.Count > 0) | 262 | if (digitalSignatureTable.Rows.Count > 0) |
| 263 | { | 263 | { |
| 264 | var command = new CreateIdtFileCommand(digitalSignatureTable, codepage, this.Context.IntermediateFolder, true); | 264 | var command = new CreateIdtFileCommand(this.Context.Messaging, digitalSignatureTable, codepage, this.Context.IntermediateFolder, true); |
| 265 | command.Execute(); | 265 | command.Execute(); |
| 266 | 266 | ||
| 267 | database.Import(command.IdtPath); | 267 | database.Import(command.IdtPath); |
| @@ -275,7 +275,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe | |||
| 275 | // If we did find external cabs but none of them were signed, give a warning | 275 | // If we did find external cabs but none of them were signed, give a warning |
| 276 | if (foundUnsignedExternals) | 276 | if (foundUnsignedExternals) |
| 277 | { | 277 | { |
| 278 | this.Context.Messaging.OnMessage(WixWarnings.ExternalCabsAreNotSigned(this.Context.InputFilePath)); | 278 | this.Context.Messaging.Write(WarningMessages.ExternalCabsAreNotSigned(this.Context.InputFilePath)); |
| 279 | } | 279 | } |
| 280 | 280 | ||
| 281 | if (shouldCommit) | 281 | if (shouldCommit) |
