BuildForMacCmake

Version 77 (Botanic, 05/07/2012 02:33 am)

1 41 rti
h1. Building Ryzom Core Client including NeL with CMake on Mac OS X
2 17 rti
3 40 rti
For some information about the quite new native Mac OS X Support, see [[MacClientState]].
4 1 rti
5 32 vl
h2. Pre Requirement
6 1 rti
7 32 vl
* "Download and install XCode":http://developer.apple.com/technologies/xcode.html
8 32 vl
* "Download and install MacPorts":http://www.macports.org/install.php
9 27 rti
10 67 Botanic
Don't forget to add MacPorts in your PATH (only needed for older macports installers):
11 52 molator
> echo 'export PATH=${PATH}:/opt/local/bin' >> ~/.profile
12 52 molator
13 32 vl
h2. Installing Dependencies
14 32 vl
15 41 rti
If you are using Mac OS X 10.6, you might want to install the packages with the +universal flag to use them for 32bit and 64bit builds, default is 64bit on 10.6, which is ok for Ryzom Core Client and NeL.
16 1 rti
17 33 vl
* Launch the _Terminal_ application and execute the following command in it.
18 1 rti
19 1 rti
<pre>
20 61 Botanic
sudo port install mercurial p7zip boost cmake curl freetype jpeg libwww libxml2 lua zlib libpng python_select libogg libvorbis python26
21 77 Botanic
sudo port select --set python python26
22 41 rti
</pre>
23 41 rti
24 1 rti
* Install luabind, see [[InstallingLuabind]].
25 1 rti
26 40 rti
h2. Get the sources
27 1 rti
28 1 rti
See [[Getting_Source]].
29 7 rti
30 57 rti
h2. Build
31 1 rti
32 50 rti
The given list of CMake options is just an example. For a complete list see: [[CMakeOptions]].
33 50 rti
34 1 rti
<pre>
35 41 rti
cd code/
36 43 vl
mkdir build
37 43 vl
cd build
38 44 kervala
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF ..
39 25 rti
make
40 8 rti
sudo make install
41 38 vl
</pre>
42 38 vl
43 46 rti
The install process created @/Applications/ryzom_client.app@ for you.
44 46 rti
45 60 molator
* Download the latest "Windows Ryzom Core client": http://dev.ryzom.com/projects/ryzom/wiki/WindowsBinaries
46 58 molator
* Extract it and follow this instructions http://dev.ryzom.com/projects/ryzom/wiki/MacBinaries#Providing-the-client-with-the-data-directory
47 57 rti
48 57 rti
h2. Static Build
49 57 rti
50 57 rti
This section shows how to create a static Ryzom Core client built on Mac OS X. The resulting binary only depends on system libs, therefore can be moved easily to another Mac OS X machine.
51 57 rti
52 57 rti
<pre>
53 57 rti
cd code/
54 57 rti
mkdir build-static
55 57 rti
cd build-static
56 62 kervala
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DWITH_STATIC=ON -DWITH_STATIC_DRIVERS=ON -DWITH_NEL_TOOLS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_STATIC_EXTERNAL=ON ..
57 57 rti
make
58 57 rti
</pre>
59 57 rti
60 57 rti
To check which libraries are needed by your binary run:
61 57 rti
<pre>
62 57 rti
otool -L bin/ryzom_client.app/Contents/MacOS/ryzom_client
63 57 rti
</pre>
64 57 rti
65 57 rti
You should only see libraries which reside in @/usr/lib@ or @/System/Library/Frameworks@.
66 57 rti
67 7 rti
68 64 Botanic
h2. Data
69 64 Botanic
70 64 Botanic
You will need to put the data for the client into 
71 64 Botanic
72 64 Botanic
ryzom_client.app/Contents/Resources
73 64 Botanic
74 64 Botanic
Also you will need to put the atys.icns for the icon into that folder.
75 64 Botanic
76 69 Botanic
h2. Create Distribution Package
77 65 Botanic
78 76 Botanic
Use the application "packages.dmg" to create a pkg from the .app file you can download it at the bottom of the page. ( http://s.sudre.free.fr/Software/Packages/about.html Note i could only get it working correctly in build and debug mode...)
79 65 Botanic
80 72 Botanic
Use the following command to create a compressed dmg for the pkg
81 72 Botanic
82 72 Botanic
<pre>
83 72 Botanic
hdiutil create ryzom_client.dmg -srcdir ryzom_client.app -format UDZO -imagekey zlib-level=9
84 72 Botanic
</pre>
85 72 Botanic
86 24 rti
h2. Screenshot
87 49 molator
88 49 molator
!Screen_shot_2010-06-01_at_1.56.51_AM.png!