autodeploy.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. PRO_DIR=`pwd`
  2. CONFIG_IVSysMan="IVSysMan_HAPO_1.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. cp ./bin/*.so ./deploy/app/lib/
  59. qt_com=`arch`
  60. if [ $qt_com = "aarch64" ];then
  61. cp -r /usr/lib/aarch64-linux-gnu/nss/* ./deploy/app/lib/
  62. else
  63. cp -r /usr/lib/x86_64-linux-gnu/nss/* ./deploy/app/lib/
  64. fi
  65. cp ./sh/BaiDuMap.html ./deploy/app/
  66. cp ./sh/car.png ./deploy/app/
  67. cp ./sh/asphalt.jpg ./deploy/app/
  68. echo ""
  69. echo "***************"
  70. echo "*** done! ***"
  71. echo "***************"