MacDonald, Stuart píše v Út 03. 05. 2011 v 10:28 -0400: > I've gotten PyInstaller-1.5-rc2 working with Python 2.6.6 under > Windows XP, and the resulting .exe is all sorts of good. PyInstaller > is awesome. Thanks. > > What I'd like to do now is have PyInstaller automatically build into > the .exe the SVN revision numbers of the original Python script and > its module dependencies. It looks like I could do this with > --version=file but a) I need ideas on what to use GrabVersion.py on to > get a starting point, or, what to look for when searching for > something (maybe it's the extra info that appears on the properties > tab?) and
It should be the extra info that appears on the properties tab. You need to look for Portable Executable format: http://en.wikipedia.org/wiki/Portable_Executable > b) after reading through the SVN trunk documentation it's > not clear to me how to alter PyInstaller's behaviour to run an > arbitrary script or extend the anaylsis to get the revision numbers; > ideally I'd like to be able to put something into the spec file to > accomplish this. > > I'm relatively new to Python but wasn't able to find anyone else doing > this with a fairly solid amount of googling. > > I appreciate any pointers and/or help. > > ...Stu I personally didn't use the GrabVersion.py and option --version=file yet. So I'm not sure if it still works. For resolving DLL dependencies on windows we use the python library pefile. This library can read and write info included in .exe files. http://code.google.com/p/pefile/ If the current code in GrabVersion.py does not work, the pefile library could be used for what you need. Perhaps grabversion.py and some other places in pyinst. code could be simplified to use pefile library. -- 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.
