source: snovis/trunk/obuild/setup.bat @ 101

Last change on this file since 101 was 101, checked in by barrand, 16 years ago
File size: 6.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 v1r1.
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" 1> NUL
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 NOT %obuild_platform_result% == yes GOTO end_if_platform_1
57SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2
58:end_if_platform_1
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 NOT %obuild_platform_result% == yes GOTO end_if_platform_3
67SET bhep_platform=Darwin
68:end_if_platform_3
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 NOT %obuild_platform_result% == yes GOTO end_if_platform_5
77SET snova_home=/Users/barrand/dev/exp/nemo/snova/v2r0p0
78:end_if_platform_5
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 NOT %obuild_platform_result% == yes GOTO end_if_platform_7
87SET snova_platform=Darwin
88:end_if_platform_7
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 NOT %obuild_platform_result% == yes GOTO end_if_platform_9
97SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
98:end_if_platform_9
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 NOT %obuild_platform_result% == yes GOTO end_if_platform_11
107SET Geant4_home=/usr/local/geant4/8.2
108:end_if_platform_11
109SET obuild_platform_result=
110IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
111IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
112  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" 1> NUL
113  IF EXIST obuild_find.obj DEL obuild_find.obj
114)
115FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
116cd "%obuild_snovis_path%\%obuild_dir_bin%"
117IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
118FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  OnX v17r*`) DO SET obuild_OnX_path=%%j
119cd "%obuild_pwd_snovis_0%"
120SET obuild_pwd_snovis_0=
121IF NOT DEFINED obuild_OnX_path  ECHO Can't find OnX package.  && GOTO obuild_return
122FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
123cd "%obuild_snovis_path%\%obuild_dir_bin%"
124IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
125FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j
126cd "%obuild_pwd_snovis_0%"
127SET obuild_pwd_snovis_0=
128IF NOT DEFINED obuild_G4Lab_path  ECHO Can't find G4Lab package.  && GOTO obuild_return
129
130REM # Execute setup of used packages :
131IF NOT EXIST "%obuild_OnX_path%\obuild\setup.bat"  ECHO setup.bat not found for package OnX.  && GOTO obuild_return
132CALL "%obuild_OnX_path%\obuild\setup.bat"
133@ECHO OFF
134
135IF NOT EXIST "%obuild_G4Lab_path%\obuild\setup.bat"  ECHO setup.bat not found for package G4Lab.  && GOTO obuild_return
136CALL "%obuild_G4Lab_path%\obuild\setup.bat"
137@ECHO OFF
138
139REM # Set environment variables of this package :
140SET SNOVISROOT=%obuild_snovis_path%
141SET G4RADIOACTIVEDATA=%Geant4_home%\data\RadiativeDecay3.1
142SET G4LEVELGAMMADATA=%Geant4_home%\data\PhotonEvaporation2.0
143SET G4LEDATA=%Geant4_home%\data\G4EMLOW4.2
144SET NeutronHPCrossSections=%Geant4_home%\data\G4NDL3.10
145
146IF DEFINED PATH GOTO else_if_path_snovis_17
147  SET PATH=%obuild_snovis_path%\%obuild_dir_bin%
148  GOTO end_if_path_snovis_17
149:else_if_path_snovis_17
150  SET PATH=%PATH%;%obuild_snovis_path%\%obuild_dir_bin%
151:end_if_path_snovis_17
152
153:obuild_return
154
155SET obuild_snovis_path=
156
157REM # FIXME SET obuild_platform=
158REM # FIXME SET obuild_dir_bin=
159
160@ECHO ON
Note: See TracBrowser for help on using the repository browser.