Rixstep
 About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Home » Learning Curve » ACP Guru

Trimming the Fox

Well groomed pets make the environment happier.


Get It

Try It

Taking automatic updates with Firefox is OK but you've a lot you can clean out. Some of the cruft has to be there as the Mozzies don't know what box you're running but some of it shouldn't be there in the first place.

The following process will nearly halve the disk footprint and should take about 15 minutes.

  1. Drop Firefox.app on an Xscan window or its dock icon.
  2. Select all and drag it to an Xfind window. Export the results.
  3. Change your regex in Xscan to \.tif. Refresh.
  4. Drop the results on TIFFCompress.
  5. Change the regex to ^PkgInfo$ and refresh.
  6. Delete the results.
  7. Change the regex to ^classes\.nib$ and refresh. Remove all.
  8. Change the regex to ^designable\.nib$ and refresh. Remove all.
  9. Change the regex to ^info\.nib$ and refresh. Remove all.
  10. Change the regex to \.lproj$. Refresh. Remove languages you're not using.
  11. Change the regex to ^InfoPlist\.strings$, refresh, remove all.
  12. Drop each of the remaining lproj directories on Xfile or its icon. If you have only one language remaining then move its files a step higher into Resources and remove the empty directory.
  13. Start using lipo on the binaries. What you want is a script like this.
    /usr/bin/lipo $1 -thin $2 -output $1
    Where $1 is your target and $2 is your architecture. Currently there are two architectures used: i386 (Intel) and ppc (PowerPC). You pick the architecture you want to keep.
  14. Run the above script on these files: crashreporter, DefaultPlugin, firefox-bin, JavaEmbeddingPlugin, MRJPlugin, PrintPDE, updater, XUL.
  15. Open each icon in Icon Composer (from Apple's ADC tools). These images still contain 'beige box cruft' - images that can't be used on the platform anymore. Most of the time it's enough to open the files and then immediately save back again. Find the icons by using the regex \.icns$ in Xscan.
  16. Run the above script on all files with the extension dylib. Here's the full list of Firefox binaries.

Firefox.app/Contents/MacOS/components/libalerts_s.dylib
Firefox.app/Contents/MacOS/components/libbrowsercomps.dylib
Firefox.app/Contents/MacOS/components/libbrowserdirprovider.dylib
Firefox.app/Contents/MacOS/crashreporter.app/Contents/MacOS/crashreporter
Firefox.app/Contents/MacOS/firefox-bin
Firefox.app/Contents/MacOS/libfreebl3.dylib
Firefox.app/Contents/MacOS/libmozjs.dylib
Firefox.app/Contents/MacOS/libnspr4.dylib
Firefox.app/Contents/MacOS/libnss3.dylib
Firefox.app/Contents/MacOS/libnssckbi.dylib
Firefox.app/Contents/MacOS/libnssdbm3.dylib
Firefox.app/Contents/MacOS/libnssutil3.dylib
Firefox.app/Contents/MacOS/libplc4.dylib
Firefox.app/Contents/MacOS/libplds4.dylib
Firefox.app/Contents/MacOS/libsmime3.dylib
Firefox.app/Contents/MacOS/libsoftokn3.dylib
Firefox.app/Contents/MacOS/libsqlite3.dylib
Firefox.app/Contents/MacOS/libssl3.dylib
Firefox.app/Contents/MacOS/libxpcom.dylib
Firefox.app/Contents/MacOS/plugins/DefaultPlugin.plugin/Contents/MacOS/DefaultPlugin
Firefox.app/Contents/MacOS/plugins/JavaEmbeddingPlugin.bundle/Contents/MacOS/JavaEmbeddingPlugin
Firefox.app/Contents/MacOS/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin
Firefox.app/Contents/MacOS/updater.app/Contents/MacOS/updater
Firefox.app/Contents/MacOS/XUL
Firefox.app/Contents/Plug-Ins/PrintPDE.plugin/Contents/MacOS/PrintPDE

Go to a command line and navigate to the Firefox.app directory. Save your lipo script. Call it 'mylipo' for example. Make sure the file's executable. Then implement it like this.

$ find . -name '*\.lproj' -type d -exec <path-to-mylipo> {} <arch> \;

Where <arch> is your native architecture, either i386 or ppc as discussed above.

  1. Drop Firefox.app on an Xscan window again.
  2. Select all and drag it to an Xfind window. Export the results.
  3. Compare with your first export.

461 items, 51170376 bytes, 100848 blocks, 14752 bytes in extended attributes.
448 items, 29436815 bytes, 59416 blocks, 0 bytes in extended attributes.
About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Copyright © Rixstep. All rights reserved.