How to drag icns file to App Edit Icon

I am using Xojo 2016 Release 3 on macOS 10.11. When I drag and drop an icns file to App -> Edit Icon Window in Xojo the masks for 256kb, 512kb and 1024kb were missing. When I drag the single png images, everything works fine. In Finder preview and Apple Icon Composer the masks are available in the icns file.
I tested it with the App.icns file from the Xojo program as well. I dragged this file into the App -> Edit Icon but got the same result. The higher resolution masks are missing. In the Xojo Video “Creating a Facebook Messenger App” at 0:24 (link text), Paul Lefebvre drags an icns file and the higher resolution masks are missing as well. Is this a bug of my Xojo version or how do I create an icns file I can correctly drag into Xojo App -> Edit icon including all images and masks.

Two screenshots of the three missing masks in the App.icns file from the Xojo Application:

I have the same with App.icns from inside Xojo 2016r3.

Note the size of the icon file (App.icns).

Same problem with 2016r3 and r4
Using a .icns made by xoxo same version

–> Only some sizes are filled !

In the icns file ?
In the Xojo IDE Icon Editor ?

If you drag in an ICNS only some sizes actually have masks
Some sizes are PNG’s with transparency - not a mask

Instead of dragging the icns into the editor, move it to the bundle with a CopyFile step after the gear (build).

Otherwise, I have always dragged transparent PNG into that editor, and it works perfectly. It lets me optimize small sizes 32 and 16.

For years I’ve been using App Wrapper to include ICNS files in my apps, so much so that I forgot how to use it in Xojo.

[quote=303211:@Norman Palardy]If you drag in an ICNS only some sizes actually have masks
Some sizes are PNG’s with transparency - not a mask[/quote]
I think the thing is in the Preview section of the Icon interface, it shows the image as if it doesn’t have a mask (solid black background).

[quote=303220:@Michel Bujardet]Instead of dragging the icns into the editor, move it to the bundle with a CopyFile step after the gear (build).

For Mac applications, but for Windows ?

For Windows, I just replied here https://forum.xojo.com/37143-windows-icon

We do not have access to the manifest, so the only game in town is the app icon editor. And Windows icon format is .ico, not icns.

That said, I fail to see the logic into dragging a fully formed icns in that editor. The best result is obtained with separate pictures.

I asked Xojo for years to be able to change the icon of the app in the IDE before a compilation, by script (the same project is used for different applications, and all the strings like Short Version are scriptables)

For Mac apps, I can change the icns after, but for Windows: no

In realbasic, we could copy paste all the icns from the finder to the IDE in a single manipulation
In Xojo, I am looking for a simple solution, too

If a when we get access to the Windows app manifest, it will be possible to change the ico. It should be possible when Windows 64 bit gets out of beta. Hopefully.

So what is the simplest way to fill this icons window ?
The goal is to avoid copying / pasting 10 icons and 10 masks…

drop icns on the Icon Editor window.

That said, who cares to copying / pasting 10 icons and 10 masks once in a while ?

For a (unfair) test we set the Xojo project to use a Windows icon, and then used App Wrapper to replace it with a Mac icon.

If you don’t want to use App Wrapper (why not!) you can always use a Build Step to copy the .icns file into the Resources folder.

Yes App Wrapper is mac only, sorry.

How do you do that when running Windows ?

Contrary to what Xojo Documentation.pdf says “You can also drag an ICNS file onto the window background (instead of an image area) to load and populate all the image sizes at one time.”, the simplest method is to drag a PNG file onto the window background.
(As Michel Bujardet said, but I did not understand “onto the background”)

We have been waiting for years that Xojo create a function to transfer the icons by script IDE !

Unsure of what you say, but if, on macOS (OS X), you drop an,icns file onto the App.Icon window (not in the graphic areas), Xojo will dispatch its contents.

I just checked. Michel method here fills all areas, the icns fills only from what’s in the icns.

Edit: I just checked (both methods) with Xojo 2016r4.1.

I have icns files with all sizes, and the result looks like that of Lars Weber…

I have been using a CopyFile step for that for a while.