Build Source on Mac
For some information about the quite new native Mac OS X Support, see Mac Client State. Link to blank page.
Pre Requirement
Don't forget to add MacPorts in your PATH (only needed for older macports installers):
echo 'export PATH=${PATH}:/opt/local/bin' >> ~/.profile
Since Xcode 5, to be able to compile Ryzom Core, you'll need to type :
xcode-select --install
If you plan to deploy Ryzom on different Mac OS X versions, I suggest you to set MACOSX_DEPLOYMENT_TARGET environment variable before compiling any dependencies :
export MACOSX_DEPLOYMENT_TARGET=10.6
Installing Dependencies
- Run XCode once to accept the license agreement
- Launch the Terminal application and execute the following command in it.
sudo port install mercurial p7zip boost cmake curl freetype jpeg libwww libxml2 lua zlib libpng python_select libogg libvorbis python26 sudo port select --set python python26
- Install luabind, see Installing Luabind.
- note: if you get string.h not found error in macOS 10.14 run this command:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Get the sources
See Getting Source.
Build
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. The given list of CMake options is just an example. For a complete list see: CMake Options. Building a Ryzom Core client that depends on NeL and Ryzom shared libraries is strongly discouraged.
cd code mkdir build cd build
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 ..
make sudo make install
The install process created /Applications/ryzom_client.app
for you.
- Download the latest "Windows Ryzom Core client": Downloads for Windows
- Extract it and follow the instructions on Downloads for Mac.
To check which libraries are needed by your binary run:
otool -L bin/ryzom_client.app/Contents/MacOS/ryzom_client
You should only see libraries which reside in /usr/lib
or /System/Library/Frameworks
.
Universal binary
To create an universal binary for 32 and 64 bits Mac OS X versions, just append -DCMAKE_OSX_ARCHITECTURES="i386;x86_64"
to CMake command line.
Data
You can append -DRYZOM_DATA_DIR=<Ryzom data path> to CMake command-line to copy your data into bundle.
Create Distribution Package
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...)
Use the following command to create a compressed dmg for the pkg
hdiutil create ryzom_client.dmg -srcdir ryzom_client.app