1、安装部署Teamcenter13 服务器(DB、TC Foundation、J2EE 服务端)或应用层服务(TC Foundation、J2EE 服务端)、Sample样例程序,具备支持ITK编译和运行条件。
2、编写编译脚本。
echo "Start compile itk sign"
export TC_ROOT=/usr/Siemens/Teamcenter13
echo $TC_ROOT
export TC_INCLUDE=/usr/Siemens/Teamcenter13/include
echo $TC_INCLUDE
#export TC_INCLUDE=/usr/Siemens/Teamcenter13/include/tccore
#echo $TC_INCLUDE
export TC_LIBRARY=/usr/Siemens/Teamcenter13/lib
echo $TC_LIBRARY
export TC_DATA=/usr/Siemens/tcdata
echo $TC_DATA
export LIBPATH=/usr/Siemens/Teamcenter13/lib
TC_USER_LIB=${TC_LIBRARY};export TC_USER_LIB
/usr/Siemens/tcdata/tc_profilevars
echo "执行的文件名:$0";
# check argumenst 1 is null?
inputPathName=$1;
if [ -z $inputPathName ]; then
echo "arguments error !"
inputPathName=$(cd "$(dirname "$0")";pwd);
else
echo "arguments $inputPathName !"
fi
#check path
if [ ! -d "$inputPathName" ];then
echo "[ $inputPathName ] Path does not exits !";
#--get current path
inputPathName=$(cd "$(dirname "$0")";pwd);
fi
folder=$inputPathName;
echo "current Path:$folder"
echo get all file
fileList=$(ls $folder/*.c)
echo ${fileList}
for fileList in ${fileList}
do
echo -e "**********"
echo -e "compile fileName ${fileList}"
#/usr/Siemens/Teamcenter13/sample/compile ${fileList}
echo -e "********"
done
#compile .c files
$TC_ROOT/sample/compile *.c
if [ -f"/usr/Siemens/Teamcenter13/lib/libZL13.so" ]; then
rm -rf "/usr/Siemens/Teamcenter13/lib/libZL13.so"
fi
$TC_ROOT/sample/link_custom_exits libZL13
3、运行脚本:
4、运行验证