Difference between revisions of "Assignment 1 (yshen6)"

From CDOT Wiki
Jump to: navigation, search
(Steps to Complete the build)
(Steps to Complete the build)
Line 77: Line 77:
 
</pre>
 
</pre>
  
Login to the mozilla CVS by anonymous<br/>
+
Log into the mozilla CVS by anonymous<br/>
  
 
Problem2 – failed: connection refused (only at school’s computer)<br/>
 
Problem2 – failed: connection refused (only at school’s computer)<br/>
Line 88: Line 88:
  
 
Checkout the build script:
 
Checkout the build script:
 +
 +
<pre>
 +
C:\proj> cvs co mozilla/browser/config mozilla/client.mk
 +
 +
Cvs checkout: Updating mozilla/browser/config
 +
U mozilla/client.mk
 +
</pre>
 +
 +
This create some files in C:\proj\mozilla<br/>
 +
 +
Move into mozilla directory and create a file .mozconfig
 +
 +
<pre>
 +
c:\proj\mozilla> touch .mozconfig
 +
</pre>
 +
 +
open .mozconfig, copy and paste the given code(from David's website).
 +
 +
<pre>
 +
# 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
 +
 +
</pre>

Revision as of 20:10, 15 September 2006

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