I'm a bundling fool

Posted by Orville Bennett on 28 May 2008
Read time: about 4 minutes

Two hundred and seventeen point one megabytes. This is the current size of an amarok.app bundle which I have laying in my ~/Applications directory. Problem? First of all, it's about one hundred and seventeen point two megabytes too large for my liking. Secondly, it doesn't work. Point number two is the most vexing but I'll touch on point number one first. "Hey illogic-al," you may ask, "why 99.9 MB?" I'll tell you why.

iTunes weighs in at one hundred and thirty six point nine megabytes on leopard. Thirty seven point two of which is due to translations. So that means the iTunes bundle weighs in on the heavy side of 90 MB. My "dream weight" for Amarok's bundle is, accordingly, in this same range. Most people will never go into the Application bundle and do things like remove translations to save space though. Hell I know how and I haven't even bothered. Space is cheap. In reality this means that we're "competing" against iTunes, sizewize, to the tune of 137 MB. That's the upper limit of what I'd like the size of the Amarok bundle to be.

After removing Qt's debug frameworks from the bundle we get back 49 MB of space. That gets us to 168 MB. That puts us 31 MB away from the magic number. Currently I compile libraries with full debugging information included in the binaries. I've also thrown all of kdebase's icons directory in there because I was lazy. Some things we definitely don't need though. The oxygen/scalable directory can probably go. That would save us 37 MB. I'm thinking oxygen/128x128 can go too. Another 6.9 MB. Let's say compiling release binaries saves us 4.1 MB. In total that's 48 MB less. Oh wow. Lookit that, 120 MB. We hit the minimum weight and are fast approaching the magic number. Not bad for something containing libraries from kdelibs, kdebase, strigi, Qt 4.4 Frameworks, artwork from kdebase and the libraries of other dependencies. Something still wrong though.

The bundle doesn't work. The closest I've gotten is a crash happy bundle whenever i try to play audio, or a bundle missing gui elements when I just launch the app. I've been at it for about a week and a half now. A dialog box keeps popping up and whines about kio_file.

![kioslave error message in amarok os x bundle]

I've included all the libraries and executables I know or think might be related to kioslaves and their loading, but still no joy. I think the audio playback crashes might be related to the kioslaves not loading. After all, how are we going to access the file system or web without kio_file or kio_http, respectively? I also believe that the bundle has begun communicating with me. I can't fully understand what is being said, but I do get the basic gist of the communiqué: Screw you. In commemoration of this joyous occasion I've created a slogan: Am stuck. Will cry for help.

But wait! There's more! Oh yes, there's always more. Amarok will need to provide, outside of the bundle, at least one external program: dbus. Two, if someone doesn't get the qt7 phonon backend to not crash, because then we'll need to provide a xine installation as well. Which will end up bumping the size of our .dmg: amarok.app + dbus.pkg + libxine.pkg. Actually, three depending on the results of that shared-mime-info experiment. Feh.

We're nearly there though, we're nearly there. If nothing else I'm stubborn enough to not give up until it works, and annoying enough to keep bugging people until I get the answers I'm looking for. I predict a disturbance in the force of #kde-devel soon.

![screenshot of amarok being run from bundle]

The story so far...