Index: snovis/head/obuild/DOS/build_app_snovis_session.bat
===================================================================
--- snovis/head/obuild/DOS/build_app_snovis_session.bat	(revision 6)
+++ snovis/head/obuild/DOS/build_app_snovis_session.bat	(revision 92)
@@ -88,5 +88,5 @@
 IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" (
-  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"
+  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
   IF EXIST obuild_platform.obj DEL obuild_platform.obj
 )
@@ -98,87 +98,67 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p1
-)
-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 %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
+SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2
+: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% 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_3
 SET bhep_platform=Darwin
-)
-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 %obuild_platform_result% == yes (
-SET GeomUtils_home=/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/GeomUtils
-)
-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 %obuild_platform_result% == yes (
-SET GeomUtils_platform=Darwin-i386
-)
-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 %obuild_platform_result% == yes (
-SET SNgeom2_home=/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/SNgeom2
-)
-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 %obuild_platform_result% == yes (
-SET snova_home=/Users/barrand/dev/exp/nemo/SNgeom/v0r1p0/build_area/snova
-)
-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 %obuild_platform_result% == yes (
+: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
+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
+:end_if_platform_5
+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_7
+SET snova_platform=Darwin
+: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
+cd "%obuild_pwd_snovis_0%"
+SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
 SET CLHEP_home=/usr/local/CLHEP/2.0.3.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 %obuild_platform_result% == yes (
-SET Geant4_home=/geant4/geant4.8.2
-)
-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 %obuild_platform_result% == yes (
-SET Geant4_work=${Geant4_home}/Darwin
-)
+:end_if_platform_9
+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_11
+SET Geant4_home=/usr/local/geant4/8.2
+: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_12
+SET obuild_cxx_command=c++
+:end_if_platform_12
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -188,17 +168,39 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET Geant4_work=${Geant4_home}/slc3_gcc323
-)
-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 %obuild_platform_result% == yes (
-SET Geant4_system=Darwin-g++
-)
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
+SET obuild_cxx_command=c++
+:end_if_platform_13
+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_14
+SET obuild_cxx_command=cxx
+:end_if_platform_14
+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_15
+SET obuild_cxx_command=cl.exe
+:end_if_platform_15
+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_16
+SET obuild_cxx_optimize=-O
+:end_if_platform_16
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -208,7 +210,17 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET Geant4_system=Linux-g++
-)
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
+SET obuild_cxx_optimize=-O
+: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% 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_18
+SET obuild_cxx_optimize=-O
+:end_if_platform_18
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -218,17 +230,18 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET Geant4_system=WIN32-VC
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_command=c++
-)
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_19
+SET obuild_cxx_optimize=/O2
+: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% 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_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
@@ -238,7 +251,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET obuild_cxx_command=c++
-)
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_21
+SET obuild_cxx_debug=-g
+:end_if_platform_21
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -248,7 +261,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET obuild_cxx_command=cxx
-)
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_22
+SET obuild_cxx_debug=-g
+:end_if_platform_22
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -258,20 +271,9 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET obuild_cxx_command=cl.exe
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_optimize=-O
-)
-SET obuild_platform_result=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_23
+SET obuild_cxx_debug=/ZI /Od
+:end_if_platform_23
+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%"
@@ -280,17 +282,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET obuild_cxx_optimize=-O
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_optimize=-O
-)
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_24
+SET obuild_cxx_options=-fPIC
+:end_if_platform_24
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -300,85 +292,27 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET obuild_cxx_optimize=/O2
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_debug=-g
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_debug=-g
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_debug=-g
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_debug=/ZI /Od
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_options=-fPIC
-)
-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 %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_25
 SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
-)
-SET obuild_platform_result=
-
-IF %obuild_debug% == yes (
+:end_if_platform_25
+SET obuild_platform_result=
+
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_snovis_session_sh_26
   SET obuild_cxx_debug_local=%obuild_cxx_debug%
-) ELSE (
+  GOTO end_if_db_build_app_snovis_session_sh_26
+:else_if_db_build_app_snovis_session_sh_26
   SET obuild_cxx_debug_local=
-)
-IF %obuild_optimize% == yes (
+:end_if_db_build_app_snovis_session_sh_26
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_snovis_session_sh_27
   SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
-) ELSE (
+  GOTO end_if_opt_build_app_snovis_session_sh_27
+:else_if_opt_build_app_snovis_session_sh_27
   SET obuild_cxx_optimize_local=
-)
+:end_if_opt_build_app_snovis_session_sh_27
+
 
 IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
 IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
-  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"
+  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
   IF EXIST obuild_find.obj DEL obuild_find.obj
 )
@@ -530,57 +464,67 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET obuild_cxx_includes=-I${SNOVA_ROOT}
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_includes=%obuild_cxx_includes% -I${SNGEOM2_ROOT}/include
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_includes=%obuild_cxx_includes% -I${GEOMUTILS_ROOT}/include
-)
-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 %obuild_platform_result% == yes (
-SET obuild_cxx_includes=%obuild_cxx_includes% -I${BHEP_ROOT}/Darwin/include
-)
-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 %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_28
+SET obuild_cxx_includes=-I${snova_home}
+: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/GeomUtils/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${snova_home}/source/SNgeom2/include
+: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${snova_home}/source/SNvertex/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${bhep_home}
+:end_if_platform_32
+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_33
 SET obuild_cxx_includes=%obuild_cxx_includes% -I${CLHEP_home}/include
-)
-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 %obuild_platform_result% == yes (
+: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% 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_34
 SET obuild_cxx_includes=%obuild_cxx_includes% -I${Geant4_home}/include
-)
+:end_if_platform_34
 SET obuild_platform_result=
 SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_HDF5_path%\include"
@@ -595,6 +539,7 @@
 @IF %obuild_verbose% == yes @ECHO ON 
 cd "%obuild_snovis_path%\%obuild_dir_bin%"
-%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\app_snovis_session\snovis_session.obj  /Tp..\applications\snovis_session.cc
-@IF ERRORLEVEL 1 @GOTO obuild_return
+%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\app_snovis_session\snovis_session.obj  /Tp"..\applications\snovis_session.cc" 1> cl_exe_error
+@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
+@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
 cd "%obuild_snovis_path%\obuild"
 
@@ -607,7 +552,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_41
 SET obuild_cxx_linker_command=c++
-)
+:end_if_platform_41
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -617,7 +562,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_42
 SET obuild_cxx_linker_command=c++
-)
+:end_if_platform_42
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -627,7 +572,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_43
 SET obuild_cxx_linker_command=cxx
-)
+:end_if_platform_43
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -637,7 +582,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_44
 SET obuild_cxx_linker_command=link.exe
-)
+:end_if_platform_44
 SET obuild_platform_result=
 IF "%obuild_cxx_linker_command%" == ""  ECHO Variable obuild_cxx_linker_command not defined.  && GOTO obuild_return
@@ -649,7 +594,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+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
@@ -659,7 +604,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_46
 SET obuild_cxx_linker_debug=-g
-)
+:end_if_platform_46
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -669,7 +614,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_47
 SET obuild_cxx_linker_debug=-g
-)
+:end_if_platform_47
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -679,7 +624,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_48
 SET obuild_cxx_linker_debug=/DEBUG
-)
+:end_if_platform_48
 SET obuild_platform_result=
 
@@ -690,24 +635,26 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_49
 SET obuild_cxx_linker_options=/nologo
-)
-SET obuild_platform_result=
-
-IF %obuild_debug% == yes (
+:end_if_platform_49
+SET obuild_platform_result=
+
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_app_snovis_session_sh_50
   SET obuild_cxx_linker_debug_local=%obuild_cxx_linker_debug%
-) ELSE (
+  GOTO end_if_db_build_app_snovis_session_sh_50
+:else_if_db_build_app_snovis_session_sh_50
   SET obuild_cxx_linker_debug_local=
-)
-IF %obuild_optimize% == yes (
+:end_if_db_build_app_snovis_session_sh_50
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_app_snovis_session_sh_51
   SET obuild_cxx_linker_optimize_local=%obuild_cxx_linker_optimize%
-) ELSE (
+  GOTO end_if_opt_build_app_snovis_session_sh_51
+:else_if_opt_build_app_snovis_session_sh_51
   SET obuild_cxx_linker_optimize_local=
-)
+:end_if_opt_build_app_snovis_session_sh_51
+
 SET obuild_linked_libraries="%obuild_OnX_path%\%obuild_dir_bin%\OnXCore.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_snovis_path%\%obuild_dir_bin%\snova.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${SNGEOM2_ROOT}/Darwin-i386/lib -lsngeom
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${GEOMUTILS_ROOT}/Darwin-i386/lib -lgeomutils
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${BHEP_ROOT}/Darwin/lib -lbhep
+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_HDF5_path%\%obuild_dir_bin%\osc_HDF5.lib"
 SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_G4Lab_path%\%obuild_dir_bin%\G4LabUIOnX.lib"
@@ -719,17 +666,17 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${Geant4_work}/lib/${Geant4_system} -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global
-)
-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 %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_58
+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_58
+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_59
 SET obuild_linked_libraries=%obuild_linked_libraries% -L${CLHEP_home}/lib -lCLHEP
-)
+:end_if_platform_59
 SET obuild_platform_result=
 SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibXML.lib"
@@ -750,17 +697,17 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_71
 SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
-)
-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 %obuild_platform_result% == yes (
+:end_if_platform_71
+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_72
 SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
-)
+:end_if_platform_72
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -770,7 +717,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_73
 SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/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
@@ -780,7 +727,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_74
 SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
-)
+:end_if_platform_74
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -790,17 +737,17 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF %obuild_platform_result% == yes (
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_75
 SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
-)
-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 %obuild_platform_result% == yes (
+:end_if_platform_75
+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_76
 SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
-)
+:end_if_platform_76
 SET obuild_platform_result=
 
