mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-12 01:24:12 +08:00
🐛 fix(installer): 修复 MSI 更新后快捷方式图标失效
- 让开始菜单和桌面快捷方式直接使用 GoNavi.exe 内嵌图标 - 避免 Major Upgrade 后 Shell 缓存继续引用已删除的 MSI 图标资源 - 增加 Windows 安装产物回归测试,锁定快捷方式图标来源
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -72,8 +72,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
|
||||
|
||||
Reference in New Issue
Block a user