Stripping certain binaries out of a UB to save space?

Posted:
in Mac Software edited January 2014
Hey, I don't have an Intel Mac yet but I know that when I do, I'll want to kill the PPC binaries of my Universal apps if it'll help me save space. If localization files took up nearly a gig of space, how much space do the PPC binaries of all the default applications?



Do the default-installed apps like Mail and Safari have PPC binaries, out of the box on an Intel machine? How much space do they take up? And is there an app that you can use to easily strip all non-Intel binaries out?

Comments

  • Reply 1 of 12
    meelashmeelash Posts: 1,045member
    hmmm... excellent question. I'd like to know the answer as well. I was of the impression that Universal Binary meant only one kind of binary that could run on both types of machines rather than two different kinds of binaries packaged together. Or maybe that's completely ridiculous because I really don't have a clue about it .



    Any developers/other experts who could comment on this.
  • Reply 2 of 12
    kickahakickaha Posts: 8,760member
    If you're comfortable with the Terminal, the tool 'lipo' is what you want.



    The name comes from the fact that, under NeXT, Universal Binaries were known as Fat Binaries.
  • Reply 3 of 12
    placeboplacebo Posts: 5,767member
    So UBs are just Fats? That's beautiful, I didn't know Apple used standard Fat Binaries for Universal apps.
  • Reply 4 of 12
    kickahakickaha Posts: 8,760member
    There are some differences, but the basic idea is still the same.
  • Reply 5 of 12
    rraburrabu Posts: 264member
    One little app that I had showed no difference in size at all when compiling just for PPC versus compiling as UB. That was a while ago though before the finder showed if an app was UB or not. I wonder if it may have been a bug with Xcode as it didn't make much sense to me. I'd have to check again with current versions...
  • Reply 6 of 12
    MarvinMarvin Posts: 15,323moderator
    Quote:
    Originally Posted by Placebo


    So UBs are just Fats? That's beautiful, I didn't know Apple used standard Fat Binaries for Universal apps.



    Fat is just a horrible name so they like to call it something nicer .



    Quote:
    Originally Posted by rrabu


    One little app that I had showed no difference in size at all when compiling just for PPC versus compiling as UB.



    Most of the time you probably won't see a difference. Most of the space that apps take up is in the resources such as idvd themes etc. Those are cross platform anyway. All that you need two versions of generally are the bits inside the application package in the Contents/MacOS folder. For lots of apps, that program will be a few hundred kb - idvd is about 3.5MB.



    Of course if you have linked libraries then they need to be have two versions too. You will usually find that in high end apps like Maya.
  • Reply 7 of 12
    I don't know if it is really worth all the effort to strip out the binaries for other platforms. In the end I think it will only save you a couple hundred MB or less. The Binary part of an application is typically pretty small, only being several MBs to a couple 10's of MBs. It's all the resources an app uses that cause it to take up so much space.
  • Reply 8 of 12
    1337_5l4xx0r1337_5l4xx0r Posts: 1,558member
    To answer the thread's question, Monolingual is what you want. It also removes localizations and international keyboard inputs. http://monolingual.sourceforge.net/
  • Reply 9 of 12
    MarvinMarvin Posts: 15,323moderator
    Quote:
    Originally Posted by 1337_5L4Xx0R


    To answer the thread's question, Monolingual is what you want. It also removes localizations and international keyboard inputs. http://monolingual.sourceforge.net/



    That's for removing localizations, the OP wanted an app to remove the ppc binaries from universal apps. They are totally different things. Nonetheless, monolingual should remove a lot of unnecessary stuff and will likely free up more than removing ppc binaries would (around 1-2 GB if I recall).
  • Reply 10 of 12
    chuckerchucker Posts: 5,089member
    It does both.
  • Reply 11 of 12
    placeboplacebo Posts: 5,767member
    Wow, that's exactly what I wanted. Thanks.
  • Reply 12 of 12
    1337_5l4xx0r1337_5l4xx0r Posts: 1,558member
    Monolingual is great... I've used it many times and it saves GBs of space by stripping out unwanted binaries and localizations. I run it every now and then. It's also Growl-aware so you can run it in the background while surfing the web and Growl lets you know when it is done.
Sign In or Register to comment.