Update: Icon registry key and how to avoid the need for signing ‘privileged’.
Update: As of August 10, 2009, the requirement for the PNG Start Screen icon has changed from requiring three to one (90×90) PNG icon. This FAQ has been updated to reflect this change. You can satisfy this requirement via the static setup described in: Using Custom Icons in Windows Mobile 6.5.
The Windows Marketplace for Mobile requirements around the support of a PNG file for your Start Screen icon and the supporting blog posts Using Custom Icons in Windows Mobile 6.5 and Creating Custom Icons for Windows Mobile 6.5 have generated many questions. The following is a list of those questions and answers. We welcome your feedback via the Windows Phone blog and Windows Marketplace forum.
Q: I understand that because of the PNG Start screen icon requirements that I need to sign my CAB file as ‘privileged’, doesn’t this extend the approval time for my application?A: Yes. Requesting that your app be signed privileged does increase the approval time for your application. This is because you are likely accessing protected APIs and / or registry keys. The Marketplace team needs to vet the reasons for your access to these protected areas. However, within the scope of the PNG Start screen icons, you only need to sign privileged if 1) you are using a single CAB to distribute your app to both Professional and Standard devices and 2) you are using CAB file declarations (not code in a setup dll) to configure the PNG StartInfo registry key. In other words, you can avoid having to sign privileged if you create the PNG StartInfo registry key programmatically using a setup dll and only do this if installing on a Professional device. The blog post has more details.
Q: Instead of creating a separate PNG file, why can’t I just create icons of the required sizes (45×45, 60×60, and 90×90) and store them into the ICO resource of my EXE – the usual way?
A: Because the shell icon selection logic has not changed. That is, the shell looks for a 32×32, 43×43, or 64×64 sized icon. In WM 6.5, it scales up the icon. Depending on the icon layout, the icon will look fine –in other cases you will notice some artifacts in the appearance of the icon. Using a optimally sized PNG file avoids this scaling problem.
Q: Are there any plans to fix the shell so that it loads the large (45×45, 60×60, or 90×90) icons from the EXE for the Start screen.
A: Not at this time.
Q: Do I really need to sign my CAB to create the PNG icon?
A: For developing on the emulator, you do not need to sign the CAB file, unless you have reconfigured its security policies. However some devices in the field may be provisioned to NOT allow unsigned applications to run. If this is the case, even though WCELOAD.EXE will run and process your CAB file, your setup dll will not be able to write to the protected registry key. This is why your CAB file and it executable contents should be signed. This is really not a problem for Windows Marketplace applications since all applications are signed as part of the submission process.
Q: Can I restrict my app to be distributed on 6.0 and 6.1 devices so that I can skip the icon requirement?
A: No. 6.0 applications by default can run on Windows Mobile 6.5. Therefore all 6.0 of 6.1 applications will be made available to 6.5 device users in the Windows Marketplace client.
Q: If my app was written for 6.0, do I need to modify the CAB to include the PNG files and setup DLL as mentioned in the blog post?
A: Yes and No. Yes you do need to include one 90×90 PNG file, a registry entry pointing to it, in addition to the traditional shortcut definition in your CAB file. A setup DLL is not required. See the blog post: Using Custom Icons in Windows Mobile 6.5 for more information.
Q: Can I use the registry location HKLMDriversDisplayGPE to retrieve the DPI of the device?
A: While this works in most cases, OEMs are not required to support this key. If you use this method, you run this risk of not being able to detect the DPI across all devices.
Q: The method in the blog article requires the inclusion of a helper EXE that is used to detect the device DPI. Doesn’t this violate the Windows Marketplace requirement, 7.3. Bundling Applications, which prohibits the distribution of more than one EXE?
A: No. 7.3. Bundling Applications states that after installation there should only be one EXE installed on the device. The helper EXE is removed during installation.
Q: Since I now have to distribute PNG files for my Start screen icon, is it still necessary to include icons in my EXE file?
A: Yes. You need the ‘small’ and ‘large’ icons (see first table in blog post) for the common controls used in applications that reference your application EXE or data files. For example, File Explorer uses these icons. Note that as of 8/10/09, you only need to include one PNG file for your Start screen icon. (Professional only.)
Q: Using a PNG fie for my Start screen icon requires that I write a native C++ setup DLL. I am a managed code programmer, is there any way to meet these requirements using managed code?
A: Note since the requirement was changed to a single PNG file, you no longer need the setup DLL to meet this requirement. To answer your question, there is no way to host the .Net CF runtime in a DLL. The sample code for the setup dll available via the blog post, is written in a generic way so that you just have compile it and it will work without modification. Here are the constraints:
Install directory, Shortcut Name, and EXE name are the same. For example. If the install directory is ‘Program FilesSMS Intercept’, then setup DLL sample code assumes the EXE name is ‘SMS Intercept.exe’ and the Shortcut name is ‘SMS Intercept’. The installation directory is passed as an argument to the setup dll, so you do not have to hardcode this into the code.
Q: Do I have to install the PNG in the application directory? If I do this and the app is installed on an SD card, if the card is removed and I reboot, I see a funny looking icon instead of my app icon.
A: No. You can install the PNG file on the device if you wish. A good directory would be Application Data<app name>.
Q: If we are targeting 6.x do we need to add this setup.dll functionality? Will it fail Windows Marketplace certification if it does not have this?
A: No. You do not need to include a setup.dll, since you are only required to install one PNG file as your Start sceen icon. However, you do need to include support for a 90×90 PNG file as your Start Screen icon, otherwise your submission will fail certification testing.