Changes

Jump to: navigation, search

Assignment1 (mojo)

4,258 bytes added, 04:25, 20 September 2006
no edit summary
= Assignment 1 - Build the Fox =

== Hardware & Software ==

Processor: Intel Centrino Duo 1.66mhz

Ram: 1 Gigabyte

Operating System: Windows XP SP2

Development Tools: Microsoft Visual Studio 2005 Professional, Cygwin, GNU Make 3.80

== Initial Steps ==

=== Did the Windows Prerequisities ===
#Install Microsoft Visual Studio 2005 Professional
#Install Cygwin
#Install Moztools

http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites

=== Tutorials ===

I went over a few build tutorials to get an idea of what is going to happen. I used the following links:

http://cs.senecac.on.ca/~david.humphrey/writing/firefox-win32-build.html

http://developer.mozilla.org/en/docs/VC8_Build_Instructions

After getting an idea of the basic process I setup my environment and downloaded the source according to the tutorials.

My setup is as follows:
*C:\proj
*C:\proj\moztools
*C:\cygwin

Add to the Environment Variables %MOZ_TOOLS% = C:\proj\moztools;

I don't like putting libraries or applications in the root directory of C:\, but Cygwin won't work with spaces in the path. I tried to use C:\Program Files\Cygwin, but that failed so I reinstalled it to the root.

=== filename: cygwin.bat ===
set HOME=C:\home
set VCVARS=C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat
set MOZ_TOOLS=C:\proj\moztools
set CYGWINBASE=C:\cygwin
set CYGWIN=nodosfilewarning
set PATH=%CYGWINBASE%\bin;%PATH%
call "%VCVARS%"
set PATH=%PATH%;%MOZ_TOOLS%\bin
rem MS-SDK; MSVC; Cygwin; Windows; glib/libIDL; Moztools
rem --- Typically the last thing the script does is launch a cygwin shell
rem --- watch for your ~/.profile and /etc/profile which may overwrite your carefully setup PATH!
bash --login -i

=== filename: buildsetup.bat ===
@echo off
rem --- CVS Setup
SET CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
SET CVS_RSH=ssh
rem --- Setup the paths to the moztools build libraries
set MOZ_TOOLS=C:\proj\moztools
set GLIB_PREFIX=%MOZ_TOOLS%
set LIBIDL_PREFIX=%MOZ_TOOLS%
rem --- Scrub these variables first
SET INCLUDE=
SET LIB=
SET PATH=C:\;C:\windows\system32;C:\windows\system32\wbem
rem --- Prepend cygwin
SET PATH=C:\cygwin\bin;%PATH%
rem --- Setup VC8 compiler environment vars
CALL "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86
rem --- Add glib/libidl to build environment
SET PATH=%PATH%;%GLIB_PREFIX%;%GLIB_PREFIX%\bin
SET INCLUDE=%GLIB_PREFIX%\include;%INCLUDE%
SET LIB=%GLIB_PREFIX%\lib;%LIB%
rem --- moztools comes last after glib/libIDL
SET PATH=%PATH%;%MOZ_TOOLS%\bin

Open a command prompt, go to the project directory (c:\proj) and run buildsetup.bat.

=== Download the source ===

In project directory:

cvs login
cvs co mozilla/browser/config mozilla/client.mk

Create the file .mozconfig in proj\mozilla with the following:

=== filename: .mozconfig ===
# Building Firefox Trunk with Debugging
. $topsrcdir/browser/config/mozconfig
# Put all obj files in one place, not in src tree
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-objdir
ac_add_options --disable-static
ac_add_options --enable-shared
# Debug Build Setup Options
ac_add_options --disable-optimize
ac_add_options --enable-debug
# I'm using Canvas for my work
ac_add_options --enable-canvas
ac_add_options --disable-installer

Then run:

make -f client.mk checkout
make -f client.mk build

== Problems on the way ==

First problem I encountered was some configuration problems. I needed to modify them to use work with my environemnt. I remember changing .mozconfig, buildsetup.bat, and cygwin.bat to get this error to go away, but not sure which one actually fixed the issue:

http://cs1.senecac.on.ca/wiki/imgs/Error1.JPG

'''checking whether the C compiler (cl ) works... no'''

This error occurred when I was using bash rather than cmd. I switched to cmd after my fascination with bash running on windows was over.

Second problem was the Make version. I used the cygwin version, but reading from Liz's problems I found I needed to install 3.80 rather than using 3.81. That cleared it up.

Third problem was after the build worked I ran the program and started to get lots of error prompts. This might have something to do with me changing make versions without removing the old objects.
1
edit

Navigation menu