From 0e604606b23d5b6b5b935f648c3c588f4ab42c1b Mon Sep 17 00:00:00 2001 From: Christophe De Wagter Date: Mon, 13 Feb 2023 04:22:11 -0800 Subject: [PATCH] [ubuntu18.04] Update documentation + legacy: solves #2987 (#2990) Fix for newer ubuntus --- doc/sphinx/source/installation/index_installation.rst | 4 ++-- .../source/installation/software/index_software.rst | 2 +- doc/sphinx/source/quickstart/install.rst | 5 +++-- start.py | 10 ++++++++++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/doc/sphinx/source/installation/index_installation.rst b/doc/sphinx/source/installation/index_installation.rst index 202b039a0a..501352db16 100644 --- a/doc/sphinx/source/installation/index_installation.rst +++ b/doc/sphinx/source/installation/index_installation.rst @@ -4,7 +4,7 @@ Installation ================= -Paparazzi is very easily installed on any laptop or workstation running the Ubuntu Linux OS or virtually any Debian based Linux. Apple Macintosh running Mac OS X system are also fairly well supported. Windows is supported through the WSL2 module (running a Linux kernel inside Windows10). +Paparazzi is easily installed on any laptop or workstation running the Ubuntu Linux OS or virtually any Debian based Linux. Apple Macintosh running Mac OS X system are also fairly well supported. Windows is supported through the WSL2 module (running a Linux kernel inside Windows10). The steps required to install the software needed to be able to let your UAS fly are: @@ -15,7 +15,7 @@ The steps required to install the software needed to be able to let your UAS fly .. note:: - If you run **Ubuntu** 16.04 or higher LTS (18.04, 20.04), go to the :doc:`../quickstart/install` page to get quickly running ! + If you run **Ubuntu** 18.04 or higher LTS (20.04, 22.04), go to the :doc:`../quickstart/install` page to get quickly running ! .. toctree:: :maxdepth: 2 diff --git a/doc/sphinx/source/installation/software/index_software.rst b/doc/sphinx/source/installation/software/index_software.rst index 9a8a0884d0..84c0f99752 100644 --- a/doc/sphinx/source/installation/software/index_software.rst +++ b/doc/sphinx/source/installation/software/index_software.rst @@ -20,7 +20,7 @@ If you don't want to work with the latest master branch (it may contain some uns :: cd paparazzi - git checkout v5.16 + git checkout v6.2 OS-specific instructions diff --git a/doc/sphinx/source/quickstart/install.rst b/doc/sphinx/source/quickstart/install.rst index 28282ecfc6..a89358396c 100644 --- a/doc/sphinx/source/quickstart/install.rst +++ b/doc/sphinx/source/quickstart/install.rst @@ -11,7 +11,7 @@ Open a terminal and execute each lines below. If one fails, ask for help on gitt Version specific prerequisites ------------------------------ -**If you have Ubuntu 20.04:** +**If you have Ubuntu 20.04 or 22.04:** .. code-block:: bash @@ -23,6 +23,7 @@ Version specific prerequisites sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa sudo apt-get install gcc-arm-embedded + sudo apt-get install python3-lxml python3-numpy sudo apt-get update Install Paparazzi @@ -36,7 +37,7 @@ Add paparazzi apt-repository and install dependencies: sudo apt-get update sudo apt-get -f -y install paparazzi-dev paparazzi-jsbsim dfu-util pprzgcs -.. note:: If you are on Ubuntu 18.04, ``pprzgcs`` is not available, just remove it from the last line. +.. note:: If you are on Ubuntu 18.04, ``pprzgcs`` is not available, just remove it from the last line. Also launch using ``paparazzi -legacy`` mode Clone the repository: diff --git a/start.py b/start.py index 0df17272ad..e99fddc89e 100755 --- a/start.py +++ b/start.py @@ -12,6 +12,7 @@ import shutil import datetime import subprocess import sys +import lsb_release lib_path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'sw', 'lib', 'python')) sys.path.append(lib_path) @@ -21,6 +22,12 @@ from paparazzi_health import PaparazziOverview import xml.etree.ElementTree +release = lsb_release.get_distro_information() +isLegacy = False +if release['ID'] == 'Ubuntu': + if release['RELEASE'] == '18.04' or release['RELEASE'] == '16.04': + isLegacy = True + class ConfChooser(object): @@ -154,6 +161,9 @@ class ConfChooser(object): if self.btnPythonGUI.get_active(): args += ["-python"] + if isLegacy: + args += ["-legacy"] + self.pp = subprocess.Popen(args) self.window.destroy()