

             ________
            /        \________  _______
            \         \       \|       \
         ____\     ___/____   /|_       \
        /     \     \    \    \ |        \
        \            \____\_   \|         \
         \___________/          \    |    /
                 s3D \__________/________/

						INSTALL




1. Preparing
------------


Before being able to install s3d and the sample programs, you need to prepare
the build, and compile s3d.

You will need to setup CMake first. The following assumes that cmake 2.4.4 or
better is available and installed into a directory listed in the $PATH
environment variable. It is possible to run cmake direct from the source
directory, but we recommend to create a directory from where you start cmake.

$ mkdir build
$ cd build
$ cmake .. [-DPROFILING=ON|OFF] [-DDEBUG=VLOW|LOW|MED|HIGH|VHIGH] \
           [-DBUILD_LTO=ON|OFF] [-DEXAMPLES=ON|OFF] \
	   [-DCMAKE_INSTALL_PREFIX=...]

This will configure s3d. Use the -DCMAKE_INSTALL_PREFIX command line argument to
select a different prefix to install s3d into. The default is /usr/local, so
binaries will get installed into /usr/local/bin, libraries into /usr/local/lib,
and documentation into /usr/local/share/doc/s3d-version. If you are intending to
work on s3d, you can use the -DDEBUG argument to enable building a debug
version. Likewise, -DPROFILING=ON will enable a version compiled for profiling.
Link time optimisation can be enabled by setting -DBUILD_LTO=ON.

You can use ccmake to ccmake to set additional cmake cache variables.

$ ccmake ..

2. Building
-----------

After configure has finished, you can start the build of s3d:

$ make

in the build directory will compile server, client-lib and the examples for you.


3. Installing
-------------

Because of the new plugins, things need to be installed before you can test.

$ make install

installs s3d in the selected prefix (default /usr/local/*), you may need to
become root first.

$ s3d --no-rc

fires up the server. Uf you're lucky, a X11 window appears. Now the s3d is
listening on TCP port 6066.
Now it's time to test some things. on another terminal:

$ cd examples
$ ./modelloader ../objs/miu.3ds

now there should appear a rotating cat. you can move with with the middle
mouse-button pushed.
now you can try the MCP, which is something like a windowmanager in X:

$ cd apps/dot_mcp
$ ./dot_mcp

now you should get some fancy window decorations :D
there are a few other examples, just play around

4. s3drc
--------

We recommend to make use of the .s3drc. The idea is the same as in .xinitrc,
starting the window manager (the mcp) along with the server. When the .s3drc
is finished, the server will go down with it (so you can press a "quit" button
in the mcp).

Give it a try:

$ cat << EOF > ~/.s3drc
#!/bin/sh
dot_mcp
EOF
$ s3d

(note, this time without --no-rc)
