Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Firefox 1.0.4 + GTK1.2, keeping it small< Next Oldest | Next Newest >
friedgold Offline





Group: Members
Posts: 122
Joined: Mar. 2005
Posted: July 07 2005,03:16 QUOTE

I've been trying to compile the latest firefox release against the gtk1.2 library. This way it can be run without downloading the gtk2 extension. I was hoping to keep the size to a minimum in the same way the version currently included with DSL is. I'd like to make a DSL extension when I'm finished, or maybe if I get it small enough it might even be considered for future versions of DSL.

The /usr/local/firefox directory takes up 17Mb (uncompressed) in the current DSL so thats what I'm aiming at. The version I compiled weighs in at 27Mb. I was hoping that whoever was responsible for the Firefox in DSL might have some suggestions.

The .mozconifg file I'm using is as follows

Code Sample
#
# See http://www.mozilla.org/build/ for build instructions.
#

. $topsrcdir/browser/config/mozconfig

# Options for 'configure' (same as command-line options).
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
ac_add_options --enable-application=browser
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-mathml
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-strip
ac_add_options --prefix=/usr/local


There plenty of compile options (see here for more details) its hard to find documentation the effects of some. I think I'm probably just gonna have to experiment to see what size effect they have
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: July 07 2005,21:24 QUOTE

John would be the one to answer this. It was his efforts that we have such a damnsmall version of FF.
Back to top
Profile PM WEB 
friedgold Offline





Group: Members
Posts: 122
Joined: Mar. 2005
Posted: July 07 2005,21:47 QUOTE

Quote (roberts @ July 07 2005,17:24)
John would be the one to answer this. It was his efforts that we have such a damnsmall version of FF.

I'm starting to realise what a hard job that must of been. I've got the size down further to 23Mbs but I think I've probably exhausted what can be done using ./configure options and need to start pruning files manually.
Back to top
Profile PM 
friedgold Offline





Group: Members
Posts: 122
Joined: Mar. 2005
Posted: July 12 2005,16:41 QUOTE

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
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: July 13 2005,03:36 QUOTE

Nice job with the documented recompile process.

This should make it possible to quickly recompile GTK1.2 firefox whenever a small, incremental (1.0.x) security fix is made.

Now if John could provide the missing piece of the puzzle (how to get rid of that extra 2MB), then so much the better. I am sure that some of the extra space is taken up by new code that has been introduced between versions 0.9.1 and 1.0.4 but not all of it.

In the meantime, having a small Firefox1.0.4.uci extension without the GTK2 dependencies is a nice option to have.
Back to top
Profile PM 
5 replies since July 07 2005,03:16 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Firefox 1.0.4 + GTK1.2

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code