From 155a6e96346e0cb3d9ab6f5372fa29b46ebaee89 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 19 Dec 2017 12:25:40 -0800 Subject: Integrate simplified message handling --- .../Inscribe/InscribeMsiPackageCommand.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller/Inscribe/InscribeMsiPackageCommand.cs') 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 FileAttributes attributes = File.GetAttributes(this.Context.InputFilePath); if (FileAttributes.ReadOnly == (attributes & FileAttributes.ReadOnly)) { - this.Context.Messaging.OnMessage(WixErrors.ReadOnlyOutputFile(this.Context.InputFilePath)); + this.Context.Messaging.Write(ErrorMessages.ReadOnlyOutputFile(this.Context.InputFilePath)); return shouldCommit; } @@ -179,7 +179,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe // If the cabs aren't there, throw an error but continue to catch the other errors if (!File.Exists(cabPath)) { - this.Context.Messaging.OnMessage(WixErrors.WixFileNotFound(cabPath)); + this.Context.Messaging.Write(ErrorMessages.WixFileNotFound(cabPath)); continue; } @@ -205,11 +205,11 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe if ((5 == Environment.OSVersion.Version.Major && 2 == Environment.OSVersion.Version.Minor) || // W2K3 (5 == Environment.OSVersion.Version.Major && 1 == Environment.OSVersion.Version.Minor)) // XP { - this.Context.Messaging.OnMessage(WixErrors.UnableToGetAuthenticodeCertOfFileDownlevelOS(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult))); + this.Context.Messaging.Write(ErrorMessages.UnableToGetAuthenticodeCertOfFileDownlevelOS(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult))); } else // otherwise, generic error { - this.Context.Messaging.OnMessage(WixErrors.UnableToGetAuthenticodeCertOfFile(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult))); + this.Context.Messaging.Write(ErrorMessages.UnableToGetAuthenticodeCertOfFile(cabPath, String.Format(CultureInfo.InvariantCulture, "HRESULT: 0x{0:x8}", HResult))); } } @@ -252,7 +252,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe if (digitalCertificateTable.Rows.Count > 0) { - var command = new CreateIdtFileCommand(digitalCertificateTable, codepage, this.Context.IntermediateFolder, true); + var command = new CreateIdtFileCommand(this.Context.Messaging, digitalCertificateTable, codepage, this.Context.IntermediateFolder, true); command.Execute(); database.Import(command.IdtPath); @@ -261,7 +261,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe if (digitalSignatureTable.Rows.Count > 0) { - var command = new CreateIdtFileCommand(digitalSignatureTable, codepage, this.Context.IntermediateFolder, true); + var command = new CreateIdtFileCommand(this.Context.Messaging, digitalSignatureTable, codepage, this.Context.IntermediateFolder, true); command.Execute(); database.Import(command.IdtPath); @@ -275,7 +275,7 @@ namespace WixToolset.Core.WindowsInstaller.Inscribe // If we did find external cabs but none of them were signed, give a warning if (foundUnsignedExternals) { - this.Context.Messaging.OnMessage(WixWarnings.ExternalCabsAreNotSigned(this.Context.InputFilePath)); + this.Context.Messaging.Write(WarningMessages.ExternalCabsAreNotSigned(this.Context.InputFilePath)); } if (shouldCommit) -- cgit v1.2.3-55-g6feb