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

Last change on this file since 244 was 244, checked in by barrand, 17 years ago
File size: 5.0 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 CLHEP_home=/usr/local/CLHEP/2.0.3.1
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% UNIX`) 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 Geant4_home=/usr/local/geant4/8.2
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 HDF5_home=/usr/local/HDF5/1.6.5
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% UNIX`) 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 OSC_home=/usr/local/OpenScientist/v16r0
88:end_if_platform_7
89SET obuild_platform_result=
90IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
91IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
92  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
93  IF EXIST obuild_find.obj DEL obuild_find.obj
94)
95FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
96cd "%obuild_snovis_path%\%obuild_dir_bin%"
97IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
98FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
99cd "%obuild_pwd_snovis_0%"
100SET obuild_pwd_snovis_0=
101IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
102
103REM # Execute setup of used packages :
104IF NOT EXIST "%obuild_snova_path%\obuild\setup.bat"  ECHO setup.bat not found for package snova.  && GOTO obuild_return
105CALL "%obuild_snova_path%\obuild\setup.bat"
106@ECHO OFF
107
108REM # Set environment variables of this package :
109SET SNOVISROOT=%obuild_snovis_path%
110SET ONXROOT=%OSC_home%\Resources\OnX
111SET ONXLABROOT=%OSC_home%\Resources\OnXLab
112SET G4LABROOT=%obuild_snovis_path%\Resources\G4Lab
113
114IF DEFINED PATH GOTO else_if_path_snovis_12
115  SET PATH=%obuild_snovis_path%\%obuild_dir_bin%
116  GOTO end_if_path_snovis_12
117:else_if_path_snovis_12
118  SET PATH=%PATH%;%obuild_snovis_path%\%obuild_dir_bin%
119:end_if_path_snovis_12
120
121:obuild_return
122
123SET obuild_snovis_path=
124
125REM # FIXME SET obuild_platform=
126REM # FIXME SET obuild_dir_bin=
127
128@ECHO ON
Note: See TracBrowser for help on using the repository browser.