Mac 下搭建 RoboCup3d 安装环境

Tested on OS X 10.7.2

Installing Tools

================================================================================

- Xcode (used 4.1, although 4.2 is out and should work fine) This is necessary for gcc. I downloaded it from the App Store. - CMake (tested 2.8.6) I used the binary for Mac OSX 64/32-bit Universal from here: http://www.cmake.org/cmake/resources/software.html -MacPorts A package manager for OS X that is useful for compiling and maintaining open-source UNIX software (similar to apt-get). http://www.macports.org/install.php

Installing Libraries

================================================================================

From command-line, install the following (boost will take a long time!)

$ sudo port install boost $ sudo port install ruby $ sudo port install freetype $ sudo port install libsdl $ sudo port install libdevil $ sudo port install ode

Installing Simspark

================================================================================

1. Checkout latest revision

$ svn co https://simspark.svn.sourceforge.net/svnroot/simspark simspark --------------------------------------------------------------------------------

2. Modify 

simspark/trunk/spark/lib/zeitgeist/scriptserver/scriptserver.cpp and

replace the following line (should be 611 or so):

pkgdatadir += "Contents/Resources/"; to pkgdatadir += "../share/simspark/";

This was necessary because for some reason the devs treat compiles on Apple differently and assume the scripts (spark.rb, zeitgeist.rb, kerosin.rb, etc.) will be in strange places. My change assumes that you will install everything to the default of /usr/local (as in Linux).

--------------------------------------------------------------------------------

3. Compile and install spark, just like linux:

$ cd simspark/trunk/spark $ mkdir build $ cd build $ cmake .. $ make $ sudo make install --------------------------------------------------------------------------------

4. Compile and install rcssserver3d, just like linux:

$ cd simspark/trunk/rcssserver3d $ mkdir build $ cd build $ cmake .. $ make $ sudo make install

Running Simspark

================================================================================

Everything should have compiled and installed successfully by this point. However, if you run rcsssserver3d from command-line you will get an error: dyld: Library not loaded: libspark.0.dylib Referenced from: /usr/local/bin/rcssserver3d Reason: image not found Trace/BPT trap: 5 On linux the solution is to modify /etc/ld.so.conf and do sudo ldconfig, but on OS X this is not a solution. I wrote a simple script to launch the server:

#!/bin/bash export DYLD_LIBRARY_PATH=/usr/local/lib/simspark/:/usr/local/lib/rcssserver3d/ /usr/local/bin/rcssserver3d

I save the above into a file ~/scripts/rcssserver3d.sh. I then put an alias in my ~/.bash_profile: alias rcssserver3d=~/scripts/rcssserver3d.sh From the terminal, I can now start a server by simply typing rcssserver3d. You could also modify the PATH to include the script. It is also possible to just add the "export DYLD_LIBRARY_PATH=鈥�" part to your bash_profile but this is not recommended.

参考文献:

http://web.cs.miami.edu/home/jstoecker/files/simspark-osx.txt

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值