Difference between revisions of "Development:Building:Intel"
(Tidied up some minor niggles in the .mozconfig section) |
(obsolete these; thanks delliott for getting them up when we needed them!) |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | ==Building Camino on your Intel Mac== | + | <div style="margin: 0; padding:0 .5em; border:1px solid pink; background:#FFE8E8;"><b>N.B.</b> These build instructions are obsolete and have been superseded by the instructions on [[Development:Building]].</div> |
+ | |||
+ | ==Building Camino (trunk) on your Intel Mac== | ||
These instructions are constantly changing and should not be considered a definitive resource, even though there is no other resource. | These instructions are constantly changing and should not be considered a definitive resource, even though there is no other resource. | ||
Line 25: | Line 27: | ||
===Pulling source and building in Terminal.app=== | ===Pulling source and building in Terminal.app=== | ||
+ | '''N.B.''' ''Other than the Intel-specific stuff, the [http://www.caminobrowser.org/development/build/ existing instructions] provide more detail, so we want to merge these.'' | ||
− | Open Terminal.app, change directory to where you would like to build Camino from. | + | Open Terminal.app, change directory to where you would like to build Camino from (e.g., <tt>~/dev/lizard</tt>). |
+ | cd ~/dev/lizard | ||
export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot | export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot | ||
cvs login | cvs login | ||
Line 33: | Line 37: | ||
cvs co mozilla/camino/config/mozconfig | cvs co mozilla/camino/config/mozconfig | ||
− | + | Now move into the mozilla directory and use your favourite text editor to create the file .mozconfig | |
+ | |||
+ | cd mozilla | ||
+ | pico .mozconfig | ||
If your Intel Mac has a Core Duo processor then your .mozconfig file should contain the following: | If your Intel Mac has a Core Duo processor then your .mozconfig file should contain the following: | ||
Line 40: | Line 47: | ||
ac_add_options --disable-optimize | ac_add_options --disable-optimize | ||
ac_add_options --enable-debug | ac_add_options --enable-debug | ||
− | |||
mk_add_options MOZ_MAKE_FLAGS=-jN | mk_add_options MOZ_MAKE_FLAGS=-jN | ||
Where N = # of CPUs +1, where # of CPUs = 2 on a Core Duo processor. | Where N = # of CPUs +1, where # of CPUs = 2 on a Core Duo processor. | ||
− | ''' | + | '''Please read the above line, again''', you are not setting 'N' MAKE_FLAGS, but a real number as defined above! |
To pull from cvs and build: | To pull from cvs and build: | ||
+ | |||
+ | '''Please''' visit the [http://tinderbox.mozilla.org/showbuilds.cgi?tree=Camino Tinderbox] and '''make sure that the 2nd, 3rd, and 6th columns are green.''' | ||
make -f client.mk | make -f client.mk | ||
− | === | + | When you're all done, your Camino ends up in <tt>camino/build</tt> (<tt>mozilla/camino/build</tt> for a non-OBJDIR build, <tt>{OBJDIR}/camino/build</tt> in an OBJDIR build). |
+ | |||
+ | ====Updating your source and rebuilding==== | ||
− | + | '''Please''' visit the [http://tinderbox.mozilla.org/showbuilds.cgi?tree=Camino Tinderbox] and '''make sure that the 2nd, 3rd, and 6th columns are green.''' | |
− | + | cd ~/dev/lizard/mozilla | |
+ | cvs update -dP client.mk | ||
+ | make -f client.mk | ||
− | + | (For OBJDIR builds, replace <tt>make -f client.mk</tt> with <tt>make -f client.mk checkout; cd ../{OBJDIR}; make</tt>) | |
− | + | ===Building in Xcode=== | |
− | + | *Open Xcode, click your left-mouse button on File ... Open | |
− | Click on Change in the panel that pops up. | + | *Browse to <tt>mozilla/camino/</tt> and select <tt>Camino.xcode</tt> |
+ | |||
+ | *Choose to Upgrade a Copy | ||
+ | |||
+ | *Click on Project... Edit Project Settings | ||
+ | |||
+ | *In the General tab, select Mac OS X 10.4 (Universal) in the Cross-Develop Using Target SDK drop-down menu. | ||
+ | |||
+ | *Click on Change in the panel that pops up. | ||
+ | |||
+ | '''N.B.''' Whenever <tt>Camino.xcode</tt> changes, you will need to repeat these steps. Luckily, the project file does not change often. | ||
===Setting Camino to use a different profile=== | ===Setting Camino to use a different profile=== | ||
Line 69: | Line 91: | ||
This means you can run the Camino you are developing on alongside your day-to-day copy of Camino! | This means you can run the Camino you are developing on alongside your day-to-day copy of Camino! | ||
− | + | There are 2 ways to do this, you can either set this within XCode: | |
Click Project... Edit Active Executable 'Camino' | Click Project... Edit Active Executable 'Camino' | ||
Line 76: | Line 98: | ||
Click Build & Go in the XCode Toolbar | Click Build & Go in the XCode Toolbar | ||
− | + | Or you can set this at a Terminal: | |
Instead of clicking on Build & Go in the XCode toolbar, click on Build. | Instead of clicking on Build & Go in the XCode toolbar, click on Build. | ||
Line 88: | Line 110: | ||
Your CAMINO_PROFILE_DIR can be anywhere you have write access to, my CAMINO_PROFILE_DIR points to ~/Documents/SoC/CAMINO_PROFILE_DIR/ | Your CAMINO_PROFILE_DIR can be anywhere you have write access to, my CAMINO_PROFILE_DIR points to ~/Documents/SoC/CAMINO_PROFILE_DIR/ | ||
− | My Camino.app is in ~/Documents/SoC/ | + | My Camino.app is in ~/Documents/SoC/mozilla/camino/build/Development/ so I cd to that directory before executing open Camino.app |
===(Weak) Statistics=== | ===(Weak) Statistics=== | ||
Line 102: | Line 124: | ||
#http://www.caminobrowser.org/development/build/ | #http://www.caminobrowser.org/development/build/ | ||
#http://developer.mozilla.org/en/docs/Mac_OS_X_Universal_Binaries | #http://developer.mozilla.org/en/docs/Mac_OS_X_Universal_Binaries | ||
+ | |||
+ | ==Discussion== | ||
+ | Questions, comments, missing items, ''et cetera''? See the [[Talk:Development:Building:Intel|Discussion]] tab. |
Latest revision as of 14:51, 6 November 2006
Contents
Building Camino (trunk) on your Intel Mac
These instructions are constantly changing and should not be considered a definitive resource, even though there is no other resource.
Preparing your Macintosh
Download and install XCode 2.3 from the Apple Developer Connection. (free registration)
Download and install Fink 0.8.1 from Fink.
Open Terminal.app
sudo apt-get install orbit orbit-dev glib libidl2
Close Terminal.app
Download and install the Shared Menus Cocoa framework using the instructions at Mozilla Developer Centre.
Open Terminal.app
sudo mkdir -p /Developer/SDKs/MacOSX10.2.8.sdk/Library/Frameworks sudo ln -s /Library/Frameworks/SharedMenusCocoa.framework /Developer/SDKs/MacOSX10.2.8.sdk/Library/Frameworks sudo mkdir -p /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks sudo ln -s /Library/Frameworks/SharedMenusCocoa.framework /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks
Pulling source and building in Terminal.app
N.B. Other than the Intel-specific stuff, the existing instructions provide more detail, so we want to merge these.
Open Terminal.app, change directory to where you would like to build Camino from (e.g., ~/dev/lizard).
cd ~/dev/lizard export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot cvs login cvs co mozilla/client.mk cvs co mozilla/camino/config/mozconfig
Now move into the mozilla directory and use your favourite text editor to create the file .mozconfig
cd mozilla pico .mozconfig
If your Intel Mac has a Core Duo processor then your .mozconfig file should contain the following:
. $topsrcdir/camino/config/mozconfig ac_add_options --disable-optimize ac_add_options --enable-debug mk_add_options MOZ_MAKE_FLAGS=-jN
Where N = # of CPUs +1, where # of CPUs = 2 on a Core Duo processor.
Please read the above line, again, you are not setting 'N' MAKE_FLAGS, but a real number as defined above!
To pull from cvs and build:
Please visit the Tinderbox and make sure that the 2nd, 3rd, and 6th columns are green.
make -f client.mk
When you're all done, your Camino ends up in camino/build (mozilla/camino/build for a non-OBJDIR build, {OBJDIR}/camino/build in an OBJDIR build).
Updating your source and rebuilding
Please visit the Tinderbox and make sure that the 2nd, 3rd, and 6th columns are green.
cd ~/dev/lizard/mozilla cvs update -dP client.mk make -f client.mk
(For OBJDIR builds, replace make -f client.mk with make -f client.mk checkout; cd ../{OBJDIR}; make)
Building in Xcode
- Open Xcode, click your left-mouse button on File ... Open
- Browse to mozilla/camino/ and select Camino.xcode
- Choose to Upgrade a Copy
- Click on Project... Edit Project Settings
- In the General tab, select Mac OS X 10.4 (Universal) in the Cross-Develop Using Target SDK drop-down menu.
- Click on Change in the panel that pops up.
N.B. Whenever Camino.xcode changes, you will need to repeat these steps. Luckily, the project file does not change often.
Setting Camino to use a different profile
This means you can run the Camino you are developing on alongside your day-to-day copy of Camino!
There are 2 ways to do this, you can either set this within XCode:
Click Project... Edit Active Executable 'Camino' In the Arguments tab click the + button under the "Variables to be set in the environment" table. In the Name column type 'CAMINO_PROFILE_DIR' in the Value column type in where you would like to store Camino's profile for your development copy. Click Build & Go in the XCode Toolbar
Or you can set this at a Terminal:
Instead of clicking on Build & Go in the XCode toolbar, click on Build.
Open a Terminal.app
export CAMINO_PROFILE_DIR=AbsolutePathToDir cd PathToWhereYourCamino.appLies open Camino.app
Your CAMINO_PROFILE_DIR can be anywhere you have write access to, my CAMINO_PROFILE_DIR points to ~/Documents/SoC/CAMINO_PROFILE_DIR/
My Camino.app is in ~/Documents/SoC/mozilla/camino/build/Development/ so I cd to that directory before executing open Camino.app
(Weak) Statistics
Total time to pull and make from scratch on:
- MacBook Core Duo 1.83GHz w/ 512MB RAM : 48 minutes.
I tested this using the command uptime && make -f client.mk && uptime.
References
- http://www.caminobrowser.org/development/build/
- http://developer.mozilla.org/en/docs/Mac_OS_X_Universal_Binaries
Discussion
Questions, comments, missing items, et cetera? See the Discussion tab.