Difference between revisions of "Compiling the viewer (Mac OS X)"
Stone Linden (talk | contribs) (→Getting Development Tools: cmake 2.8 works just fine, and you can get it from macports, too) |
Alain Linden (talk | contribs) |
||
Line 5: | Line 5: | ||
= Getting Development Tools = | = Getting Development Tools = | ||
* '''Xcode''': Most Lindens use Xcode 3. | * '''Xcode''': Most Lindens use Xcode 3.2 on Snow Leopard (OS X 10.6) for building on Macintosh computers. For simplicity, we suggest installing everything from the mpkg. Note that later versions of Xcode have build options to be backwards compatible to 3.1. (See [[Talk:Compiling_the_viewer_(Mac_OS_X)#Trying_newer_versions_of_tools]]. Later versions of Xcode (3.2.4) work fine.) | ||
* '''CMake''': Install CMake from [http://www.cmake.org cmake.org], or using [http://macports.org/ MacPorts] with 'port install cmake'. You will need at least CMake 2.6; CMake 2.8 may be required in the future. | |||
* '''CMake''': Install CMake from [http://www.cmake.org cmake.org], or using [http://macports.org/ MacPorts] with 'port install cmake'. You will need at least CMake 2.6; CMake 2.8 | |||
*'''Command line Makefiles''': These are included in Apple's Xcode product. Download and install Xcode from Apple. | *'''Command line Makefiles''': These are included in Apple's Xcode product. Download and install Xcode from Apple. | ||
Line 16: | Line 15: | ||
If you're just starting out, it's probably best to get ''viewer-release'' or ''viewer-beta'' , because ''viewer-developer'' gets updated several times per week. But if you would rather work with the latest code, look for the latest builds on [[Project Snowstorm]] and ''viewer-developer'' on bitbucket. | If you're just starting out, it's probably best to get ''viewer-release'' or ''viewer-beta'' , because ''viewer-developer'' gets updated several times per week. But if you would rather work with the latest code, look for the latest builds on [[Project Snowstorm]] and ''viewer-developer'' on bitbucket. | ||
== Installing Proprietary Libraries == | == Installing Proprietary Libraries == | ||
Some builds of the the Viewer depends on proprietary libraries (alternative open source libraries are also provided for developers who prefer or are not licensed to use the proprietary libraries). Lindens do not distribute these libraries, so you will need to fetch and install these even if you download the libraries packages. (This is due to licensing restrictions. Don't ask, Lindens already did, and can't get permission. So you do have to get them yourself.) | |||
=== Fmod === | === Fmod === | ||
(instructions needed) | |||
== Build the viewer with autobuild == | |||
Configuring and building with autobuild works the same on all platforms. Full instructions may be found at [[Build_Viewer_With_Autobuild]]. | |||
== Xcode == | == Xcode == | ||
If you have followed the configure instructions from [[Build_Viewer_With_Autobuild]], the directory ''build-darwin-i386'' will have been created in the root of your source distribution. Inside that directory you will find the ''SecondLife.xcodeproj'' project file which can be used with Xcode. When opened it should be configured correctly to build, so just '''Build and Run'''. | |||
''' | |||
== Where's the built viewer? == | == Where's the built viewer? == | ||
On OS X, your viewer build will be in "build-darwin- | On OS X, your viewer build will be in "build-darwin-i386/newview/RelWithDebInfo/Second Life.app" depending on which branch you built. | ||
The easiest way to launch your compiled viewer is to simply navigate under the Finder to that folder and double click the application. | The easiest way to launch your compiled viewer is to simply navigate under the Finder to that folder and double click the application. | ||
Line 116: | Line 38: | ||
Note: | Note: | ||
* If you change the build configuration you use, the intermediate directory will also change, e.g. from <code>RelWithDebInfo</code> to <code>Release</code>. | * If you change the build configuration you use, the intermediate directory will also change, e.g. from <code>RelWithDebInfo</code> to <code>Release</code>. | ||
= Building the Unit Tests = | = Building the Unit Tests = | ||
Line 123: | Line 44: | ||
= What to do if it doesn't work for you = | = What to do if it doesn't work for you = | ||
* Ask for help on [[IRC]] (irc.freenode.net #opensl) | * Ask for help on [[IRC]] (irc.freenode.net #opensl) | ||
* Ask for help on the [[SLDev|Opensource-dev mailing list]] | * Ask for help on the [[SLDev|Opensource-dev mailing list]] |
Revision as of 09:50, 28 March 2011
For recent information check the Project Snowstorm page.
Getting Development Tools
- Xcode: Most Lindens use Xcode 3.2 on Snow Leopard (OS X 10.6) for building on Macintosh computers. For simplicity, we suggest installing everything from the mpkg. Note that later versions of Xcode have build options to be backwards compatible to 3.1. (See Talk:Compiling_the_viewer_(Mac_OS_X)#Trying_newer_versions_of_tools. Later versions of Xcode (3.2.4) work fine.)
- CMake: Install CMake from cmake.org, or using MacPorts with 'port install cmake'. You will need at least CMake 2.6; CMake 2.8 may be required in the future.
- Command line Makefiles: These are included in Apple's Xcode product. Download and install Xcode from Apple.
Downloading Source Code
Linden Lab Project Snowstorm uses Mercurial and Bit Bucket for the version control repository. The repository is here. Look vor viewer-development, viewer-beta, viewer-release, and others, as your needs dictate. If you're just starting out, it's probably best to get viewer-release or viewer-beta , because viewer-developer gets updated several times per week. But if you would rather work with the latest code, look for the latest builds on Project Snowstorm and viewer-developer on bitbucket.
Installing Proprietary Libraries
Some builds of the the Viewer depends on proprietary libraries (alternative open source libraries are also provided for developers who prefer or are not licensed to use the proprietary libraries). Lindens do not distribute these libraries, so you will need to fetch and install these even if you download the libraries packages. (This is due to licensing restrictions. Don't ask, Lindens already did, and can't get permission. So you do have to get them yourself.)
Fmod
(instructions needed)
Build the viewer with autobuild
Configuring and building with autobuild works the same on all platforms. Full instructions may be found at Build_Viewer_With_Autobuild.
Xcode
If you have followed the configure instructions from Build_Viewer_With_Autobuild, the directory build-darwin-i386 will have been created in the root of your source distribution. Inside that directory you will find the SecondLife.xcodeproj project file which can be used with Xcode. When opened it should be configured correctly to build, so just Build and Run.
Where's the built viewer?
On OS X, your viewer build will be in "build-darwin-i386/newview/RelWithDebInfo/Second Life.app" depending on which branch you built.
The easiest way to launch your compiled viewer is to simply navigate under the Finder to that folder and double click the application.
Note:
- If you change the build configuration you use, the intermediate directory will also change, e.g. from
RelWithDebInfo
toRelease
.
Building the Unit Tests
From Xcode, open the project 'linden/indra/test/MacTester.xcodeproj', set 'MacTester' as the active target, and build.
What to do if it doesn't work for you
- Ask for help on IRC (irc.freenode.net #opensl)
- Ask for help on the Opensource-dev mailing list
- Fix it: Modifying CMake Files and please, submit a patch!
Submitting Patches
This is probably far down the road, but if you make changes to the source and want to submit them, see the page about submitting patches.