Index: osc_snovis/trunk/obuild/sh/build_release
===================================================================
--- osc_snovis/trunk/obuild/sh/build_release	(revision 273)
+++ osc_snovis/trunk/obuild/sh/build_release	(revision 277)
@@ -54,5 +54,5 @@
 
 if [  "${OBUILD_DIR_BIN}" = "" ] ; then
-  obuild_dir_bin=${obuild_platform}_obuild
+  obuild_dir_bin=bin_obuild
 else
   obuild_dir_bin=${OBUILD_DIR_BIN}
@@ -157,5 +157,4 @@
 
 /bin/rm -f "${obuild_dir_project}/Versions"
-echo "package osc_snovis v1r0" >> "${obuild_dir_project}/Versions"
 echo "package bhep v1r4p2" >> "${obuild_dir_project}/Versions"
 echo "package snova v2r0p0" >> "${obuild_dir_project}/Versions"
@@ -385,53 +384,4 @@
   exit
 fi
-obuild_osc_snovis_path=`"${obuild_find_exe}" osc_snovis 'v1r0'`
-if [ "${obuild_osc_snovis_path}" = "" ] ; then
-  echo "Can't find osc_snovis package."
-  exit
-fi
-
-if [ "${obuild_platform_exe}" = "" ] ; then
-  echo "Variable obuild_platform_exe not defined."
-  exit
-fi
-obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
-if [ ${obuild_platform_result} = yes ] ; then
-if [ ! -e "${obuild_osc_snovis_path}/obuild/release/UNIX/setup.csh" ] ; then
-  echo "WARNNING : File ${obuild_osc_snovis_path}/obuild/release/UNIX/setup.csh not found."
-else
-/bin/cp "${obuild_osc_snovis_path}/obuild/release/UNIX/setup.csh" "${obuild_dir_project}/."
-fi
-fi
-unset obuild_platform_result
-if [ "${obuild_platform_exe}" = "" ] ; then
-  echo "Variable obuild_platform_exe not defined."
-  exit
-fi
-obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
-if [ ${obuild_platform_result} = yes ] ; then
-if [ ! -e "${obuild_osc_snovis_path}/obuild/release/UNIX/setup.sh" ] ; then
-  echo "WARNNING : File ${obuild_osc_snovis_path}/obuild/release/UNIX/setup.sh not found."
-else
-/bin/cp "${obuild_osc_snovis_path}/obuild/release/UNIX/setup.sh" "${obuild_dir_project}/."
-fi
-fi
-unset obuild_platform_result
-if [ "${obuild_platform_exe}" = "" ] ; then
-  echo "Variable obuild_platform_exe not defined."
-  exit
-fi
-obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
-if [ ${obuild_platform_result} = yes ] ; then
-if [ ! -e "${obuild_osc_snovis_path}/obuild/release/UNIX/install" ] ; then
-  echo "WARNNING : File ${obuild_osc_snovis_path}/obuild/release/UNIX/install not found."
-else
-/bin/cp "${obuild_osc_snovis_path}/obuild/release/UNIX/install" "${obuild_dir_project}/."
-fi
-fi
-unset obuild_platform_result
-if [ "${obuild_find_exe}" = "" ] ; then
-  echo "Variable obuild_find_exe not defined."
-  exit
-fi
 obuild_snovis_path=`"${obuild_find_exe}" snovis 'v1r1'`
 if [ "${obuild_snovis_path}" = "" ] ; then
@@ -462,9 +412,9 @@
 obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
 if [ ${obuild_platform_result} = yes ] ; then
-if [ ! -d "${obuild_snovis_path}/Darwin_obuild/snovis_session.app" ] ; then
-  echo "WARNNING : Directory ${obuild_snovis_path}/Darwin_obuild/snovis_session.app not found."
+if [ ! -d "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app" ] ; then
+  echo "WARNNING : Directory ${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app not found."
 else
 /bin/mkdir -p "${obuild_dir_project}/../../."
-/bin/cp -R "${obuild_snovis_path}/Darwin_obuild/snovis_session.app" "${obuild_dir_project}/../../."
+/bin/cp -R "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis.app" "${obuild_dir_project}/../../."
 find "${obuild_dir_project}/../../." -depth -name CVS -exec /bin/rm -R -f {} \;
 find "${obuild_dir_project}/../../." -depth -name .svn -exec /bin/rm -R -f {} \;
@@ -667,4 +617,247 @@
 if [ -e "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis" ] ; then  /bin/cp "${obuild_snovis_path}/${obuild_dir_bin}/prog_snovis" "${obuild_dir_project}/bin/." ;fi
 fi
+
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -d "${OSC_home}/bin" ] ; then
+  echo "WARNNING : Directory ${OSC_home}/bin not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/./."
+/bin/cp -R "${OSC_home}/bin" "${obuild_dir_project}/./."
+find "${obuild_dir_project}/./." -depth -name CVS -exec /bin/rm -R -f {} \;
+find "${obuild_dir_project}/./." -depth -name .svn -exec /bin/rm -R -f {} \;
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -d "${OSC_home}/lib" ] ; then
+  echo "WARNNING : Directory ${OSC_home}/lib not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/./."
+/bin/cp -R "${OSC_home}/lib" "${obuild_dir_project}/./."
+find "${obuild_dir_project}/./." -depth -name CVS -exec /bin/rm -R -f {} \;
+find "${obuild_dir_project}/./." -depth -name .svn -exec /bin/rm -R -f {} \;
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -d "${OSC_home}/Resources" ] ; then
+  echo "WARNNING : Directory ${OSC_home}/Resources not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/./."
+/bin/cp -R "${OSC_home}/Resources" "${obuild_dir_project}/./."
+find "${obuild_dir_project}/./." -depth -name CVS -exec /bin/rm -R -f {} \;
+find "${obuild_dir_project}/./." -depth -name .svn -exec /bin/rm -R -f {} \;
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -e "${CLHEP_home}/lib/libCLHEP-2.0.3.1.dylib" ] ; then
+  echo "WARNNING : File ${CLHEP_home}/lib/libCLHEP-2.0.3.1.dylib not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/lib"
+/bin/cp "${CLHEP_home}/lib/libCLHEP-2.0.3.1.dylib" "${obuild_dir_project}/lib/."
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -e "${CLHEP_home}/lib/libCLHEP-2.0.3.1.so" ] ; then
+  echo "WARNNING : File ${CLHEP_home}/lib/libCLHEP-2.0.3.1.so not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/lib"
+/bin/cp "${CLHEP_home}/lib/libCLHEP-2.0.3.1.so" "${obuild_dir_project}/lib/."
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -d "${CLHEP_home}/include" ] ; then
+  echo "WARNNING : Directory ${CLHEP_home}/include not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/Resources/CLHEP/."
+/bin/cp -R "${CLHEP_home}/include" "${obuild_dir_project}/Resources/CLHEP/."
+find "${obuild_dir_project}/Resources/CLHEP/." -depth -name CVS -exec /bin/rm -R -f {} \;
+find "${obuild_dir_project}/Resources/CLHEP/." -depth -name .svn -exec /bin/rm -R -f {} \;
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -d "${Geant4_home}/include" ] ; then
+  echo "WARNNING : Directory ${Geant4_home}/include not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/Resources/Geant4/."
+/bin/cp -R "${Geant4_home}/include" "${obuild_dir_project}/Resources/Geant4/."
+find "${obuild_dir_project}/Resources/Geant4/." -depth -name CVS -exec /bin/rm -R -f {} \;
+find "${obuild_dir_project}/Resources/Geant4/." -depth -name .svn -exec /bin/rm -R -f {} \;
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -d "${Geant4_home}/lib" ] ; then
+  echo "WARNNING : Directory ${Geant4_home}/lib not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/lib/."
+find "${Geant4_home}/lib" -name 'libG4physicslists.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4readout.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4run.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4event.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4tracking.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4processes.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4digits_hits.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4track.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4particles.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4geometry.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4graphics_reps.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4materials.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4intercoms.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4global.dylib' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Linux'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -d "${Geant4_home}/lib" ] ; then
+  echo "WARNNING : Directory ${Geant4_home}/lib not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/lib/."
+find "${Geant4_home}/lib" -name 'libG4physicslists.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4readout.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4run.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4event.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4tracking.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4processes.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4digits_hits.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4track.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4particles.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4geometry.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4graphics_reps.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4materials.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4intercoms.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+find "${Geant4_home}/lib" -name 'libG4global.so' -follow -exec /bin/cp {} "${obuild_dir_project}/lib/." \;
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'Darwin'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -e "${HDF5_home}/lib/libhdf5.0.0.0.dylib" ] ; then
+  echo "WARNNING : File ${HDF5_home}/lib/libhdf5.0.0.0.dylib not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/lib"
+/bin/cp "${HDF5_home}/lib/libhdf5.0.0.0.dylib" "${obuild_dir_project}/lib/."
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -d "${HDF5_home}/include" ] ; then
+  echo "WARNNING : Directory ${HDF5_home}/include not found."
+else
+/bin/mkdir -p "${obuild_dir_project}/Resources/HDF5/."
+/bin/cp -R "${HDF5_home}/include" "${obuild_dir_project}/Resources/HDF5/."
+find "${obuild_dir_project}/Resources/HDF5/." -depth -name CVS -exec /bin/rm -R -f {} \;
+find "${obuild_dir_project}/Resources/HDF5/." -depth -name .svn -exec /bin/rm -R -f {} \;
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -e "${obuild_osc_snovis_path}/obuild/release/UNIX/setup.csh" ] ; then
+  echo "WARNNING : File ${obuild_osc_snovis_path}/obuild/release/UNIX/setup.csh not found."
+else
+/bin/mkdir -p "${obuild_dir_project}"
+/bin/cp "${obuild_osc_snovis_path}/obuild/release/UNIX/setup.csh" "${obuild_dir_project}/."
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -e "${obuild_osc_snovis_path}/obuild/release/UNIX/setup.sh" ] ; then
+  echo "WARNNING : File ${obuild_osc_snovis_path}/obuild/release/UNIX/setup.sh not found."
+else
+/bin/mkdir -p "${obuild_dir_project}"
+/bin/cp "${obuild_osc_snovis_path}/obuild/release/UNIX/setup.sh" "${obuild_dir_project}/."
+fi
+fi
+unset obuild_platform_result
+if [ "${obuild_platform_exe}" = "" ] ; then
+  echo "Variable obuild_platform_exe not defined."
+  exit
+fi
+obuild_platform_result=`"${obuild_platform_exe}" ${obuild_platform} 'UNIX'`
+if [ ${obuild_platform_result} = yes ] ; then
+if [ ! -e "${obuild_osc_snovis_path}/obuild/release/UNIX/install" ] ; then
+  echo "WARNNING : File ${obuild_osc_snovis_path}/obuild/release/UNIX/install not found."
+else
+/bin/mkdir -p "${obuild_dir_project}"
+/bin/cp "${obuild_osc_snovis_path}/obuild/release/UNIX/install" "${obuild_dir_project}/."
+fi
+fi
+unset obuild_platform_result
+obuild_pwd_osc_snovis_1=`pwd`
+cd "${obuild_osc_snovis_path}/obuild"
+if [ -e ./sh/build_sys ] ; then
+  ./sh/build_sys "${obuild_dir_project}"
+  obuild_status=$?;if [ ${obuild_status} != 0 ] ; then exit ${obuild_status};fi
+fi
+cd "${obuild_pwd_osc_snovis_1}"
+unset obuild_pwd_osc_snovis_1
 
 if [ "${obuild_platform_exe}" = "" ] ; then
