Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 155 lines (107 sloc) 4.739 kB
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored
1
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
2 Build system
3 ------------
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
4 Stage is now built using the CMake build system (version 2.4.7 or newer).
5 This has two main advantages: (i) it is much faster; (ii) CMake can
6 create native build files for Windows and Mac OS X, which will help
7 Stage become more portable.
9193b68 new files needed for Autotools
gerkey authored
8
18d767c Added dependencies section to install docs
jeremy_asher authored
9 Dependencies
10 ------------
11 Building Stage requires the following libraries:
12
13 - FLTK 1.1.x
14 - OpenGL
15 - GLib 2
16 - libpng
17 - ltdl (Libtool)
9193b68 new files needed for Autotools
gerkey authored
18
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
19 Configuring the build
20 ---------------------
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
21 Unpack the distribution or check it out from SVN. Change directory to
22 the top level of the Stage source tree.
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored
23
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
24 First, you may need to help CMake find your the libraries on which
25 Stage depends. For example, if you use MacPorts on OS X, packages are
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
26 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
27 system search path. Add your non-standard software directories to
28 CMake's search paths by setting environment variables, e.g. in bash:
9193b68 new files needed for Autotools
gerkey authored
29
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
30 $ export CMAKE_INCLUDE_PATH=/opt/local/include
31 $ export CMAKE_LIBRARY_PATH=/opt/local/lib
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored
32
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
33 If you want to use Player with Stage, install Player first, then make
34 sure that pkg-config can find it. Test it like so:
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored
35
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
36 $ pkg-config --modversion playercore
f48d622 Modernized configure.in for autoconf 2.58 / automake 1.7.
gerkey authored
37
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
38 This should output the version number of the Player installation
39 (probably 2.2.0 or later). If not, add the location of Player's
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
40 pkg-config file to your `PKG_CONFIG_PATH`, eg. in bash:
9193b68 new files needed for Autotools
gerkey authored
41
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
42 $ export PKG_CONFIG_PATH+=<Player installation prefix>/lib/pkgconfig
9193b68 new files needed for Autotools
gerkey authored
43
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
44 Now that the supporting software is set up, you can decide where you
45 want to install Stage. The default installation directory varies by
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
46 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
47 often a good choice, but has the disadvantage that installation needs
48 root/sudo priviliges. To install in the default location, do:
49
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
50 $ cmake .
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
51
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
52 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
53 path variable when invoking cmake. To do this, use this command,
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
54 substituting `<prefix>` with your chosen installation
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
55 directory.
56
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
57 $ cmake -DCMAKE_INSTALL_PREFIX=<prefix> .
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
58
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
59 For example to install in `$HOME/playerstage`, do:
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
60
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
61 $ cmake -DCMAKE_INSTALL_PREFIX=$HOME/playerstage .
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
62
b4caa83 successfully generated, built and installed source package
rtv authored
63 Cmake will generate makefiles specifically for your machine. When this
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
64 is done, you can inspect and edit the build settings by using ccmake:
65
66 $ ccmake .
67
68 or by editing the file CMakeCache.txt manually.
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
69
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
70 Building
71 --------
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
72 In the top level directory of the source tree, do:
73
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
74 $ make
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
75
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
76 Installing
77 ----------
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
78 In the top level directory of the source tree, do:
79
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
80 $ make install
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
81
82 (You may need to run this command as root or sudo, depending on the
83 install location).
84
85 Stage will install its components in various directories, for example:
86
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
87 <prefix>/bin (executables, including the 'stage' program)
88 <prefix>/lib (libraries, including libstage)
89 <prefix>/share (contains data resources, such as images)
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
90
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
91 Setup
92 -----
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
93 You must ensure that the dynamic library libstage.so (or
94 libstage.dylib, or libstage.dll, depending on your platform) can be
95 found by your system's library loader. The method for doing this
96 varies by platform.
97
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
98 On Linux, using bash:
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
99
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
100 $ export LD_LIBRARY_PATH=<prefix>/lib
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
101
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
102 On OS X, using bash:
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
103
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
104 $ export DYLD_LIBRARY_PATH=<prefix>/lib
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
105
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
106 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
107 environment variable to include the directory that contains your
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
108 plugins. E.g. in bash, do:
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
109
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
110 $ export STAGEPATH=/usr/local/lib
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
111
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
112 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
113 your install prefix:
114
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
115 $ export STAGEPATH=<stage install prefix>/lib
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
116
117 If you are using Stage with Player, you probably don't need to set the
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
118 `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
119 Stage's installed lib directory instead.
120
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
121 Testing
122 -------
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
123 To test your Stage installation, do:
124
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
125 $ <prefix>/bin/stage worlds/simple.world
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
126
127 You should see a window appear, showing some robots. You can change
128 the camera point of view by holding down the 'ctrl' key and moving the
129 mouse pointer. If this works, you are ready to write your own robot
130 simulations using libstage.
131
132 If you plan to use Stage plugins, you can test that plugins are
133 working:
134
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
135 $ <prefix>/bin/stage worlds/fasr.world
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
136
137 You should see a window appear, showing some robots. Try pressing the
138 'p' key to pause and un-pause the simulation, to check that the robots
139 are working. If this works, you are ready to write Stage plugins.
140
3bd03c8 Documentation changed to source INSTALL file for instructions
jeremy_asher authored
141 Next steps
142 ----------
0304ea3 adding to config.h, removing dead files and moving some things around…
rtv authored
143 - read the Stage manual, available from the Player Project website
144 (also buildable from the docsrc directory in the source tree
145 (requires doxygen)).
146
147 - look at the examples provided in the worlds and examples
148 directories.
149
150
151 Enjoy using Stage -- rtv
152
4fbd808 Fixed INSTALL formatting
jeremy_asher authored
153 "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
154 Wm. Shakespeare - "As you like it"
Something went wrong with that request. Please try again.