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