What is the downside of using a .png file for the

2019-03-01 23:35发布

This question already has an answer here:

I'm learning how to use WiX toolset to create an MSI file. The tutorial that I'm reading guides to using BMP files to customize the default dialogs. I tried here using a PNG file, and it seems to be working fine. Also, I found that using Bitmaps with transparency (which is not part of the original BMP specification) would work fine too.

<WixVariable Id="WixUIDialogBmp" Value="Assets\dialog.png" />

Is this a limitation of an older version of Microsoft Installer or Windows?

Here is the PNG file that I'm using.

enter image description here

Here is there installer running.

enter image description here

Note: I'm using Windows 10 with Windows Installer 5.0.16299.15.

2条回答
神经病院院长
2楼-- · 2019-03-02 00:24

Yes, PNG support is "new" for Windows 8, per the MSDN SDK:

Windows 8 and Windows Server 2012: The image file can be in any standard format supported by the Windows Imaging Component (WIC), including TIFF, JPEG, PNG, GIF, BMP, and HDPhoto. The control does not support animation.

查看更多
狗以群分
3楼-- · 2019-03-02 00:24

I believe it's just a legacy limitation and the documentation was never updated. Probably technically falls in the unsupported category if you somehow ever needed to open a ticket with MSFT PSS.

I suspect under the hood MSI supports whatever native codecs are installed on the machine by WIC. YMMV may very on some old unpatched installation of XP or something. I wouldn't worry about it.

MSI UI is kinda old and crappy. If it does what you need then use it. Otherwise create a bootstrapper or external ui handler. One tip for transparency and nativeUI is to use pushbuttons instead of radio controls. Things like that will help. Look at what other installers do for examples.

https://msdn.microsoft.com/en-us/library/windows/desktop/ee719654(v=vs.85).aspx

查看更多
登录 后发表回答