Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

How to change the windows icon of a script compiled with PP ?

by ZlR (Chaplain)
on Feb 18, 2010 at 16:26 UTC ( #823968=perlquestion: print w/replies, xml ) Need Help??

ZlR has asked for the wisdom of the Perl Monks concerning the following question:

The FAQ of PAR FAQ states:
There is a switch that only works on windows, --icon MyIcon.ico. So just use this:
% pp --icon "c:\path to\MyIcon.ico" -o file.exe
And the PAR::Packer FAQ states:
Unlike Perl2EXE, which can use a standard 16-color bitmap as an application icon, PAR requires a true Windows icon file. Download a trial version of Microangelo and use that to create your .ico file. The latest Netpbm tools at has ppmtowinicon, which can take a pbm and convert it to a windows icon. It is open source and has win32 ports. Gimp for Windows can also create Windows icon files
But what is the exact .ico format needed to make it work ?

Originally posted as a Categorized Question.

Replies are listed 'Best First'.
Re: How to change the windows icon of a script compiled with PP ?
by ZlR (Chaplain) on Feb 18, 2010 at 16:34 UTC
    I've been looking for a way to change the camel icon from pp exe files , and after trying different things i made it work with freeware IcoFX 1.6 by creating a windows icon file with the following icon components :

    - XP Colors - 32x32, 32 bits - 16x16, 32 bits

    It may be trivial but all other settings i tried failed and that specific info wasn't available anywhere. HTH ;)

Re: How to change the windows icon of a script compiled with PP ?
by jellisii2 (Hermit) on Mar 10, 2011 at 22:12 UTC
    Using GIMP 2.6.11 on windows, I was able to get pp to recognize and use an icon using the following settings:

    48x48 canvas size image. I just saved a single image instead of the multilayer image for all the different sizes.

    Save as .ico

    8 bpp, 1-bit alpha, 256-slot Palette, no PNG compression.

    Doesn't quite blend in on windows 7, but at least it's not the camel. PP needs an update to take advantage of the current .ico format, but I'm 99% certain I don't have the chops to do it.

      As an ALTERNATIVE to the above, you CAN use a multilayer icon with the following layer geometery:




      You still have to use 8 bpp, 1-bit alpha, 256-slot Palette, no PNG compression, and it has to be set on all layers.

      I have since started to go this route, as Windows 2008 server doesn't respect the single 48x48 icon. I can't speak as to why you can't use a 48x48 in the stack, but a multilayer icon with a 48x48 layer doesn't display on Win7 if you do so. This appears to work as expected on both Win7 and 2008 server.

Re: How to change the windows icon of a script compiled with PP ?
by orange (Beadle) on Feb 19, 2010 at 07:51 UTC
    thank you ZIR for refering to the freeware IcoFX , it is unbelievable in its wealth and features

    Originally posted as a Categorized Answer.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://823968]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2022-06-30 06:30 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (97 votes). Check out past polls.