td2026 1.1 KB

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. if [[ -n "${PRODU2_TD_ROOT:-}" ]]; then
  4. td_root="${PRODU2_TD_ROOT}"
  5. elif [[ -x /data/prod2u/toolchain/TD_Release_2026.1_SP2_NL/bin/td ]]; then
  6. td_root=/data/prod2u/toolchain/TD_Release_2026.1_SP2_NL
  7. else
  8. td_root=/data/anlogic/TD_Release_2026.1_SP2_NL
  9. fi
  10. if [[ ! -x "$td_root/bin/td" ]]; then
  11. candidate=/data/prod2u/toolchain/TD_Release_2026.1_SP2_NL/TD_Release_2026.1_SP2_NL
  12. if [[ -x "$candidate/bin/td" ]]; then td_root="$candidate"; fi
  13. fi
  14. td_runtime="${PRODU2_TD_RUNTIME_LIB:-/data/prod2u/td-runtime/lib}"
  15. td_runtime_root="${PRODU2_TD_RUNTIME_ROOT:-/data/prod2u/td-runtime/root}"
  16. export LD_LIBRARY_PATH="${td_root}/lib:${td_root}/lib/Qt/lib:/workspace/lib:${td_runtime}:${td_runtime_root}/usr/lib/x86_64-linux-gnu:${td_runtime_root}/lib/x86_64-linux-gnu"
  17. export QT_PLUGIN_PATH="${td_root}/lib/Qt/plugins"
  18. export QT_QPA_PLATFORM=offscreen
  19. # The vendor td.sh overwrites LD_LIBRARY_PATH and drops the persistent
  20. # libusb runtime above. Execute the same vendor binary directly so the
  21. # subprocess-scoped dependency set remains intact.
  22. exec "${td_root}/bin/td" "$@"