autodeploy.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. PRO_DIR=`pwd`
  2. CONFIG_IVSysMan="IVSysMan_HAPO_2.xml"
  3. check_result=`whereis patchelf | awk '{print $2}'`
  4. if [ ! $check_result ];then
  5. echo -e "\e[31m no found patchelf, Plz install patchelf first\e[0m"
  6. exit 1
  7. fi
  8. app_name=(
  9. ######driver######
  10. driver_can_nvidia_agx
  11. driver_rpc_client
  12. ######detection#####
  13. #detection_radar_delphi_srr
  14. detection_mobileye
  15. ######tools########
  16. IVSysMan
  17. view_ivlog
  18. ivlog_record
  19. adciv_record
  20. )
  21. for x in ${app_name[@]}
  22. do
  23. echo "deploy $x"
  24. cp ./bin/${x} ./
  25. ./deploy.sh $x
  26. if [ $? == 1 ];then
  27. echo "build $x faile"
  28. echo "build $x faile"
  29. exit 1
  30. fi
  31. rm ${x}
  32. done
  33. lib_name=(
  34. libmodulecomm.so
  35. libndt_cpu.so
  36. libxmlparam.so
  37. libivfault.so
  38. libivlog.so
  39. libplatformif.so
  40. libivexit.so
  41. libivchart.so
  42. )
  43. for x in ${lib_name[@]}
  44. do
  45. echo "link lib $x"
  46. patchelf --set-rpath '$ORIGIN' ./bin/$x
  47. if [ "$?" != 0 ];then
  48. echo -e "\e[31m patchelf $EXE faile, Ensure patchelf tool installed\e[0m"
  49. exit 1
  50. fi
  51. done
  52. #echo "creat IVSysMan.xml"
  53. #cp ./other/$CONFIG_IVSysMan ./deploy/app/IVSysMan.xml
  54. #cp ./other/ADS_decision.xml ./deploy/app/ADS_decision.xml
  55. #sed -i "s|xxxxxx|$PRO_DIR/deploy/app|g" ./deploy/app/IVSysMan.xml
  56. cp ./bin/*.so ./deploy/app/lib/
  57. qt_com=`arch`
  58. if [ $qt_com = "aarch64" ];then
  59. cp -r /usr/lib/aarch64-linux-gnu/nss/* ./deploy/app/lib/
  60. else
  61. cp -r /usr/lib/x86_64-linux-gnu/nss/* ./deploy/app/lib/
  62. fi
  63. cp ./sh/BaiDuMap.html ./deploy/app/
  64. cp ./sh/car.png ./deploy/app/
  65. cp ./sh/asphalt.jpg ./deploy/app/
  66. echo ""
  67. echo "***************"
  68. echo "*** done! ***"
  69. echo "***************"