Chapter 2 : 3DVIEWNIX Installation Procedure


2.1 Installing The 3DVIEWNIX System Files

We distribute the 3DVIEWNIX software system in the form of source code. Installation involves compiling all programs that constitute the system and will take at least 30 minutes to complete. (After compilation on a Sun workstation, for example, the 3DVIEWNIX system would be approximately 65 MB if you use static libraries, and 25 MB if you use dynamic libraries.) Installing the files consists of the following steps.

1. Create a system directory for 3DVIEWNIX. This directory should be accessible to the users at run time for reading and execution. The path name of this directory will be referred to as in the following instructions. It is recommended that you do not move this directory or any modules or directories from this directory after installation.

2. Load the system files onto the 3DVIEWNIX directory.
2.1. If you received a tape, the system files would be on a "tar" file at the beginning of the tape. Use the "tar" Unix command to extract the system files to the 3DVIEWNIX system directory.
2.2. If you received 3.5" Sun formatted diskettes, each of these disks contains one tar file. Use the "tar" Unix command to extract all files from each of the system disks to the 3DVIEWNIX system directory.
2.3. If you received a 3.5" DOS formatted diskettes you would have to use the "cp" Unix command or some disk reading utility to copy over the files from all system disks to the 3DVIEWNIX system directory.
2.4. If you receive the data over the network (using ftp) two directories would be created in the specified directory. One would be called SYSTEM and the other would be called DATA. You should copy the files in the SYSTEM directory to the 3DVIEWNIX system directory. Once the files are loaded, you should see the following files in your 3DVIEWNIX system directory:
(a) makefile
(b) install
(c) A set of files that begin with "view" followed by 3 digits.

3. Before starting the installation procedure you should edit the "makefile" in the 3DVIEWNIX system directory to make sure that the include paths and library paths for compilation (especially X11 include and library) are setup properly. We recommend that you change the values of only the following variables in the makefile: CC, X11LIBDIR, X11INCLUDEDIR, CFLAGS. Improperly set values or major changes to this makefile may cause the installation to fail.
The default for the X11LIBDIR and X11INCLUDEDIR variables is empty. This should cause the compiler to use the default paths. Default for CC is "cc" and CFLAGS contains the optimization option "-O". We strongly recommend that you use dynamically linked 3DVIEWNIX libraries if your system supports it. We cannot provide a general solution that would work on all systems but we have included the support for dynamic libraries for the Sun workstations. To install the system with dynamic libraries on Sun workstations, change the variable VIEWNIXLIB in the main makefile. That line should now show

 
 VIEWNIXLIB = $(VIEWNIX_ENV)/LIBRARY/lib3dviewnix.so.1.0
This change would reduce the total size of the BIN directory by almost two thirds.

4. You should now be ready to run the "install" script on the main 3DVIEWNIX directory. As certain installation procedures make use of the current directory, make sure you "cd" to the 3DVIEWNIX system directory before running the installation procedure.

Do not be alarmed if you see a few error messages and the installation continues. The installation program is written to work in many environments and uses commands that are required in some and not available in others; if a command is not available, you may see a fatal error that is ignored. Also some compilers give many warnings and still compile successfully.

The Installation follows the following steps.
Note: you do not have to execute any of the following. The script would do it for you.
Concatenates all files which begin with "view" followed by 3 digits and creates a new file called view_.tar.Z Uncompresses this file. Uses "tar" to extract all 3DVIEWNIX 1.0 system directories. executes the global makefile (one that you edited in step 3) with all_cleaned option. This option would recursively compile the library and each of the processes, cleaning up the object code after each module is compiled.)

5. Should the installation fail, you may want to edit the makefile based upon the error message you see. You may require some Unix, C and system administration knowledge to do so.

2.2 Installing 3DVIEWNIX Data Files

Note: These files are not necessary for using 3DVIEWNIX. They are provided for you to test 3DVIEWNIX after installation and for purposes of familiarization with the 3DVIEWNIX system. To feed your own data into 3DVIEWNIX, refer to the sections on PORT-DATA. Installing data files consists of the following steps.

1. Create a directory for the data. At run time the data will need to be available in the user's current directory. You can either install the data in the users' directory or have the users link the data files to their directory after installation. Note that a user must have write permission in the current directory to run 3DVIEWNIX,and only one session of 3DVIEWNIX can be run in a directory at one time.

2. Load the data files onto this directory. There are three independent sets of data. You can extract any combination of them.
2.1. If you received a tape, the data files would be on the second, third, and fourth "tar" files of the tape. Use the "tar" Unix command to extract the data files to the data directory.
2.2. If you received 3.5" Sun formatted diskettes, each of these disks contains one "tar" file. Use the "tar" Unix command to extract the files from each of the data disks to the data directory.
2.3. If you received 3.5" DOS formatted diskettes, you will have to use the "cp" Unix command or some disk reading utility to copy over the files on the data disks to the data directory.
2.4. If you receive the data over the network (using ftp) two directories would be created in the specified directory. One would be called SYSTEM and the other would be called DATA. You should copy the files in the DATA directory to the data directory.
Once the files are loaded you should see the following files in your data directory.

(a) instdata
(b) A set of files that begin with either "data_x", "data_y" or "data_z"
followed by 2 digits.
(c) "readme.x", "readme.y", or "readme.z".

The sets "x","y","z" contain the three independent sets of data. The contents and size of each of these sets are described in their respective readme files.

3. Now you can install the data according to the space that you have. To install all data sets, run the "instdata" script. This would extract all data into the current directory. If you want to install only one set, specify the sets you would like to install as arguments to instdata". For example,

   instdata x z
would install the data sets x and z.

2.3 Running 3DVIEWNIX

Note: You should have an X-Window server with a minimum visual class of 8-bit GrayScale. Otherwise 3DVIEWNIX will not be able to display any windows and images. You may run into problems if you have a .profile file that resets the PATH variable. (3DVIEWNIX uses the system command to start up new shells and the 3DVIEWNIX path should be visible to the new shell.)

In order to run 3DVIEWNIX you must "cd" to the directory where the data files are, or create links of the data files to your working directory. You must have write permission in the directory, and there must be no 3DVIEWNIX session in progress in that directory.

There are two ways to start 3DVIEWNIX.

1. The "viewnix" script can be run with the following options:

% /PROCESS/BIN/viewnix [visual-class] [-display machine-name:0.0]
3DVIEWNIX supports GrayScale, PseudoColor and DirectColor visual classes. If no visual class is specified in the arguments, then the default for the specified server is used. On most machines this is the 8-bit PseudoColor visual class. Please remember that the machine on which 3DVIEWNIX runs must also be X-Windows and must give access permission to the host. This can be easily done by using the "xhost +" command. Sometimes when you try running 3DVIEWNIX you might get a message like:
 The current 3DVIEWNIX user is mary. Try later on.
This indicates that someone else is trying to access 3DVIEWNIX from the same directory as you are. This is not allowed and this is prevented by creating the file "3DVIEWNIX_RUN". In the unlikely event that the program "3DVIEWNIX" crashes, "3DVIEWNIX_RUN" may not be automatically removed. Please remove this file to restart after a crash.

2. Alternatively the user can set environment and path and then run 3DVIEWNIX with the above options. A typical example is shown below : If the user's Unix shell is /bin/csh or /bin/tcsh:

% setenv VIEWNIX_ENV 
% set path=($VIEWNIX_ENV/PROCESS/BIN $path)
% setenv LD_LIBRARY_PATH ($LD_LIBRARY_PATH:$VIEWNIX_ENV/LIBRARY)
If the user's Unix shell is /bin/sh, /bin/ksh, or /bin/bash:
 
$VIEWNIX_ENV=
$PATH=$VIEWNIX_ENV/PROCESS/BIN:$PATH
$LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$VIEWNIX_ENV/LIBRARY
$export VIEWNIX_ENV PATH LD_LIBRARY_PATH
LD_LIBRARY_PATH applies only if the dynamic library is used.

2.4 3DVIEWNIX Parameters

Under the 3DVIEWNIX directory there is a sub-directory called FILES which contains the following files:

ACRNEMA_V1.0.STD
SCENE_V1.0.SPC
STRUCTURE_V1.0.SPC
DISPLAY_V1.0.SPC
3DVIEWNIX.ERR
DEFAULT
ERROR_CODES
FONTNAME
HELPFILE
SIMPLE_MENU
MENU_TREE
TAPE_PATH_NAME
Of these files the installation manager should modify FONTNAME and TAPE_PATH_NAME to customize it for a particular server.

FONTNAME:

This ascii file lists the fonts that are used by 3DVIEWNIX. The fonts are listed for each window of the 3DVIEWNIX system in the following order:
IMAGE_WINDOW_FONT
DIALOG_WINDOW_FONT
MOUSE_WINDOW_FONT
TITLE_WINDOW_FONT
This file can be used (and modified) to customize the fonts for a particular server.
The systems administrator has to make sure that the fonts used here are available on the server. Should the font specified be unavailable or should the specified fonts be inconsistent with the 3DVIEWNIX minimum requirements, 3DVIEWNIX first tries to use a fixed size font for all windows. If that fails, it tries to use the variable size font. If that fails, it uses 6X10 font for all windows. If that also fails, then 3DVIEWNIX cannot run on that server.

TAPE_PATH_NAME:

This is an ascii file that contains a list of hosts and the device names on these machines that are accessible to the 3DVIEWNIX users. This requires that all users have the following:

An account on each of the machines.
They can access their account remotely without giving a password.

(This can be accommodated by running a Network Information Service server or by asking each 3DVIEWNIX user to have a .rhosts file which would give access to the machines on which 3DVIEWNIX is running.)

They can access the device on these hosts. They should be able to run the "dd" and "mt" unix commands on the host machine.
The format in which some scanners output the data is not a standard ascii format. If so mt fails when you try to skip files with some data formats. Thus 3DVIEWNIX has its own command to do this. This program is called mtfsf.c and is available in PROCESS/PORT_DATA/SIGNA in the main 3DVIEWNIX directory. This file should be copied over to each of the host machines specified in the TAPE_PATH_NAME file and should be compiled as follows.

% cc mtfsf.c -o mtfsf
It is also important that all 3DVIEWNIX users who plan to use the tape drive have this executable in their path on all host machines.

The format of the TAPE_PATH_NAME file is as follows.

machine_name1   device1  mt_option  tape_size
machine_name2   device2  mt_option  tape_size
:               :
where machine_name indicates the name of the machine the tape drive is mounted on; device indicates the name of the tape drive which does not rewind the tape automatically ( i.e., /dev/nrst1); mt_option indicates the option to be used by the "mt" command to specify the tape device; tape_size indicates what kind of tape device (e.g., 1/4inch, 1/2inch, 8mm) it is.
User Manual Library Ref. Manual Tutorial