[6] | 1 | @ECHO OFF |
---|
| 2 | |
---|
| 3 | REM # |
---|
| 4 | REM # File produced by the obuild tool version 1.0 |
---|
[101] | 5 | REM # for the package snovis with version v1r1. |
---|
[6] | 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" ( |
---|
[92] | 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 |
---|
[6] | 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 |
---|
[137] | 53 | FOR /F "usebackq" %%j IN (`.\obuild_platform.exe %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j |
---|
[6] | 54 | cd "%obuild_pwd_snovis_0%" |
---|
| 55 | SET obuild_pwd_snovis_0= |
---|
[92] | 56 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1 |
---|
[137] | 57 | SET CLHEP_home=/usr/local/CLHEP/2.0.3.1 |
---|
[92] | 58 | :end_if_platform_1 |
---|
[6] | 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 |
---|
[134] | 63 | FOR /F "usebackq" %%j IN (`.\obuild_platform.exe %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j |
---|
[6] | 64 | cd "%obuild_pwd_snovis_0%" |
---|
| 65 | SET obuild_pwd_snovis_0= |
---|
[92] | 66 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3 |
---|
[137] | 67 | SET Geant4_home=/usr/local/geant4/8.2 |
---|
[92] | 68 | :end_if_platform_3 |
---|
[6] | 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%" |
---|
[244] | 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 |
---|
[188] | 74 | cd "%obuild_pwd_snovis_0%" |
---|
| 75 | SET obuild_pwd_snovis_0= |
---|
[244] | 76 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_5 |
---|
| 77 | SET HDF5_home=/usr/local/HDF5/1.6.5 |
---|
| 78 | :end_if_platform_5 |
---|
| 79 | SET obuild_platform_result= |
---|
[188] | 80 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d |
---|
| 81 | cd "%obuild_snovis_path%\%obuild_dir_bin%" |
---|
[244] | 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% UNIX`) DO SET obuild_platform_result=%%j |
---|
[6] | 84 | cd "%obuild_pwd_snovis_0%" |
---|
| 85 | SET obuild_pwd_snovis_0= |
---|
[244] | 86 | IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7 |
---|
| 87 | SET OSC_home=/usr/local/OpenScientist/v16r0 |
---|
| 88 | :end_if_platform_7 |
---|
| 89 | SET obuild_platform_result= |
---|
| 90 | IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%" |
---|
| 91 | IF 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 | ) |
---|
[6] | 95 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d |
---|
| 96 | cd "%obuild_snovis_path%\%obuild_dir_bin%" |
---|
| 97 | IF NOT EXIST obuild_find.exe ECHO Program obuild_find.exe not found. && GOTO obuild_return |
---|
[244] | 98 | FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe snova v2r0p0`) DO SET obuild_snova_path=%%j |
---|
[6] | 99 | cd "%obuild_pwd_snovis_0%" |
---|
| 100 | SET obuild_pwd_snovis_0= |
---|
[244] | 101 | IF NOT DEFINED obuild_snova_path ECHO Can't find snova package. && GOTO obuild_return |
---|
[6] | 102 | |
---|
| 103 | REM # Execute setup of used packages : |
---|
[188] | 104 | IF NOT EXIST "%obuild_snova_path%\obuild\setup.bat" ECHO setup.bat not found for package snova. && GOTO obuild_return |
---|
| 105 | CALL "%obuild_snova_path%\obuild\setup.bat" |
---|
| 106 | @ECHO OFF |
---|
| 107 | |
---|
[6] | 108 | REM # Set environment variables of this package : |
---|
| 109 | SET SNOVISROOT=%obuild_snovis_path% |
---|
[244] | 110 | SET ONXROOT=%OSC_home%\Resources\OnX |
---|
| 111 | SET ONXLABROOT=%OSC_home%\Resources\OnXLab |
---|
| 112 | SET G4LABROOT=%obuild_snovis_path%\Resources\G4Lab |
---|
[6] | 113 | |
---|
[244] | 114 | IF DEFINED PATH GOTO else_if_path_snovis_12 |
---|
[6] | 115 | SET PATH=%obuild_snovis_path%\%obuild_dir_bin% |
---|
[244] | 116 | GOTO end_if_path_snovis_12 |
---|
| 117 | :else_if_path_snovis_12 |
---|
[6] | 118 | SET PATH=%PATH%;%obuild_snovis_path%\%obuild_dir_bin% |
---|
[244] | 119 | :end_if_path_snovis_12 |
---|
[6] | 120 | |
---|
| 121 | :obuild_return |
---|
| 122 | |
---|
| 123 | SET obuild_snovis_path= |
---|
| 124 | |
---|
| 125 | REM # FIXME SET obuild_platform= |
---|
| 126 | REM # FIXME SET obuild_dir_bin= |
---|
| 127 | |
---|
| 128 | @ECHO ON |
---|