root/tags/mcxtrace_beta/INSTALL.TXT

Revision 2658, 4.4 KB (checked in by farhi, 2 years ago)

update mkdist with mccode.h files

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