Install

(for the WIN32 installation go to the end of this document)

extract the archive in the directory of your choice:

tar xvfz archive_name

before compilation you must have installed the library gtk+, then type these well known commands:

./configure

make

make install (as root: this will install the program in /usr/local/bin)

The executable created will be named STK_x.xx (x.xx is version number);

The make install command is implemented: it will install the executable in /usr/local/bin;

you must be root to execute it, because users have no access to /usr/local, and /usr in general.

But you can also install where you want: in your home directory for example, but it is not recommended to avoid several versions of the same executable duplicated anywhere.

(Usually the executables are installed in /usr/local/bin).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From GTK2.12.0, the GtkFileSelection widget has been declared deprecated.

It can be still used by adding comments (dnl) in configure.in file, to the 3 following lines:

dnl -DGDK_DISABLE_DEPRECATED \

dnl -DGTK_DISABLE_DEPRECATED \

dnl -DG_DISABLE_DEPRECATED \

Very important note:

Since the version 0.21 it is NECESSARY to create the environment variables in the following files :

.profile or /etc/profile.local (SuSE)

or ./bash_profile (RedHat, Fedora Core) ;

here is an example that you can copy and paste in your .profile or .bash_profile :

#necessary for STK and Utilities Programs

export STK_TMP=/tmp

export STK_BITE_ORDER=TO_SWAP

export STK_LOG=~/STK_Log

#optional for STK

export STK_SAC_BIN_PATH=/tmp/sac.bin

export STK_SAC_ASCII_PATH=/tmp/sac_ascii

#could be necessary for non US language

export LC_NUMERIC=en_US.utf-8

The 3 first (STK_TMP, STK_BYTE_ORDER, and STK_LOG) are absolutely necessary; the 3 others are optional .

Thus, each user will have its own log files, and also the utilities programs that use the also the same environment variables will work properly (especially for the directory containing the LOG files and tmp files).

An other easy way to create versatile variables, without declaring them 'for life' in /etc/profile,

is to create a shell program which will run stk, with the variables declared inside;

but IT IS NOT RECOMMANDED because the UTILITIES PROGRAMS will not have the benefit of the environment variables.

The life time of environment variables will be only those of the shell.



*Note that when you get signal in SAC_BIN from IRIS internet site,

they are always in the MOTOROLA byte order,

so if you work on a PC (with INTEL byte order), you must swap the binary data,

and set the environment variable to the following:

export BITE_ORDER=TO_SWAP

Of course, on the contrary if the variable is set to : BYTE_ORDER=NO_SWAP

the byte order of data will be not changed.

An example of shell is also jointed in the archive.



The other environment variables (STK_SAC_BIN_PATH and STK_SAC_ASCII_PATH) are not necessary,

but they save time and fingers, because they are pointing directly on the directories containing the signals.

So opening a file will be very straightforward and rapid. If they do not exist, it is not a cause of error, simply,

you will need to type the path to data at every run of stk.

Suppose that usually, the ASCII_SAC data are stored in /tmp/sac_ascii,

and the SAC_BIN data are stored in /tmp/sac_bin, then set these environment variables to the following:

export STK_SAC_BIN_PATH=/tmp/sac.bin

export STK_SAC_ASCII_PATH=/tmp/sac_ascii

The variable LC_NUMERIC is not necessary if the computer is set in US language, else it is necessary to avoid some problems of display.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you experience difficulties to compile, here are some suggestions:



If ./configure and make still not work, you can type the following, in this order:

rm -rf .deps (or delete it with your file manager)

rm -rf autom4te.cache (or delete it with your file manager)

rm aclocal.m4

aclocal

autoconf

automake –add-missing

automake

./configure

to install the new libraries gtk+-2.0 you need all the following archives or packages:

gtk, glib and atk can be download on www.gtk.org

pango on www.pango.org

for pkgconfig search it in google for example (not difficult)

  1. pkconfig

  2. glib (latest stable release of course)

  3. pango

  4. atk

  5. gtk+ >= 2.2

    install them in this order . To install it always the same procedure:

./configure

make

make install (do not forget this ! Else the installation of others componants will not work)

by default it will be installed in /usr/local and libraries in /usr/local/lib : perfect !

In principle there is not problem of compilation, because pkgconfig do all the work for searching path and dependancies,

so install it first.

The pkg-config utility is necessary; theoretically it is doing all the work, for searching all the libraries and includes needed.

The file configure.in contains all the flags for the compilation, including all the work that will be done by pkg-config.

The old libraries GTK1.2.x and the new one GTK2.x can lie simultaneously in the system without bad interferences; but you need to install the new GTK2.x and glib2.x from the version 0.14 of STK.

To run pkg-config, type : pkg-config gtk+-2.0 --cflags –libs (there is also the help with pkg-config –-help).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Nota:

you can find the path to gtk.h forexample, with the following commands:

locate gtk.h

locate glibconfig.h

etc ..

or, if locate is not installed: (as root)

find / > /tmp/list

grep gtk.h /tmp/list

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Installation of GTK+ for WIN32
------------------------------

there is a one-click (very easy) installation procedure, go to the following link:
http://gimp-win.sourceforge.net/stable.html

then download the GTK+ 2 Runtime Environment for Windows 2000 and newer):
gtk+-2.8.18-setup-1.zip
 
this executable will install the libraries of GTK+ for win32
//////////////////////////////////////////////////////////////



back to the index