Quick Start for CIT Users

From VrlWiki
Jump to navigation Jump to search

These are terse instructions for setting up a typical sandbox at Brown using Linux. Even if you intend to develop on a different platform such as Windows you should initially get set up on Linux. If you need more explicit instructions or you want a more complex setup then revert back to the full instructions.

Create your Sandbox

Create a user directory for yourself in the groups work area. Be sure to use your login name as the directory name.

> mkdir  /map/gfx0/users/$USER


Set Environment Variables

Setup your environment variables in the login script for your shell. If you are using Windows you will also want to set these variables on your Windows system as well.

                 Linux                           Windows

 CVSROOT   /map/gfx0/cvsroot                 Y:\map\gfx0\cvsroot
 GROOT     /map/gfx0                         Y:\map\gfx0
 G         /map/gfx0/users/$USER             Y:\map\gfx0\users\<User ID>
 GTO       /map/gfx0/users/$USER             Y:\map\gfx0\users\<User ID>
 GARCH     linux                             WIN32


The G_COMPILER variable is set to the compiler you want to work with. This may change depending on project requirements. Most projects will build if you set it to gcc4 on linux and cl9 on Windows. Supported settings are:

gcc2           gcc version 2.95
gcc3           gcc version 3.4
gcc4           gcc version 4.1
cl6            Microsoft Studio version 6
cl8            Microsoft Studio version 8 (2005)
cl9            Microsoft Studio version 9 (2008)


Also on Linux set your umask in your login shell to: 002

umask  002

Get the Build System

The common/ directory has the build make files and shared programs and libraries written at Brown. You only need the common/build/ directory to develop programs, but since you probably will eventually want other common code just check the whole directory out.

> cd  /map/gfx0/users/$USER
> cvs co common


When software is installed (via the "make install" command) it is copied to the install directory. There is an install directory for each platform. Create install directories for Linux and Windows with:

> mkdir  /map/gfx0/users/$USER/install_linux
> mkdir  /map/gfx0/users/$USER/install_WIN32


The install directories are populated by a "make install" command and are organized like this:

install_linux/lib/<Project Name>/lib*.a
install_linux/bin/<Project Name>/<Program>
install_linux/include/<Project Name>/*.h


Try a simple build to see that everything is properly set up.

> cd  /map/gfx0/users/$USER/common/utility
> make  all                       # Build the utilities.
> make install                    # Install the utilities.


This should populate the install directory. Take a look with:

> ls  /map/gfx0/users/$USER/install_linux/*/*

Get Project Code

Project code is kept in CVS under the project/ directory. Note that inside your sandbox project code can be kept in any directory and you can have multiple versions of projects in different directories. If you want to work with a project already in CVS then you can check it out now.

> cd  /map/gfx0/users/$USER
> cvs  co  project/<Project Name>


If you want to create a new project then make a new directory for it in your sandbox.

> mkdir  -p  /map/gfx0/users/$USER/project/<Project Name>


You are free to organize your project within the new directory as you wish. For instructions on writing make files visit:

https://sourceforge.net/apps/mediawiki/vrg3d/index.php?title=Writing_Make_Files

Get Third Party Software

Many projects depend on downloaded software. Create the import/ directory in your sandbox where downloaded software is installed.

> mkdir  /map/gfx0/users/$USER/import


The packages you need are determined by the projects you are working on. Project documentation is the first place to check for required software. Copies of some packages are installed in a shared public area, however the public area may not have the versions your projects require and the installations may change over time without notice. The only sure fire method is to download and install the software.

To see how the import/ directory is organized and what packages are installed browse the public installations:

/map/gfx0/tools/linux/import/...


If there is a copy there that looks like one you need you can first try it and if it doesn't work then download and install your own copy. Copy the packages you need from the public area to your own:

> copy  -R  /map/gfx0/tools/linux/import/<Package>  /map/gfx0/users/$USER/import


Build a Project on Windows

Windows users need a few Unix utilities installed to build projects. You can check these out of cvs with:

> cd   /map/gfx0/users/$USER
> cvs  co  import/make


Check to see that the utilities are in: /map/gfx0/users/$USER/import/make/g.utility_1.0/

On your Windows system you will need to add this path to the front of your PATH environment variable. After it is set verify that you can run these utilities from the command line.

If you've not already done so, set your environment variables according to section 2. Run the 'cmd.exe' shell and try:

> cd/d  Y:\map\gfx0\users\<User ID>\common\utility
> make  all
> make  install

Finally inspect Y:\map\gfx0\users\$lt;User ID>\install_WIN32 to ensure it was properly populated.