From 56fad953a52df312d0890d7ab713810e64966102 Mon Sep 17 00:00:00 2001 From: Kang Lin Date: Tue, 18 Feb 2025 16:00:30 +0800 Subject: [PATCH] CI: install qt in build_depend.sh --- .github/workflows/appimage.yml | 9 +++++---- Script/build_depend.sh | 24 +++++++++++++----------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 2c3685707..bd443d0e8 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -66,6 +66,7 @@ jobs: path: | ${{env.INSTALL_DIR}} ${{env.TOOLS_DIR}}/linuxdeploy-* + ${{env.TOOLS_DIR}}/qt_* key: install_appimage - name: git clone RabbitCommon @@ -75,18 +76,16 @@ jobs: - name: Install dependency libraries run: | - sudo ./Script/build_depend.sh --apt_update --base \ + sudo ./Script/build_depend.sh --apt_update --base --qt \ --tigervnc --freerdp --pcapplusplus \ --install ${{env.INSTALL_DIR}} \ --source ${{env.SOURCE_DIR}} \ --tools ${{env.TOOLS_DIR}} \ --build ${{env.BUILD_DIR}} - if [ "ubuntu-22.04-arm" != ${{matrix.os}} ]; then - sudo apt install -y -q qt6-5compat-dev - fi - name: Install Qt uses: jurplel/install-qt-action@v3 + if: false with: dir: '${{env.TOOLS_DIR}}/qt' version: ${{matrix.qt_version}} @@ -114,6 +113,8 @@ jobs: PcapPlusPlus_DIR: ${{env.INSTALL_DIR}}/lib/cmake/pcapplusplus run: | #export QMAKE=$QT_ROOT_DIR/bin/qmake6 + export QT_ROOT=${{env.TOOLS_DIR}}/qt_`uname -m` + export Qt6_DIR=$QT_ROOT export QMAKE=$Qt6_DIR/bin/qmake6 ${{github.workspace}}/Script/build_appimage.sh md5sum RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_`uname -m`.AppImage > RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_`uname -m`.AppImage.md5sum diff --git a/Script/build_depend.sh b/Script/build_depend.sh index 0a6b21f8b..b46121846 100755 --- a/Script/build_depend.sh +++ b/Script/build_depend.sh @@ -339,17 +339,19 @@ fi if [ $QT -eq 1 ]; then echo "Install qt ......" pushd "$TOOLS_DIR" - # See: https://ddalcino.github.io/aqt-list-server/ - apt install -y -q python3-pip python3-pip-whl python3-pipdeptree cpio - #pip install -U pip - pip install aqtinstall - export QTVERSION=6.8.2 - if [ "`uname -m`" == "x86_64" ]; then - aqt install-qt linux desktop ${QTVERSION} linux_gcc_64 -m qt5compat qtgraphs qtimageformats qtmultimedia qtscxml qtserialport - mv ${QTVERSION}/gcc_64 qt - elif [ "`uname -m`" == "aarch64" ]; then - aqt install-qt linux_arm64 desktop ${QTVERSION} linux_gcc_arm64 -m qt5compat qtgraphs qtimageformats qtmultimedia qtscxml qtserialport - mv ${QTVERSION}/gcc_arm64 qt + if [ ! -d qt_`uname -m` ]; then + # See: https://ddalcino.github.io/aqt-list-server/ + apt install -y -q python3-pip python3-pip-whl python3-pipdeptree cpio + #pip install -U pip + pip install aqtinstall + export QTVERSION=6.8.2 + if [ "`uname -m`" == "x86_64" ]; then + aqt install-qt linux desktop ${QTVERSION} linux_gcc_64 -m qt5compat qtgraphs qtimageformats qtmultimedia qtscxml qtserialport + mv ${QTVERSION}/gcc_64 qt_`uname -m` + elif [ "`uname -m`" == "aarch64" ]; then + aqt install-qt linux_arm64 desktop ${QTVERSION} linux_gcc_arm64 -m qt5compat qtgraphs qtimageformats qtmultimedia qtscxml qtserialport + mv ${QTVERSION}/gcc_arm64 qt_`uname -m` + fi fi popd fi