en it

Installation for Unix distributions

If your system is a Unix-like one, including any flavour of GNU/Linux or MacOS X, it is quite easy to directly compile Radiance from the source tarball.

The steps involved are:

  1. Ensure that the development tools are installed on your system
  2. Download the latest source tarball
  3. Extract it to a folder on the local hard-drive
  4. Compile and install the source code
  5. Set up the environment variables PATH and RAYPATH

Alternatively, you can try to download and install precompiled Radiance binaries, or to install from a Debian package.

Development tools

You will need at least a C compiler like gcc (GNU C compiler) to build the Radiance binaries, plus the make programme. In fact, the standard method to compile Radiance is to use the makeall script. Alternatively, the scons programme can be used, and this means having python installed on your system (this is installed usually by default on recent GNU/Linux distributions).

RPM based systems

On RPM based systems, like Fedora or Red Hat Linux, you should be able to install gcc and make, and/or python and scons with yum from the root account:

yum install gcc
yum install make

or using sudo:

sudo yum install gcc
sudo yum install make

If you prefer to use scons for the installation, you can run a similar command:

sudo yum install scons

Many Radiance scripts will need to have tcsh installed as well:

sudo yum install tcsh

Debian based systems

On Debian based systems, you can use the following commands as root:

apt-get install gcc
apt-get install make

or using sudo (for instance if you are using Ubuntu Linux):

sudo apt-get install gcc
sudo apt-get install make

Similarly, you can install scons if you prefer:

sudo apt-get install scons

Many Radiance scripts will need to have tcsh installed as well:

sudo apt-get install tcsh

MacOS X

All the development tools you need for OSX are installed when you install the optional Xcode development environment for OSX. Download the .dmg from Apple’s developer website, and install as you would any other Apple OSX application.

Be sure to do a full installation, including the X11 tools!

Download the latest Radiance source tarballs

The latest Radiance source tarballs can be downloaded from this page: http://www.radiance-online.org/software/.

There are two files that are required to compile Radiance:

Extract source tarball to hard-drive

After downloading the two files listed above and saving them to the folder you like, open a terminal window and go to that folder with the cd command.

cd /path/to/folder/

You then have to uncompress the archives:

tar zxvf rad3R8supp.tar.gz
tar zxvf radiance-HEAD.tgz

This will create a folder called ray.

Go to this folder:

cd ray

Compile and install the source code

Now you can choose to compile Radiance in two ways:

  1. using the standard makeall script
  2. using scons

Compile Radiance using the makeall script

First you need to decide where to install Radiance. The standard locations are /usr/local/bin for the binaries and /usr/local/lib/ray for the library. Generally, you need to have root privileges to access these folders, so be ready to use sudo or change to the root account if you want to install there.

For this example, let’s suppose you want install Radiance in our home folder. So you create a specific radiance folder, and bin, lib and man folders (the symbol ~ is used on Unix system to indicate the home folder):

mkdir ~/radiance
mkdir ~/radiance/bin
mkdir ~/radiance/lib

Now, from within the ray folder, you need to launch the makeall script:

./makeall

This script will ask you to confirm your favourite editor (type the name of your favourite editor here, and hit enter) the license terms (type yes and hit enter), where you want to put the binaries (type ~/radiance/bin and hit enter), which platform you are using to build Radiance (type the number according to the type of operating system that you are using and hit enter) and where and if to install the library (enter ~/radiance/lib and yes).

Finally, the script will ask you to confirm if you want to edit the rmake script. You can safely avoid this if you don’t feel like wanting to make any change. This is an opportunity to change the special flag (for instance you can type ogl for the special variable to compile the OpenGL programmes) or to optimise the gcc options.

After this, the compiling process will begin, and will stop with either a

Done.

or a

There were some errors.

which I hope you will not get!

If the compilation has been successful, you will find the binaries and library files in the ~/radiance/bin and ~/radiance/lib directories.

Compile Radiance using scons

To compile Radiance using scons, simply go to the ray folder and type:

scons build

This will create a bin folder with the binaries in it.

You can now create your radiance folder where you prefer, and move the binaries and libraries in it. For instance, if you want to create the radiance folder in your home directory as above, type the following:

mkdir ~/radiance
mv bin ~/radiance
mv lib ~/radiance

Set up the environment variables PATH and RAYPATH

The final step is to set up the environment variables on your system. This depends on whether you use a c-shell (csh) type system or a bash-like system.

Most GNU/Linux systems use bash.

Environment variables for a bash-like system

Still in the case of using the ~/radiance folder, for bash, type the following at the end of your ~/.bashrc file using your favourite editor:

export PATH=.:~/radiance/bin:$PATH
export RAYPATH=.:~/radiance/lib

You will need to logout and login again to use Radiance, or run

source ~/.bashrc

if you cannot wait.

Environment variables for a c-shell system

If you are using the c-shell, type the following at the end of your ~/.login or ~/.profile file using your favourite editor:

setenv PATH .:${HOME}/radiance/bin:${PATH}
setenv RAYPATH .:${HOME}/radiance/lib

You will need to logout and login again to use Radiance.

Optional: Install manual pages

This step is optional, but highly recommended.

To be able to read the Radiance manual pages with a command like:

man rpict

you will need to install them. They are located inside the ray/doc/man folder.

To install the manual pages just move this folder into the radiance directory. If you are still in the ray directory, run:

mv ray/doc/man ~/radiance/

You will then need to add the following line to the ~/.bashrc or file

export MANPATH=~/radiance/man:$MANPATH

or:

setenv MANPATH ${HOME}/radiance/man:${MANPATH}

to ~/.login or ~/.profile if you are using a c-shell.

Test your Radiance installation

It is finally time to test your Radiance installation. You can try it on some sample scenes, located in the ray/obj folder.

For example, move to ray/obj/misc and run:

make

You should then see something like this:

The Radiance daffodil


standard_unix_distribution.txt · Last modified: 2008/02/03 23:22 by pisuke
Recent changes · Show pagesource · Login