Am Donnerstag 29 April 2010 04:08:21 schrieb Peter Scheie: > Ah, clever idea! So, I tried that: I found two icon files in > c:\pyinstaller\source\windows\, iconw.ico and icon1.ico. I renamed those > and then dropped in two copies of my icon and gave the the names iconw.ico > and icon1.ico; then I rebuild my executable...and it still came out with > the pyinstaller icon. I don't know how that's possible since I change the > names of the original icon files. And those were the only icon files I > found in c:\pyinstaller. I even tried copying in Sebastion's icon into > c:\pyinstaller\source\windows\, naming the files iconw.ico and icon1.ico > again; and again, when I run Build.py, I get the default pyinstaller icon. > I tried it with an icon file specified in my spec file and with no icon > specified in the spec file; same result. Since I renamed the original icon > files, where is pyinstaller getting the icon from?
Just guessing but pyinstaller might be getting the icon from inline python. We used to do that for GNUmed. There is a feature called py2ico or the other way around where it would produce python code from an icon and one can use that in python code. I guess the next step i would do is to have a look at the code of pyinstaller , try to identify where it does its icon magic. I am a beginner at python but http://www.pyinstaller.org/browser/trunk/Build.py has class EXE(Target): 627 typ = 'EXECUTABLE' 628 exclude_binaries = 0 629 append_pkg = 1 630 def __init__(self, *args, **kws): 631 Target.__init__(self) 632 self.console = kws.get('console',1) 633 self.debug = kws.get('debug',0) 634 self.name = kws.get('name',None) 635 self.icon = kws.get('icon',None) I would throw in a print self.icon there to see what that yields. If it is None then something is borked. then there is def check_guts(self, last_build): 677 if not os.path.exists(self.name): 678 print "rebuilding %s because %s missing" % (self.outnm, os.path.basename(self.name)) 679 return 1 680 if not self.append_pkg and not os.path.exists(self.pkgname): 681 print "rebuilding because %s missing" % ( 682 os.path.basename(self.pkgname),) 683 return 1 684 685 data = Target.get_guts(self, last_build) 686 if not data: 687 return True 688 689 icon, versrsrc = data[3:5] 690 if (icon or versrsrc) and not config['hasRsrcUpdate']: 691 # todo: really ignore :-) 692 print "ignoring icon and version resources = platform not capable" One could have a look at the value of icon there Here it gets interesting: def assemble(self): 723 print "building EXE from", os.path.basename(self.out) 724 trash = [] 725 if not os.path.exists(os.path.dirname(self.name)): 726 os.makedirs(os.path.dirname(self.name)) 727 outf = open(self.name, 'wb') 728 exe = self._bootloader_postfix('support/loader/run') 729 exe = os.path.join(HOMEPATH, exe) 730 if target_iswin or cygwin: 731 exe = exe + '.exe' 732 if config['hasRsrcUpdate']: 733 if self.icon: 734 tmpnm = tempfile.mktemp() 735 shutil.copy2(exe, tmpnm) 736 os.chmod(tmpnm, 0755) 737 icon.CopyIcons(tmpnm, self.icon) 738 trash.append(tmpnm) 739 exe = tmpnm what is the value for self.icon ? Looks like there is a function called icon.CopyIcons which will make use of self.icon. 1139 if config['hasRsrcUpdate']: 1140 import icon, versionInfo I can only assume that this means icon.py from http://www.pyinstaller.org/browser/trunk/icon.py 133 def CopyIcons (dstpath, srcpath): 134 import os.path, string 135 136 if type(srcpath) in StringTypes: 137 srcpath = [ srcpath ] You could check for srcpath I guess to see where it tries to find the icon. But be aware that all I have written maybe utter crap and I guess Giovanni could shed some light on this :-) Sebastian > > Peter > > On Wed, Apr 28, 2010 at 7:18 AM, Sebastian Hilbert < > > [email protected]> wrote: > > Am Mittwoch 28 April 2010 14:10:44 schrieb Peter Scheie: > > > Sebastian graciously sent me his icon which I tried, but that doesn't > > > > work > > > > > either, I still get the default pyinstaller icon. Nuts. > > > > What happens if you delete the pyinstaller icon or replace it with your > > icon > > > > :-) > > > > Sebastian > > > > > Peter > > > > > > On Fri, Apr 23, 2010 at 1:19 PM, Peter Scheie <[email protected]> wrote: > > > > Yes, please send me your icon. I did try rebooting Windows to see if > > > > clearing the icon cache would help, but it did not. I haven't yet > > > > tried > > > > > > the other methods of clearning the cache. > > > > > > > > > > > > On Fri, Apr 23, 2010 at 1:18 AM, Sebastian Hilbert < > > > > > > > > [email protected]> wrote: > > > >> Am Donnerstag 22 April 2010 22:58:17 schrieb Peter Scheie: > > > >> > I took all the files of different resolutions--256, 128, 64, and > > > >> > 32 bit--and using the article at > > > > http://egressive.com/tutorial/creating-a-multi-resolution-favicon-includ > > > > > >> ing > > > >> > > > >> > -transparency-with-the-gimpas a guide, I also created a 48 and a > > > >> > 16 bit images, and then combined those > > > >> > all into an icon using GIMP, but I still get just the default icon > > > > on > > > > > >> > my executable. Noting that the article only mentions needing > > > >> > resolution of 128 bit and lower, I also tried throwing out the 256 > > > >> > bit image, but that didn't make any difference. I noticed that the > > > >> > 48bit & 16bit images, produced by scaling down the 256bit image, > > > >> > are also reduced to 4bpp, whereas the ones from Kolourpaint are > > > >> > 8bpp; might this mixing the resolutions make any difference? Is > > > >> > there any sort of debug I can turn > > > >> > > > >> on > > > >> > > > >> > during Build.py to see why it's not using the icon? > > > >> > > > >> Would it make sense to send you my icon to see it that works? If it > > > > does > > > > > >> the > > > >> problem is with your icon. If not ... > > > >> > > > >> Have you considered clearing the icon cache ? I am not sure it is > > > >> related but > > > >> ... > > > >> > > > >> http://smallvoid.com/article/windows-icon-cache.html > > > >> > > > >> > On Wed, Apr 21, 2010 at 8:54 PM, mac9416 > > > >> > <[email protected]> > > > >> > > > >> wrote: > > > >> > > Peter, I don't know if it makes any difference, but I made the > > > > icon > > > > > >> > > with GIMP instead of ImageMagik. Might be worth trying that. > > > >> > > Also, installing pywin32 was the only tweak I had to make to > > > >> > > make everything work. > > > >> > > > > > >> > > On Wed, Apr 21, 2010 at 8:46 AM, Peter Scheie > > > >> > > <[email protected]> > > > >> > > > >> wrote: > > > >> > > > I ran Build.py with the multi-resolution icon on my office > > > > system, > > > > > >> > > > where py32win was already installed. It builds, and does not > > > > give > > > > > >> me > > > >> > > > >> > > > the 'platform not capable' error that I get on my home > > > >> > > > machine, but it's > > > >> > > > > > >> > > still > > > >> > > > > > >> > > > not using the icon I've specified; I'm still getting the > > > >> > > > default > > > >> > > > > > >> > > pyinstaller > > > >> > > > > > >> > > > icon. Could it be that it doesn't like my icon? It's only > > > >> > > > two > > > >> > > > >> colors, > > > >> > > > >> > > > quite simple. In an earlier incarnation, it was saved in > > > >> > > > 24-bit > > > >> > > > >> color > > > >> > > > >> > > (and > > > >> > > > > > >> > > > it didn't work). I reduced it to 256 colors (since I'm only > > > > using > > > > > >> two) > > > >> > > > >> > > to > > > >> > > > > > >> > > > reduce the size, but that does not seem to make any > > > >> > > > difference. > > > >> > > > > > >> > > Presumably > > > >> > > > > > >> > > > the --icon option works under the right circumstances; anyone > > > > know > > > > > >> what > > > >> > > > >> > > > those would be? > > > >> > > > > > > >> > > > Peter > > > >> > > > > > > >> > > > On Mon, Apr 19, 2010 at 4:20 PM, Peter Scheie < > > > > [email protected]> > > > > > >> wrote: > > > >> > > >> Well, almost solved. pywin32 is installed. Now when I run > > > >> > > >> Build.py, > > > >> > > > >> I > > > >> > > > >> > > get > > > >> > > > > > >> > > >> "ignoring icon and version resources = platform not capable". > > > > I > > > > > >> > > >> googled > > > >> > > > > > >> > > for > > > >> > > > > > >> > > >> that error, but only found one mention, in which Giovanni > > > >> > > >> asked if > > > >> > > > >> the > > > >> > > > >> > > >> poster had pywin32 installed, and there was no reply. In my > > > >> > > >> case, yes, > > > >> > > > > > >> > > I do > > > >> > > > > > >> > > >> have pywin32 installed. What does this error mean? > > > >> > > >> > > > >> > > >> Peter > > > >> > > >> > > > >> > > >> On Sun, Apr 18, 2010 at 7:52 PM, Peter Scheie < > > > > [email protected]> > > > > > >> > > wrote: > > > >> > > >>> Problem solved! I hadn't installed Service Pack 2 on this > > > >> > > >>> VM. > > > >> > > > >> Once > > > >> > > > >> > > >>> I did, the pywin32 installer ran normally, no questions > > > >> > > >>> about > > > >> > > > >> which > > > >> > > > >> > > >>> ID to > > > >> > > > > > >> > > run > > > >> > > > > > >> > > >>> under, etc. Thanks for everyone's help. > > > >> > > >>> > > > >> > > >>> Peter > > > >> > > >>> > > > >> > > >>> On Fri, Apr 16, 2010 at 9:38 PM, Florian Höch < > > > >> > > > >> [email protected]> > > > >> > > > >> > > >>> wrote: > > > >> > > >>>> Hi, > > > >> > > >>>> > > > >> > > >>>> you can easily verify if your download is corrupt by > > > > comparing > > > > > >> the > > > >> > > > >> > > hash. > > > >> > > > > > >> > > >>>> A good copy should have: > > > >> > > >>>> > > > >> > > >>>> Filename: pywin32-214.win32-py2.5.exe > > > >> > > >>>> MD5 hash: 09EC5EF23D7A1BAD81B80CF6C00C12A3 > > > >> > > >>>> > > > >> > > >>>> HashTab ( http://beeblebrox.org/ ) might be handy for > > > > comparing > > > > > >> > > hashes > > > >> > > > > > >> > > >>>> from Windows Explorer. > > > >> > > >>>> > > > >> > > >>>> Am 17.04.2010 04:24, schrieb Peter Scheie: > > > >> > > >>>>> I've tried downloading pywin32 at least six times, > > > >> > > >>>>> including > > > >> > > > > > >> > > specifying > > > >> > > > > > >> > > >>>>> a mirror in Sweden and the US (Florida) but I always get > > > >> > > >>>>> the > > > >> > > > >> same > > > >> > > > >> > > >>>>> thing. Of course, it could be that I've always gotten > > > > broken > > > > > >> > > >>>>> copies, > > > >> > > > > > >> > > I > > > >> > > > > > >> > > >>>>> suppose. Do you know of a specific mirror that has a > > > >> > > >>>>> known good > > > >> > > > > > >> > > copy? > > > >> > > > > > >> > > >>>> -- > > > >> > > >>>> Florian Höch > > > >> > > >>>> > > > >> > > >>>> -- > > > >> > > >>>> You received this message because you are subscribed to the > > > >> > > > >> Google > > > >> > > > >> > > >>>> Groups "PyInstaller" group. > > > >> > > >>>> To post to this group, send email to > > > >> > > > >> [email protected]. > > > >> > > > >> > > >>>> To unsubscribe from this group, send email to > > > >> > > >>>> [email protected]<pyinstaller%2Bunsu > > > >> > > >>>> [email protected]> > > > > <pyinstaller%2Bunsubscr > > > > > >> > > >>>> [email protected]> > > > >> > > > >> <pyinstaller%2bunsubscr...@g > > > >> > > > >> > > >>>> ooglegroups.com> > > > >> > > > > > >> > > . > > > >> > > > > > >> > > >>>> For more options, visit this group at > > > >> > > >>>> http://groups.google.com/group/pyinstaller?hl=en. > > > >> > > > > > > >> > > > -- > > > >> > > > You received this message because you are subscribed to the > > > > Google > > > > > >> > > > Groups "PyInstaller" group. > > > >> > > > To post to this group, send email to > > > > [email protected]. > > > > > >> > > > To unsubscribe from this group, send email to > > > >> > > > [email protected]<pyinstaller%2Bunsubsc > > > >> > > > [email protected]> > > > > <pyinstaller%2Bunsubscribe > > > > > >> > > > @googlegroups.com> > > > >> > > > >> <pyinstaller%2bunsubscr...@goog > > > >> > > > >> > > > legroups.com> > > > >> > > > > > >> > > . > > > >> > > > > > >> > > > For more options, visit this group at > > > >> > > > http://groups.google.com/group/pyinstaller?hl=en. > > > >> > > > > > >> > > -- > > > >> > > You received this message because you are subscribed to the > > > >> > > Google > > > >> > > > >> Groups > > > >> > > > >> > > "PyInstaller" group. > > > >> > > To post to this group, send email to > > > >> > > [email protected] > > > > . > > > > > >> > > To unsubscribe from this group, send email to > > > >> > > [email protected]<pyinstaller%2Bunsubscri > > > >> > > [email protected]> > > > > <pyinstaller%2bunsubscr...@g > > > > > >> > > ooglegroups.com> > > > >> > > > >> <pyinstaller%2bunsubscr...@google > > > >> > > > >> > > groups.com> . > > > >> > > For more options, visit this group at > > > >> > > http://groups.google.com/group/pyinstaller?hl=en. > > > >> > > > >> -- > > > >> You received this message because you are subscribed to the Google > > > >> Groups "PyInstaller" group. > > > >> To post to this group, send email to [email protected]. > > > >> To unsubscribe from this group, send email to > > > >> [email protected]<pyinstaller%2bunsubscr...@g > > > >> ooglegroups.com> > > > > <pyinstaller%2bunsubscr...@googl > > > > > >> egroups.com> . > > > >> For more options, visit this group at > > > >> http://groups.google.com/group/pyinstaller?hl=en. > > > > -- > > You received this message because you are subscribed to the Google Groups > > "PyInstaller" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<pyinstaller%2bunsubscr...@google > > groups.com> . > > For more options, visit this group at > > http://groups.google.com/group/pyinstaller?hl=en. -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.
