friedgold
Group: Members
Posts: 122
Joined: Mar. 2005 |
|
Posted: July 12 2005,16:41 |
|
Ok, I've got it down to 19Mbs (Uncompressed) and I'm going to send the extension I've made onto kent. The .mozconfig I used in the end is as follows
Code Sample | # See http://www.mozilla.org/build/ for build instructions. #
# Options for 'configure' (same as command-line options).
# We're building firefox export MOZ_PHOENIX=1 mk_add_options MOZ_PHOENIX=1 ac_add_options --enable-application=browser
# Extensions ac_add_options --enable-extensions=cookie,xml-rpc,xmlextras,pref,universalchardet
# Use gtk1.2 toolkit ac_add_options --disable-toolkit-qt ac_add_options --disable-toolkit-xlib ac_add_options --enable-toolkit-gtk ac_add_options --disable-toolkit-gtk2 ac_add_options --enable-default-toolkit=gtk
# Use system libs ac_add_options --with-system-jpeg ac_add_options --with-system-zlib ac_add_options --with-system-png
# Disable ac_add_options --disable-mailnews ac_add_options --disable-composer ac_add_options --disable-irc ac_add_options --disable-calendar ac_add_options --disable-ldap ac_add_options --disable-gnomevfs ac_add_options --disable-gnomeui ac_add_options --disable-installer ac_add_options --disable-updater ac_add_options --disable-tests ac_add_options --disable-freetype2 ac_add_options --disable-xprint ac_add_options --disable-jsd ac_add_options --disable-oji ac_add_options --disable-accessibility ac_add_options --disable-svg ac_add_options --disable-mathml ac_add_options --disable-logging ac_add_options --disable-profilesharing
# Enable ac_add_options --enable-crypto ac_add_options --enable-single-profile
# Compile options ac_add_options --enable-optimize="-Os" ac_add_options --disable-debug ac_add_options --enable-strip |
I used the following script to strip out various bits when compiling firefox:
Code Sample | #!/bin/sh SUITEBUILDROOT=/usr/local/src/mozilla EXT_UP=TGZ PACKAGENAME=firefox export SUITEBUILDROOT,EXP_UP,PACKAGENAME
# compiling the build function compilebuild() { echo Compiling the build...
cd $SUITEBUILDROOT make -f client.mk build || exit }
# cleaning the build function cleanbuild() { echo Cleaning the build...
# Removing testfiles and other unneccessary files from build rm -rf $SUITEBUILDROOT/dist/bin/res/html rm -rf $SUITEBUILDROOT/dist/bin/res/rdf rm -rf $SUITEBUILDROOT/dist/bin/res/samples rm -rf $SUITEBUILDROOT/dist/bin/res/throbber rm -f $SUITEBUILDROOT/dist/bin/res/bloatcycle.html rm -f $SUITEBUILDROOT/dist/bin/res/ignore-test.xul rm -f $SUITEBUILDROOT/dist/bin/res/sample.unixpsfonts.properties rm -f $SUITEBUILDROOT/dist/bin/res/viewer.properties rm -f $SUITEBUILDROOT/dist/bin/bloaturls.txt rm -f $SUITEBUILDROOT/dist/bin/mangle rm -f $SUITEBUILDROOT/dist/bin/shlibsign rm -f $SUITEBUILDROOT/dist/bin/TestGtkEmbed rm -f $SUITEBUILDROOT/dist/bin/xpcshell rm -f $SUITEBUILDROOT/dist/bin/xpidl rm -f $SUITEBUILDROOT/dist/bin/xpt_link rm -f $SUITEBUILDROOT/dist/bin/xpt_dump
# Removing empty directories and unneccessary files from chrome rm -rf $SUITEBUILDROOT/dist/bin/chrome/classic rm -rf $SUITEBUILDROOT/dist/bin/chrome/comm rm -rf $SUITEBUILDROOT/dist/bin/chrome/embed-sample rm -rf $SUITEBUILDROOT/dist/bin/chrome/en-US rm -rf $SUITEBUILDROOT/dist/bin/chrome/modern rm -rf $SUITEBUILDROOT/dist/bin/chrome/pipnss rm -rf $SUITEBUILDROOT/dist/bin/chrome/pippki rm -rf $SUITEBUILDROOT/dist/bin/chrome/toolkit rm -f $SUITEBUILDROOT/dist/bin/chrome/chromelist.txt
# Removing some jar files from chrome cd $SUITEBUILDROOT/build/dist/bin/chrome rm -f embed-sample.jar sed --in-place --line-length=0 -e '/embed/d' installed-chrome.txt }
# making the package function makepackage() { echo Making the package...
# Making compressed package cd $SUITEBUILDROOT/xpinstall/packager make -C $SUITEBUILDROOT/xpinstall/packager MOZ_PKG_FORMAT=$EXT_UP PKG_BASENAME=$PACKAGENAME || exit }
compilebuild cleanbuild makepackage |
|