Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 239 lines (159 sloc) 7.262 kb
62a6c7f @rtv preparing version 4.1.0 release
authored
1 Stage INSTALL.txt
2 =================
3
4 These are the Stage installation instructions, both quick and longer
5 versions. They are intended for experienced programmers. This is not a
6 tutorial.
7
8 For release notes see RELEASE.txt
9 For introduction and license see README.txt
10
11
090db65 @rtv added notes on OS X 10.7 installation
authored
12 Quick start: Build Stage from RTV's Github
13 ------------------------------------------
14
12bbec6 @rtv added Ubuntu instructions after testing new build scripts on Ubuntu 11.0...
authored
15 Tested 2011.8.5 on:
16
17 - OS X 10.7 Lion
18 - Ubuntu 11.04
090db65 @rtv added notes on OS X 10.7 installation
authored
19
0add340 @rtv started release notes for next release (4.1.0)
authored
20 1) Install Stage's dependencies (for Ubuntu and OS X specific instructions, see the next paragraph).
090db65 @rtv added notes on OS X 10.7 installation
authored
21
22 FLTK >=1.1
23 git
24 cmake
25 pkg-config
12bbec6 @rtv added Ubuntu instructions after testing new build scripts on Ubuntu 11.0...
authored
26 libpng
27 jpeglib
28 OpenGLU
090db65 @rtv added notes on OS X 10.7 installation
authored
29
0add340 @rtv started release notes for next release (4.1.0)
authored
30 On Ubuntu 11.10 I install these packages:
31
32 $ sudo apt-get install git cmake g++ fltk1.1-dev libjpeg8-dev libpng12-dev libglu1-mesa-dev libltdl-dev
33
34 On the Mac I use Homebrew, since MacPorts installs way more than Stage
35 needs (http://mxcl.github.com/homebrew/). First, install Apple's XCode
36 and enable the command-line build tools. Then brew the dependencies:
090db65 @rtv added notes on OS X 10.7 installation
authored
37
38 $ brew install --HEAD fltk cmake git pkg-config
39
0add340 @rtv started release notes for next release (4.1.0)
authored
40 (OS X has the graphics libs installed by default with XCode).
41
090db65 @rtv added notes on OS X 10.7 installation
authored
42 If you want to use Player/Stage, install and test Player now.
43
44 2) Get and build Stage
45
46 $ mkdir stage4
47 $ cd stage4
48 $ git clone git://github.com/rtv/Stage.git
49 $ export STG=$HOME/stg
50 $ cmake -DCMAKE_INSTALL_PREFIX=$STG Stage
51 $ make
52
53 3) Install and set up environment
54
55 $ make install
12bbec6 @rtv added Ubuntu instructions after testing new build scripts on Ubuntu 11.0...
authored
56
57 On OS X:
58
090db65 @rtv added notes on OS X 10.7 installation
authored
59 $ export DYLD_LIBRARY_PATH=$STG/lib
60
12bbec6 @rtv added Ubuntu instructions after testing new build scripts on Ubuntu 11.0...
authored
61 On Linux:
62
63 $ export LD_LIBRARY_PATH=$STG/lib
64
090db65 @rtv added notes on OS X 10.7 installation
authored
65 4) Run Stage
66 $ stage Stage/worlds/simple.world
67
68 5) Please report build issues, bugs or other problems using the tracker at http://github.com/rtv/Stage/issues
69
70
71 --- Longer instructions ------------------------------------------
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored
72
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
73 Build system
74 ------------
72c8156 bugfixes
rtv authored
75 Stage is now built using the CMake build system (version 2.4.7 or
76 newer). This has two main advantages over the old GNU
77 autoconf/automake system: (i) it is much faster; (ii) CMake can create
78 native build files for Windows and Mac OS X, which will help Stage
79 become more portable.
9193b68 new files needed for Autotools
gerkey authored
80
18d767c Added dependencies section to install docs
jeremy_asher authored
81 Dependencies
82 ------------
996c281 replaced some c-strings with std::strings
rtv authored
83 Building Stage requires the following tools and libraries:
18d767c Added dependencies section to install docs
jeremy_asher authored
84
996c281 replaced some c-strings with std::strings
rtv authored
85 - pkg-config
18d767c Added dependencies section to install docs
jeremy_asher authored
86 - FLTK 1.1.x
87 - OpenGL
88 - libpng
89 - ltdl (Libtool)
9193b68 new files needed for Autotools
gerkey authored
90
552aa07 @rtv preparing package for release 4.0.0
authored
91 The optional Player plugin requires Player >= 2.1.
92
93 The optional Avonstage web-enabled binary requires Avon >= 0.1.
7f749cd preparing 3.1 rel
rtv authored
94
40d3318 @mani-monaj Added some information about dependencies and opengl for Linux to INSTAL...
mani-monaj authored
95 On a typical Debian based Linux distribution (like Ubuntu & Mint) you can install above dependencies using this command: (assuming that you have already installed build tools like cmake and build-essentials)
96
97 sudo apt-get install pkg-config libfltk1.1-dev libgl1-mesa-dev libglu1-mesa-dev libpng12-dev libtool
98
99 Please note that OpenGL libraries (gl1 & glu1) come with graphics card drivers and they are vendor based, therefore you need to inatall required drivers for your graphics card first.
100
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
101 Configuring the build
102 ---------------------
40d3318 @mani-monaj Added some information about dependencies and opengl for Linux to INSTAL...
mani-monaj authored
103 Unpack the distribution or check it out from Git. Change directory to
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
104 the top level of the Stage source tree.
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored
105
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
106 First, you may need to help CMake find your the libraries on which
107 Stage depends. For example, if you use MacPorts on OS X, packages are
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
108 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 fo...
rtv authored
109 system search path. Add your non-standard software directories to
110 CMake's search paths by setting environment variables, e.g. in bash:
9193b68 new files needed for Autotools
gerkey authored
111
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
112 $ export CMAKE_INCLUDE_PATH=/opt/local/include
113 $ export CMAKE_LIBRARY_PATH=/opt/local/lib
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored
114
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
115 If you want to use Player with Stage, install Player first, then make
116 sure that pkg-config can find it. Test it like so:
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored
117
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
118 $ pkg-config --modversion playercore
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored
119
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
120 This should output the version number of the Player installation
121 (probably 2.2.0 or later). If not, add the location of Player's
7f749cd preparing 3.1 rel
rtv authored
122 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
123
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
124 $ export PKG_CONFIG_PATH+=<Player installation prefix>/lib/pkgconfig
9193b68 new files needed for Autotools
gerkey authored
125
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
126 Now that the supporting software is set up, you can decide where you
127 want to install Stage. The default installation directory varies by
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
128 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 fo...
rtv authored
129 often a good choice, but has the disadvantage that installation needs
130 root/sudo priviliges. To install in the default location, do:
131
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
132 $ cmake .
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
133
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
134 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 fo...
rtv authored
135 path variable when invoking cmake. To do this, use this command,
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
136 substituting `<prefix>` with your chosen installation
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
137 directory.
138
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
139 $ cmake -DCMAKE_INSTALL_PREFIX=<prefix> .
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
140
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
141 For example to install in `$HOME/playerstage`, do:
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
142
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
143 $ cmake -DCMAKE_INSTALL_PREFIX=$HOME/playerstage .
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
144
b4caa83 successfully generated, built and installed source package
rtv authored
145 Cmake will generate makefiles specifically for your machine. When this
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
146 is done, you can inspect and edit the build settings by using ccmake:
147
148 $ ccmake .
149
150 or by editing the file CMakeCache.txt manually.
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
151
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
152 Building
153 --------
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
154 In the top level directory of the source tree, do:
155
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
156 $ make
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
157
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
158 Installing
159 ----------
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
160 In the top level directory of the source tree, do:
161
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
162 $ make install
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
163
164 (You may need to run this command as root or sudo, depending on the
165 install location).
166
167 Stage will install its components in various directories, for example:
168
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
169 <prefix>/bin (executables, including the 'stage' program)
170 <prefix>/lib (libraries, including libstage)
171 <prefix>/share (contains data resources, such as images)
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
172
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
173 Setup
174 -----
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
175 You must ensure that the dynamic library libstage.so (or
176 libstage.dylib, or libstage.dll, depending on your platform) can be
177 found by your system's library loader. The method for doing this
178 varies by platform.
179
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
180 On Linux, using bash:
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
181
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
182 $ export LD_LIBRARY_PATH=<prefix>/lib
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
183
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
184 On OS X, using bash:
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
185
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
186 $ export DYLD_LIBRARY_PATH=<prefix>/lib
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
187
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
188 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 fo...
rtv authored
189 environment variable to include the directory that contains your
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
190 plugins. E.g. in bash, do:
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
191
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
192 $ export STAGEPATH=/usr/local/lib
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
193
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
194 If you installed Stage somewhere other than `/usr/local`, substitute
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
195 your install prefix:
196
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
197 $ export STAGEPATH=<stage install prefix>/lib
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
198
199 If you are using Stage with Player, you probably don't need to set the
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
200 `STAGEPATH`. However, you may need to set the `PLAYERPATH` to include
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
201 Stage's installed lib directory instead.
202
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
203 Testing
204 -------
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
205 To test your Stage installation, do:
206
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
207 $ <prefix>/bin/stage worlds/simple.world
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
208
209 You should see a window appear, showing some robots. You can change
210 the camera point of view by holding down the 'ctrl' key and moving the
211 mouse pointer. If this works, you are ready to write your own robot
212 simulations using libstage.
213
214 If you plan to use Stage plugins, you can test that plugins are
215 working:
216
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
217 $ <prefix>/bin/stage worlds/fasr.world
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
218
219 You should see a window appear, showing some robots. Try pressing the
220 'p' key to pause and un-pause the simulation, to check that the robots
221 are working. If this works, you are ready to write Stage plugins.
222
40d3318 @mani-monaj Added some information about dependencies and opengl for Linux to INSTAL...
mani-monaj authored
223 (If the stage window is flicking or some texts are not shown properly on Linux, try to disable compiz, if it is enabled)
224
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
225 Next steps
226 ----------
0304ea3 adding to config.h, removing dead files and moving some things around fo...
rtv authored
227 - read the Stage manual, available from the Player Project website
228 (also buildable from the docsrc directory in the source tree
229 (requires doxygen)).
230
231 - look at the examples provided in the worlds and examples
232 directories.
233
234
235 Enjoy using Stage -- rtv
236
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
237 "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 fo...
rtv authored
238 Wm. Shakespeare - "As you like it"
Something went wrong with that request. Please try again.