Changes

Jump to: navigation, search

User:DavidBertenshaw/Assignment 01: Build the Fox

3,239 bytes added, 19:13, 19 September 2006
Screenshot
I started working on the project on September 17th. The first thing I did was follow the link to developer.mozilla.org. From there I managed to find a link to guide for building Firefox on a windows platform. This guide was the key to finishing this assignment, without it I would be lost and would never have gotten firefox to build properly. Even with this guide I suffered some hardships but eventually managed to complete my build.
== Build PrerequistsPrerequisites==
'''Visual Studio 2003 or Visual Studio 2005'''
Both Visual studios have tools that are neccesary to build MozzilaMozilla's Firefox. I personally had 2003 installed but switched to 2005 to try and fix a bug, which it didn't. Although you can get free tools out on the net, this is what I used and can say works.
'''MozTools'''
2) Next download the [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/moztools-static.zip| MozTools], extracted them, and placed the directory in c:\proj\moztools\. I also added this to my path, not sure if that's required though.
3)Once those tasks were done I installed cygwin and configured it as per the Cygwin [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#GNU_Tools_for_Microsoft_Windows_.28Cygwin.29|Configuration].
4)A batch script is needed to configure the system so that the right variables are in the path and such. I created a batch script called SetupFireFox.bat with the following code inside.
== Conflicts ==
 
1) '''C compiler cannot create files'''
 
On my first time attempt building Firefox I received this error. I thought that my C++ compiler wasn't working and tried installing one and adding it to my path. No success.
 
'''Solution'''
 
After stumbling around the net for a while someone wrote "Use the command window from Visual Studio". I didn't think of that all for some reason. When I opened command prompt from visual studio I got past this error. By using that command window I guess I was referencing my Visual Studio copy of C++ which the build could understand.
 
2) '''Linker Error'''
 
After fixing my previous error I quickly came upon a new one. This one I had already read on a tutorial earlier and was quick to fix it. For some reason the build may give a linker error related to the file in Cygwin's bin called 'link'
 
'''Solution'''
 
Change the file in Cygwin's bin directory named 'Link.exe' to something else. It will no longer interfer with the build afterwards.
 
3) '''Error code 2'''
 
If you stumble upon this during your code it isn't easy to diagnose. I say this because for me it seemed that error code 2 can apply to a lot of different problems. For a long time during this build I was having many types of errors with this error code attached.
 
'''Solution'''
 
I realized, when after hours I figured out my problem , that this error was because of something dumb I was doing. I was reading some other documentation which mentioned I had to download '''and run''' Cygwin to get Firefox to build. From what I understand Cygwin is a Unix interface for windows. I thought that I had to build Firefox through that Unix command window. Though I'm sure this is possible I was downloading (and trying to use) windows tools which obviously did not work.
 
== Contributers ==
 I'd firstly like to thank those who assisted me in overcoming my conflicts. I spent some time on IRC where I receieved assistance from [[User:dtolj|Dejan Tolj]] who helped me by working with me to identify the problem. [[User:David.humphrey|Dave Humphrey]] also assisted me in providing me with knowledge sources and resources.  [[Liz_Chak_Assignment_1 | Liz Chak's]] guide to building Firefox was one of the most helpful pieces of documentation during my struggle. I found the posting of students successes very valuable for I could search for a student who had a similar experience as mine and then read their troubleshooting to understand how they overcame the conflict. == Reources Resources == David Humphrey's [http://cs.senecac.on.ca/~david.humphrey/writing/firefox-win32-build.html| Guide to Building Firefox] was a useful resorce as a guideline but it was missing some small details that required some research.  The [http://developer.mozilla.org/en/docs/Build_Documentation| Mozilla documentation] is also very detailed and easy to read. I found this also a useful asset in building Firefox 
== Screenshot ==
[[Image:Myfirefoxbuild2.JPG]] == conclusion Conclusion == In conclusion though I found this to be a stressful exercise it forced me to get involved with IRC and I now have a better understanding of the open source community. It was also very rewarding when the software finally did build. Overall I am satisfied that the task is over and I am glad that I've sparked some interest in open source development.
1
edit

Navigation menu