Skip to content

Commit ca291b7

Browse files
committed
Tools: install-prereqs-ubuntu.sh: add support for Ubuntu Noble (24.04)
1 parent 06b7394 commit ca291b7

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

Tools/environment_install/install-prereqs-ubuntu.sh

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ elif [ ${RELEASE_CODENAME} == 'mantic' ]; then
114114
SITLCFML_VERSION="2.5"
115115
PYTHON_V="python3"
116116
PIP=pip3
117+
elif [ ${RELEASE_CODENAME} == 'noble' ]; then
118+
SITLFML_VERSION="2.6"
119+
SITLCFML_VERSION="2.6"
120+
PYTHON_V="python3"
121+
PIP=pip3
117122
elif [ ${RELEASE_CODENAME} == 'groovy' ] ||
118123
[ ${RELEASE_CODENAME} == 'bullseye' ]; then
119124
SITLFML_VERSION="2.5"
@@ -169,7 +174,8 @@ ARM_LINUX_PKGS="g++-arm-linux-gnueabihf $INSTALL_PKG_CONFIG"
169174

170175
if [ ${RELEASE_CODENAME} == 'bookworm' ] ||
171176
[ ${RELEASE_CODENAME} == 'lunar' ] ||
172-
[ ${RELEASE_CODENAME} == 'mantic' ]; then
177+
[ ${RELEASE_CODENAME} == 'mantic' ] ||
178+
[ ${RELEASE_CODENAME} == 'noble' ]; then
173179
# on Lunar (and presumably later releases), we install in venv, below
174180
PYTHON_PKGS+=" numpy pyparsing psutil"
175181
SITL_PKGS="python3-dev"
@@ -181,7 +187,8 @@ fi
181187
if [[ $SKIP_AP_GRAPHIC_ENV -ne 1 ]]; then
182188
if [ ${RELEASE_CODENAME} == 'bookworm' ] ||
183189
[ ${RELEASE_CODENAME} == 'lunar' ] ||
184-
[ ${RELEASE_CODENAME} == 'mantic' ]; then
190+
[ ${RELEASE_CODENAME} == 'mantic' ] ||
191+
[ ${RELEASE_CODENAME} == 'noble' ]; then
185192
PYTHON_PKGS+=" matplotlib scipy opencv-python pyyaml"
186193
SITL_PKGS+=" xterm libcsfml-dev libcsfml-audio${SITLCFML_VERSION} libcsfml-dev libcsfml-graphics${SITLCFML_VERSION} libcsfml-network${SITLCFML_VERSION} libcsfml-system${SITLCFML_VERSION} libcsfml-window${SITLCFML_VERSION} libsfml-audio${SITLFML_VERSION} libsfml-dev libsfml-graphics${SITLFML_VERSION} libsfml-network${SITLFML_VERSION} libsfml-system${SITLFML_VERSION} libsfml-window${SITLFML_VERSION}"
187194
else
@@ -274,7 +281,8 @@ elif [ ${RELEASE_CODENAME} == 'lunar' ]; then
274281
SITL_PKGS+=" libpython3-stdlib" # for argparse
275282
elif [ ${RELEASE_CODENAME} == 'buster' ]; then
276283
SITL_PKGS+=" libpython3-stdlib" # for argparse
277-
elif [ ${RELEASE_CODENAME} != 'mantic' ]; then
284+
elif [ ${RELEASE_CODENAME} != 'mantic' ] &&
285+
[ ${RELEASE_CODENAME} != 'noble' ]; then
278286
SITL_PKGS+=" python-argparse"
279287
fi
280288

@@ -293,6 +301,9 @@ if [[ $SKIP_AP_GRAPHIC_ENV -ne 1 ]]; then
293301
elif [ ${RELEASE_CODENAME} == 'mantic' ]; then
294302
SITL_PKGS+=" libgtk-3-dev libwxgtk3.2-dev "
295303
# see below
304+
elif [ ${RELEASE_CODENAME} == 'noble' ]; then
305+
SITL_PKGS+=" libgtk-3-dev libwxgtk3.2-dev "
306+
# see below
296307
elif apt-cache search python-wxgtk3.0 | grep wx; then
297308
SITL_PKGS+=" python-wxgtk3.0"
298309
elif apt-cache search python3-wxgtk4.0 | grep wx; then
@@ -312,7 +323,8 @@ if [[ $SKIP_AP_GRAPHIC_ENV -ne 1 ]]; then
312323
PYTHON_PKGS+=" wxpython opencv-python"
313324
SITL_PKGS+=" python3-wxgtk4.0"
314325
SITL_PKGS+=" fonts-freefont-ttf libfreetype6-dev libpng16-16 libportmidi-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev" # for pygame
315-
elif [ ${RELEASE_CODENAME} == 'mantic' ]; then
326+
elif [ ${RELEASE_CODENAME} == 'mantic' ] ||
327+
[ ${RELEASE_CODENAME} == 'noble' ]; then
316328
PYTHON_PKGS+=" wxpython opencv-python"
317329
SITL_PKGS+=" python3-wxgtk4.0"
318330
SITL_PKGS+=" fonts-freefont-ttf libfreetype6-dev libpng16-16 libportmidi-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev" # for pygame
@@ -360,10 +372,17 @@ fi
360372
PIP_USER_ARGUMENT="--user"
361373

362374
# create a Python venv on more recent releases:
375+
PYTHON_VENV_PACKAGE=""
363376
if [ ${RELEASE_CODENAME} == 'bookworm' ] ||
364377
[ ${RELEASE_CODENAME} == 'lunar' ] ||
365378
[ ${RELEASE_CODENAME} == 'mantic' ]; then
366-
$APT_GET install python3.11-venv
379+
PYTHON_VENV_PACKAGE=python3.11-venv
380+
elif [ ${RELEASE_CODENAME} == 'noble' ]; then
381+
PYTHON_VENV_PACKAGE=python3.12-venv
382+
fi
383+
384+
if [ -n "$PYTHON_VENV_PACKAGE" ]; then
385+
$APT_GET install $PYTHON_VENV_PACKAGE
367386
python3 -m venv $HOME/venv-ardupilot
368387

369388
# activate it:
@@ -389,7 +408,8 @@ fi
389408

390409
if [ ${RELEASE_CODENAME} == 'bookworm' ] ||
391410
[ ${RELEASE_CODENAME} == 'lunar' ] ||
392-
[ ${RELEASE_CODENAME} == 'mantic' ]; then
411+
[ ${RELEASE_CODENAME} == 'mantic' ] ||
412+
[ ${RELEASE_CODENAME} == 'noble' ]; then
393413
# must do this ahead of wxPython pip3 run :-/
394414
$PIP install $PIP_USER_ARGUMENT -U attrdict3
395415
fi

0 commit comments

Comments
 (0)