source: snovis/head/obuild/setup.bat @ 88

Last change on this file since 88 was 6, checked in by barrand, 16 years ago
File size: 9.7 KB
Line 
1@ECHO OFF
2
3REM #
4REM # File produced by the obuild tool version 1.0
5REM # for the package snovis with version v1r0.
6REM #
7
8REM #////////////////////////////////////////////////
9REM # Usage :
10REM #   DOS> setup
11REM # or :
12REM #   DOS> setup.bat
13REM # or :
14REM #   DOS> call setup.bat
15REM #////////////////////////////////////////////////
16
17SET obuild_snovis_path=%~dp0
18REM # Remove ending \obuild\
19SET obuild_snovis_path=%obuild_snovis_path:~0,-8%
20
21IF "%OBUILD_PLATFORM%" == "" (
22  IF "%OS%" == "" ECHO Environment variable OS not found. & GOTO obuild_return
23  SET obuild_platform=%OS%
24) ELSE (
25  SET obuild_platform=%OBUILD_PLATFORM%
26)
27
28IF "%obuild_platform%" == "" (
29  ECHO obuild_platform variable not defined.
30  GOTO obuild_return
31)
32
33IF "%OBUILD_DIR_BIN%" == "" (
34  SET obuild_dir_bin=%obuild_platform%_obuild
35) ELSE (
36  SET obuild_dir_bin=%OBUILD_DIR_BIN%
37)
38
39IF "%obuild_dir_bin%" == "" (
40  ECHO obuild_dir_bin variable not defined.
41  GOTO obuild_return
42)
43
44IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
45IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" (
46  cl.exe /nologo /DWIN32 /MD /O2 /W3  /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" "%obuild_snovis_path%\obuild\cpp\obuild_platform.cpp"
47  IF EXIST obuild_platform.obj DEL obuild_platform.obj
48)
49
50FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
51cd "%obuild_snovis_path%\%obuild_dir_bin%"
52IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
53FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
54cd "%obuild_pwd_snovis_0%"
55SET obuild_pwd_snovis_0=
56IF %obuild_platform_result% == yes (
57SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p1
58)
59SET obuild_platform_result=
60FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
61cd "%obuild_snovis_path%\%obuild_dir_bin%"
62IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
63FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
64cd "%obuild_pwd_snovis_0%"
65SET obuild_pwd_snovis_0=
66IF %obuild_platform_result% == yes (
67SET bhep_platform=Darwin
68)
69SET obuild_platform_result=
70FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
71cd "%obuild_snovis_path%\%obuild_dir_bin%"
72IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
73FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
74cd "%obuild_pwd_snovis_0%"
75SET obuild_pwd_snovis_0=
76IF %obuild_platform_result% == yes (
77SET GeomUtils_home=/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/GeomUtils
78)
79SET obuild_platform_result=
80FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
81cd "%obuild_snovis_path%\%obuild_dir_bin%"
82IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
83FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
84cd "%obuild_pwd_snovis_0%"
85SET obuild_pwd_snovis_0=
86IF %obuild_platform_result% == yes (
87SET GeomUtils_platform=Darwin-i386
88)
89SET obuild_platform_result=
90FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
91cd "%obuild_snovis_path%\%obuild_dir_bin%"
92IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
93FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
94cd "%obuild_pwd_snovis_0%"
95SET obuild_pwd_snovis_0=
96IF %obuild_platform_result% == yes (
97SET SNgeom2_home=/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/SNgeom2
98)
99SET obuild_platform_result=
100FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
101cd "%obuild_snovis_path%\%obuild_dir_bin%"
102IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
103FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
104cd "%obuild_pwd_snovis_0%"
105SET obuild_pwd_snovis_0=
106IF %obuild_platform_result% == yes (
107SET snova_home=/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/snova
108)
109SET obuild_platform_result=
110FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
111cd "%obuild_snovis_path%\%obuild_dir_bin%"
112IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
113FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
114cd "%obuild_pwd_snovis_0%"
115SET obuild_pwd_snovis_0=
116IF %obuild_platform_result% == yes (
117SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
118)
119SET obuild_platform_result=
120FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
121cd "%obuild_snovis_path%\%obuild_dir_bin%"
122IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
123FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
124cd "%obuild_pwd_snovis_0%"
125SET obuild_pwd_snovis_0=
126IF %obuild_platform_result% == yes (
127SET Geant4_home=/geant4/geant4.8.2
128)
129SET obuild_platform_result=
130FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
131cd "%obuild_snovis_path%\%obuild_dir_bin%"
132IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
133FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
134cd "%obuild_pwd_snovis_0%"
135SET obuild_pwd_snovis_0=
136IF %obuild_platform_result% == yes (
137SET Geant4_work=${Geant4_home}/Darwin
138)
139SET obuild_platform_result=
140FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
141cd "%obuild_snovis_path%\%obuild_dir_bin%"
142IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
143FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
144cd "%obuild_pwd_snovis_0%"
145SET obuild_pwd_snovis_0=
146IF %obuild_platform_result% == yes (
147SET Geant4_work=${Geant4_home}/slc3_gcc323
148)
149SET obuild_platform_result=
150FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
151cd "%obuild_snovis_path%\%obuild_dir_bin%"
152IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
153FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
154cd "%obuild_pwd_snovis_0%"
155SET obuild_pwd_snovis_0=
156IF %obuild_platform_result% == yes (
157SET Geant4_system=Darwin-g++
158)
159SET obuild_platform_result=
160FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
161cd "%obuild_snovis_path%\%obuild_dir_bin%"
162IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
163FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
164cd "%obuild_pwd_snovis_0%"
165SET obuild_pwd_snovis_0=
166IF %obuild_platform_result% == yes (
167SET Geant4_system=Linux-g++
168)
169SET obuild_platform_result=
170FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
171cd "%obuild_snovis_path%\%obuild_dir_bin%"
172IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
173FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
174cd "%obuild_pwd_snovis_0%"
175SET obuild_pwd_snovis_0=
176IF %obuild_platform_result% == yes (
177SET Geant4_system=WIN32-VC
178)
179SET obuild_platform_result=
180IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
181IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
182  cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" "%obuild_snovis_path%\obuild\cpp\obuild_find.cpp"
183  IF EXIST obuild_find.obj DEL obuild_find.obj
184)
185FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
186cd "%obuild_snovis_path%\%obuild_dir_bin%"
187IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
188FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  OnX v17r*`) DO SET obuild_OnX_path=%%j
189cd "%obuild_pwd_snovis_0%"
190SET obuild_pwd_snovis_0=
191IF NOT DEFINED obuild_OnX_path  ECHO Can't find OnX package.  && GOTO obuild_return
192FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
193cd "%obuild_snovis_path%\%obuild_dir_bin%"
194IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
195FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j
196cd "%obuild_pwd_snovis_0%"
197SET obuild_pwd_snovis_0=
198IF NOT DEFINED obuild_G4Lab_path  ECHO Can't find G4Lab package.  && GOTO obuild_return
199
200REM # Execute setup of used packages :
201IF NOT EXIST "%obuild_OnX_path%\obuild\setup.bat"  ECHO setup.bat not found for package OnX.  && GOTO obuild_return
202CALL "%obuild_OnX_path%\obuild\setup.bat"
203@ECHO OFF
204
205IF NOT EXIST "%obuild_G4Lab_path%\obuild\setup.bat"  ECHO setup.bat not found for package G4Lab.  && GOTO obuild_return
206CALL "%obuild_G4Lab_path%\obuild\setup.bat"
207@ECHO OFF
208
209REM # Set environment variables of this package :
210SET SNOVISROOT=%obuild_snovis_path%
211SET G4RADIOACTIVEDATA=%Geant4_home%\data\RadiativeDecay3.1
212SET G4LEVELGAMMADATA=%Geant4_home%\data\PhotonEvaporation2.0
213SET G4LEDATA=%Geant4_home%\data\G4EMLOW4.2
214SET NeutronHPCrossSections=%Geant4_home%\data\G4NDL3.10
215
216IF NOT DEFINED PATH (
217  SET PATH=%obuild_snovis_path%\%obuild_dir_bin%
218) ELSE (
219  SET PATH=%PATH%;%obuild_snovis_path%\%obuild_dir_bin%
220)
221
222:obuild_return
223
224SET obuild_snovis_path=
225
226REM # FIXME SET obuild_platform=
227REM # FIXME SET obuild_dir_bin=
228
229@ECHO ON
Note: See TracBrowser for help on using the repository browser.