From affd0efcb072429a510f637bd6f0c53b819857b0 Mon Sep 17 00:00:00 2001 From: Neil Horne <15316949+elecpower@users.noreply.github.com> Date: Sun, 27 Jul 2025 09:53:21 +1000 Subject: [PATCH] fix(scripts): qt version and formatting (#6472) --- tools/msys2_fetch_and_build_all.sh | 4 +-- tools/setup_buildenv_ubuntu22.04.sh | 51 +++++++++++++++++++++++++++-- tools/setup_buildenv_ubuntu24.04.sh | 35 ++++++++++++++++++-- 3 files changed, 82 insertions(+), 8 deletions(-) diff --git a/tools/msys2_fetch_and_build_all.sh b/tools/msys2_fetch_and_build_all.sh index a88ab9db5..42296cc14 100644 --- a/tools/msys2_fetch_and_build_all.sh +++ b/tools/msys2_fetch_and_build_all.sh @@ -209,8 +209,8 @@ if [[ $PAUSEAFTEREACHLINE == "true" ]]; then fi echo "=== Step $((STEP++)): Running CMake for ${RADIO_TYPE} as an example ===" -cmake -G "MSYS Makefiles" -Wno-dev -DCMAKE_PREFIX_PATH=$HOME/6.8.2/mingw_64 -DSDL2_LIBRARY_PATH=/mingw64/bin/ ${BUILD_OPTIONS} -DCMAKE_BUILD_TYPE=Release ../ -check_command $? "cmake -G MSYS Makefiles -Wno-dev -DCMAKE_PREFIX_PATH=$HOME/6.8.2/mingw_64 -DSDL2_LIBRARY_PATH=/mingw64/bin/ ${BUILD_OPTIONS} -DCMAKE_BUILD_TYPE=Release ../" +cmake -G "MSYS Makefiles" -Wno-dev -DCMAKE_PREFIX_PATH=$HOME/6.9.0/mingw_64 -DSDL2_LIBRARY_PATH=/mingw64/bin/ ${BUILD_OPTIONS} -DCMAKE_BUILD_TYPE=Release ../ +check_command $? "cmake -G MSYS Makefiles -Wno-dev -DCMAKE_PREFIX_PATH=$HOME/6.9.0/mingw_64 -DSDL2_LIBRARY_PATH=/mingw64/bin/ ${BUILD_OPTIONS} -DCMAKE_BUILD_TYPE=Release ../" if [[ $PAUSEAFTEREACHLINE == "true" ]]; then echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop." read diff --git a/tools/setup_buildenv_ubuntu22.04.sh b/tools/setup_buildenv_ubuntu22.04.sh index 85ded7e7a..41d55cdde 100755 --- a/tools/setup_buildenv_ubuntu22.04.sh +++ b/tools/setup_buildenv_ubuntu22.04.sh @@ -42,19 +42,64 @@ if [[ $PAUSEAFTEREACHLINE == "true" ]]; then fi echo "=== Step $((STEP++)): Installing packages ===" -sudo apt-get -y install build-essential cmake gcc git lib32ncurses-dev lib32z1 libsdl2-dev qtbase5-dev qt5-qmake qtmultimedia5-dev qttools5-dev qttools5-dev-tools qtcreator libqt5svg5-dev libqt5serialport5-dev software-properties-common wget zip python3-pip-whl python3-pil libgtest-dev python3-pip python3-tk python3-setuptools clang python3-clang libusb-1.0-0-dev stlink-tools openocd npm pv libncurses5:i386 libpython2.7:i386 libclang-dev python-is-python3 +sudo apt-get -y install \ + build-essential \ + cmake \ + gcc \ + git \ + lib32ncurses-dev \ + lib32z1 \ + libsdl2-dev \ + software-properties-common \ + wget \ + zip \ + python3-pip-whl \ + python3-pil \ + libgtest-dev \ + python3-pip \ + python3-tk \ + python3-setuptools \ + clang \ + python3-clang \ + libusb-1.0-0-dev \ + stlink-tools \ + openocd \ + npm \ + pv \ + libncurses5:i386 \ + libpython2.7:i386 \ + libclang-dev \ + python-is-python3 \ + openssl if [[ $PAUSEAFTEREACHLINE == "true" ]]; then echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop." read fi echo "=== Step $((STEP++)): Installing Python packages ===" -sudo python3 -m pip install filelock asciitree jinja2 pillow==7.2.0 clang==14.0.0 future lxml lz4 +sudo python3 -m pip install \ + filelock \ + asciitree \ + jinja2 \ + pillow==7.2.0 \ + clang==14.0.0 \ + future \ + lxml \ + lz4 \ + aqtinstall \ + pyelftools if [[ $PAUSEAFTEREACHLINE == "true" ]]; then echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop." read fi +echo "=== Step $((STEP++)): Installing Qt ===" +./aqt install-qt --outputdir qt linux desktop 6.9.0 linux_gcc_64 -m qtmultimedia qtserialport +if [[ $PAUSEAFTEREACHLINE == "true" ]]; then + echo "Step finished. Please press Enter to continue or Ctrl+C to stop." + read +fi + echo "=== Step $((STEP++)): Fetching GNU Arm Embedded Toolchains ===" # EdgeTX uses GNU Arm Embedded Toolchain version 14.2.rel1 wget -q --show-progress --progress=bar:force:noscroll https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz @@ -114,7 +159,7 @@ fi echo "=== Step $((STEP++)): Building and Installing USB DFU host utility ===" cd dfu-util-0.11/ -./configure +./configure make sudo make install cd .. diff --git a/tools/setup_buildenv_ubuntu24.04.sh b/tools/setup_buildenv_ubuntu24.04.sh index a75af93d5..812bf3fa0 100644 --- a/tools/setup_buildenv_ubuntu24.04.sh +++ b/tools/setup_buildenv_ubuntu24.04.sh @@ -42,7 +42,36 @@ if [[ $PAUSEAFTEREACHLINE == "true" ]]; then fi echo "=== Step $((STEP++)): Installing packages ===" -sudo apt-get -y install build-essential cmake gcc git lib32ncurses-dev lib32z1 libfox-1.6-dev libsdl2-dev software-properties-common wget zip python3-pip-whl python3-pil libgtest-dev python3-pip python3-tk python3-setuptools clang python3-clang libusb-1.0-0-dev stlink-tools openocd npm pv libncurses5:i386 libpython2.7:i386 libclang-dev python-is-python3 +sudo apt-get -y install \ + build-essential \ + cmake \ + gcc \ + git \ + lib32ncurses-dev \ + lib32z1 \ + libfox-1.6-dev \ + libsdl2-dev \ + software-properties-common \ + wget \ + zip \ + python3-pip-whl \ + python3-pil \ + libgtest-dev \ + python3-pip \ + python3-tk \ + python3-setuptools \ + clang \ + python3-clang \ + libusb-1.0-0-dev \ + stlink-tools \ + openocd \ + npm \ + pv \ + libncurses5:i386 \ + libpython2.7:i386 \ + libclang-dev \ + python-is-python3 \ + openssl if [[ $PAUSEAFTEREACHLINE == "true" ]]; then echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop." read @@ -62,14 +91,14 @@ python3 -m pip install --break-system-package \ lxml \ lz4 \ aqtinstall \ - pyelftools + pyelftools if [[ $PAUSEAFTEREACHLINE == "true" ]]; then echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop." read fi echo "=== Step $((STEP++)): Installing Qt ===" -./aqt install-qt --outputdir qt linux desktop 6.8.2 linux_gcc_64 -m qtmultimedia qtserialport +./aqt install-qt --outputdir qt linux desktop 6.9.0 linux_gcc_64 -m qtmultimedia qtserialport if [[ $PAUSEAFTEREACHLINE == "true" ]]; then echo "Step finished. Please press Enter to continue or Ctrl+C to stop." read