Difference between revisions of "Development:Building:Intel"
(Added in a (weak) statistics section) |
(Added some information about possible profile problems and a workaround, also updated the -jN value according to some advice from a friend.) |
||
Line 41: | Line 41: | ||
ac_add_options --enable-debug | ac_add_options --enable-debug | ||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build | ||
− | mk_add_options MOZ_MAKE_FLAGS=- | + | mk_add_options MOZ_MAKE_FLAGS=-jN |
+ | |||
+ | Where N = # of CPUs +1 | ||
+ | |||
+ | '''PLEASE READ THE LINE ABOVE AGAIN''', you are not setting 'N' MAKE_FLAGS, but a real number as defined above! | ||
If your Intel Mac does not have a Core Duo processor remove the final line from above. | If your Intel Mac does not have a Core Duo processor remove the final line from above. | ||
Line 63: | Line 67: | ||
Click on Change in the panel that pops up. | Click on Change in the panel that pops up. | ||
− | Click Project... Edit Active Executable 'Camino' | + | ===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! | ||
+ | |||
+ | The following did not work for me but my Mentor seems to have no problem with it, feedback would be appreciated. | ||
+ | |||
+ | 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 | ||
+ | |||
+ | The following does work for me | ||
+ | |||
+ | 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/build/camino/build/Development/ so I cd to that directory before executing open Camino.app | |
===(Weak) Statistics=== | ===(Weak) Statistics=== |
Revision as of 14:10, 20 June 2006
Contents
Building Camino 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
Open Terminal.app, change directory to where you would like to build Camino from.
export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot cvs login cvs co mozilla/client.mk cvs co mozilla/camino/config/mozconfig
Use your favourite text editor to create the file .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_OBJDIR=@TOPSRCDIR@/../build mk_add_options MOZ_MAKE_FLAGS=-jN
Where N = # of CPUs +1
PLEASE READ THE LINE ABOVE AGAIN, you are not setting 'N' MAKE_FLAGS, but a real number as defined above!
If your Intel Mac does not have a Core Duo processor remove the final line from above.
To pull from cvs and build:
make -f client.mk
Building in XCode
Open XCode, click your left-mouse button on File ... Open
Browse to build/i386/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.
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!
The following did not work for me but my Mentor seems to have no problem with it, feedback would be appreciated.
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
The following does work for me
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/build/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.