logo       

Re: PAR::Lipo?: msg#00010

lang.perl.par

Subject: Re: PAR::Lipo?

On Jun 8, 2006, at 11:15 PM, Chris Dolan wrote:

[snip]

I propose a "par_lipo" command that works analogously to Apple's "lipo". par_lipo accepts two PAR executables, one compiled for PPC and one for x86, and merges them into a single larger PAR executable. The steps involved would be:
* compare the embedded .zip containers file-by-file (including libperl)
- if the file is present in one PAR and missing in the other, die
- if the file is already Universal in either PAR, keep that one
- if the file is single-architecture binary, merge via Apple's "lipo" and reinsert
- if the file is not binary and is byte-wise different in the two PARs, die
- if the file is not binary and is the same in both PARs, keep it as-is
* create a "lipo"d header for the executable

[snip]

I have successfully implemented the first bullet above. However the second bullet has proved to be hard because the process by which parl creates a standalone executable is extremely complicated.

Is there documentation somewhere of what comprises the non-ZIP portion of a PAR standalone executable and/or a PAR standalone script? Most importantly: besides the ZIP portion, does the PAR exe ever access its data via file access or just via function calls (like the way it extracts libperl and par via the file2c.pl WRITE_load_me_X () macros)?

Is there a way to ask PAR to create an empty header with no ZIP section? If so, I think I could do that once for PPC and once for x86, then lipo them, then tack on the ZIP section.

Thanks in advance for any advice. If I can get this solved before YAPC::NA, I'll present the technique there.
Chris
--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf

Clotho Advanced Media, Inc. - Creators of MediaLandscape Software (http://www.media-landscape.com/) and partners in the revolutionary Croquet project (http://www.opencroquet.org/)





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise