Skip to content
Newer
Older
100644 199 lines (135 sloc) 5.75 KB
090db65 @rtv added notes on OS X 10.7 installation
authored Aug 5, 2011
1 Quick start: Build Stage from RTV's Github
2 ------------------------------------------
3
4 [Tested 2011.8.5 on OS X 10.7 Lion]
5
6 1) Install Stage's dependencies:
7
8 FLTK >=1.1
9 git
10 cmake
11 pkg-config
12
13 On the Mac I use Homebrew, since MacPorts installs way more than Stage needs (http://mxcl.github.com/homebrew/)
14
15 $ brew install --HEAD fltk cmake git pkg-config
16
17 If you want to use Player/Stage, install and test Player now.
18
19 2) Get and build Stage
20
21 $ mkdir stage4
22 $ cd stage4
23 $ git clone git://github.com/rtv/Stage.git
24 $ export STG=$HOME/stg
25 $ cmake -DCMAKE_INSTALL_PREFIX=$STG Stage
26 $ make
27
28 3) Install and set up environment
29
30 $ make install
31 $ export DYLD_LIBRARY_PATH=$STG/lib
32
33 4) Run Stage
34 $ stage Stage/worlds/simple.world
35
36 5) Please report build issues, bugs or other problems using the tracker at http://github.com/rtv/Stage/issues
37
38
39 --- Longer instructions ------------------------------------------
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored Feb 7, 2005
40
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
41 Build system
42 ------------
72c8156 bugfixes
rtv authored Jan 23, 2009
43 Stage is now built using the CMake build system (version 2.4.7 or
44 newer). This has two main advantages over the old GNU
45 autoconf/automake system: (i) it is much faster; (ii) CMake can create
46 native build files for Windows and Mac OS X, which will help Stage
47 become more portable.
9193b68 new files needed for Autotools
gerkey authored Aug 21, 2002
48
18d767c Added dependencies section to install docs
jeremy_asher authored Jul 11, 2008
49 Dependencies
50 ------------
996c281 replaced some c-strings with std::strings
rtv authored Sep 26, 2009
51 Building Stage requires the following tools and libraries:
18d767c Added dependencies section to install docs
jeremy_asher authored Jul 11, 2008
52
996c281 replaced some c-strings with std::strings
rtv authored Sep 26, 2009
53 - pkg-config
18d767c Added dependencies section to install docs
jeremy_asher authored Jul 11, 2008
54 - FLTK 1.1.x
55 - OpenGL
56 - libpng
57 - ltdl (Libtool)
9193b68 new files needed for Autotools
gerkey authored Aug 21, 2002
58
552aa07 @rtv preparing package for release 4.0.0
authored Nov 25, 2010
59 The optional Player plugin requires Player >= 2.1.
60
61 The optional Avonstage web-enabled binary requires Avon >= 0.1.
7f749cd preparing 3.1 rel
rtv authored Jul 22, 2009
62
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
63 Configuring the build
64 ---------------------
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
65 Unpack the distribution or check it out from SVN. Change directory to
66 the top level of the Stage source tree.
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored Feb 7, 2005
67
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
68 First, you may need to help CMake find your the libraries on which
69 Stage depends. For example, if you use MacPorts on OS X, packages are
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
70 usually installed in `/opt/local`, which is not in CMake's default
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
71 system search path. Add your non-standard software directories to
72 CMake's search paths by setting environment variables, e.g. in bash:
9193b68 new files needed for Autotools
gerkey authored Aug 21, 2002
73
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
74 $ export CMAKE_INCLUDE_PATH=/opt/local/include
75 $ export CMAKE_LIBRARY_PATH=/opt/local/lib
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored Feb 7, 2005
76
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
77 If you want to use Player with Stage, install Player first, then make
78 sure that pkg-config can find it. Test it like so:
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored Feb 7, 2005
79
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
80 $ pkg-config --modversion playercore
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored Feb 7, 2005
81
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
82 This should output the version number of the Player installation
83 (probably 2.2.0 or later). If not, add the location of Player's
7f749cd preparing 3.1 rel
rtv authored Jul 22, 2009
84 pkg-config file to your `PKG_CONFIG_PATH`, eg. in bash, and replacing <Player installation prefix> with the correct directory, do:
9193b68 new files needed for Autotools
gerkey authored Aug 21, 2002
85
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
86 $ export PKG_CONFIG_PATH+=<Player installation prefix>/lib/pkgconfig
9193b68 new files needed for Autotools
gerkey authored Aug 21, 2002
87
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
88 Now that the supporting software is set up, you can decide where you
89 want to install Stage. The default installation directory varies by
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
90 system, but is often `/usr/local` on Unix variants. This is easy and is
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
91 often a good choice, but has the disadvantage that installation needs
92 root/sudo priviliges. To install in the default location, do:
93
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
94 $ cmake .
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
95
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
96 If you wish to install Stage elsewhere, define the `CMAKE_INSTALL_PATH`
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
97 path variable when invoking cmake. To do this, use this command,
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
98 substituting `<prefix>` with your chosen installation
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
99 directory.
100
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
101 $ cmake -DCMAKE_INSTALL_PREFIX=<prefix> .
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
102
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
103 For example to install in `$HOME/playerstage`, do:
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
104
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
105 $ cmake -DCMAKE_INSTALL_PREFIX=$HOME/playerstage .
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
106
b4caa83 successfully generated, built and installed source package
rtv authored Jul 8, 2008
107 Cmake will generate makefiles specifically for your machine. When this
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
108 is done, you can inspect and edit the build settings by using ccmake:
109
110 $ ccmake .
111
112 or by editing the file CMakeCache.txt manually.
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
113
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
114 Building
115 --------
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
116 In the top level directory of the source tree, do:
117
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
118 $ make
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
119
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
120 Installing
121 ----------
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
122 In the top level directory of the source tree, do:
123
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
124 $ make install
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
125
126 (You may need to run this command as root or sudo, depending on the
127 install location).
128
129 Stage will install its components in various directories, for example:
130
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
131 <prefix>/bin (executables, including the 'stage' program)
132 <prefix>/lib (libraries, including libstage)
133 <prefix>/share (contains data resources, such as images)
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
134
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
135 Setup
136 -----
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
137 You must ensure that the dynamic library libstage.so (or
138 libstage.dylib, or libstage.dll, depending on your platform) can be
139 found by your system's library loader. The method for doing this
140 varies by platform.
141
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
142 On Linux, using bash:
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
143
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
144 $ export LD_LIBRARY_PATH=<prefix>/lib
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
145
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
146 On OS X, using bash:
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
147
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
148 $ export DYLD_LIBRARY_PATH=<prefix>/lib
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
149
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
150 If you plan to use Stage plugins, you also need to set the `STAGEPATH`
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
151 environment variable to include the directory that contains your
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
152 plugins. E.g. in bash, do:
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
153
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
154 $ export STAGEPATH=/usr/local/lib
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
155
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
156 If you installed Stage somewhere other than `/usr/local`, substitute
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
157 your install prefix:
158
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
159 $ export STAGEPATH=<stage install prefix>/lib
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
160
161 If you are using Stage with Player, you probably don't need to set the
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
162 `STAGEPATH`. However, you may need to set the `PLAYERPATH` to include
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
163 Stage's installed lib directory instead.
164
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
165 Testing
166 -------
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
167 To test your Stage installation, do:
168
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
169 $ <prefix>/bin/stage worlds/simple.world
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
170
171 You should see a window appear, showing some robots. You can change
172 the camera point of view by holding down the 'ctrl' key and moving the
173 mouse pointer. If this works, you are ready to write your own robot
174 simulations using libstage.
175
176 If you plan to use Stage plugins, you can test that plugins are
177 working:
178
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
179 $ <prefix>/bin/stage worlds/fasr.world
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
180
181 You should see a window appear, showing some robots. Try pressing the
182 'p' key to pause and un-pause the simulation, to check that the robots
183 are working. If this works, you are ready to write Stage plugins.
184
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored Jul 10, 2008
185 Next steps
186 ----------
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
187 - read the Stage manual, available from the Player Project website
188 (also buildable from the docsrc directory in the source tree
189 (requires doxygen)).
190
191 - look at the examples provided in the worlds and examples
192 directories.
193
194
195 Enjoy using Stage -- rtv
196
4fbd808 Fixed INSTALL formatting
jeremy_asher authored Jul 11, 2008
197 "All the world's a stage, and all the men and women merely players"
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored Jul 8, 2008
198 Wm. Shakespeare - "As you like it"
Something went wrong with that request. Please try again.