Post-Build Script: How to copy icon files

I created a Post-Build Files Script to copy the Icons to my application and all I get is… the icons files were copied… beside the .exe and Libs items !

Nota: on screen, the right part of the Xojo window (where usually there are properties and labels) looks like its OS X counterpart, notably - and here’s where the problem may be - the PopupMenu Contents have the OS X entries.

Question 1: Do you use Post-Build Files Scripts to move your Icons to the exe ?

Question 2: if so, can you share your how to ?

You cant use a copy file step to insert icons INTO an exe
It copies files from one location to another just as if you had manually copied them in Explorer

Thank you Norman.

Is there’s a HowTo description somewhere ?
(that I missed ?)

What I seems to be missing is the part the copy goes into the .exe.

In the inspector for app there is an Icon option. Click on that & you can paste your icon & mask.

Is this copy the icons into the project file ?

If so, that is what I was going far off…

Sorry Wayne, that is what I was going far away: adding icons to the project have a grave effect on the project load time and to my health ;-:).

Thank you for taking time to give an answer.

[quote=219003:@Emile Schwarz]Is this copy the icons into the project file ?

If so, that is what I was going far off…

Sorry Wayne, that is what I was going far away: adding icons to the project have a grave effect on the project load time and to my health ;-:).

Thank you for taking time to give an answer.[/quote]

Just use Xojo icon editor and you will be fine. Easy does it.

I am lost here Michel.

The question was how to copy the icons into the Windows .exe.

I already have a Post-Build Script for OS X, but I was not able to do the same for Windows.

[quote=219014:@Emile Schwarz]I am lost here Michel.

The question was how to copy the icons into the Windows .exe.

I already have a Post-Build Script for OS X, but I was not able to do the same for Windows.[/quote]

Emile,

The structure of an EXE is not at all the same as a Mac OS X bundle. The icon is in the code of the EXE, not separate. There is no access to the Windows app manifest as well, that would allow to specify another icon than the one built by Xojo.

You must use the Xojo App icon editor to set the different resolutions and let Xojo insert that into the executable.

To my knowledge, there is no way around that.

Hi Michel,

thank you for your answer.

So, if you’re a Windows only or XPlatform developer, you are condemned to have your application icons (icons for the Application and all custom icons) into the Project file ?

Weird !

Worst: I wasted my time

I understand,
If so, why is it possible to create Pre and Post builds scripts,
If Xojo is not able to do that… I think it is just because they do not have time or do not think it is worth the time to do that.

Just opinions while reading other conversations in this forum.

Emile, this is not open for debate. Windows executables are built so the icon is inside the file. It has been since day one and is still to this day. It does not mean you cannot have a custom icon. All you need to do is to copy each image for each resolution in the Xojo icon editor. You can perfectly well create different images for 16x16 and 256x256 for instance, so 16x16 looks better. Note that Windows does not use all sizes. Just 16x16, 24x24, 32x32, 48x48, and 256x256.

[quote=219277:@Emile Schwarz]If so, why is it possible to create Pre and Post builds scripts,
If Xojo is not able to do that… I think it is just because they do not have time or do not think it is worth the time to do that.[/quote]

Pre and Post build scripts have many more uses than simply copying an icon file. That said, it is indeed possible in languages that give access to the manifest, such as VB. NET, to specify an icon file. And many other things. The manifest is the equivalent of the Mac OS X Info.Plist.

You may put points on the feature request that has been pending for a while requesting access to the manifest <https://xojo.com/issue/6297>

That should have been made available. I suspect it got thrown under the pile by some more urgent issue, like the QuickTime rejections by Apple in late 2014, 64 bit iOS in 2015, 64 bit for Desktop and Web, ARM, whatever… Lesser child …