@@ -23,6 +23,11 @@ source util.sh
2323g_arch=$( uname -m) # Global variable. No function should use this name.
2424print_status_msg " Detected architecture: ${g_arch} "
2525
26+ if [[ $( lsb_release -rs) == " 20.04" ]] || [[ $( lsb_release -rs) == " 22.04" ]]; then
27+ print_status_msg " This version of ubuntu is not supported anymore, please upgrade your OS version"
28+ exit 1
29+ fi
30+
2631print_status_msg " Installing Utilities and Dependencies"
2732
2833sudo apt-get update
@@ -55,20 +60,13 @@ host_software_packages=(
5560 g++-10
5661 kcachegrind # This lets us view the profiles output by callgrind
5762 libeigen3-dev # A math / numerical library used for things like linear regression
58- libprotobuf-dev
5963 libudev-dev
6064 libusb-1.0-0-dev
6165 libxcb-cursor0 # This is used as the Linux platform abstraction by Qt
62- protobuf-compiler # This is required for the "NanoPb" library, which does not
63- # properly manage this as a bazel dependency, so we have
64- # to manually install it ourselves
6566 python3.12 # Python 3
6667 python3.12-dev # Python 3 headers
6768 python3.12-venv # Virtual Environment
6869 python3-pip # Required for bazel to install python dependencies for build targets
69- python3-protobuf # This is required for the "NanoPb" library, which does not
70- # properly manage this as a bazel dependency, so we have
71- # to manually install it ourselves
7270 python3-yaml # Load dynamic parameter configuration files
7371 valgrind # Checks for memory leaks
7472 libsqlite3-dev # needed to build Python 3 with sqlite support
@@ -80,36 +78,16 @@ host_software_packages=(
8078 xvfb # used for CI to run GUI applications
8179)
8280
83- if [[ $( lsb_release -rs) == " 20.04" ]]; then
84- # This is required for bazel, we've seen some issues where
85- # the bazel install hasn't installed it properly
86- host_software_packages+=(python-is-python3)
87-
88- # This is to setup the toolchain for bazel to run
89- host_software_packages+=(clang)
90- host_software_packages+=(llvm-6.0)
91- host_software_packages+=(libclang-6.0-dev)
92- host_software_packages+=(libncurses5)
93-
94- # This fixes missing headers by notifying the linker
95- sudo ldconfig
96- fi
97-
9881# Clear the download cache
9982sudo rm -rf /tmp/tbots_download_cache
10083mkdir /tmp/tbots_download_cache
10184
102- if [[ $( lsb_release -rs) == " 22.04 " ]] || [[ $( lsb_release -rs ) == " 24.04" ]]; then
85+ if [[ $( lsb_release -rs) == " 24.04" ]]; then
10386 # This is required because a Braille TTY device that Linux provides a driver for conflicts with the ESP32
10487 wget -nc https://github.com/UBC-Thunderbots/Software-External-Dependencies/blob/main/85-brltty.rules -O /tmp/tbots_download_cache/85-brltty.rules
10588 sudo mv /tmp/tbots_download_cache/85-brltty.rules /usr/lib/udev/rules.d/85-brltty.rules
10689fi
10790
108- if [[ $( lsb_release -rs) == " 22.04" ]]; then
109- # This is required for clang-format
110- host_software_packages+=(libtinfo5)
111- fi
112-
11391virtualenv_opt_args=" "
11492if [[ $( lsb_release -rs) == " 24.04" ]]; then
11593 host_software_packages+=(python3-pyqt6)
@@ -135,20 +113,11 @@ if ! sudo /usr/bin/python3.12 -m venv /opt/tbotspython $virtualenv_opt_args ; th
135113 exit 1
136114fi
137115
138- if [[ $( lsb_release -rs) == " 20.04" ]] || [[ $( lsb_release -rs) == " 22.04" ]]; then
139- # Install pip if it is not a system-managed package
140- sudo /usr/bin/python3.12 -m ensurepip
141- fi
142-
143116if ! sudo /opt/tbotspython/bin/python3 -m pip install --upgrade pip ; then
144117 print_status_msg " Error: Upgrading pip version in venv failed"
145118 exit 1
146119fi
147120
148- if [[ $( lsb_release -rs) == " 22.04" ]]; then
149- sudo /opt/tbotspython/bin/pip3 install -r ubuntu22_requirements.txt
150- fi
151-
152121if [[ $( lsb_release -rs) == " 24.04" ]]; then
153122 sudo /opt/tbotspython/bin/pip3 install -r ubuntu24_requirements.txt
154123fi
0 commit comments