--- /dev/null
+#!/bin/bash -noprofile
+
+####################################################################################
+# File : HOMARD.sh
+# Created : Thu Dec 18 12:01:00 2002
+# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+# Project : SALOME
+# Module : Installation Wizard
+# Copyright : 2002-2008 CEA
+#
+# This script is the part of the SALOME installation procedure.
+#
+####################################################################################
+
+check_version(){
+if [ -n "${HOMARD_ROOT_DIR}" ]; then
+ check_lib_version VERSION ${HOMARD_ROOT_DIR}/bin/salome
+ if [ "$?" -eq "0" ]; then
+ ver=`cat ${HOMARD_ROOT_DIR}/bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]' `
+ if [ "$ver" = "${SALOME_VERSION}" ]; then
+ return 0
+ fi
+ fi
+elif [ -n "${HOMARD_SRC_DIR}" ]; then
+ check_salome_src_version HOMARD_SRC_DIR
+ if [ $? -eq 0 ] ; then return 0 ; fi
+ return 1
+fi
+return 1
+}
+
+print_env_bin(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
+#$DELIM ${PRODUCT_TYPE} $DELIM
+export HOMARD_ROOT_DIR=\${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+if [ -n "\${ENV_FOR_LAUNCH}" ] ; then
+ if [ "\${ENV_FOR_LAUNCH}" == "1" ] ; then
+ export PATH=\${HOMARD_ROOT_DIR}/bin/salome:\${PATH}
+ export LD_LIBRARY_PATH=\${HOMARD_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
+ export PYTHONPATH=\${HOMARD_ROOT_DIR}/bin/salome:\${HOMARD_ROOT_DIR}/lib/salome:\${HOMARD_ROOT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/salome:\${PYTHONPATH}
+ fi
+fi
+##
+EOF
+(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+print_env_src(){
+cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh <<EOF
+#$DELIM ${PRODUCT_TYPE}_src $DELIM
+export HOMARD_SRC_DIR=\${INST_ROOT}/${PRODUCT_SRC}
+##
+EOF
+
+(test -w ${PRODUCT_SRC_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}_src.sh ${PRODUCT_SRC_DIR})
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}"
+}
+
+try_preinstalled(){
+try_existing ${PRODUCT_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+try_existing ${PRODUCT_SRC_DIR} ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+return $?
+}
+
+install_source()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src
+source ${INSTALL_WORK}/$SHRC
+
+check_jb tar xfz ${SOURCE_DIR}/HOMARDsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_source_and_build()
+{
+# install sources
+install_source
+
+# build sources
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+if [ -e ./build.sh ] ; then
+ cp -f ./build.sh ${INST_ROOT}
+fi
+
+CUR_DIR=`pwd`
+cd ${INST_ROOT}
+if [ $INST_WITH_GUI == "FALSE" ] ; then
+ check_jb ./build.sh -o -b -w -d -v 0 -p $INST_ROOT HOMARD
+else
+ check_jb ./build.sh -o -b -d -v 0 -p $INST_ROOT HOMARD
+fi
+
+cd $CUR_DIR
+
+# remove sources and temporary files after building
+if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then
+ test -d ${PRODUCT_SRC_DIR} && rm -fr ${PRODUCT_SRC_DIR}
+ test -d ${INST_ROOT}/"HOMARD_BUILD" && rm -fr ${INST_ROOT}/"HOMARD_BUILD"
+fi
+
+# to generate environment scripts
+try_preinstalled
+}
+
+install_binary()
+{
+make_env ${INST_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}
+source ${INSTALL_WORK}/$SHRC
+
+# create a module directory
+test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
+
+if [ $INST_WITH_GUI == "FALSE" ] ; then
+ check_jb tar xfz ${SOURCE_DIR}/HOMARDWOGUIbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
+else
+ check_jb tar xfz ${SOURCE_DIR}/HOMARDbinariesV${SALOME_VERSION}.tar.gz -C ${PRODUCT_DIR}
+fi
+check_jb tar xfz ${SRC_DIR}/HOMARDsourcesV${SALOME_VERSION}.tar.gz -C ${INST_ROOT}
+
+# modify all *.la files
+export HOMARD_ROOT_DIR=${PRODUCT_DIR}
+test -z ${SINGLE_DIR} && modif_la_files ${PRODUCT_DIR}
+
+# to generate environment scripts
+try_preinstalled
+}
+
+source ./common.sh
+
+export PROCEDURE=$1;
+export INSTALL_WORK=$2;
+export SOURCE_DIR=$3;
+export INST_ROOT=$4;
+export PRODUCT_SEQUENCE=$5;
+export PRODUCT_TYPE=$6;
+export INSTALL_PRODUCTS=$7;
+SRC_DIR=$8;
+shift
+REMOVE_SRC_TMP=$8;
+shift
+INST_WITH_GUI=$9;
+shift
+SINGLE_DIR=$9;
+if [ -n "$SINGLE_DIR" ] ; then SINGLE_DIR=$SDIR_NAME; fi
+export PRODUCT="HOMARD_${SALOME_VERSION}"
+export PRODUCT_SRC="HOMARD_SRC_${SALOME_VERSION}"
+export PRODUCT_DIR=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}
+export PRODUCT_SRC_DIR=${INST_ROOT}/${PRODUCT_SRC}
+$PROCEDURE