Danh mục

Appendix A. Getting and Building the Mozilla Source

Số trang: 22      Loại file: pdf      Dung lượng: 70.15 KB      Lượt xem: 7      Lượt tải: 0    
tailieu_vip

Hỗ trợ phí lưu trữ khi tải xuống: 18,000 VND Tải xuống file đầy đủ (22 trang) 0

Báo xấu

Xem trước 3 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Một trong những điều tốt nhất về cách sử dụng Mozilla như là một khuôn khổ phát triển ứng dụng là bạn không cần phải tham gia bằng nguồn Mozilla code để tạo ra một ứng dụng Mozilla. Một Mozilla nhị phân đơn giản mà bạn tải về và cài đặt là nền tảng phát triển duy nhất mà bạn cần. Bạn có thể tạo và sử dụng hầu hết các thủ tục và các mẫu mô tả trong cuốn sách này với một phiên bản biên dịch sẵn của trình duyệt. ...
Nội dung trích xuất từ tài liệu:
Appendix A. Getting and Building the Mozilla SourceAppendix A. Getting and Building the Mozilla SourceOne of the best things about using Mozilla as an application developmentframework is that you dont need to get involved with the Mozilla sourcecode to create a Mozilla application. A simple Mozilla binary that youdownload and install is the only development platform you need. You cancreate and use most procedures and samples described in this book with aprecompiled version of the browser.The best way to get a working version of Mozilla quickly is to download aprecompiled binary for your platform. If you go to the mozilla.orghomepage, you will find links to Mozillas most recent stable milestone buildfor each platform and a link to the nightly development snapshot builds.These binaries come as compressed archives or with an installer, and youcan use either to run Mozilla on your computer within a few minutes. Thesebinaries dont include the source for Mozilla (unless you count the XUL,CSS, and JavaScript that made up the front end, which are always available),so read on if you want to obtain the code.Under the relevant license terms, the Mozilla source code is freely availableto anyone who has an Internet connection and a desire to explore. You maywant to look at this code out of curiosity or dive into the code as you figureout how it works and can be improved. Whatever your reasons are forlooking at the Mozilla source, it is not much more difficult to get the codeand build it yourself than it is to download the precompiled binaries. To getstarted, you need to know a few things about how to get and use the source.A.1. Getting the Source CodeYou can get the Mozilla source code in a few different ways. Depending onwhat you are interested in doing, one method may work better for you thananother. This appendix provides basic information about how to get thesource, but you can also find information about this topic on the Mozilla siteat http://www.mozilla.org/source.html.If you want to look at the source code and dont intend to recompile it,experiment with it, or update it at all, the best way to get at the source is tobrowse the Mozilla code base with Mozilla Cross Reference (LXR). As youcan see in Figure A-1, LXR is a web-based source code browsing toollocated at http://lxr.mozilla.org. LXR is also hooked up to other tools, suchas Bonsai (http://bonsai.mozilla.org) and the various tinderboxen(http://tinderbox.mozilla.org/showbuilds.cgi). Together, these tools create apowerful code maintenance system that is used widely by Mozilladevelopers.Figure A-1. Mozilla Cross Reference code browsing toolA.1.1. Downloading the Source with FTPIf you would like to get your hands on the code directly, use either FileTransfer Protocol (FTP) or Concurrent Versioning System (CVS) to grab thesource from the Mozilla site. Many people prefer to start by grabbing anarchive of the source code by FTP and then working with CVS as theymodify the code.If youre sure you wont check your work back into Mozilla and you justwant to get the source, using FTP is the easiest way to do so. The main FTPserver is at ftp://ftp.mozilla.org/ (a list of FTP mirrors is available on themozilla.org site). To download a particular version of Mozilla, go to either/pub/mozilla/nightly/latest/ or/pub/mozilla/releases/, depending on which build you would liketo have.When you download the source from the releases directory, you get the codefor the most recent Mozilla milestone. These releases are versions of Mozillathat have been tested and approved by developers at mozilla.org. Milestonescome out about once a month and have some implied stability. The code inthe latest directory is for the version of Mozilla currently underdevelopment. This code is not tested and stability is not guaranteed. In fact,the latest code may not even work if something that was checked in recentlybreaks Mozilla.A.1.2. Downloading the Source with CVSGrabbing the source with CVS requires additional steps to get things set upproperly, but for many, its worth the effort. If you would like to contributeyour own changes back to the community, you must understand how CVSworks. Pulling the source in this manner is a good way to start learningabout Mozilla development.For a quick understanding of CVS, you can obtain a copy of the CVS PocketReference (OReilly). To pick up a binary distribution of CVS if it isntalready installed, go to http://www.cvshome.org/downloads.html, whereyoull also find links to documentation.Using CVS requires logging into the Mozilla site by using a CVS client,checking out the source code, modifying the source code locally, and thenchecking the code back into the tree. Anyone is free to check out the code,but you need special permission to check in the changes you make to thesource. This chapter discusses only how to check out the source ...

Tài liệu được xem nhiều: