From adb850f1444a39b37b8af3c1080cb7101a3f9714 Mon Sep 17 00:00:00 2001 From: Kang Lin Date: Tue, 18 Feb 2025 14:06:45 +0800 Subject: [PATCH] App: add log information --- .github/workflows/aarch64.yml | 2 +- .github/workflows/android.yml | 8 +++--- .github/workflows/appimage.yml | 28 ++++++++++---------- .github/workflows/build.yml | 43 +++++++++++++++++-------------- .github/workflows/macos.yml | 12 ++++----- .github/workflows/mingw.yml | 2 +- .github/workflows/msvc.yml | 12 ++++----- .github/workflows/ubuntu.yml | 8 +++--- App/Client/main.cpp | 47 +++++++++++++++++++++------------- Script/build_appimage.sh | 18 ++++++++++--- Script/build_depend.sh | 44 ++++++++++++++++++------------- snap/snapcraft.yaml | 2 +- 12 files changed, 131 insertions(+), 95 deletions(-) diff --git a/.github/workflows/aarch64.yml b/.github/workflows/aarch64.yml index c3467db67..01ddfca11 100644 --- a/.github/workflows/aarch64.yml +++ b/.github/workflows/aarch64.yml @@ -53,7 +53,7 @@ jobs: cmake -E make_directory ${{env.INSTALL_DIR}} - name: Cache installed - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-installed with: path: | diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index cf47ddbe7..c32724f13 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -16,7 +16,7 @@ jobs: matrix: BUILD_TYPE: [Release] qt_arch: [android_arm64_v8a, android_x86_64] - qt_version: [6.8.2] + qt_version: [6.9.0] include: - qt_arch: android_arm64_v8a VCPKG_TARGET_TRIPLET: arm64-android @@ -33,7 +33,7 @@ jobs: env: RabbitRemoteControl_VERSION: v0.0.32 - VCPKGGITCOMMITID: 9f5925e81bbcd9c8c34cc7a8bd25e3c557b582b2 + VCPKGGITCOMMITID: d5ec528843d29e3a52d745a64b469f810b2cedbf VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} VCPKG_DEFAULT_HOST_TRIPLET: x64-linux @@ -74,7 +74,7 @@ jobs: sudo apt install -y -q ninja-build nasm - name: Cache installed - uses: actions/cache@v2 + uses: actions/cache@v4 id: cache-installed with: path: | @@ -95,7 +95,7 @@ jobs: - name: Install Qt of linux_gcc_64 uses: jurplel/install-qt-action@v4 - if: ${{ matrix.qt_version == '6.8.2' }} + if: ${{ matrix.qt_version == '6.9.0' }} with: dir: '${{env.TOOLS_DIR}}/qt' # optional version: '${{matrix.qt_version}}' diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 6a979848f..a9c01d6e2 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -18,14 +18,12 @@ jobs: matrix: BUILD_TYPE: [Release] qt_version: [6.8.2] - os: [ubuntu-24.04, ubuntu-24.04-arm, ubuntu-22.04-arm] + os: [ubuntu-24.04, ubuntu-24.04-arm] include: - os: ubuntu-24.04 qt_arch: "linux_gcc_64" - os: ubuntu-24.04-arm qt_arch: "linux_gcc_arm64" - - os: ubuntu-22.04-arm - qt_arch: "linux_gcc_arm64" # See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) # See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job) @@ -37,9 +35,9 @@ jobs: BUILD_DIR: ${{github.workspace}}/build SOURCE_DIR: ${{github.workspace}}/.cache/source TOOLS_DIR: ${{github.workspace}}/.cache/tools - INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.os}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}} + INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}} RabbitRemoteControl_VERSION: v0.0.32 - artifact_name: build_appimage_${{matrix.os}} + artifact_name: build_appimage qt_modules: 'qtscxml qtmultimedia qtimageformats qtserialport qt5compat' # Map the job outputs to step outputs @@ -60,13 +58,14 @@ jobs: cmake -E make_directory ${{env.INSTALL_DIR}} - name: Cache installed - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-installed with: path: | ${{env.INSTALL_DIR}} ${{env.TOOLS_DIR}}/linuxdeploy-* - key: install_ubuntu + ${{env.TOOLS_DIR}}/qt_* + key: install_appimage - name: git clone RabbitCommon working-directory: ${{env.SOURCE_DIR}} @@ -75,18 +74,16 @@ jobs: - name: Install dependency libraries run: | - sudo ./Script/build_depend.sh --apt_update --base \ + sudo ./Script/build_depend.sh --apt_update --base --qt ${{matrix.qt_version}} \ --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}} @@ -97,7 +94,6 @@ jobs: cache: true cache-key-prefix: cached-qt_${{matrix.qt_arch}} - - name: build appimage env: RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon @@ -114,7 +110,11 @@ jobs: PcapPlusPlus_DIR: ${{env.INSTALL_DIR}}/lib/cmake/pcapplusplus run: | #export QMAKE=$QT_ROOT_DIR/bin/qmake6 - export QMAKE=$Qt6_DIR/bin/qmake6 + export QT_ROOT=${{env.TOOLS_DIR}}/qt_`uname -m` + export Qt6_DIR=$QT_ROOT + export QMAKE=$QT_ROOT/bin/qmake + export LD_LIBRARY_PATH=$QT_ROOT/lib + export QT_PLUGIN_PATH=$QT_ROOT/plugins ${{github.workspace}}/Script/build_appimage.sh md5sum RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_`uname -m`.AppImage > RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_Linux_`uname -m`.AppImage.md5sum @@ -142,7 +142,7 @@ jobs: if: ${{ matrix.BUILD_TYPE == 'Release' }} uses: actions/upload-artifact@v4 with: - name: ${{ env.artifact_name }} + name: ${{ env.artifact_name }}_${{matrix.os}} path: | ${{github.workspace}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_*.AppImage ${{github.workspace}}/update_appimage_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 24b0ad928..7c6974202 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,17 +55,30 @@ jobs: with: submodules: false + - name: clean test tag + if: ${{ startsWith(github.ref, 'refs/heads/master') }} + continue-on-error: true + run: | + gh release delete test_${{ github.ref_name }} -y --cleanup-tag + - name: Download ubuntu uses: actions/download-artifact@v4 with: - name: ${{ needs.ubuntu.outputs.name }} + pattern: ${{ needs.ubuntu.outputs.name }}* + path: ${{ env.artifact_path }} + merge-multiple: true + + - name: Download appimage + uses: actions/download-artifact@v4 + with: + pattern: ${{ needs.appimage.outputs.name }}* path: ${{ env.artifact_path }} merge-multiple: true - name: Download msvc uses: actions/download-artifact@v4 with: - pattern: ${{ needs.msvc.outputs.name }}_* + pattern: ${{ needs.msvc.outputs.name }}* path: ${{ env.artifact_path }} merge-multiple: true @@ -80,14 +93,14 @@ jobs: - name: Download macos uses: actions/download-artifact@v4 with: - pattern: ${{ needs.macos.outputs.name }}_* + pattern: ${{ needs.macos.outputs.name }}* path: ${{ env.artifact_path }} merge-multiple: true - name: Download android uses: actions/download-artifact@v4 with: - pattern: ${{ needs.android.outputs.name }}_* + pattern: ${{ needs.android.outputs.name }}* path: ${{ env.artifact_path }} merge-multiple: true @@ -98,19 +111,6 @@ jobs: path: ${{ env.artifact_path }} merge-multiple: true - - name: Download appimage - uses: actions/download-artifact@v4 - with: - name: ${{ needs.appimage.outputs.name }} - path: ${{ env.artifact_path }} - merge-multiple: true - - - name: clean test tag - if: ${{ startsWith(github.ref, 'refs/heads/master') }} - continue-on-error: true - run: | - gh release delete test_${{ github.ref_name }} -y --cleanup-tag - - name: Process configure file run: | git clone https://github.com/KangLin/RabbitCommon.git @@ -154,14 +154,19 @@ jobs: done # See: [访问有关工作流运行的上下文信息](https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context) - - name: Upload To Github Release + - name: Create Github Release if: ${{ startsWith(github.ref, 'refs/tags/') }} + continue-on-error: true run: | gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-file ${{github.workspace}}/Note.md + + - name: Upload To Github Release + if: ${{ startsWith(github.ref, 'refs/tags/') }} + run: | gh release upload ${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/Note.md ${{github.workspace}}/update.json - name: Upload test tag To Github Release if: ${{ startsWith(github.ref, 'refs/heads/master') }} run: | gh release create test_${{ github.ref_name }} --prerelease --latest=false --title "Recently developed build - ${{ github.ref_name }}" --notes-file ${{github.workspace}}/Note.md - gh release upload test_${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/Note.md ${{github.workspace}}/update.json --clobber + gh release upload test_${{ github.ref_name }} --clobber ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/Note.md ${{github.workspace}}/update.json --clobber diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e839f01ff..3c2f3b7c7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,11 +18,11 @@ jobs: matrix: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: [Release, Debug] - qt_version: [6.8.2, 5.15.2, 5.12.12] + qt_version: [6.9.0, 5.15.2, 5.12.12] qt_arch: [clang_64] VCPKG_TARGET_TRIPLET: [x64-osx] include: - - qt_version: 6.8.2 + - qt_version: 6.9.0 qt_modules: qtscxml qtmultimedia qtserialport qt5compat - qt_version: 5.15.2 @@ -41,7 +41,7 @@ jobs: TOOLS_DIR: ${{github.workspace}}/.cache/tools INSTALL_DIR: ${{github.workspace}}/.cache/install qt_modules: ${{matrix.qt_modules}} - VCPKGGITCOMMITID: 9f5925e81bbcd9c8c34cc7a8bd25e3c557b582b2 + VCPKGGITCOMMITID: d5ec528843d29e3a52d745a64b469f810b2cedbf VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} VCPKG_MANIFEST_FEATURES: "freerdp;vnc;wol" @@ -67,7 +67,7 @@ jobs: cmake -E make_directory ${{env.INSTALL_DIR}}_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}} - name: Cache installed - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-installed with: path: | @@ -291,7 +291,7 @@ jobs: 7z a RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_macos.zip ./install/* - name: Update configure file - if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.2' }} + if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' }} working-directory: ${{github.workspace}}/build run: | ${{env.SOURCE_DIR}}/RabbitCommon/Install/GenerateJsonFile.sh \ @@ -301,7 +301,7 @@ jobs: "https://github.com/KangLin/RabbitRemoteControl/releases/download/v${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_macos.zip;https://sourceforge.net/projects/rabbitRabbitRemoteControl/files/v${{env.RabbitRemoteControl_VERSION}}/RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_macos.zip" - name: Update artifact - if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.2' }} + if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' }} uses: actions/upload-artifact@v4 with: name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}} diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 55ee5877c..4cf39db39 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -77,7 +77,7 @@ jobs: cmake -E make_directory ${{env.INSTALL_DIR}} - name: Cache installed - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-installed with: path: | diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml index f78d1b475..6d58e5e15 100644 --- a/.github/workflows/msvc.yml +++ b/.github/workflows/msvc.yml @@ -13,9 +13,9 @@ jobs: strategy: matrix: BUILD_TYPE: [Release, Debug] - qt_version: [6.8.1, 5.15.2, 5.12.12] + qt_version: [6.9.0, 5.15.2, 5.12.12] include: - - qt_version: 6.8.1 + - qt_version: 6.9.0 qt_arch: win64_msvc2022_64 qt_modules: qtscxml qtmultimedia qtimageformats qtserialport qt5compat CMAKE_GENERATOR_PLATFORM: x64 @@ -46,7 +46,7 @@ jobs: SOURCE_DIR: ${{github.workspace}}\.cache\source TOOLS_DIR: ${{github.workspace}}\.cache\tools INSTALL_DIR: ${{github.workspace}}\.cache\install - VCPKGGITCOMMITID: 9f5925e81bbcd9c8c34cc7a8bd25e3c557b582b2 + VCPKGGITCOMMITID: d5ec528843d29e3a52d745a64b469f810b2cedbf VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}} @@ -80,7 +80,7 @@ jobs: cmake -E make_directory ${{env.INSTALL_DIR}} - name: Cache installed - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-installed with: path: | @@ -313,7 +313,7 @@ jobs: run: git clone https://github.com/KangLin/RabbitCommon.git - name: Build RabbitRemoteControl with cmake preset - if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.1' && startsWith(github.ref, 'refs/heads/master')}} + if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' && startsWith(github.ref, 'refs/heads/master')}} working-directory: ${{github.workspace}} env: RabbitCommon_ROOT: ${{env.SOURCE_DIR}}/RabbitCommon @@ -415,7 +415,7 @@ jobs: ${{github.workspace}}\build\update_msvc_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json - name: Update artifact update_windows.xml - if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.1' }} + if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.9.0' }} uses: actions/upload-artifact@v4 with: name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}_xml diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index aabd22d86..64fcb357e 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: BUILD_TYPE: [Release, Debug] - os: [ubuntu-24.04, ubuntu-24.04-arm, ubuntu-22.04-arm] + os: [ubuntu-24.04, ubuntu-24.04-arm] # See: [About GitHub-hosted runners](https://docs.github.com/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) # See: [Choosing the runner for a job](https://docs.github.com/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job) @@ -31,7 +31,7 @@ jobs: TOOLS_DIR: ${{github.workspace}}/.cache/tools INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.os}}_${{matrix.BUILD_TYPE}} RabbitRemoteControl_VERSION: 0.0.32 - artifact_name: build_${{matrix.os}} + artifact_name: build_ubuntu # Map the job outputs to step outputs outputs: @@ -89,7 +89,7 @@ jobs: cmake -E make_directory ${{env.INSTALL_DIR}} - name: Cache installed - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-installed with: path: | @@ -191,7 +191,7 @@ jobs: if: ${{ matrix.BUILD_TYPE == 'Release' }} uses: actions/upload-artifact@v4 with: - name: ${{ env.artifact_name }} + name: ${{ env.artifact_name }}_${{matrix.os}} path: | ${{github.workspace}}/rabbitremotecontrol_*.deb ${{github.workspace}}/update_ubuntu.json diff --git a/App/Client/main.cpp b/App/Client/main.cpp index 7968c9b99..6165cdb9e 100644 --- a/App/Client/main.cpp +++ b/App/Client/main.cpp @@ -67,34 +67,45 @@ int main(int argc, char *argv[]) QApplication::setDesktopFileName(QLatin1String("RabbitRemoteControl.desktop")); #endif - QApplication a(argc, argv); + QApplication app(argc, argv); RabbitCommon::CTools::Instance()->Init(); - qInfo(log) << a.applicationName() + " " + a.applicationVersion() + " " + QObject::tr("Start"); + qInfo(log) << app.applicationName() + " " + app.applicationVersion() + + " " + QObject::tr("Start") + " ......" + << "\n" << app.arguments(); QSharedPointer tApp = RabbitCommon::CTools::Instance()->InstallTranslator("RabbitRemoteControlApp"); - a.setApplicationDisplayName(QObject::tr("Rabbit Remote Control")); - a.setOrganizationName(QObject::tr("Kang Lin Studio")); + app.setApplicationDisplayName(QObject::tr("Rabbit Remote Control")); + app.setOrganizationName(QObject::tr("Kang Lin Studio")); #ifdef HAVE_UPDATE // Check update version QSharedPointer pUpdate(new CFrmUpdater()); - QIcon icon = QIcon::fromTheme("app"); - if(!icon.isNull()) - { - auto sizeList = icon.availableSizes(); - if(!sizeList.isEmpty()){ - QPixmap p = icon.pixmap(*sizeList.begin()); - pUpdate->SetTitle(p.toImage()); + if(pUpdate) { + QIcon icon = QIcon::fromTheme("app"); + if(!icon.isNull()) + { + auto sizeList = icon.availableSizes(); + if(!sizeList.isEmpty()){ + QPixmap p = icon.pixmap(*sizeList.begin()); + pUpdate->SetTitle(p.toImage()); + } + } + if(app.arguments().length() > 1) { + try{ + pUpdate->GenerateUpdateJson(); + pUpdate->GenerateUpdateXml(); + } catch(...) { + qCritical(log) << "Generate update fail"; + } + + qInfo(log) << app.applicationName() + " " + app.applicationVersion() + + " " + QObject::tr("Generate update json file End"); + return 0; } - } - if(a.arguments().length() > 1) { - pUpdate->GenerateUpdateJson(); - pUpdate->GenerateUpdateXml(); - return 0; } #endif @@ -119,7 +130,7 @@ int main(int argc, char *argv[]) w->show(); #endif - nRet = a.exec(); + nRet = app.exec(); } catch (std::exception &e) { qCritical(log) << "exception:" << e.what(); } catch(...) { @@ -137,6 +148,6 @@ int main(int argc, char *argv[]) // Q_CLEANUP_RESOURCE(translations_RabbitRemoteControlApp); //#endif - qInfo(log) << a.applicationName() + " " + a.applicationVersion() + " " + QObject::tr("End"); + qInfo(log) << app.applicationName() + " " + app.applicationVersion() + " " + QObject::tr("End"); return nRet; } diff --git a/Script/build_appimage.sh b/Script/build_appimage.sh index d935a6384..ae9da1acb 100755 --- a/Script/build_appimage.sh +++ b/Script/build_appimage.sh @@ -69,7 +69,7 @@ fi pushd "${TOOLS_DIR}" if [ ! -f linuxdeploy-`uname -m`.AppImage ]; then wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-`uname -m`.AppImage - chmod u+x linuxdeploy-`uname -m`.AppImage + chmod u+x linuxdeploy-`uname -m`.AppImage fi if [ ! -f linuxdeploy-plugin-qt-`uname -m`.AppImage ]; then wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-qt-`uname -m`.AppImage @@ -77,6 +77,7 @@ if [ ! -f linuxdeploy-plugin-qt-`uname -m`.AppImage ]; then fi popd +echo "Compile RabbitRemoteControl ......" INSTALL_APP_DIR=AppDir/usr cmake "$REPO_ROOT" \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -94,14 +95,25 @@ cmake --install . --config Release --component Runtime --prefix ${INSTALL_APP_DI cmake --install . --config Release --component Application --prefix ${INSTALL_APP_DIR} cmake --install . --config Release --component Plugin --prefix ${INSTALL_APP_DIR} +echo "Build AppImage ......" # See: https://github.com/linuxdeploy/linuxdeploy-plugin-qt #export QMAKE=$Qt6_DIR/bin/qmake6 export EXTRA_PLATFORM_PLUGINS="libqxcb.so" # Icons from theme are not displayed in QtWidgets Application: https://github.com/linuxdeploy/linuxdeploy-plugin-qt/issues/17 export EXTRA_QT_MODULES="svg" -${TOOLS_DIR}/linuxdeploy-`uname -m`.AppImage --appdir=AppDir -v0 \ +echo "QT_ROOT: $QT_ROOT" +echo "Qt6_DIR: $Qt6_DIR" +echo "QMAKE: $QMAKE" +echo "EXTRA_PLATFORM_PLUGINS: $EXTRA_PLATFORM_PLUGINS" +echo "EXTRA_QT_MODULES: $EXTRA_QT_MODULES" +echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH" +echo "QT_PLUGIN_PATH: $QT_PLUGIN_PATH" +echo "PATH: $PATH" +$QMAKE --version +${TOOLS_DIR}/linuxdeploy-`uname -m`.AppImage --appdir=AppDir \ --plugin qt \ - --output appimage + --output appimage \ + --deploy-deps-only=${INSTALL_APP_DIR}/plugins/Client chmod a+x Rabbit_Remote_Control-`uname -m`.AppImage diff --git a/Script/build_depend.sh b/Script/build_depend.sh index ef2cd2ddd..0278943c1 100755 --- a/Script/build_depend.sh +++ b/Script/build_depend.sh @@ -11,6 +11,7 @@ APT_UPDATE=0 BASE_LIBS=0 DEFAULT_LIBS=0 QT=0 +QT_VERSION=6.8.2 FREERDP=0 TIGERVNC=0 PCAPPLUSPLUS=0 @@ -19,7 +20,7 @@ libdatachannel=0 QtService=0 usage_long() { - echo "$0 [--install=] [--source=] [--tools=] [--build=] [--apt=<'lib1 lib2 ...'>] [--apt_update=[0|1]] [--base[=0|1]] [--default[=0|1]] [--qt[=0|1]] [--rabbitcommon[=0|1]] [--freerdp[=0|1]] [--tigervnc[=0|1]] [--pcapplusplus[=0|1]] [--libdatachannel=[0|1]] [--QtService[0|1]]" + echo "$0 [--install=] [--source=] [--tools=] [--build=] [--apt=<'lib1 lib2 ...'>] [--apt_update=[0|1]] [--base[=0|1]] [--default[=0|1]] [--qt[=0|1|version]] [--rabbitcommon[=0|1]] [--freerdp[=0|1]] [--tigervnc[=0|1]] [--pcapplusplus[=0|1]] [--libdatachannel=[0|1]] [--QtService[0|1]]" echo "Directory:" echo " --install: Set install directory" echo " --source: Set source directory" @@ -137,8 +138,12 @@ if command -V getopt >/dev/null; then case $2 in "") QT=1;; + 1 | 0) + QT=$2 + ;; *) - QT=$2;; + QT=1 + QT_VERSION=$2;; esac shift 2 ;; @@ -293,8 +298,6 @@ if [ $BASE_LIBS -eq 1 ]; then echo "Install base libraries ......" apt install -y -q build-essential \ git cmake gcc g++ debhelper fakeroot graphviz gettext - # Needed by QtMultimedia - apt install -y -q pipewire # OpenGL apt install -y -q libgl1-mesa-dev libglx-dev libglu1-mesa-dev libvulkan-dev mesa-common-dev # Virtual desktop (virtual framebuffer X server for X Version 11). Needed by CI @@ -318,10 +321,14 @@ if [ $BASE_LIBS -eq 1 ]; then libkrb5-dev libpulse-dev libcups2-dev libpam0g-dev libutf8proc-dev # PcapPlusPlus dependency apt install -y -q libpcap-dev - # FFmpeg + # FFmpeg needed by QtMultimedia and freerdp apt install -y -q libavcodec-dev libavformat-dev libresample1-dev libswscale-dev + # Needed by QtMultimedia + #apt install -y -q pipewire + # Needed by QtMultimedia + #apt install -y -q libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer*-dev # AppImage - apt install -y -q fuse + #apt install -y -q libfuse-dev libfuse3-dev # Other apt install -y -q libvncserver-dev fi @@ -339,17 +346,18 @@ 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 + if [ "`uname -m`" == "x86_64" ]; then + aqt install-qt linux desktop ${QT_VERSION} linux_gcc_64 -m qtscxml qtmultimedia qtimageformats qtserialport qt5compat + mv ${QT_VERSION}/gcc_64 qt_`uname -m` + elif [ "`uname -m`" == "aarch64" ]; then + aqt install-qt linux_arm64 desktop ${QT_VERSION} linux_gcc_arm64 -m qtscxml qtmultimedia qtimageformats qtserialport qt5compat + mv ${QT_VERSION}/gcc_arm64 qt_`uname -m` + fi fi popd fi @@ -366,7 +374,7 @@ if [ $FREERDP -eq 1 ]; then echo "Install FreeRDP ......" pushd "$SOURCE_DIR" if [ ! -d ${INSTALL_DIR}/lib/cmake/FreeRDP3 ]; then - git clone -b 3.11.1 https://github.com/FreeRDP/FreeRDP.git + git clone -b 3.12.0 https://github.com/FreeRDP/FreeRDP.git cd FreeRDP git submodule update --init --recursive cmake -E make_directory build diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a55de063b..3d6aa6c1d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -67,7 +67,7 @@ parts: plugin: cmake source: https://github.com/FreeRDP/FreeRDP.git source-type: git - source-tag: 3.11.1 + source-tag: 3.12.0 source-depth: 1 build-packages: - libssl-dev