autodeploy.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. PRO_DIR=`pwd`
  2. CONFIG_IVSysMan="IVSysMan_midcar.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_lidar_leishen16
  10. driver_gps_ins550d
  11. driver_can_vci
  12. driver_map_xodrload
  13. #driver_obu
  14. #driver_platform
  15. detection_lidar_grid
  16. detection_chassis
  17. decition_brain_sf_1x
  18. controller_hunter
  19. view_pointcloud
  20. view_gps
  21. IVSysMan
  22. view_ivlog
  23. ui_ads_hmi_1px
  24. tool_xodrobj
  25. ivlog_record
  26. adciv_record
  27. )
  28. for x in ${app_name[@]}
  29. do
  30. echo "deploy $x"
  31. cp ./bin/${x} ./
  32. ./deploy.sh $x
  33. if [ $? == 1 ];then
  34. echo "build $x faile"
  35. exit 1
  36. fi
  37. rm ${x}
  38. done
  39. lib_name=(
  40. libmodulecomm.so
  41. libndt_cpu.so
  42. libxmlparam.so
  43. libivfault.so
  44. libivlog.so
  45. libplatformif.so
  46. libivexit.so
  47. libivchart.so
  48. )
  49. for x in ${lib_name[@]}
  50. do
  51. echo "link lib $x"
  52. patchelf --set-rpath '$ORIGIN' ./bin/$x
  53. if [ "$?" != 0 ];then
  54. echo -e "\e[31m patchelf $EXE faile, Ensure patchelf tool installed\e[0m"
  55. exit 1
  56. fi
  57. done
  58. #echo "creat IVSysMan.xml"
  59. #cp ./other/$CONFIG_IVSysMan ./deploy/app/IVSysMan.xml
  60. #cp ./other/ADS_decision.xml ./deploy/app/ADS_decision.xml
  61. #sed -i "s|xxxxxx|$PRO_DIR/deploy/app|g" ./deploy/app/IVSysMan.xml
  62. cp ./bin/*.so ./deploy/app/lib/
  63. qt_com=`arch`
  64. if [ $qt_com = "aarch64" ];then
  65. cp -r /usr/lib/aarch64-linux-gnu/nss/* ./deploy/app/lib/
  66. else
  67. cp -r /usr/lib/x86_64-linux-gnu/nss/* ./deploy/app/lib/
  68. fi
  69. cp ./sh/BaiDuMap.html ./deploy/app/
  70. cp ./sh/car.png ./deploy/app/
  71. cp ./sh/asphalt.jpg ./deploy/app/
  72. echo ""
  73. echo "***************"
  74. echo "*** done! ***"
  75. echo "***************"