root/tags/mcxtrace_beta/install.bat

Revision 2123, 5.2 KB (checked in by pkwi, 4 years ago)

Implementing perl 5.10 (In principle, changes to the setup.bat are unneeded as we now provide the nulsoft installer).

  • 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 mcstas.exe %MCSTAS_SITE%\bin
81@copy mcformat.exe %MCSTAS_SITE%\bin
82@copy mpicc.bat %MCSTAS_SITE%\bin
83@copy support\Win32\which.exe %MCSTAS_SITE%\bin
84@copy *.pl %MCSTAS_SITE%\bin
85@copy support\pgplot_win32\*.* %MCSTAS_SITE%\bin
86@xcopy /e /y /q /i lib %MCSTAS_SITE%\lib
87@echo Done
88@echo Doing doc update using mcdoc...
89@set PATH=%PATH%;%MCSTAS_SITE%\bin
90@set MCSTAS=%MCSTAS_SITE%\lib
91@mcdoc.pl --text
92@echo Placing Mcstas.pm in perl tree....
93@support\win32\perlinst.pl Tk\CodeText\Bash.pm support\Tk-CodeText-0.3.4\CodeText\McStas.pm
94@echo ...............................................................
95@echo Modifying Windows registry for MCSTAS and PATH system variables
96@echo ...............................................................
97@reg add HKCU\Environment /v MCSTAS /d "%MCSTAS_SITE%\lib" /f
98@reg add HKCU\Environment /v PGPLOT_FONT /d "%MCSTAS_SITE%\bin\grfont.dat" /f
99@reg add HKCU\Environment /v PGPLOT_DIR /d "%MCSTAS_SITE%\bin" /f
100@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
101@reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATHEXT /d "%PATHEXT%;.pl%" /f /t REG_EXPAND_SZ
102@echo ..............................................................
103@echo .
104@echo Please log off and on again to finish the McStas setup!
105@echo .
106@echo After that, start McStas with the command mcgui.pl. You may create a
107@echo shortcut to this program situated in %MCSTAS_SITE%\bin. Put it on your
108@echo Desktop.
109@echo .
110@echo Thanks for using McStas. End of the installation.
111@if "%NSIS%"=="AUTO" goto end
112@pause
113:end
Note: See TracBrowser for help on using the browser.