Index: snovis/trunk/obuild/DOS/build_app_snovis_session.bat
===================================================================
--- snovis/trunk/obuild/DOS/build_app_snovis_session.bat	(revision 137)
+++ snovis/trunk/obuild/DOS/build_app_snovis_session.bat	(revision 153)
@@ -648,5 +648,4 @@
 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%"
@@ -655,17 +654,17 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_53
+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_53
+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_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
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${CLHEP_home}/lib -lCLHEP
 :end_if_platform_54
-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_55
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${CLHEP_home}/lib -lCLHEP
-:end_if_platform_55
 SET obuild_platform_result=
 SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibXML.lib"
@@ -686,6 +685,16 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_66
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
+:end_if_platform_66
+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_67
-SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
 :end_if_platform_67
 SET obuild_platform_result=
@@ -693,9 +702,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% 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_68
-SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
+SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/lib -lGLU -lGL -lm
 :end_if_platform_68
 SET obuild_platform_result=
@@ -703,9 +712,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% 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_69
-SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/lib -lGLU -lGL -lm
+SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
 :end_if_platform_69
 SET obuild_platform_result=
@@ -713,9 +722,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% Windows_NT`) 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_70
-SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
 :end_if_platform_70
 SET obuild_platform_result=
@@ -723,20 +732,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% OSF1`) 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_71
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
+SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
 :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% 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% -lpthread
-:end_if_platform_72
 SET obuild_platform_result=
 
