-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.env
83 lines (72 loc) · 2.76 KB
/
setup.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Configuration file to setup SAL environment. Default config assumes
# ts_opensplice is available in the same directory as ts_sal. You don't need to
# edit this file for the default config described in README.md.
#
# If needed, please change the LSST_SDK_INSTALL and OSPL_HOME to the actual
# locations before running the script.
# colors
if [ -t 1 ]; then
R="\e[31m"
Y="\e[33m"
G="\e[32m"
N="\e[0m"
fi
BS_DIRNAME=$(dirname $BASH_SOURCE)
if [ $BS_DIRNAME = "." ]; then
export LSST_SDK_INSTALL=${LSST_SDK_INSTALL:=$(pwd)}
else
export LSST_SDK_INSTALL=${LSST_SDK_INSTALL:=$(pwd)/${BS_DIRNAME}}
fi
if [ -z "$OSPL_HOME" ]; then
echo -e "${R}Please edit setup.env to set OSPL_HOME environment variable.${N}"
return 1
fi
if [ ! -r $OSPL_HOME/release.com ]; then
echo -e "${R}Cannot find $OSPL_HOME/release.com. Please check ts_opensplice installation.${N}"
return 1
fi
echo "LSST_SDK_INSTALL $LSST_SDK_INSTALL"
export SAL_HOME=$LSST_SDK_INSTALL/lsstsal
export SAL_WORK_DIR=$LSST_SDK_INSTALL/test
export TS_DDSCONFIG_DIR=$LSST_SDK_INSTALL/../ts_ddsconfig
### Do not use the DDS_DefaultQos unless you know this is what you want
export LSST_DDS_QOS=file://${TS_DDSCONFIG_DIR}/python/lsst/ts/ddsconfig/data/qos/QoS.xml
if [ ! -z "$LSST_DDS_QOS" ]; then
XQOS=`echo ${LSST_DDS_QOS:7}`
if [ -f "$XQOS" ]; then
echo -e "${G}Using DDS QOS from ${XQOS}${N}"
else
echo -e "${R}Please ensure LSST_DDS_QOS references an existing file - ${LSST_DDS_QOS}${N}"
return 1
fi
fi
export SAL_CPPFLAGS=-m64
source $SAL_HOME/salenv.sh
if [ -z "$JAVA_HOME" ]; then
export JAVA_HOME=/usr/lib/jvm/java-17-zulu-openjdk-jdk
fi
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SAL_HOME}/lib
export PATH=${LSST_SDK_INSTALL}/bin:${PATH}
export SAL_IDL_DIR=${SAL_WORK_DIR}/idl-templates/validated/sal
export LSST_DDS_IP=`ip route get 1 | awk '{print $7;exit}'`
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SAL_WORK_DIR}/lib:${LSST_SDK_INSTALL}/lib
export TS_SAL_DIR=$LSST_SDK_INSTALL
export TS_XML_DIR=$LSST_SDK_INSTALL/../ts_xml
export RLM_HOME=$SAL_HOME/.m2/repository/org/opensplice/gateway/rlm/9.1.3
source $OSPL_HOME/release.com
export OSPL_RELEASE=`$SAL_DIR/ospl_release.tcl`
mkdir -p $LSST_SDK_INSTALL/lsstsal/lib
pushd $LSST_SDK_INSTALL
sal_version=`git describe --tags --dirty`
popd
export SAL_VERSION=$sal_version
echo "LSST middleware toolset environment "$sal_version" is configured."
echo "LSST_SDK_INSTALL=$LSST_SDK_INSTALL"
echo "OSPL_HOME=$OSPL_HOME"
if [ -r $JAVA_HOME/lib/libjsig.so ]; then
echo -e "${G}Using java in ${JAVA_HOME}${N}"
export LD_PRELOAD=$JAVA_HOME/lib/libjsig.so
export PATH=$JAVA_HOME/bin:${PATH}
else
echo -e "${Y}Cannot find $JAVA_HOME/lib/libjsig.so. Please check java installation. Setup will proceed, but generating java bindings will fail${N}"
fi