Merge pull request #658 from AutumnNazi/fix/msi-shortcut-icon

This commit is contained in:
Syngnat
2026-07-16 21:16:02 +08:00
2 changed files with 13 additions and 4 deletions

View File

@@ -31,17 +31,17 @@
Source="$(var.SourceExe)"
Name="GoNavi.exe"
KeyPath="yes">
<!-- Keep shortcut icons bound to the stable executable path. Referencing the MSI Icon table
can leave Windows shell caches pointing at the removed product cache after a major upgrade. -->
<Shortcut Id="StartMenuShortcut"
Directory="ProgramMenuFolder"
Name="$(var.ProductName)"
WorkingDirectory="INSTALLFOLDER"
Icon="GoNaviIcon"
Advertise="no" />
<Shortcut Id="DesktopShortcut"
Directory="DesktopFolder"
Name="$(var.ProductName)"
WorkingDirectory="INSTALLFOLDER"
Icon="GoNaviIcon"
Advertise="no" />
</File>
<File Id="GoNaviMsiInstallMarker"

View File

@@ -76,8 +76,17 @@ class WindowsReleaseArtifactsTest(unittest.TestCase):
self.assertIsNotNone(package.find("wix:MediaTemplate", ns))
self.assertIsNotNone(package.find("wix:Property[@Id='ARPPRODUCTICON']", ns))
self.assertIsNotNone(package.find("wix:SetProperty[@Id='ARPINSTALLLOCATION']", ns))
self.assertIsNotNone(package.find(".//wix:Shortcut[@Id='StartMenuShortcut']", ns))
self.assertIsNotNone(package.find(".//wix:Shortcut[@Id='DesktopShortcut']", ns))
executable = package.find(".//wix:File[@Id='GoNaviExe']", ns)
self.assertIsNotNone(executable)
assert executable is not None
start_menu_shortcut = executable.find("wix:Shortcut[@Id='StartMenuShortcut']", ns)
self.assertIsNotNone(start_menu_shortcut)
assert start_menu_shortcut is not None
self.assertNotIn("Icon", start_menu_shortcut.attrib)
desktop_shortcut = executable.find("wix:Shortcut[@Id='DesktopShortcut']", ns)
self.assertIsNotNone(desktop_shortcut)
assert desktop_shortcut is not None
self.assertNotIn("Icon", desktop_shortcut.attrib)
marker = package.find(".//wix:RegistryValue[@Name='InstallType']", ns)
self.assertIsNotNone(marker)
assert marker is not None