root/trunk/install_mcstas.bat

Revision 3111, 5.5 KB (checked in by erkn, 11 months ago)

McStas.pm was not installed - fixed that

  • Property svn:executable set to *
Line 
1@rem
2@rem   This file is part of the McStas neutron ray-trace simulation package
3@rem   Copyright (C) 1997-2004, All rights reserved
4@rem   Risoe National Laborartory, Roskilde, Denmark
5@rem   Institut Laue Langevin, Grenoble, France
6@rem
7@rem   This program is free software; you can redistribute it and/or modify
8@rem   it under the terms of the GNU General Public License as published by
9@rem   the Free Software Foundation; version 2 of the License.
10@rem
11@rem   This program is distributed in the hope that it will be useful,
12@rem   but WITHOUT ANY WARRANTY; without even the implied warranty of
13@rem   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14@rem   GNU General Public License for more details.
15@rem
16@rem   You should have received a copy of the GNU General Public License
17@rem   along with this program; if not, write to the Free Software
18@rem   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19@echo off
20@rem Simple batch script for installation of McStas on Win32 systems,
21@rem after build using Bloodshed Dev-Cpp.
22@rem
23@rem Please modify the path below for installing mcstas in non-standard
24@rem location
25
26@if "%NSIS%"=="AUTO" cd mcstas-%MCVERSION%
27@if "%NSIS%"=="AUTO" goto nsis
28
29@echo ** McStas install.bat for Win32...
30@echo ...
31@echo To have a fully functional McStas installation, you should have
32@echo   * Dec-Cpp from http://www.bloodshed.net/dev/devcpp.html
33@echo       Have it installed e.g. in C:\Dev-Cpp
34@echo       When installed, add the C:\Dev-Cpp\bin directory to your PATH
35@echo       Select from the Windows menu:
36@echo       Start/Settings/Control Panel/System/Advanced/Environment Variables
37@echo   * Perl and Tcl/Tk from:
38@echo       http://www.activestate.com/Products/Download
39@echo   IMPORTANT:
40@echo   You must install the ppm option with the Perl package!
41@echo   * Matlab or Scilab from http://www.scilab.org in C:\Scilab
42@echo       With Scilab, add the C:\Program Files\Scilab\bin (or equivalent)
43@echo       directory to your PATH
44@echo       Select from the Windows menu:
45@echo       Start/Settings/Control Panel/System/Advanced/Environment Variables
46@echo ...
47@echo WARNING: McStas 1.12 for Windows requires Scilab == 4.0 and Perl >= 5.6
48@echo ...
49@echo Use Ctrl-C if you want to break this script to install these packages or
50@pause
51@if "%DEVBIN%"=="" set DEVBIN=c:\Dev-CPP\bin
52@SET /P DEVBIN=Where is your Dev-CPP installation? (default is %DEVBIN%):
53@if "%DEVLIB%"=="" set DEVLIB=c:\Dev-CPP\libexec\gcc\mingw32\3.4.2
54@SET /P DEVLIB=What is the location of cc1.exe? (default is %DEVLIB%):
55@if "%PERLBIN%"=="" set PERLBIN=c:\perl\bin
56@SET /P PERLBIN=Where is your perl.exe? (default is %PERLBIN%):
57@if "%SCIBIN%"=="" set SCIBIN=c:\progra~1\scilab-4.0\bin
58@SET /P PERLBIN=Where is your Scilab? (default is %SCIBIN%):
59@if "%MCSTAS_SITE%"=="" set MCSTAS_SITE=c:\mcstas
60@SET /P MCSTAS_SITE=Set McStas base directory (default is %MCSTAS_SITE%):
61:nsis
62@set ORIGPATH=%PATH%
63@set PATH=%PERLBIN%;%SCIBIN%;%DEVBIN%;%DEVLIB%;%PATH%
64@echo Trying to guess your plotter and configuration...
65@mcconfig.pl
66@echo Installing in MCSTAS_SITE=%MCSTAS_SITE%
67@if exist %MCSTAS_SITE% move %MCSTAS_SITE% "%MCSTAS_SITE%.%DATE%"
68@echo Creating directory %MCSTAS_SITE%
69@mkdir %MCSTAS_SITE%
70:bin
71@if exist %MCSTAS_SITE%\bin goto lib
72@echo Creating directory %MCSTAS_SITE%\bin
73@mkdir %MCSTAS_SITE%\bin
74:lib
75@if exist %MCSTAS_SITE%\lib goto inst
76@echo Creating directory %MCSTAS_SITE%\lib
77@mkdir %MCSTAS_SITE%\lib
78:inst
79@echo Copying in the files...
80@copy src\mcstas.exe %MCSTAS_SITE%\bin
81@copy src\mcformat.exe %MCSTAS_SITE%\bin
82@copy src\mpicc.bat %MCSTAS_SITE%\bin
83@copy support\Win32\install\which.exe %MCSTAS_SITE%\bin
84@copy src\*.pl %MCSTAS_SITE%\bin
85@copy support\Win32\Perl\safewrap.pl %MCSTAS_SITE%\bin
86@copy support\Win32\pgplot\*.* %MCSTAS_SITE%\bin
87@copy support\Win32\gnuplot\*.* %MCSTAS_SITE%\bin
88@xcopy /e /y /q /i support\Win32\gnuplot\share %MCSTAS_SITE%\bin\share
89@xcopy /e /y /q /i support\Win32\gnuplot\etc %MCSTAS_SITE%\bin\etc
90@xcopy /e /y /q /i lib %MCSTAS_SITE%\lib
91@xcopy /e /y /q /i nlib %MCSTAS_SITE%\lib
92@echo Done
93@echo Doing doc update using mcdoc...
94@set PATH=%PATH%;%MCSTAS_SITE%\bin
95@set MCSTAS=%MCSTAS_SITE%\lib
96@mcdoc.pl --text
97@echo Placing Mcstas.pm in perl tree....
98@support\Win32\install\perlinst.pl Tk\CodeText\Bash.pm support\common\Perl\Tk-CodeText-0.3.4\CodeText\McStas.pm
99@echo ...............................................................
100@echo Modifying Windows registry for MCSTAS and PATH system variables
101@echo ...............................................................
102@reg add HKCU\Environment /v MCSTAS /d "%MCSTAS_SITE%\lib" /f
103@reg add HKCU\Environment /v PGPLOT_FONT /d "%MCSTAS_SITE%\bin\grfont.dat" /f
104@reg add HKCU\Environment /v PGPLOT_DIR /d "%MCSTAS_SITE%\bin" /f
105@reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATH /d "%MCSTAS_SITE%\bin;%PERLBIN%;%DEVBIN%;%DEVLIB%;%SCIBIN%;%ORIGPATH%" /f /t REG_EXPAND_SZ
106@reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATHEXT /d "%PATHEXT%;.pl%" /f /t REG_EXPAND_SZ
107@echo ..............................................................
108@echo .
109@echo Please log off and on again to finish the McStas setup!
110@echo .
111@echo After that, start McStas with the command mcgui.pl. You may create a
112@echo shortcut to this program situated in %MCSTAS_SITE%\bin. Put it on your
113@echo Desktop.
114@echo .
115@echo Thanks for using McStas. End of the installation.
116@if "%NSIS%"=="AUTO" goto end
117@pause
118:end
Note: See TracBrowser for help on using the browser.