Icons in the packpanda installer

Greetings everyone!

We’re in the final steps of preparing a project for public consumption, and I’m feeling my way around packpanda. Which, by the way, is awesome; extra bonus points for the system automatically and transparently picking up all the non-Panda Python libraries we depend upon, without further intervention from me!

I’m having a bit of difficulty with the “custom icon” feature of the packpanda tool. I noticed the tool can pull in an icon file, and I assume this allows me to create a custom icon for my game in the “Start” menu. I attempted to supply it with a properly-formatted .ico file at the location it searches (ProjectName/ProjectName.ico). The packpanda program reports that it finds the icon, but the icon doesn’t show up as the program’s icon when I use the installer; I still get the standard “panda-head” icon in the Start menu.

Am I understanding the custom icon feature correctly? If not, is there another way to cause packpanda to create an installer that will add a custom icon image for my program in the Start menu?

Thank you for the help!
-Mark

Well, well. Looking at the code, it appears I never implemented the icon feature. Isn’t that embarassing.

So I guess I need to do that ASAP, and I need to also give you a temporary workaround. Have you ever built your own copy of panda? It’s actually not very hard. If you download the source code, and type

makepanda\makepanda --everything --installer

It should do the whole thing - it even makes a panda installer for you, just like the one you find on the website. So anyhow, before you compile, look in panda/src/configfiles/pandaIcon.ico. Replace that icon. It’s not ideal, but it’ll get the job done until I figure out a more long-term solution.

Nah, forget that idea. Here’s a better way. Look for a file called “packpanda.nsi”. Search for this line of code:

CreateShortCut “SMPROGRAMS\${SMDIRECTORY}\Play {NAME}.lnk” “INSTDIR\bin\ppython.exe" "{PPMAIN}” “INSTDIR\bin\ppython.exe" 0 SW_SHOWMINIMIZED "" "Play {NAME}”

Change it to this:

CreateShortCut “SMPROGRAMS\${SMDIRECTORY}\Play {NAME}.lnk” “INSTDIR\bin\ppython.exe" "{PPMAIN}” “INSTDIR\game\icon.ico" 0 SW_SHOWMINIMIZED "" "Play {NAME}”

That should do it.

Oops, those instructions are for panda 1.2.0 (in panda 1.2.0, I simplified packpanda’s behavior a little bit). For panda 1.0.5, the program’s icon doesn’t get copied into game\icon.ico, though. It’s somewhere else. See if you can figure out where it gets copied to, then put that path into packpanda.nsi.

  • Josh

That’s got it :exclamation:

Here’s the corrected line in the NSI file you referenced. Thank you so much for the help on this one. Of all the installer-generation systems I’ve used, packpanda is the easiest one; now that we’ve got custom icons working, it’s absolutely perfect for our needs.

CreateShortCut "$SMPROGRAMS\${SMDIRECTORY}\Play ${NAME}.lnk" "$INSTDIR\bin\ppython.exe" "${PPMAIN}" "$INSTDIR\game\${NAME}.ico" 0 SW_SHOWMINIMIZED "" "Play ${NAME}"

Take care,
Mark

(note: iconic exclamation points reserved exclusively for maximally positive emphasis. Accept no substitutes)