I took a look at macholib just now, and it seems like it would be able to get us most of the way there, at least as far keeping the headers updated.
Here's a post on StackOverflow that describes embedding arbitrary data at link time: http://stackoverflow.com/questions/1604673/how-do-i-embed-data-into-a-mac-os-x-mach-o-binary-files-text-section?rq=1 Obviously, we don't want to force the user to rebuild the bootloader, but experimentation with the -sectcreate flag on ld should provide some illumination about how the data is supposed to be embedded in the executable. Jeff On Tuesday, December 11, 2012 11:37:08 AM UTC-7, Martin Z wrote: > Jeff Keacher píše v Út 11. 12. 2012 v 09:55 -0800: > > Now, pyinstaller does include the ability to look backwards from the > > end of the executable a little ways in an effort to find the magic > > number (a feature that was apparently added to support digital > > signatures on Windows), so a relatively small change might add support > > for sticking the archive further back in the executable. > > I'm going to work more on the bootloader code so this could be done as > part of that. > > > One possibility would be sticking the archive in a TEXT segment of the > > executable (caveat: I haven't investigated that thoroughly), but then > > the pyinstaller build script would need to be able to intelligently > > reconstruct the executable with a valid MachO structure, all without > > disrupting the pointers in the "load commands" section of the file. > > Do you think that library macholib would be able to do this 'intelligent > reconstructions'? > > We already use that library for some manipulation with MachO headers. > > > -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To view this discussion on the web visit https://groups.google.com/d/msg/pyinstaller/-/BFsZGqBz-rcJ. 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.
