Salome HOME
Update copyrights
[modules/yacs.git] / src / wrappergen / src / runIDLparser
1 #! /bin/bash
2 # Copyright (C) 2006-2019  CEA/DEN, EDF R&D
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20
21 # print the help message ====================================
22
23 # test $@="-h" -o -z $@
24
25 hh=0
26
27 if test "$#" = "0";then
28     hh=1
29 else
30     for a in $@; do
31         if test "$a" = "-h"; then
32             hh=1
33         fi
34     done
35 fi
36
37 if test "$hh" = "1" ; then
38     echo ""
39     echo "Usage : "
40     echo ""
41     echo "   to run IDLparser:"
42     echo ""
43     echo "        $0 -Wbcatalog=<my_catalog.xml>[,icon=<pngfile>][,version=<num>][,author=<name>][,name=<component_name>][,remove=component_name] <file.idl>   "
44     echo ""
45     echo "   to have omniidl help:"
46     echo ""
47     echo "        $0 -u "
48     echo ""
49     exit 1
50 fi
51 #============================================================
52
53 # environment ==============================================
54
55
56 DIR=`pwd`
57 EXEC_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
58 cd $EXEC_DIR/..
59 SALOME_HOME_DIR=`pwd`
60 cd $EXEC_DIR
61
62 export SALOME_HOME_DIR      
63 export SALOME_SRC_DIR=/dn05/salome/apv/WORK/SOURCE/KERNEL
64 export ORB_HOME_DIR=/dn05/salome/ref/PRODUCTS/IW/omniORB-3.0.5
65
66 export LD_LIBRARY_PATH=${SALOME_HOME_DIR}/lib:${LD_LIBRARY_PATH}
67
68 # echo $SALOME_HOME_DIR = SALOME_HOME_DIR
69 # echo $SALOME_SRC_DIR = SALOME_SRC_DIR
70
71 PYVTK_PATH=
72 export PYTHONPATH=${PYTHONPATH}:${SALOME_HOME_DIR}/idl:${SALOME_HOME_DIR}/bin:${SALOME_HOME_DIR}/lib:${PYVTK_PATH}:${EXEC_DIR}
73
74 MICORC=/dev/null
75 export MICORC
76
77
78 cd $DIR
79
80 PYTHONPATH=${PYTHONPATH}:${SALOME_HOME_DIR}/bin
81 #============================================================
82
83 # omiidl ====================================================
84 omniidl -bIDLparser -I ${SALOME_SRC_DIR}/idl $@
85 #============================================================