| 1 | @rem
|
|---|
| 2 | @rem This file is part of the McXtrace 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 McXtrace on Win32 systems,
|
|---|
| 21 | @rem after build using Bloodshed Dev-Cpp.
|
|---|
| 22 | @rem
|
|---|
| 23 | @rem Please modify the path below for installing mcxtrace in non-standard
|
|---|
| 24 | @rem location
|
|---|
| 25 |
|
|---|
| 26 | @if "%NSIS%"=="AUTO" cd mcxtrace-%MCVERSION%
|
|---|
| 27 | @if "%NSIS%"=="AUTO" goto nsis
|
|---|
| 28 |
|
|---|
| 29 | @echo ** McXtrace install.bat for Win32...
|
|---|
| 30 | @echo ...
|
|---|
| 31 | @echo To have a fully functional McXtrace 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: McXtrace 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 "%MCXTRACE_SITE%"=="" set MCXTRACE_SITE=c:\mcxtrace
|
|---|
| 60 | @SET /P MCXTRACE_SITE=Set McXtrace base directory (default is %MCXTRACE_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 | @src\mcconfig.pl
|
|---|
| 66 | @echo Installing in MCXTRACE_SITE=%MCXTRACE_SITE%
|
|---|
| 67 | @if exist %MCXTRACE_SITE% move %MCXTRACE_SITE% "%MCXTRACE_SITE%.%DATE%"
|
|---|
| 68 | @echo Creating directory %MCXTRACE_SITE%
|
|---|
| 69 | @mkdir %MCXTRACE_SITE%
|
|---|
| 70 | :bin
|
|---|
| 71 | @if exist %MCXTRACE_SITE%\bin goto lib
|
|---|
| 72 | @echo Creating directory %MCXTRACE_SITE%\bin
|
|---|
| 73 | @mkdir %MCXTRACE_SITE%\bin
|
|---|
| 74 | :lib
|
|---|
| 75 | @if exist %MCXTRACE_SITE%\lib goto inst
|
|---|
| 76 | @echo Creating directory %MCXTRACE_SITE%\lib
|
|---|
| 77 | @mkdir %MCXTRACE_SITE%\lib
|
|---|
| 78 | :inst
|
|---|
| 79 | @echo Copying in the files...
|
|---|
| 80 | @copy src\mcxtrace.exe %MCXTRACE_SITE%\bin
|
|---|
| 81 | @copy src\mxformat.exe %MCXTRACE_SITE%\bin
|
|---|
| 82 | @copy support\Win32\install\mpicc.bat %MCXTRACE_SITE%\bin
|
|---|
| 83 | @copy support\Win32\install\which.exe %MCXTRACE_SITE%\bin
|
|---|
| 84 | @copy src\mcconvert.pl %MCXTRACE_SITE%\bin\mxconvert.pl
|
|---|
| 85 | @copy src\mcdaemon.pl %MCXTRACE_SITE%\bin\mxdaemon.pl
|
|---|
| 86 | @copy src\mcdisplay.pl %MCXTRACE_SITE%\bin\mxdisplay.pl
|
|---|
| 87 | @copy src\mcdoc.pl %MCXTRACE_SITE%\bin\mxdoc.pl
|
|---|
| 88 | @copy src\mcformatgui.pl %MCXTRACE_SITE%\bin\mxformatgui.pl
|
|---|
| 89 | @copy src\mcgui.pl %MCXTRACE_SITE%\bin\mxgui.pl
|
|---|
| 90 | @copy src\mcplot.pl %MCXTRACE_SITE%\bin\mxplot.pl
|
|---|
| 91 | @copy src\mcresplot.pl %MCXTRACE_SITE%\bin\mxresplot.pl
|
|---|
| 92 | @copy src\mcrun.pl %MCXTRACE_SITE%\bin\mxrun.pl
|
|---|
| 93 | @copy support\Win32\Perl\safewrap.pl %MCXTRACE_SITE%\bin
|
|---|
| 94 | @copy support\Win32\pgplot\*.* %MCXTRACE_SITE%\bin
|
|---|
| 95 | @copy support\Win32\gnuplot\*.* %MCXTRACE_SITE%\bin
|
|---|
| 96 | @xcopy /e /y /q /i support\Win32\gnuplot\share %MCXTRACE_SITE%\bin\share
|
|---|
| 97 | @xcopy /e /y /q /i support\Win32\gnuplot\etc %MCXTRACE_SITE%\bin\etc
|
|---|
| 98 | @xcopy /e /y /q /i lib %MCXTRACE_SITE%\lib
|
|---|
| 99 | @xcopy /e /y /q /i xlib %MCXTRACE_SITE%\lib
|
|---|
| 100 | @echo Done
|
|---|
| 101 | @echo Doing doc update using mcdoc...
|
|---|
| 102 | @set PATH=%PATH%;%MCXTRACE_SITE%\bin
|
|---|
| 103 | @set MCSTAS=%MCXTRACE_SITE%\lib
|
|---|
| 104 | @mxdoc.pl --text
|
|---|
| 105 | @echo Placing Mcstas.pm in perl tree....
|
|---|
| 106 | @support\Win32\install\perlinst.pl Tk\CodeText\Bash.pm support\common\Perl\Tk-CodeText-0.3.4\CodeText\McStas.pm
|
|---|
| 107 | @echo ...............................................................
|
|---|
| 108 | @echo Modifying Windows registry for MCSTAS and PATH system variables
|
|---|
| 109 | @echo ...............................................................
|
|---|
| 110 | @reg add HKCU\Environment /v MCSTAS /d "%MCXTRACE_SITE%\lib" /f
|
|---|
| 111 | @reg add HKCU\Environment /v PGPLOT_FONT /d "%MCXTRACE_SITE%\bin\grfont.dat" /f
|
|---|
| 112 | @reg add HKCU\Environment /v PGPLOT_DIR /d "%MCXTRACE_SITE%\bin" /f
|
|---|
| 113 | @reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATH /d "%MCXTRACE_SITE%\bin;%PERLBIN%;%DEVBIN%;%DEVLIB%;%SCIBIN%;%ORIGPATH%" /f /t REG_EXPAND_SZ
|
|---|
| 114 | @reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATHEXT /d "%PATHEXT%;.pl%" /f /t REG_EXPAND_SZ
|
|---|
| 115 | @echo ..............................................................
|
|---|
| 116 | @echo .
|
|---|
| 117 | @echo Please log off and on again to finish the McXtrace setup!
|
|---|
| 118 | @echo .
|
|---|
| 119 | @echo After that, start McXtrace with the command mxgui.pl. You may create a
|
|---|
| 120 | @echo shortcut to this program situated in %MCXTRACE_SITE%\bin. Put it on your
|
|---|
| 121 | @echo Desktop.
|
|---|
| 122 | @echo .
|
|---|
| 123 | @echo Thanks for using McXtrace. End of the installation.
|
|---|
| 124 | @if "%NSIS%"=="AUTO" goto end
|
|---|
| 125 | @pause
|
|---|
| 126 | :end
|
|---|