Index: snovis/trunk/obuild/DOS/build_app_snovis_session.bat
===================================================================
--- snovis/trunk/obuild/DOS/build_app_snovis_session.bat	(revision 134)
+++ snovis/trunk/obuild/DOS/build_app_snovis_session.bat	(revision 137)
@@ -95,29 +95,39 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
+SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
+:end_if_platform_1
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
+SET Geant4_home=/usr/local/geant4/8.2
+:end_if_platform_3
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
 FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
-SET snova_platform=Darwin
-:end_if_platform_1
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
-SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2
-:end_if_platform_3
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_4
+SET obuild_cxx_command=c++
+:end_if_platform_4
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_5
-SET snova_home=/Users/barrand/dev/exp/nemo/snova/v2r0p0
+SET obuild_cxx_command=c++
 :end_if_platform_5
 SET obuild_platform_result=
@@ -125,19 +135,41 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_6
+SET obuild_cxx_command=cxx
+:end_if_platform_6
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7
-SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
+SET obuild_cxx_command=cl.exe
 :end_if_platform_7
 SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_8
+SET obuild_cxx_optimize=-O
+:end_if_platform_8
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
-SET Geant4_home=/usr/local/geant4/8.2
+SET obuild_cxx_optimize=-O
 :end_if_platform_9
 SET obuild_platform_result=
@@ -145,10 +177,31 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_10
+SET obuild_cxx_optimize=-O
+:end_if_platform_10
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
+SET obuild_cxx_optimize=/O2
+:end_if_platform_11
+SET obuild_platform_result=
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
 FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_10
-SET obuild_cxx_command=c++
-:end_if_platform_10
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
+SET obuild_cxx_debug=-g
+:end_if_platform_12
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -158,7 +211,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
-SET obuild_cxx_command=c++
-:end_if_platform_11
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
+SET obuild_cxx_debug=-g
+:end_if_platform_13
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -168,7 +221,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
-SET obuild_cxx_command=cxx
-:end_if_platform_12
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
+SET obuild_cxx_debug=-g
+:end_if_platform_14
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -178,20 +231,9 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
-SET obuild_cxx_command=cl.exe
-:end_if_platform_13
-SET obuild_platform_result=
-IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
-
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
-SET obuild_cxx_optimize=-O
-:end_if_platform_14
-SET obuild_platform_result=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
+SET obuild_cxx_debug=/ZI /Od
+:end_if_platform_15
+SET obuild_platform_result=
+
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
@@ -200,16 +242,6 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
-SET obuild_cxx_optimize=-O
-:end_if_platform_15
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_16
-SET obuild_cxx_optimize=-O
+SET obuild_cxx_options=-fPIC
 :end_if_platform_16
 SET obuild_platform_result=
@@ -221,83 +253,21 @@
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
-SET obuild_cxx_optimize=/O2
+SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
 :end_if_platform_17
 SET obuild_platform_result=
 
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_18
-SET obuild_cxx_debug=-g
-:end_if_platform_18
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_19
-SET obuild_cxx_debug=-g
-:end_if_platform_19
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_20
-SET obuild_cxx_debug=-g
-:end_if_platform_20
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_21
-SET obuild_cxx_debug=/ZI /Od
-:end_if_platform_21
-SET obuild_platform_result=
-
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_22
-SET obuild_cxx_options=-fPIC
-:end_if_platform_22
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_23
-SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
-:end_if_platform_23
-SET obuild_platform_result=
-
-IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_snovis_session_sh_24
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_snovis_session_sh_18
   SET obuild_cxx_debug_local=%obuild_cxx_debug%
-  GOTO end_if_db_build_app_snovis_session_sh_24
-:else_if_db_build_app_snovis_session_sh_24
+  GOTO end_if_db_build_app_snovis_session_sh_18
+:else_if_db_build_app_snovis_session_sh_18
   SET obuild_cxx_debug_local=
-:end_if_db_build_app_snovis_session_sh_24
-
-IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_snovis_session_sh_25
+:end_if_db_build_app_snovis_session_sh_18
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_snovis_session_sh_19
   SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
-  GOTO end_if_opt_build_app_snovis_session_sh_25
-:else_if_opt_build_app_snovis_session_sh_25
+  GOTO end_if_opt_build_app_snovis_session_sh_19
+:else_if_opt_build_app_snovis_session_sh_19
   SET obuild_cxx_optimize_local=
-:end_if_opt_build_app_snovis_session_sh_25
+:end_if_opt_build_app_snovis_session_sh_19
 
 
@@ -310,4 +280,39 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  bhep v1r4p2`) DO SET obuild_bhep_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_bhep_path  ECHO Can't find bhep package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
 FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HDF5 v1r*`) DO SET obuild_HDF5_path=%%j
 cd "%obuild_pwd_snovis_0%"
@@ -352,4 +357,39 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  snova v2r0p0`) DO SET obuild_snova_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_snova_path  ECHO Can't find snova package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  bhep v1r4p2`) DO SET obuild_bhep_path=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT DEFINED obuild_bhep_path  ECHO Can't find bhep package.  && GOTO obuild_return
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
 FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HDF5 v1r*`) DO SET obuild_HDF5_path=%%j
 cd "%obuild_pwd_snovis_0%"
@@ -448,4 +488,9 @@
 IF NOT DEFINED obuild_CoinGL_path  ECHO Can't find CoinGL package.  && GOTO obuild_return
 
+SET obuild_cxx_includes=/I"%obuild_snova_path%"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_snova_path%\source\GeomUtils\include"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_snova_path%\source\SNvertex\include"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_snova_path%\source\SNgeom2\include"
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_bhep_path%"
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
@@ -454,67 +499,17 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_25
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${CLHEP_home}/include
+:end_if_platform_25
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_26
-SET obuild_cxx_includes=-I${snova_home}
+SET obuild_cxx_includes=%obuild_cxx_includes% -I${Geant4_home}/include
 :end_if_platform_26
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_27
-SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/GeomUtils/include
-:end_if_platform_27
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_28
-SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/SNgeom2/include
-:end_if_platform_28
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_29
-SET obuild_cxx_includes=%obuild_cxx_includes% -I${snova_home}/source/SNvertex/include
-:end_if_platform_29
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_30
-SET obuild_cxx_includes=%obuild_cxx_includes% -I${bhep_home}
-:end_if_platform_30
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_31
-SET obuild_cxx_includes=%obuild_cxx_includes% -I${CLHEP_home}/include
-:end_if_platform_31
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_32
-SET obuild_cxx_includes=%obuild_cxx_includes% -I${Geant4_home}/include
-:end_if_platform_32
 SET obuild_platform_result=
 SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_HDF5_path%\include"
@@ -542,6 +537,68 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_33
+SET obuild_cxx_linker_command=c++
+:end_if_platform_33
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_34
+SET obuild_cxx_linker_command=c++
+:end_if_platform_34
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_35
+SET obuild_cxx_linker_command=cxx
+:end_if_platform_35
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_36
+SET obuild_cxx_linker_command=link.exe
+:end_if_platform_36
+SET obuild_platform_result=
+IF "%obuild_cxx_linker_command%" == ""  ECHO Variable obuild_cxx_linker_command not defined.  && GOTO obuild_return
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_37
+SET obuild_cxx_linker_debug=-g
+:end_if_platform_37
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_38
+SET obuild_cxx_linker_debug=-g
+:end_if_platform_38
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_39
-SET obuild_cxx_linker_command=c++
+SET obuild_cxx_linker_debug=-g
 :end_if_platform_39
 SET obuild_platform_result=
@@ -549,105 +606,47 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_40
-SET obuild_cxx_linker_command=c++
+SET obuild_cxx_linker_debug=/DEBUG
 :end_if_platform_40
 SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
+
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_41
-SET obuild_cxx_linker_command=cxx
+SET obuild_cxx_linker_options=/nologo
 :end_if_platform_41
 SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_42
-SET obuild_cxx_linker_command=link.exe
-:end_if_platform_42
-SET obuild_platform_result=
-IF "%obuild_cxx_linker_command%" == ""  ECHO Variable obuild_cxx_linker_command not defined.  && GOTO obuild_return
-
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_43
-SET obuild_cxx_linker_debug=-g
-:end_if_platform_43
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_44
-SET obuild_cxx_linker_debug=-g
-:end_if_platform_44
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_45
-SET obuild_cxx_linker_debug=-g
-:end_if_platform_45
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_46
-SET obuild_cxx_linker_debug=/DEBUG
-:end_if_platform_46
-SET obuild_platform_result=
-
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_47
-SET obuild_cxx_linker_options=/nologo
-:end_if_platform_47
-SET obuild_platform_result=
-
-IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_snovis_session_sh_48
+
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_snovis_session_sh_42
   SET obuild_cxx_linker_debug_local=%obuild_cxx_linker_debug%
-  GOTO end_if_db_build_app_snovis_session_sh_48
-:else_if_db_build_app_snovis_session_sh_48
+  GOTO end_if_db_build_app_snovis_session_sh_42
+:else_if_db_build_app_snovis_session_sh_42
   SET obuild_cxx_linker_debug_local=
-:end_if_db_build_app_snovis_session_sh_48
-
-IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_snovis_session_sh_49
+:end_if_db_build_app_snovis_session_sh_42
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_snovis_session_sh_43
   SET obuild_cxx_linker_optimize_local=%obuild_cxx_linker_optimize%
-  GOTO end_if_opt_build_app_snovis_session_sh_49
-:else_if_opt_build_app_snovis_session_sh_49
+  GOTO end_if_opt_build_app_snovis_session_sh_43
+:else_if_opt_build_app_snovis_session_sh_43
   SET obuild_cxx_linker_optimize_local=
-:end_if_opt_build_app_snovis_session_sh_49
+:end_if_opt_build_app_snovis_session_sh_43
 
 SET obuild_linked_libraries="%obuild_OnX_path%\%obuild_dir_bin%\OnXCore.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${snova_home}/Darwin -lsnova -lsnvertex -lsngeom -lgeomutils
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${bhep_home}/Darwin -lbhep
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_snova_path%\%obuild_dir_bin%\snova.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_snova_path%\%obuild_dir_bin%\snvertex.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_snova_path%\%obuild_dir_bin%\sngeom.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_snova_path%\%obuild_dir_bin%\geomutils.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_bhep_path%\%obuild_dir_bin%\bhep.lib"
 SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HDF5_path%\%obuild_dir_bin%\osc_HDF5.lib"
 SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_G4Lab_path%\%obuild_dir_bin%\G4LabUIOnX.lib"
 SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_G4Lab_path%\%obuild_dir_bin%\G4LabCore.lib"
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${Geant4_home}/lib -lG4interfaces
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
@@ -656,7 +655,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_56
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_54
 SET obuild_linked_libraries=%obuild_linked_libraries% -L${Geant4_home}/lib -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global
-:end_if_platform_56
+:end_if_platform_54
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -666,7 +665,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_57
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_55
 SET obuild_linked_libraries=%obuild_linked_libraries% -L${CLHEP_home}/lib -lCLHEP
-:end_if_platform_57
+:end_if_platform_55
 SET obuild_platform_result=
 SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibXML.lib"
@@ -687,6 +686,26 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_67
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
+:end_if_platform_67
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_68
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
+:end_if_platform_68
+SET obuild_platform_result=
+FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
+cd "%obuild_snovis_path%\%obuild_dir_bin%"
+IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_69
-SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
+SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/lib -lGLU -lGL -lm
 :end_if_platform_69
 SET obuild_platform_result=
@@ -694,9 +713,9 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_70
-SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
+SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
 :end_if_platform_70
 SET obuild_platform_result=
@@ -704,9 +723,9 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_71
-SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/lib -lGLU -lGL -lm
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
 :end_if_platform_71
 SET obuild_platform_result=
@@ -714,30 +733,10 @@
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
+FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
 IF NOT %obuild_platform_result% == yes GOTO end_if_platform_72
-SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
+SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
 :end_if_platform_72
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_73
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
-:end_if_platform_73
-SET obuild_platform_result=
-FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
-cd "%obuild_snovis_path%\%obuild_dir_bin%"
-IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
-FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_74
-SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
-:end_if_platform_74
 SET obuild_platform_result=
 
