Difference between revisions of "Assignment1-Sminchel"
(No difference)
|
Revision as of 20:36, 22 September 2006
Contents
What's the Plan Stan?
Below is my attempt at "Building the Fox". I can't say that I understand (yet) what I did, all I know is that I did it.. I think.
Software Installations
In order to start the build process I had to install the following pieces of software:
- Visual Studio 2005 - however, I searched endlessly for Visual Studio .NET 2005 on the ACS website, before realizing it WAS VS.NET 2005.
- Cygwin
- With the addtional packages:
- patchutils
- make 3.80
- perl
- zip
- unzip
- With the addtional packages:
Steps Taken
After reading http://developer.mozilla.org/, and flipping through the build pages, I was completely overwhelmed. I started this course a week late, and already felt I had missed out on everything - I seriously thought I was in over my head. I started reading other student's Assignments to see if I could find a footing to start from, and then that's when I realized Dave had a build outline on his website. Starting from this, I took these steps: (to see Details of Problems, see Problem's Section)
1) After installing VS 2005 and Cygwin, I created the directory:
c:\proj
2) I downloaded the static moztools zip file and extracted it to:
c:\proj\moztools
3) I created the buildsetup.bat script, and used the settings in Dave's build (to be honest - I haven't the slightest what some of these do..):
@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
4) I then ran the buildsetup.bat, and stumbled upon by first problem (Problem #1), how do I run the script?!
5) After figuring out how to run the buildsetup.bat script, I logged into Mozilla's CVS:
cvs login
6) I checked out the build script:
cvs co mozilla/browser/config mozilla/client.mk
7) I then created the .mozconfig file,
# 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
in the directory:
c:\proj\mozilla
8) While in the same directory (c:\proj\mozilla), I then downloaded the full source:
make -f client.mk checkout
9) After about 15 minutes of text flying through the screen, I crossed my fingers and began my build:
make -f client.mk build
10) Unfortunately.. barely a minute had passed, and I had a build error (Problem #2). One of my directory names, my user directory, was my full name (Sara Minchella), taken from the windows user directory, and was causing havoc in my build process!
11)After fixing the problem, I began my build again, only to have another build error, I was missing the path to the makensis installer (Problem #3).
12) After fixing the problem (again), I attempted my build again.. only after 1.5 hours of building... I had a memory access error (DAMN YOU WINDOWS!!!), and my build died (Problem #4). Once again.. after starting the build process again (after cracking my head on the desk a few times), I finished the build successfully!
13) At least I think it build worked successfully, when I loaded firefox.exe, a few "errors" pop up, and I just clicked ignore, and the browser still pop up.. so I'm assuming it worked!
Problems & Solutions
Problem #1
- When I attempted to run the buildsetup.bat script from the command line, I kept getting:
$buildsetup.bat bash: buildsetup.bat: command not found
- slightly confused, I then realized this was UNIX, and I had to figure out how to call the script, I found my solution on Yi Shen's assignment.
Problem #2
- After searching Google, and the http://www.cygwin.com/faq I discoverd the spaces in the directory name was causing the problem. So I read a bit more, and discovered I had to change the home directory name in the /etc/passwd file.
Problem #3
- The error message said I was missing the makensis installer in my path, however I didn't know what this was. I googled makensis, and discovered it was an installer than wasn't needed, but I didn't know how not to include it, I eventually found my answer on Mark Paruze's assignment. I needed to include the following in my .mozconfig file:
# 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 <---added this line
Problem #4
- No idea what caused this problem, but after asking around in IRC #firefox, Lucy_ told me to make sure I follow the instruction exactly, and if the build dies again, I'm to ask in #developers (she said they would tell me the same thing "make sure you follow the instructions!"). Then sp3000, had a look as well, and suggested that the error, was actually a warning, but they knew nothing about window's memory access errors.. I don't think anyone really does!! I attempted the build again.. and oddly, it worked, with no problems!
Resources
- Dave Humphrey's Build Outline
- Mark Paruze
- Yi Shen
- http://www.cygwin.com/faq
- http://developers.mozilla.org
Conclusion
Seeing as I have never worked on a project of this size (Mozilla), I was (and still am!) completely overwhelmed. I didn't have the slightest idea where to start, even after reading http://developers.mozilla.org. I didn't realize a build could take almost 2 hours to complete, and be so involved! As an avid Windows user, I suppose I'm just used to the install wizards, and my software magically appearing! I'm eager to learn more about Mozilla development, and even more eager to get started on Assignment #2. The Mozilla community looks very large, but they're all so welcoming!