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 odeInstalling 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 installRunning 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/rcssserver3dI 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
Mac 下搭建 RoboCup3d 安装环境
最新推荐文章于 2022-07-11 17:10:55 发布