Recent

Author Topic: Universal binaries  (Read 5723 times)

crorden

  • New Member
  • *
  • Posts: 36
Universal binaries
« on: June 07, 2008, 11:29:29 am »
I distribute my open source Lazarus project as a Carbon app-bundle (www.mricro.com/mricron/). I have created separate app bundles for PPC and Intel386. A user asked me if I can simply distribute a single universal binary for both CPUs. Is this possible, and if so, how do I do it...

Simon08

  • New member
  • *
  • Posts: 9
RE: Universal binaries
« Reply #1 on: June 07, 2008, 12:53:04 pm »
Yes, you can combine the two binaries into one universal binary by using the command line tool  lipo

Please refer to the man page for detailed info.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Universal binaries
« Reply #2 on: June 07, 2008, 05:07:58 pm »
Quote from: "crorden"
I distribute my open source Lazarus project as a Carbon app-bundle (www.mricro.com/mricron/). I have created separate app bundles for PPC and Intel386. A user asked me if I can simply distribute a single universal binary for both CPUs. Is this possible, and if so, how do I do it...


Don't forget that your PowerPC version will run fine on Intel Macs via Rosetta. Try it and see. That's all I distribute since my app is not processor-intensive (few desktop apps really are).

Thanks.

-Phil

crorden

  • New Member
  • *
  • Posts: 36
Thanks
« Reply #3 on: June 09, 2008, 04:15:16 pm »
This works nicely. I agree that rosetta is pretty fast, and often PPC code is sufficent, but my programs work with large 4D datasets (computing statistics for Gbs of data), so it is nicely to distribute native programs.  

For future users, this is how you would combine to applications called 'dcm2nii', one compiled for PPC (in the PPC folder) and one compiled for intel (in the intel folder) to create a universal binary.

lipo -create ./ppc/dcm2nii ./intel/dcm2nii -output ./dcm2nii

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: Thanks
« Reply #4 on: June 09, 2008, 06:01:50 pm »
Please write cool hints like this one to the Wiki instead:

http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips

The Wiki is a much better place to document what you find then the forum.

thanks,

 

TinyPortal © 2005-2018