Difference between revisions of "Assignment 1 (yshen6)"
(→Steps to Complete the build) |
(→Steps to Complete the build) |
||
Line 123: | Line 123: | ||
</pre> | </pre> | ||
+ | |||
+ | now we can get the full source from cvs: | ||
+ | |||
+ | <pre> | ||
+ | c:\proj\mozilla> make -f client.mk checkout | ||
+ | </pre> | ||
+ | |||
+ | This will take a little while, then we will see a bunch of files create in c:\proj\mozilla<br/> | ||
+ | |||
+ | Now we can build it: | ||
+ | |||
+ | <pre> | ||
+ | C:\proj\mozilla> make -f client.mk build | ||
+ | </pre> | ||
+ | |||
+ | After half an hour of building, you will find firefox3.0a1 in C:\proj\mozilla\firefox-objdir\dist\bin | ||
+ | |||
+ | Problems: | ||
+ | Problem1: | ||
+ | I have no idea how to move my current directory to c:\proj in Cygwin. | ||
+ | Mark helped me move the current directory to c:\proj and create the .mozconfig by touch command. | ||
+ | |||
+ | Problem2: | ||
+ | I wasn’t able to log into cvs at school computer. | ||
+ | Mark told me to use Putty to tunnel out the school fire through matix | ||
+ | host Name(or IP address): matix.senecac.on.ca | ||
+ | Source Port: 2401 | ||
+ | Destination: cvs-mirror.mozilla.org:2401 | ||
+ | |||
+ | Resources: | ||
+ | David humphrey’s website | ||
+ | Mark Paruzel |
Revision as of 19:13, 15 September 2006
Contents
Assignment 1 - build firefox
Introduction
My first step is search “how to build firefox on Windows” on Google. Then I followed the instructions on David Humphrey's website.
Software Installed
Install the compiler - Visual Studio.NET 2005
Install Cygwin with all packages required for building Mozilla:
ash coreutils cvs diffutils findutils gawk grep libiconv make 3.80 patchutils perl sed unzip zip
Create a directory c:\proj
Download and Extract Moztools to C:\proj\moztools
Steps to Complete the build
Setup environment variables and paths by creating a setup file: c:\proj\buildsetup.bat Copy and paste the given code(from David's website) to c:\proj\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
Run Cygwin and move into c:\proj directory Problem1 – I have no idea how to move my current directory to c:\proj in Cygwin
$ cd ../.. $ cd cygdrive/ $ cd c $ cd proj
Setup environment and paths
$ cmd Buildsetup.bat c:\proj> buildsetup.bat
Log into the mozilla CVS by anonymous
Problem2 – failed: connection refused (only at school’s computer)
After handled problem2 run Cygwin again and login CVS by anonymous
C:\proj> cvs login CVS password: anonymous
Checkout the build script:
C:\proj> cvs co mozilla/browser/config mozilla/client.mk Cvs checkout: Updating mozilla/browser/config U mozilla/client.mk
This create some files in C:\proj\mozilla
Move into mozilla directory and create a file .mozconfig
c:\proj\mozilla> touch .mozconfig
open .mozconfig, copy and paste the given code(from David's website).
# 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
now we can get the full source from cvs:
c:\proj\mozilla> make -f client.mk checkout
This will take a little while, then we will see a bunch of files create in c:\proj\mozilla
Now we can build it:
C:\proj\mozilla> make -f client.mk build
After half an hour of building, you will find firefox3.0a1 in C:\proj\mozilla\firefox-objdir\dist\bin
Problems: Problem1: I have no idea how to move my current directory to c:\proj in Cygwin. Mark helped me move the current directory to c:\proj and create the .mozconfig by touch command.
Problem2: I wasn’t able to log into cvs at school computer. Mark told me to use Putty to tunnel out the school fire through matix host Name(or IP address): matix.senecac.on.ca Source Port: 2401 Destination: cvs-mirror.mozilla.org:2401
Resources: David humphrey’s website Mark Paruzel