[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 | IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%" |
---|
| 71 | IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" ( |
---|
[92] | 72 | 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 |
---|
[6] | 73 | IF EXIST obuild_find.obj DEL obuild_find.obj |
---|
| 74 | ) |
---|
| 75 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d |
---|
| 76 | cd "%obuild_snovis_path%\%obuild_dir_bin%" |
---|
| 77 | IF NOT EXIST obuild_find.exe ECHO Program obuild_find.exe not found. && GOTO obuild_return |
---|
[188] | 78 | FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe snova v2r0p0`) DO SET obuild_snova_path=%%j |
---|
| 79 | cd "%obuild_pwd_snovis_0%" |
---|
| 80 | SET obuild_pwd_snovis_0= |
---|
| 81 | IF NOT DEFINED obuild_snova_path ECHO Can't find snova package. && GOTO obuild_return |
---|
| 82 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d |
---|
| 83 | cd "%obuild_snovis_path%\%obuild_dir_bin%" |
---|
| 84 | IF NOT EXIST obuild_find.exe ECHO Program obuild_find.exe not found. && GOTO obuild_return |
---|
[6] | 85 | FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe OnX v17r*`) DO SET obuild_OnX_path=%%j |
---|
| 86 | cd "%obuild_pwd_snovis_0%" |
---|
| 87 | SET obuild_pwd_snovis_0= |
---|
| 88 | IF NOT DEFINED obuild_OnX_path ECHO Can't find OnX package. && GOTO obuild_return |
---|
| 89 | FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d |
---|
| 90 | cd "%obuild_snovis_path%\%obuild_dir_bin%" |
---|
| 91 | IF NOT EXIST obuild_find.exe ECHO Program obuild_find.exe not found. && GOTO obuild_return |
---|
| 92 | FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j |
---|
| 93 | cd "%obuild_pwd_snovis_0%" |
---|
| 94 | SET obuild_pwd_snovis_0= |
---|
| 95 | IF NOT DEFINED obuild_G4Lab_path ECHO Can't find G4Lab package. && GOTO obuild_return |
---|
| 96 | |
---|
| 97 | REM # Execute setup of used packages : |
---|
[188] | 98 | IF NOT EXIST "%obuild_snova_path%\obuild\setup.bat" ECHO setup.bat not found for package snova. && GOTO obuild_return |
---|
| 99 | CALL "%obuild_snova_path%\obuild\setup.bat" |
---|
| 100 | @ECHO OFF |
---|
| 101 | |
---|
[6] | 102 | IF NOT EXIST "%obuild_OnX_path%\obuild\setup.bat" ECHO setup.bat not found for package OnX. && GOTO obuild_return |
---|
| 103 | CALL "%obuild_OnX_path%\obuild\setup.bat" |
---|
| 104 | @ECHO OFF |
---|
| 105 | |
---|
| 106 | IF NOT EXIST "%obuild_G4Lab_path%\obuild\setup.bat" ECHO setup.bat not found for package G4Lab. && GOTO obuild_return |
---|
| 107 | CALL "%obuild_G4Lab_path%\obuild\setup.bat" |
---|
| 108 | @ECHO OFF |
---|
| 109 | |
---|
| 110 | REM # Set environment variables of this package : |
---|
| 111 | SET SNOVISROOT=%obuild_snovis_path% |
---|
| 112 | |
---|
[211] | 113 | IF DEFINED PATH GOTO else_if_path_snovis_5 |
---|
[6] | 114 | SET PATH=%obuild_snovis_path%\%obuild_dir_bin% |
---|
[211] | 115 | GOTO end_if_path_snovis_5 |
---|
| 116 | :else_if_path_snovis_5 |
---|
[6] | 117 | SET PATH=%PATH%;%obuild_snovis_path%\%obuild_dir_bin% |
---|
[211] | 118 | :end_if_path_snovis_5 |
---|
[6] | 119 | |
---|
| 120 | :obuild_return |
---|
| 121 | |
---|
| 122 | SET obuild_snovis_path= |
---|
| 123 | |
---|
| 124 | REM # FIXME SET obuild_platform= |
---|
| 125 | REM # FIXME SET obuild_dir_bin= |
---|
| 126 | |
---|
| 127 | @ECHO ON |
---|