]> SALOME platform Git repositories - tools/hxx2salome.git/commitdiff
Salome HOME
Correction Bug PAL16047 V4_1_0 V4_1_0a1 V4_1_0a2 V4_1_0a3 V4_1_0rc1 V4_1_0rc2 V4_1_0rc3 for_M2008_07022008
authorcrouzet <crouzet>
Fri, 5 Oct 2007 12:16:00 +0000 (12:16 +0000)
committercrouzet <crouzet>
Fri, 5 Oct 2007 12:16:00 +0000 (12:16 +0000)
add automailcally $KERNEL_ROOT_DIR/bin/salome to PYTHONPATH (for runIDLparser).
Check that catalog is generated, exit if not.

scripts/hxx2salome

index 6c3911bbe5bc629c9812ebc0f9ccab4516d30191..d533e12961403cfb69fa97df5c1890e91ffbc717 100755 (executable)
@@ -246,8 +246,15 @@ generate_module_source()
     fi
     cd ${CLASS_NAME}_SRC/resources
     VER=`cat ${KERNEL_ROOT_DIR}/bin/salome/VERSION | awk ' { print $NF }'` # extract number of version 
+    export PYTHONPATH=${PYTHONPATH}:${KERNEL_ROOT_DIR}/bin/salome  # to be sure IDLparser is in PYTHONPATH
     ${idlparser} -Wbcatalog=tmp.xml,icon=${CLASS_NAME}.png,version=${VER} -I${KERNEL_ROOT_DIR}/idl/salome -I${MED_ROOT_DIR}/idl/salome ../idl/${CLASS_NAME}_Gen.idl >& /dev/null | tee  hxx2salome_journal
-    cat tmp.xml | sed 's/_Gen//g' > ${CLASS_NAME}Catalog.xml
+    if [ -f tmp.xml ]
+    then
+       cat tmp.xml | sed 's/_Gen//g' > ${CLASS_NAME}Catalog.xml
+    else
+       echo Error with runIDLparser - the catalog was not generated
+       exit
+    fi
     rm tmp.xml
 #
 }