Index: snovis/trunk/obuild/DOS/build_dll_snovis.bat
===================================================================
--- snovis/trunk/obuild/DOS/build_dll_snovis.bat	(revision 137)
+++ snovis/trunk/obuild/DOS/build_dll_snovis.bat	(revision 244)
@@ -115,10 +115,30 @@
 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_4
+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 HDF5_home=/usr/local/HDF5/1.6.5
+: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% 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_7
+SET OSC_home=/usr/local/OpenScientist/v16r0
+: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% 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_command=c++
-:end_if_platform_4
+:end_if_platform_8
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -128,7 +148,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_5
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
 SET obuild_cxx_command=c++
-:end_if_platform_5
+:end_if_platform_9
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -138,7 +158,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_6
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_10
 SET obuild_cxx_command=cxx
-:end_if_platform_6
+:end_if_platform_10
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -148,7 +168,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
 SET obuild_cxx_command=cl.exe
-:end_if_platform_7
+:end_if_platform_11
 SET obuild_platform_result=
 IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
@@ -160,7 +180,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_8
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
 SET obuild_cxx_optimize=-O
-:end_if_platform_8
+:end_if_platform_12
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -170,7 +190,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
 SET obuild_cxx_optimize=-O
-:end_if_platform_9
+:end_if_platform_13
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -180,7 +200,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_10
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
 SET obuild_cxx_optimize=-O
-:end_if_platform_10
+:end_if_platform_14
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -190,18 +210,18 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
 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_12
+: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% 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_debug=-g
-:end_if_platform_12
+:end_if_platform_16
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -211,7 +231,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
 SET obuild_cxx_debug=-g
-:end_if_platform_13
+:end_if_platform_17
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -221,7 +241,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_18
 SET obuild_cxx_debug=-g
-:end_if_platform_14
+:end_if_platform_18
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -231,7 +251,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_19
 SET obuild_cxx_debug=/ZI /Od
-:end_if_platform_15
+:end_if_platform_19
 SET obuild_platform_result=
 
@@ -242,7 +262,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_16
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_20
 SET obuild_cxx_options=-fPIC
-:end_if_platform_16
+:end_if_platform_20
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -252,181 +272,107 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_21
 SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
-:end_if_platform_17
-SET obuild_platform_result=
-
-IF NOT %obuild_debug% == yes GOTO else_if_db_build_dll_snovis_sh_18
+:end_if_platform_21
+SET obuild_platform_result=
+
+IF NOT %obuild_debug% == yes GOTO else_if_db_build_dll_snovis_sh_22
   SET obuild_cxx_debug_local=%obuild_cxx_debug%
-  GOTO end_if_db_build_dll_snovis_sh_18
-:else_if_db_build_dll_snovis_sh_18
+  GOTO end_if_db_build_dll_snovis_sh_22
+:else_if_db_build_dll_snovis_sh_22
   SET obuild_cxx_debug_local=
-:end_if_db_build_dll_snovis_sh_18
-
-IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_dll_snovis_sh_19
+:end_if_db_build_dll_snovis_sh_22
+
+IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_dll_snovis_sh_23
   SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
-  GOTO end_if_opt_build_dll_snovis_sh_19
-:else_if_opt_build_dll_snovis_sh_19
+  GOTO end_if_opt_build_dll_snovis_sh_23
+:else_if_opt_build_dll_snovis_sh_23
   SET obuild_cxx_optimize_local=
-:end_if_opt_build_dll_snovis_sh_19
-
-
-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" 1> NUL
-  IF EXIST obuild_find.obj DEL obuild_find.obj
-)
-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  Lib v8r*`) DO SET obuild_Lib_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib 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  Slash v1r*`) DO SET obuild_Slash_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_Slash_path  ECHO Can't find Slash 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  AIDA v3r2p1`) DO SET obuild_AIDA_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_AIDA_path  ECHO Can't find AIDA 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  OnX v17r*`) DO SET obuild_OnX_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_OnX_path  ECHO Can't find OnX 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  G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_G4Lab_path  ECHO Can't find G4Lab 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  BatchLab v1r*`) DO SET obuild_BatchLab_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_BatchLab_path  ECHO Can't find BatchLab 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  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis 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  CoinGL v1r*`) DO SET obuild_CoinGL_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_CoinGL_path  ECHO Can't find CoinGL 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  Lib v8r*`) DO SET obuild_Lib_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib 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  expat v1r*`) DO SET obuild_expat_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_expat_path  ECHO Can't find expat 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  Lib v8r*`) DO SET obuild_Lib_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib 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  zlib v1r*`) DO SET obuild_zlib_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_zlib_path  ECHO Can't find zlib 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  Lib v8r*`) DO SET obuild_Lib_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib 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  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis 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  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis 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  jpeg v1r*`) DO SET obuild_jpeg_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_jpeg_path  ECHO Can't find jpeg 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  dvi2bitmap v1r*`) DO SET obuild_dvi2bitmap_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_dvi2bitmap_path  ECHO Can't find dvi2bitmap 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  freetype2 v1r*`) DO SET obuild_freetype2_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_freetype2_path  ECHO Can't find freetype2 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  CoinGL v1r*`) DO SET obuild_CoinGL_path=%%j
-cd "%obuild_pwd_snovis_0%"
-SET obuild_pwd_snovis_0=
-IF NOT DEFINED obuild_CoinGL_path  ECHO Can't find CoinGL package.  && GOTO obuild_return
+:end_if_opt_build_dll_snovis_sh_23
+
+
+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_24
+SET obuild_cxx_macros=%obuild_cxx_macros% /DAPPLE_GL
+:end_if_platform_24
+SET obuild_platform_result=
+
 
 SET obuild_cxx_includes=/I"%obuild_snovis_path%"
-SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_Lib_path%\include"
-SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_Slash_path%"
-SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_AIDA_path%\src\cpp"
-SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_OnX_path%\include"
-SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_G4Lab_path%\include"
-SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_BatchLab_path%"
-SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_HEPVis_path%\include"
-SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_CoinGL_path%\include"
-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
+SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_snovis_path%\source"
+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${CLHEP_home}/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${Geant4_home}/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${OSC_home}/Resources/AIDA/src/cpp
+: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${OSC_home}/Resources/Slash -I${OSC_home}/Resources/expat/include -I${OSC_home}/Resources/Lib/include -I${OSC_home}/Resources/OnX/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${OSC_home}/Resources/BatchLab -I${OSC_home}/Resources/OnXLab
+: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${OSC_home}/Resources/CoinGL/include -I${OSC_home}/Resources/HEPVis/include
+: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% 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_33
 SET obuild_cxx_includes=%obuild_cxx_includes% -I/System/Library/Frameworks/OpenGL.framework/Headers
-:end_if_platform_29
+:end_if_platform_33
 SET obuild_platform_result=
 FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
@@ -436,7 +382,7 @@
 cd "%obuild_pwd_snovis_0%"
 SET obuild_pwd_snovis_0=
-IF NOT %obuild_platform_result% == yes GOTO end_if_platform_30
+IF NOT %obuild_platform_result% == yes GOTO end_if_platform_34
 SET obuild_cxx_includes=%obuild_cxx_includes% -I${OBUILD_OPENGL_HOME}/include
-:end_if_platform_30
+:end_if_platform_34
 SET obuild_platform_result=
 
@@ -465,23 +411,73 @@
 @IF %obuild_verbose% == yes @ECHO OFF 
 
-SET obuild_linked_libraries="%obuild_Lib_path%\%obuild_dir_bin%\LibXML.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_expat_path%\%obuild_dir_bin%\osc_expat.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibZip.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_zlib_path%\%obuild_dir_bin%\osc_z.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibUtils.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HEPVis_path%\%obuild_dir_bin%\HEPVisGeometry.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HEPVis_path%\%obuild_dir_bin%\HEPVisUtils.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_jpeg_path%\%obuild_dir_bin%\osc_jpeg.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_dvi2bitmap_path%\%obuild_dir_bin%\osc_dvi2bitmap.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_freetype2_path%\%obuild_dir_bin%\osc_freetype2.lib"
-SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_CoinGL_path%\%obuild_dir_bin%\osc_Coin.lib"
-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
+SET obuild_linked_libraries=-L${Geant4_home}/lib -lG4physicslists
+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_39
+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_39
+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_40
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${CLHEP_home}/lib -lCLHEP-2.0.3.1
+: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% 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_41
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${OSC_home}/lib -lHEPVisPlotter -lHEPVisDetector -lHEPVisGeometry -lHEPVisUtils  -losc_dvi2bitmap -losc_jpeg -losc_freetype2 -losc_Coin -lLibUtils
+: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% 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_42
+SET obuild_linked_libraries=%obuild_linked_libraries% -L${OSC_home}/lib -lOnXCore -lLibXML -losc_expat -lLibZip -lz -lLibUtils -ldl
+:end_if_platform_42
+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_43
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
+: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% 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_44
+SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
+: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% 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_45
-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_45
 SET obuild_platform_result=
@@ -489,9 +485,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_46
-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_46
 SET obuild_platform_result=
@@ -499,40 +495,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% 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_47
-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_47
-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_48
-SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
-:end_if_platform_48
-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_49
-SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
-:end_if_platform_49
-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_50
-SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
-:end_if_platform_50
 SET obuild_platform_result=
 
