Mozilla Firebird Build Instructions

Discuss building things with or for the Mozilla Platform.
Post Reply
User avatar
nilson
Posts: 4100
Joined: February 15th, 2003, 11:55 pm
Location: Tuscaloosa, Alabama
Contact:

Mozilla Firebird Build Instructions

Post by nilson »

These instructions assume that you have already followed the steps mentioned on http://www.gemal.dk/mozilla/build.html.

To get a successsful build, follow these instructions carefully.

The next time you build, do this:

Open your .mozconfig file with a text editor. You will need to replace the one that you got from Gemal's site with this:

Code: Select all

CC=gcc
CXX=g++
CPP=cpp
AS=as
LD=ld
LDFLAGS=-mwindows
ac_add_options --disable-accessibility
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --disable-composer
ac_add_options --disable-debug
ac_add_options --disable-ldap
ac_add_options --disable-mailnews
ac_add_options --disable-tests
ac_add_options --enable-crypto
ac_add_options --enable-strip
ac_add_options --enable-extensions=default,-inspector,-irc,-venkman,-content-packs,-help,-wallet
export MOZ_PHOENIX=1
mk_add_options MOZ_PHOENIX=1


(Without preceeding spaces)

Now save the file.

Start your Windows Command Prompt (not Cygwin Bash Shell)

And do this:

Code: Select all

cd D:\mozilla
mozset.bat
cd \mozilla
make clean


This will clean out all the files from the old build, but will not delete your source, so don't worry.

After this process finishes, do not close the command window.
You are next going to type this:

Code: Select all

make -f client.mk



This will update your source tree to the latest version, and proceed to build.

After this finishes, open the Cygwin bash shell (Find it in Start > Program Files [All Programs if on Windows XP] > Cygwin).
Type in the following:

Code: Select all

cd D:/mozilla/mozilla/xpinstall/packager
make MOZ_PKG_APPNAME=MozillaFirebird MOZILLA_BIN="\$(DIST)/bin/MozillaFirebird"


What this will do is take the compiled files from D:\mozilla\mozilla\dist\bin\ and put them in a nice .zip file for you. This file will be located in D:\mozilla\mozilla\dist\.
It will also create another .zip file, located in the same place as the other, containing the GRE which you have just compiled.


I have made a batch file for the automatic building and packaging of Mozilla Firebird on Windows XP. This should work for Windows 2000, and probably Windows 95/98/ME, as well. This batch file has these requirments: 7-zip (http://www.7-zip.org), and assumes that you have set the "short-date format" to "yyyy-mm-dd" in the Control Panel, under date and time, but this is not required. It also assumes that the file that sets youe build environment variables is called mozset.bat, and is located in the directory that the script is run from (usually D:\mozilla or C:\mozilla). To get the script to output .zip files, instead of .7z files, change -t7z to -tzip, and replace the .7z extension on the filenames with .zip.

Code: Select all

call mozset.bat
cd .\mozilla
make clean
make -f client.mk
unix2dos D:\mozilla\mozilla\dist\bin\defaults\pref\*.js
cd .\dist
mkdir MozillaFirebird
move D:\mozilla\mozilla\dist\bin D:\mozilla\mozilla\dist\MozillaFirebird
copy /A D:\mozilla\mozilla\.mozconfig D:\mozilla\mozilla\dist\MozillaFirebird
cd .\MozillaFirebird
"C:\Program Files\7-zip\7z" a -r -t7z MozillaFirebird-i686-pc-cygwin-%date%.7z *
move MozillaFirebird-i686-pc-cygwin-%date%.7z D:\nilson\buildarchive
cd ..\
move MozillaFirebird\bin .\
del MozillaFirebird
cd ..\..\


(You'll need to replace "C:\Program Files\7-zip\7z" with the path to 7-zip's 7z.exe file, and replace the directory names with ones that fit your setup.)

(For all instructions, replace D:\ with the drive that you have the mozilla source on.)
Also, make sure that you read Gemal's entire page and check that all of your build programs are configured correctly.

If you want to build Mozilla or Mozilla Thunderbird, the only thing you'll have to do is change your .mozconfig file. If you are using my batch file, you'll also want to chage thr filename of the archive file created. You should not have to redownload anything.

This is a revision/expansion of an earlier set of instructions by me.
Last edited by nilson on August 13th, 2003, 3:28 pm, edited 1 time in total.
User avatar
willll
Posts: 2577
Joined: November 30th, 2002, 11:39 am
Location: Washington, DC

Re: Mozilla Firebird Build Instructions

Post by willll »

nilson wrote:

Code: Select all

CC=gcc
CXX=g++
CPP=cpp
AS=as
LD=ld
LDFLAGS=-mwindows
ac_add_options --disable-accessibility
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --disable-composer
ac_add_options --disable-debug
ac_add_options --disable-ldap
ac_add_options --disable-mailnews
ac_add_options --disable-tests
ac_add_options --enable-crypto
ac_add_options --enable-strip
ac_add_options --enable-strip-libs
ac_add_options --enable-extensions=default,-inspector,-irc,-venkman,-content-packs,-help
ac_add_options --enable-plaintext-editor-only
ac_add_options --enable-image-decoders=icon,png,gif,jpeg
export MOZ_PHOENIX=1
mk_add_options MOZ_PHOENIX=1
erm.
i do believe that --enable-strip-libs is not neccessary
i also believe that you should be building without this line "ac_add_options --enable-plaintext-editor-only"
i also believe that you should be building without this line "ac_add_options --enable-image-decoders=icon,png,gif,jpeg"
i also believe that you should replave this part "--enable-extensions=default,-inspector,-irc,-venkman,-content-packs,-help" with either this "--enable-extensions=default,-inspector,-irc,-venkman,-content-packs,-help,-wallet" or this "--enable-extensions=cookie,xml-rpc,xmlextras,p3p,pref,transformiix,universalchardet,typeaheadfind,webservices" (they both do exactly the same thing)
User avatar
nilson
Posts: 4100
Joined: February 15th, 2003, 11:55 pm
Location: Tuscaloosa, Alabama
Contact:

Post by nilson »

OK, done :) Thanks.
User avatar
willll
Posts: 2577
Joined: November 30th, 2002, 11:39 am
Location: Washington, DC

Post by willll »

Also, I'm not really sure what --disable-activex-scripting is neccessary. i'm pretty sure i've gotten it to build without that line, and i would assume that --disable-activex implies --disable-activex-scripting, but i'm not really sure about that. note that everything that i suggested i prefixed with 'i think'. i'm am pretty sure i have given you good info, but not 100% sure since I haven't build firebird in a couple of weeks. I will take no responsibility for failed builds due to my suggestions. :)
EDIT2: see below
Last edited by willll on August 13th, 2003, 6:17 pm, edited 3 times in total.
User avatar
nilson
Posts: 4100
Joined: February 15th, 2003, 11:55 pm
Location: Tuscaloosa, Alabama
Contact:

Post by nilson »

Where is it that you look into these things?
User avatar
willll
Posts: 2577
Joined: November 30th, 2002, 11:39 am
Location: Washington, DC

Post by willll »

Actually, I screwed up. The opposite of what i said is true. If you still want to find how i figure this out.
EDIT: Okay. I screwed up again. It looks like these options are only turned on when you are on windows <b>and</b> when you are not runnning a GNU compiler. It looks like you don't need to use either of those options, though don't quote me on that as I have shown a large capacity for screwing up tonight.
mozilla/configure said

Code: Select all

MOZ_NO_ACTIVEX_SUPPORT=1
MOZ_ACTIVEX_SCRIPTING_SUPPORT=
case "$target_os" in
    msvc*|mks*|cygwin*|mingw*)
        if test -z "$GNU_CC"; then
            MOZ_NO_ACTIVEX_SUPPORT=
            MOZ_ACTIVEX_SCRIPTING_SUPPORT=1
        fi
        ;;
esac

# Check whether --enable-activex or --disable-activex was given.
if test "${enable_activex+set}" = set; then
  enableval="$enable_activex"
  if test "$enableval" = "no"; then
    MOZ_NO_ACTIVEX_SUPPORT=1
  elif test "$enableval" = "yes"; then
    MOZ_NO_ACTIVEX_SUPPORT=
  else
    { echo "configure: error: Option, activex, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi



# Check whether --enable-activex-scripting or --disable-activex-scripting was given.
if test "${enable_activex_scripting+set}" = set; then
  enableval="$enable_activex_scripting"
  if test "$enableval" = "no"; then
    MOZ_ACTIVEX_SCRIPTING_SUPPORT=
  elif test "$enableval" = "yes"; then
    MOZ_ACTIVEX_SCRIPTING_SUPPORT=1
  else
    { echo "configure: error: Option, activex-scripting, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi



if test -n "$MOZ_NO_ACTIVEX_SUPPORT" -a -n "$MOZ_ACTIVEX_SCRIPTING_SUPPORT";
then
    { echo "configure: error: Cannot enable ActiveX scripting support when ActiveX support is disabled." 1>&2; exit 1; }
fi
User avatar
nilson
Posts: 4100
Joined: February 15th, 2003, 11:55 pm
Location: Tuscaloosa, Alabama
Contact:

Post by nilson »

I've made a cersion for my site now: http://home.earthlink.net/~nilsoncain/tutorials/build_firebird.html.

I also have went through and cleaned up the site, and removed all the old stuff.
Post Reply