root/trunk/INSTALL.TXT

Revision 2919, 4.6 KB (checked in by farhi, 21 months ago)

INSTALL: update installation info from SVN

Line 
1/*******************************************************************************
2*
3* McStas, neutron ray-tracing package
4*         Copyright 1997-2002, All rights reserved
5*         Risoe National Laboratory, Roskilde, Denmark
6*         Institut Laue Langevin, Grenoble, France
7*
8* Documentation: INSTALL
9*
10* %Identification
11* Written by: KN
12* Date: 1997
13* Origin: Risoe
14* Release: all McStas
15* Version: $Revision: 1.18 $
16*
17* This file is part of McStas.
18* It details the installation procedure
19*
20*******************************************************************************/
21
22To install from the SVN repository, use e.g.:
23
24  ./configure --enable-mcstas OR ./configure --enable-mcxtrace
25  make
26  sudo make install
27
28
29
30NOTE: This document is obsolete - please refer to the documents in
31
32  install_docs/tex/install.*
33  install_docs/html/install.html
34
35McStas uses autoconf to detect the system configuration and create the
36proper Makefiles needed for compilation. On Unix-like systems, you
37should be able to compile and install McStas using the following steps:
38
391. Unpack the sources to somewhere convenient and change to the source
40   directory:
41
42  gunzip -c mcstas-<release>.tar.gz | tar xf -
43  cd mcstas-<release>/
44
452. Configure and compile McStas:
46
47  ./configure
48  make
49
503. Install McStas:
51
52  make install
53
54You should now be able to use McStas. For some examples to try, see the
55examples/ directory.
56
57The installation of McStas in step 3 by default installs in the
58/usr/local/ directory, which on most systems requires superuser (root)
59privileges. To install in another directory, use the --prefix= option to
60configure in step 2. For example,
61
62  ./configure --prefix=/home/joe
63
64will install the McStas programs in /home/joe/bin/ and the library files
65needed by McStas in /home/joe/lib/mcstas/.
66
67In case ./configure makes an incorrect guess, some environment variables
68can be set to override the defaults:
69
70 - The CC environment variable may be set to the name of the C compiler
71   to use (this must be an ANSI C compiler). This will also be used for
72   the automatic compilation of McStas simulations in mcgui and mcrun.
73 - CFLAGS may be set to any options needed by the compiler (eg. for
74   optimization or ANSI C conformance). Also used by mcgui/mcrun.
75 - PERL may be set to the path of the Perl interpreter to use.
76
77To use these options, set the variables before running ./configure. Eg.
78
79    setenv PERL /pub/bin/perl5
80    ./configure
81
82It may be necessary to remove configure's cache of old choices first:
83
84    rm -f config.cache
85
86If you experience any problems, or have some questions or ideas
87concerning McStas, please contact kristian.nielsen@risoe.dk.
88
89
90Installing on non-Unix systems
91==============================
92
93Windows:
94
95McStas can be installed on Windows machines, including all support applications
96(scilab, PGPLOT, VRML viewer, C compiler, perl, perl-Tk). The installer is a standard
97executable. Launch it and follow the instructions.
98
99Macintosh:
100
101McStas can be installed on Mac OSX machines, including all support applications
102(scilab, PGPLOT, PDL, VRML viewer, C compiler, perl, perl-Tk).
103We provide a dmg installer containing information on the installation
104procedure.
105
106
107Troubleshooting
108===============
109
110[Also see the FAQ at http://mcstas.org/documentation/faq for
111up-to-date help on common problems in McStas.]
112
113You should try to make sure that the directory containing the McStas
114binaries (mcstas, gscan, mcdisplay, etc.) is contained in the PATH
115environment variable. The default directory is /usr/local/bin, which is
116usually, but not always, included in PATH. Alternatively, you can
117reference the McStas programs using the full path name, ie.
118
119  /usr/local/bin/mcstas my.instr
120  perl /usr/local/bin/mcrun -N10 -n1e5 mysim -f output ARG=42
121  perl /usr/local/bin/mcdisplay --multi mysim ARG=42
122
123This may also be necessary for the front-end programs if the install
124procedure could not determine the location of the perl interpreter on
125your system.
126
127If McStas is installed properly, it should be able to find the files it
128needs automatically. If not, you should set the MCSTAS environment
129variable to the directory containing the runtime files "mcstas-r.c" and
130"mcstas-r.h" and the standard components (*.comp). Use one of
131
132  MCSTAS=/usr/local/lib/mcstas; export MCSTAS     # sh, bash
133  setenv MCSTAS /usr/local/lib/mcstas             # csh, tcsh
134
135The PGPLOT library, which is used by the mcdisplay frontend, needs the
136PGPLOT_DIR environment variable to be set to the directory containing
137PGPLOT, eg.
138
139  PGPLOT_DIR=/usr/lib/pgplot; export PGPLOT_DIR   # sh, bash
140  setenv PGPLOT_DIR /usr/lib/pgplot               # csh, tcsh
141
142See the PGPLOT documentation for details.
Note: See TracBrowser for help on using the browser.