MAKING AN ICON IMAGE IN AN (.exe) file

Hello. Is there any tool in jMP to change the icon in an exe file during building an apps?

:?

Trying to understand: you want your own custom icon for the .exe file you see in things like Windows file explorer?



Are you running the latest version of JMP? It’s definitely possible even in the older version but I think @normen made it easier recently… like there is just a .ico file you replace in your project directory or something.

@pspeed said:
Trying to understand: you want your own custom icon for the .exe file you see in things like Windows file explorer?


Yes. That's what i mean. So, how can I make it? Can give me some hints?
@pspeed said:
there is just a .ico file you replace in your project directory

I had already .ico file in the project directory.

What should I do? Could settings.setIcons(); should do?

REPLACE that .ico with your own. Copy your .ico file over that file.

I couldn’t find it. I had only found Replace in projects on “Edit” menu bar. Is that one do you mean to me?

Open Windows file explorer.



Go to the project directory.



Copy your .ico file over the one in the project directory.



Tada… done.

2 Likes

I had already done it. But, the .exe file that I had built don’t have an icon image.

I don’t know what to tell you. If you replaced the .ico file with a valid .ico and rebuilt your .exe then it should have had your new icon.

I had put .ico file inside the BasicGame folder. Then, I had clean and build the app that I made. Is the folder location that I had put .ico is wrong?

Did you name the .ico file the same name as the one that was there before?

Uhm, there is no any .ico file i’d found there in the folder and sub-folders. I had only copy .ico file and paste it in the BasicGame folder.

The support for .ico files was added relatively recently. It’s possible you created your project before @normen added that support.



I don’t know what the name is supposed to be because I’ve configured my own launch4j target that directly references my own. I don’t have my build.xml in front of me at the moment.



If you have an up to date JMP beta (including updating to the latest stable) you could create a new project to see what the .ico file is supposed to be or you could look in the nbproject/launch4j-impl.xml. You might have to turn off .exe generation and turn it back on again to get it to regenerate if you created the project before the update that included .ico support.

If nothing else, you could use ResourceHacker to replace the .ico post-build. You’ll have to replace it anytime you recompile, though.

@josh1billion said:
If nothing else, you could use ResourceHacker to replace the .ico post-build. You'll have to replace it anytime you recompile, though.


No, the worst case is that he'd have to add the 5 lines of XML to his build.xml to do it manually... and that's pretty simple. When I have access to my build.xml, I will post the section...

...but really, I'm trying to figure out why the built-in stuff isn't working.

You have to update the SDK to the latest stable version and replace the file at resources/launch4j/win-icon.ico

Hello, i’d tried all the ideas that you’d told me. But, what I’m trying to say is, like this. I had built an app and it created an .exe file. That .exe file shows an console icon, what I want to do is change that with an icon file. How I can I do that. Kindly help. All replies are appreciated.

@normen said:
You have to update the SDK to the latest stable version and replace the file at resources/launch4j/win-icon.ico

@normen said:
You have to update the SDK to the latest stable version and replace the file at resources/launch4j/win-icon.ico

@normen said:
You have to update the SDK to the latest stable version and replace the file at resources/launch4j/win-icon.ico

@normen said:
You have to update the SDK to the latest stable version and replace the file at resources/launch4j/win-icon.ico

@normen said:
You have to update the SDK to the latest stable version and replace the file at resources/launch4j/win-icon.ico

@normen said:
You have to update the SDK to the latest stable version and replace the file at resources/launch4j/win-icon.ico

Ok, I got it now.

:roll: