KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Built Client and Server Custom Icon issues
PRODUCT: 4D | VERSION: 15.2 | PLATFORM: Mac
Published On: July 28, 2016

To create a 4D standalone application, or Built Client/Server applications a custom icon can the included with the application by using XML Keys from the "SourcesFiles / CS" theme. Using the keys "ClientMacIconForMacPath,"
"ClientMacIconForWinPath" or "ServerIconMacPath" the file path the an icon file with an ".icns" file extention.

An ICNS file is an icon file used by Mac OS X applications. It stores one or more images, supports 1-bit and 8-bit alpha channels, and displays the application icon in Finder and Dock. ICNS files are generally located within the Contents/Resources/ directory inside the application package.

An ICNS file contains multiple variants of the icon to be presented (128x128, 64x64, 32x32, and 16x16) are required but it can contain more, such as 512x512 and 256x256. This is so a sharp image will be shown as different sizes are selected to be displayed in the Mac Finder.

Developers need to be aware that even though the icons of an ICNS file show up in the Finder, you’ll be disappointed to find out that they will not appear applied to an application or script unless all required variants of the icon are present.

For Mac OS 10.7+ the recommended sizes to include are 1024x1024, 512x512, 256x256, 128x128, 32x32 and 16x16 are recommended. Examples of how the icon resources are used:
   16px - list views, spotlight searches
   32px - Finder
   128px - Dock, Finder previews
   256px - Finder preview
   512px - CoverFlow

Commented by Charlie Vass on July 29, 2016 at 11:28 AM
Over the years MS has also updated the file format it uses for application icons, files with the ".ico" extension. The history of this format can be found online. ICO files available online now typical come with sizes 16x16, 24x24, 32x32, 48x48, 256x256 included in the file, on Windows 8 there were also sizes 26x26, 30х30, 50x50, 150x150 used.
Commented by Manuel PIQUET on July 29, 2016 at 2:46 AM
For Mac it's OK, but why the custom icon is NOT correctly used on PC in all windows ?