adding of icon in to exe file 
Author Message
 adding of icon in to exe file

Hi all,

Is there any tools to embed icon in to win32 exe? Or may be someone can
point me to the info how I can do it manualy, with hex editor.

Thanks,
Andy



Sat, 27 Mar 2004 12:48:14 GMT  
 adding of icon in to exe file

Quote:

>Hi all,

>Is there any tools to embed icon in to win32 exe? Or may be someone can
>point me to the info how I can do it manualy, with hex editor.

Which compiler are you using?

Stephen Posey



Sun, 28 Mar 2004 13:28:51 GMT  
 adding of icon in to exe file

Quote:
>Which compiler are you using?

Free Pascal for Windows


Mon, 29 Mar 2004 12:12:30 GMT  
 adding of icon in to exe file

Quote:

>>Which compiler are you using?

>Free Pascal for Windows

I've not used it myself (for more authoritative answers, I'd suggest
posting on comp.lang.pascal.misc), but I *think* FP uses the same
syntax for resource inclusion as the Borland compilers do:

{$R <filename>.res}

Just create a standard resource file containing your icon and add it
like that.

Stephen Posey



Tue, 30 Mar 2004 10:40:57 GMT  
 adding of icon in to exe file

Quote:
>I've not used it myself (for more authoritative answers, I'd suggest
>posting on comp.lang.pascal.misc), but I *think* FP uses the same
>syntax for resource inclusion as the Borland compilers do:

>{$R <filename>.res}

>Just create a standard resource file containing your icon and add it
>like that.

Thanks Stephen,

But I'm new in this things and phrase "Just create a standard resource file"
means for me something like "Just fly to the Mars..." :)

Yes FP use exectly the same way to add icon as you describe. But I cann't find
any info about how to create this .res file. I have played with windres.exe and
it hangs my computer.

Well, I have my.ico file. What steps I need to undertake to create .res file???

Thanks,
Andy



Tue, 30 Mar 2004 11:38:16 GMT  
 adding of icon in to exe file

Quote:



>>>Which compiler are you using?

>>Free Pascal for Windows

> I've not used it myself (for more authoritative answers, I'd suggest
> posting on comp.lang.pascal.misc), but I *think* FP uses the same
> syntax for resource inclusion as the Borland compilers do:

> {$R <filename>.res}

> Just create a standard resource file containing your icon and add it
> like that.

I didn't know (I use FPC on Unix), so I asked one of my FPC collegaes, and he
said RTFM. So it should be in the manual somewhere.


Tue, 30 Mar 2004 18:41:41 GMT  
 adding of icon in to exe file

Quote:

>>I've not used it myself (for more authoritative answers, I'd suggest
>>posting on comp.lang.pascal.misc), but I *think* FP uses the same
>>syntax for resource inclusion as the Borland compilers do:

>>{$R <filename>.res}

>>Just create a standard resource file containing your icon and add it
>>like that.

> Thanks Stephen,

> But I'm new in this things and phrase "Just create a standard resource file"
> means for me something like "Just fly to the Mars..." :)

> Yes FP use exectly the same way to add icon as you describe. But I cann't find
> any info about how to create this .res file. I have played with windres.exe and
> it hangs my computer.

> Well, I have my.ico file. What steps I need to undertake to create .res file???

I tried to follow the manual here and it worked.

I simply put

AppIcon ICON "iconame.ico"

is a file resource.rc

and then ran

windres -i resource.rc -o resource.res

to get the .res file to include.

Some possibilities why it failed
- Are you using a NT based system. Some GNU utils are known to fail on that.
- Do you have some other directory with a different windres in you path before
 the FPC dir?



Tue, 30 Mar 2004 18:48:07 GMT  
 adding of icon in to exe file

Quote:
>I tried to follow the manual here and it worked.

>I simply put

>AppIcon ICON "iconame.ico"

>is a file resource.rc

>and then ran

>windres -i resource.rc -o resource.res

>to get the .res file to include.

>Some possibilities why it failed
>- Are you using a NT based system. Some GNU utils are known to fail on
>that. - Do you have some other directory with a different windres in you
>path before
> the FPC dir?

I tried the same too and got "...The program encountered an invalid page
exeption. Fault location 0028:0009." and my computer hangs.
After I pressed Ctrl+Alt+Del I found that Winoldap(?) not responding and
after I killed it all returned back.
I used windres.exe from FP distribution on Win98SE comp. I didn't found
more windres.exe on my HD.

Andy



Wed, 31 Mar 2004 21:34:44 GMT  
 adding of icon in to exe file

Quote:

>>I tried to follow the manual here and it worked.

>>I simply put

>>AppIcon ICON "iconame.ico"

>>is a file resource.rc

>>and then ran

>>windres -i resource.rc -o resource.res

>>to get the .res file to include.

>>Some possibilities why it failed
>>- Are you using a NT based system. Some GNU utils are known to fail on
>>that. - Do you have some other directory with a different windres in you
>>path before
>> the FPC dir?

> I tried the same too and got "...The program encountered an invalid page
> exeption. Fault location 0028:0009." and my computer hangs.
> After I pressed Ctrl+Alt+Del I found that Winoldap(?) not responding and
> after I killed it all returned back.
> I used windres.exe from FP distribution on Win98SE comp. I didn't found
> more windres.exe on my HD.

Hmm, that is odd. Afaik I use the same version, also on win98se. Virus maybe?

Another thing you could try is to download a newer version of the GNU tools
we use for FPC. A link to download them is on the FPC website, more
information section, subpage "FAQ", last item.



Thu, 01 Apr 2004 03:16:14 GMT  
 adding of icon in to exe file

Quote:

>Hmm, that is odd. Afaik I use the same version, also on win98se. Virus
>maybe?

>Another thing you could try is to download a newer version of the GNU
>tools we use for FPC. A link to download them is on the FPC website,
>more information section, subpage "FAQ", last item.

Marco,

Thanks for your help. I will try to move in this direction.

Andy



Thu, 01 Apr 2004 12:10:09 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Adding data files to EXE file - HELP!

2. .exe file with icon

3. Including icons in .EXE files

4. Multiple Icons in an EXE file

5. Adding word to EXE-file

6. add programm to beginning of a exe file.

7. Adding data files to EXE's

8. Add new title bar icon - how?

9. How do you add and ICON to the Status Bar - Win 1.5

10. TPW 1.5 - Adding an ICON to the TITLE WINDOW

11. TPW - Adding ICON to Window

12. Adding an ICON to the Status Bar in TPW 1.5

 

 
Powered by phpBB® Forum Software