{
make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE} ${PRODUCT_DIR}
if [ -d ${PRODUCT_DIR} ] ; then
- cd ${PRODUCT_DIR}
+ pushd ${PRODUCT_DIR}
version=`cat bin/salome/VERSION | awk -F: '{print $2}' | tr -d '[:space:]'`
dir="${HOME}/salome_appli_$version"
bin/salome/createAppli.sh $dir
rm -rf $dir/env.d/*.sh
cp -f ${PRODUCT_DIR}/salome.sh $dir/env.d
+ popd
fi
+create_config.sh ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_DIR}
make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" "${INSTALL_PRODUCTS}" ${PRODUCT_TYPE}_src ${PRODUCT_SRC_DIR}
}
--- /dev/null
+#!/bin/bash -noprofile
+
+####################################################################################
+# File : create_config.sh
+# Created : Fri May 30 10:40:01 2008
+# 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.
+#
+####################################################################################
+
+export INSTALL_ROOT=$1
+export INSTALL_WORK=$2
+export PRODUCT_SEQUENCE=$3
+export PRODUCT_DIR=$4
+
+# --- configuration file ---
+CONFIG_FILE=${INSTALL_WORK}/config_appli.xml
+
+# create and source environment file
+make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
+source ${INSTALL_WORK}/$SHRC
+
+# remove config file
+if [ -e ${CONFIG_FILE} ] ; then
+ rm ${CONFIG_FILE}
+fi
+# create empty config file
+touch ${CONFIG_FILE}
+
+# begin <application> tag
+echo "<application>" >> ${CONFIG_FILE}
+
+# <prerequisites> tag : path to the environment script
+echo " <prerequisites path=\"${INSTALL_ROOT}/env_products.sh\"/>" >> ${CONFIG_FILE}
+
+# begin <modules> tag
+echo " <modules>" >> ${CONFIG_FILE}
+
+# for each module create <module> tag
+SALOME_MODULES="`env | awk -F_ '/[a-zA-Z0-9]*_ROOT_DIR/ { print $1 }' | grep -v -E '^SALOME$' | grep -v -E '^HXX2SALOME$'`"
+GUI_MODULES="`echo $SALOME_MODULES | tr \"[:space:]\" \"\n\" | grep -v -E \"(^KERNEL|^GUI|^SAMPLES|PLUGIN)$\"`"
+for mod in ${SALOME_MODULES}; do
+ echo ${GUI_MODULES} | tr "[:space:]" "\n" | grep -E "^${mod}$" >& /dev/null
+ if [ "$?" == "0" ] ; then
+ gui_attr="yes"
+ else
+ gui_attr="no"
+ fi
+ path_attr="`printenv ${mod}_ROOT_DIR`"
+ echo " <module name=\"${mod}\" gui=\"${gui_attr}\" path=\"${path_attr}\"/>" >> ${CONFIG_FILE}
+done
+
+# end <modules> tag
+echo " </modules>" >> ${CONFIG_FILE}
+
+# <samples> tag : path to the samples directory
+if [ -n ${DATA_DIR} ] && [ -d ${DATA_DIR} ] ; then
+ echo " <samples path=\"${DATA_DIR}\"/>" >> ${CONFIG_FILE}
+fi
+
+# end <application> tag
+echo "</application>" >> ${CONFIG_FILE}
+
+# copy resulting confuguration file to the KERNEL module
+if [ -n ${PRODUCT_DIR} ] && [ -d ${PRODUCT_DIR} ] ; then
+ cp -f ${CONFIG_FILE} ${PRODUCT_DIR}/bin/salome
+fi