How to set the application Icon ?

Windows: How to set the application Icon ?

More accurate question: beside dropping an image in the App (Navigator) --> Appearance.Icon (Properties), is there’s a way to set the application icon for Windows ?

Same question for the documents icons.

Why ?

With larger icons, HiDPI Icons, if I put the images in the project, my project size will grow to . I have a project that is more than 30MB (on disk).

A little bit of light reading :slight_smile:

Mage.exe (Manifest Generation and Editing Tool)

MageUI.exe (Manifest Generation and Editing Tool, Graphical Client)

How to: Embed a Manifest Inside a C/C++ Application

How to Assign a Custom Icon to a File Type

Emile, you have already asked that kind of question several times before, and the advice was regularly to use the built in mechanism because Windows manifest is way less simple than the Mac bundle. Julian just gave you some “light reading” to meditate over the way it works in Windows. Not exactly easy as pie.

Now, to be more realistic : how much will this poor icon will account in your 30 MB project ? I just looked at the size of the 1024x1024 icon.png file in my current project : 100 KB. For all the icon sizes, we are talking hardly over 250 KB.

Besides the fact that 30 MB for a project size is really not “out of control”, you may want to look elsewhere to save space.

Hi Michel,

thank you for your kind answer.

So, if you ask a question and do not understand the answer, you can’t adk it once (or more) times ?

The one I just check is - from the application Resource folder - 471KB. Imagine a bunch of icons (if you have some custom files…).

But, what is its size in the Project file ?

In fact, I removed all four (yes FOUR) icons from the OS X project, save the project file and… the project size is 2.3 MB.

Where can I [quote=268654:@Michel Bujardet]look elsewhere to save space[/quote] ?

PS: I’ve removed the icons from a copy of my current project, of course (One click to display the icon once in the File Type Editor, 10 clicks / press on delete + 1 click on OK for each of the four icons…).

YES ! I am asking about Windows, not OS X, but I do not have my WIndows 10 Laptop (at , Starbuck Café, Strasbourg) to complete the checkings.

I forgot to refesh the memory of the reader:

for the application icon, I created a post build icon (and created a pdf to recall how to do it for the next times), but this does not worked on Windows for unknow reasons (either a bug in WIndows, Xojo or in my mind / knowledge).

Emile, there is nothing wrong asking for clarification, but would it not be profitable to continue the threads you started before, let alone to keep the coherence of the conversation. Also, re-reading what people tried to explain before may help a better understanding.

For the rest, you seem confuse enough, no need to add to the puzzlement.


did you even tried to place large icons to an empty project, save it check its size and delete the icons to the project, check its “new” size ?

Beside that, why writing non helpful answers ?

You do not even gave a hint to Xojo documentation (I do not found one, but one may exists).

What would say Confucius in a case lithe this ?

Don’t drag a poor 500 BC philosopher who had no technical knowledge into this mess.

I am sorry, but I feel your questions do not have simple answers, and worse, usually get even more labyrinthic as the topic progresses. Nobody can help you, as you seem at each post ever more entangled in a growing amount of haphazard reflexions like a cat playing with a ball of wool.

Good luck !

You cannot help since you do not start to check anything, you do not even think that a problem may exists. Like the ostrich, you stay with your knowledge and do not even think what some persons says. “They are wong because I AM RIGHT !” This is the wrong state of soul when you want to help someone (thus the Confucius reference). The real question here is “do you really want to help” or is it a hobby. If the latter, take a garden and you will get more rewards for your efforts.

Following your assertion about one icon size, I gave you more data to think. He say, an icon size is “hardly over 250 KB”. Is that the maximum size when you add an icon into Xojo ? LOL

Now, one more data to think at: I saved the project as Xojo native file and found that the file:
Easy Displayer.xojo_resources

have a size of 27,9MB. Yes, I get an eye on it and it certainly holds my four 1024 x 1024 icons.

Michel: if you are not capable of giving clues /correct answers: stop it. AFAIK, you are not this forum policeman ! Give respect to others and you will get respect back.

You want “Thank You” ? How crazy ! Read that [quote=268825:@Michel Bujardet]poor 500 BC philosopher[/quote] who do not need a CS to give valid answers.

From wikipedia:
The philosophy of Confucius emphasized personal and governmental morality, correctness of social relationships, justice and sincerity.

You have work on your plate !

Nope. Bye.

I just looked at an icon that I got from the omega bundle, thank you, they are very nice.

I wouldn’t call 209k for a 1024x1024 PNG out of control.

Ok, so the manor of your posts to Michel upset me a little, he is only trying to help, so I did some testing.

I created a project with 1 32x32 PNG and the same project with all PNG sizes, 1024, 512, 256, 128, 48, 32 and 16

The filesize of the exe was the same.

I didn’t know this as I’m new to xojo, but you can add all the icon sizes you need right through the IDE, why would you need to ask how to assign icons to the project?

I answered your question and gave you a link on “How to Assign a Custom Icon to a File Type” but you didn’t seem to acknowledge this.

What is your actual question/concern?

Hi Julian,

In my original question, I do not talked about the exe size, but the project size. That said, my application icon is 373KB on disk. but, with the three other (custop) icons, this represent… about 28MB on my project. And that is the core of the trouble.

My question was How can I set icons to my project without seen them added (about 28MB) to the project file ?
Worst, I seached intensivelly into the documentation and found nothing that can help me.

More comments
As I wrote earlier, I have 4 (1,024 x 1,024) icons that expand the project size (both Xojo Binary and Xojo Project) by about 28MB.

In the Xojo Project, I have a file that is 27.9MB (Easy Displayer.xojo_resources).

When I delete the four icons from the project, the project size fall to 2.3MB (vs 30.2MB).

Obviously, there is something wrong, thus my question: how can I add these icons in a way that it does not expand so much my project ?
Nota: I used a Post Build Script times ago, and it worked fine on OS X, but no icon was set into the .exe.

If this is not a legitimate question, what question can be legitimate ?

And for Michel answer, read its first answer and decide by yourself if this is a positive answer, an answer that can help.

I can give thank you when I get answers, but what can I say about non constructive answers ?
(yes, I can ignore them, but this not help me either).

It does seem bizarre that your icons result in such a huge file ( unless they are monster graphics ) but 28MB in this day and age is hardly a problem. Disc space is pretty cheap - get a bigger drive, or an external. Delete some crud to make space.

that’s nearly 20 1.44 HD 3.5" floppy disks!

or 40 720KB floppies
or 80 360KB 5.25" floppies

How big are all the files outside xojo and what format are they?

Custom Icons: 198,114Bytes, 261,321Bytes and 250,693Bytes (icns) / 177,309Bytes, 145,205Bytes and 133,005Bytes (png)
App icon: 372,457Bytes (icns) that is the icon file I copied from inside the OS X application. I certainly have the png somewhere.

It is amazing that all of this can holds so much space in the project file.

Peter: me too, I am amazed. Even with an SSD, loading a 30MB project takes a bit of time.

All responders: than you.

I nearly forgot:

I already removed the Icons from the project, saved it, quit Xojo, shutdown the laptop.
I power on the laptop, make a copy of the stripped off project in a backup folder, added the icons back and get the same size.

Really, if I asked question, it is because I have trouble.

And, the project name (and path) use only ASCII characters in their names (no UTF-8, ASCII >127 is/are used).

My main project file is now 120 MB. Committing several times a day to SVN makes the repository larger very quickly. And the size is due to the large icons that one now has to use (that nobody ever sees).

My OS X/Win Project is 723.016.032 Bytes big (w/o the Git Backups) and the Windows App is approx. 120MB on the HDD and at Peaks 325MB in Memory. It’s used on 5 Year old Windows 7 Machines, new Windows 10 Machines and all kind of OS X Machines.

It’s an In-house App and no one ever asked why it “has to be” so big. It works and everything else is of less interest. :wink: