Simple script to build phoenix with XFT for newbies.

Discussion about official Mozilla Firefox builds
Posts: 7
Joined: December 11th, 2002, 12:36 pm

Post Posted December 15th, 2002, 8:38 pm

Here's a simple script to compile phoenix with XFT and generate a tar.bz2 of the phoenix directory. This works on a redhat 8 system unless I messed something up in the pasting. ;)
---------cut here---------
cd /root # change to whatever dir you want to use.
mkdir phoenix-source # Comment this line out with pound sign after first run
cd phoenix-source
rm -rf mozilla*
wget ... ce.tar.bz2
tar xvjf ./mozilla-source.tar.bz2
cvs -d checkout mozilla/browser mozilla/toolkit
cp .mozconfig mozilla #see the sample .mozconfig below and save it to /root/phoenix-source
cd mozilla && gmake -f build
cd xpinstall/packager
make MOZ_PKG_APPNAME=phoenix MOZILLA_BIN="\$(DIST)/bin/phoenix-bin"

Sample mozconfig
export MOZ_PHOENIX=1
mk_add_options MOZ_PHOENIX=1
ac_add_options --enable-crypto
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-mailnews
ac_add_options --disable-composer
ac_add_options --enable-strip
ac_add_options --enable-strip-libs
ac_add_options --enable-optimize="-O2"
ac_add_options --enable-xft

Posts: 56
Joined: December 7th, 2002, 8:26 pm

Post Posted December 15th, 2002, 11:32 pm

Thanks very much for taking the time to put that together. As a first time builder, I ran the commands independently, rather than as a script, and it worked! Well, sort of. :)
I ended up with a sort of hybrid Mozilla/Phoenix that apparently has either no user agent string, and/or has some problem with cookies. It also has the Mozilla style sidebar with tabs. I'm not sure . . but I'm still pretty darn excited that it got *this* far. :)


User avatar
Posts: 33
Joined: November 25th, 2002, 1:33 am
Location: Palo Alto, CA

Post Posted December 16th, 2002, 1:38 pm

watch it, gmake == make on Linux... ;)
<mspencer> Hitler used an aimbot.


User avatar
Posts: 88
Joined: November 12th, 2002, 1:42 pm

Post Posted December 17th, 2002, 10:24 am

This is what I use - a little more complex!
Code: Select all

for arg
   case "$arg" in
   '--usage' | '-?')
      echo "Usage: $0 [[--restart | -r] [--clean | -c] [--tarball | -t]] | [--help | -? | --usage]"
      echo "
Phoenix (Mozilla) build script -
Expects /usr/src/mozilla to exist and be writeable by user.
Uses /usr/src/mozilla/mozilla as root of build
Expects the following to exist inside /usr/src/mozilla:
   phoenix_xft.mozconfig - .mozconfig file
   extras - folder, will be copied onto program folder for plugins etc
   xpi - folder, all .xpi files (extensions etc) therein will be
   installed after build
What it does:
   If -r specified, gets source from ftp
   Updates source tree from cvs
   If -c specified, makes clean
   Builds Phoenix, generates tarball
   Creates folder named in YYYYMMDDHH format (e.g. 2002121609)
   Copies tarball to said folder, unpacks it
   Symlinks /usr/src/mozilla/latest-build to said folder, renaming the
   latest-build symlink to latest-good
   Installs extras, runs Phoenix to install xpis
If you like dogfood, I recommend you use /usr/src/mozilla/latest-build/phoenix/
as your day-to-day browser; if you encounter a bad build simply use
   $ mv -f latest-good latest-build
Note that you are expected to maintain /usr/src/mozilla yourself; if you
crontab this script it will grow at 75MB a day, so clear out old builds
      echo "Option '$arg' not recognised."
      echo "Run $0 --usage for usage."
      if echo "$arg" | grep 'r' > /dev/null; then
      if echo "$arg" | grep 'c' > /dev/null; then
      if ! echo "$arg" | grep -x '\-[rc]*' > /dev/null; then
         for option in `echo "$arg" | grep -o '[^-rc]'`; do
            echo "Option '-$option' not recognised."
         echo "Run $0 --usage for usage."
      echo "Argument '$arg' not recognised."
      echo "Run $0 --usage for usage."

if ps -A | grep phoenix-bin; then
   echo "Phoenix is running; cannot continue."

cd /usr/src/mozilla

# Re-get source tarball if wanted
if [ -n "$restart" ] || [ ! -d mozilla ]; then
   echo "Destroying current tree..."
   rm -f mozilla-source.tar.bz2
   rm -f -r mozilla
   tar xvjf ./mozilla-source.tar.bz2

# If specified, make clean
if [ -n "$clean" ]; then
   cd mozilla
   make clean
   cd ..

# Get files via cvs
cvs -d checkout -A mozilla/browser mozilla/toolkit

# Record date in 2002121409 form (I do this *after* cvs checkout; is this correct?)
let "builddate = `date +%Y%m%d%H`"

# Copy in the .mozconfig for the phoenix xft build
cp phoenix_xft.mozconfig mozilla/.mozconfig

# Build it
cd mozilla
gmake -f build

# Generate tarball (dist/phoenix-i686-pc-linux-gnu.tar.gz)
cd xpinstall/packager
make MOZ_PKG_APPNAME=phoenix MOZILLA_BIN="\$(DIST)/bin/phoenix-bin"

# make builddate directory
cd /usr/src/mozilla
mkdir $builddate
cd $builddate

# copy in tarball
cp ../mozilla/dist/phoenix-i686-pc-linux-gnu.tar.gz .

# unpack tarball to builddate/phoenix
tar -xvzf phoenix-i686-pc-linux-gnu.tar.gz

# update latest-build and latest-good symlinks
cd ..
mv -f latest-build latest-good
ln -s $builddate latest-build

# Copy in all plugins etcetera
cp -dr extras/* latest-build/phoenix/

# Run all XPIs (install extensions, global XPI themes)
./latest-build/phoenix/phoenix &
sleep 5
for xpi in xpi/*.xpi; do
   ./latest-build/phoenix/phoenix -remote "openURL (file:///usr/src/mozilla/$xpi)"

Posts: 56
Joined: December 7th, 2002, 8:26 pm

Post Posted December 17th, 2002, 4:05 pm

Bingo! As they say, "You Da Man"! Didn't modify a thing with respect to the script, created the required paths/directories, and 70 minutes later, this post comes from the resulting build! Nice! Thanks very much. BTW, I assume the time it takes to build varies from a few minutes to days, but I'm running an Athlon XP1600 w/1.5GB RAM. Any gut feel as to whether that time is about "normal"?

Return to Firefox Builds

Who is online

Users browsing this forum: No registered users and 1 guest