aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2023-08-07 12:07:39 -0700
committerRob Mensching <rob@firegiant.com>2023-08-07 13:36:08 -0700
commit1ef2fac522e39384fd8379256b9ce9ef750e18c9 (patch)
tree18954d428371566ddfb8cbf7d431096aac8c792f
parentb5b3a63ca7e7b0fd0784182ff6be7878328068b7 (diff)
downloadwix-1ef2fac522e39384fd8379256b9ce9ef750e18c9.tar.gz
wix-1ef2fac522e39384fd8379256b9ce9ef750e18c9.tar.bz2
wix-1ef2fac522e39384fd8379256b9ce9ef750e18c9.zip
Ensure the Font actions are scheduled for TrueType fonts
TrueType fonts are denoted by the empty string in the FontTitle field of the FileSymbol. That means a non-null FontTitle field value means a font is being installed. Fixes 7593
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs2
-rw-r--r--src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs4
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs12
3 files changed, 13 insertions, 5 deletions
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
index b25f0b52..18914745 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/CreateWindowsInstallerDataFromIRCommand.cs
@@ -678,6 +678,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
678 attributes |= (symbol.Attributes & FileSymbolAttributes.Vital) == FileSymbolAttributes.Vital ? WindowsInstallerConstants.MsidbFileAttributesVital : 0; 678 attributes |= (symbol.Attributes & FileSymbolAttributes.Vital) == FileSymbolAttributes.Vital ? WindowsInstallerConstants.MsidbFileAttributesVital : 0;
679 row.Attributes = attributes; 679 row.Attributes = attributes;
680 680
681 // Note that TrueType fonts are denoted by the empty string in the FontTitle
682 // field. So, non-null means a font is present.
681 if (symbol.FontTitle != null) 683 if (symbol.FontTitle != null)
682 { 684 {
683 var fontRow = this.CreateRow(symbol, "Font"); 685 var fontRow = this.CreateRow(symbol, "Font");
diff --git a/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs b/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
index 4a5319b3..39d5680b 100644
--- a/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
+++ b/src/wix/WixToolset.Core.WindowsInstaller/Bind/SequenceActionsCommand.cs
@@ -446,7 +446,9 @@ namespace WixToolset.Core.WindowsInstaller.Bind
446 var foundBindPath = false; 446 var foundBindPath = false;
447 foreach (var file in this.Section.Symbols.OfType<FileSymbol>()) 447 foreach (var file in this.Section.Symbols.OfType<FileSymbol>())
448 { 448 {
449 if (!foundFont && !String.IsNullOrEmpty(file.FontTitle)) 449 // Note that TrueType fonts are denoted by the empty string in the FontTitle
450 // field. So, non-null means a font is present.
451 if (!foundFont && file.FontTitle != null)
450 { 452 {
451 set.Add("InstallExecuteSequence/RegisterFonts"); 453 set.Add("InstallExecuteSequence/RegisterFonts");
452 set.Add("InstallExecuteSequence/UnregisterFonts"); 454 set.Add("InstallExecuteSequence/UnregisterFonts");
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
index 006610d1..7160bf73 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs
@@ -488,11 +488,13 @@ namespace WixToolsetTest.CoreIntegration
488 result.AssertSuccess(); 488 result.AssertSuccess();
489 489
490 Assert.True(File.Exists(msiPath)); 490 Assert.True(File.Exists(msiPath));
491 var results = Query.QueryDatabase(msiPath, new[] { "Font" }); 491 var results = Query.QueryDatabase(msiPath, new[] { "Font", "InstallExecuteSequence" });
492 WixAssert.CompareLineByLine(new[] 492 WixAssert.CompareLineByLine(new[]
493 { 493 {
494 "Font:test.txt\tFakeFont", 494 "Font:test.txt\tFakeFont",
495 }, results); 495 "InstallExecuteSequence:RegisterFonts\t\t5300",
496 "InstallExecuteSequence:UnregisterFonts\t\t2500",
497 }, results.Where(l => l.Contains("Font")).ToArray());
496 } 498 }
497 } 499 }
498 500
@@ -521,11 +523,13 @@ namespace WixToolsetTest.CoreIntegration
521 result.AssertSuccess(); 523 result.AssertSuccess();
522 524
523 Assert.True(File.Exists(msiPath)); 525 Assert.True(File.Exists(msiPath));
524 var results = Query.QueryDatabase(msiPath, new[] { "Font" }); 526 var results = Query.QueryDatabase(msiPath, new[] { "Font", "InstallExecuteSequence" });
525 WixAssert.CompareLineByLine(new[] 527 WixAssert.CompareLineByLine(new[]
526 { 528 {
527 "Font:TrueTypeFontFile\t", 529 "Font:TrueTypeFontFile\t",
528 }, results); 530 "InstallExecuteSequence:RegisterFonts\t\t5300",
531 "InstallExecuteSequence:UnregisterFonts\t\t2500",
532 }, results.Where(l => l.Contains("Font")).ToArray());
529 } 533 }
530 } 534 }
531 535