From a1d7f382d179ce26d1c9c095fad620a080db82f1 Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Wed, 19 Nov 2025 18:04:51 +0100 Subject: [PATCH 1/4] Add AppImage support --- .github/workflows/build-linux.yml | 59 +++++++++++++++++++++++++++++++ CMakePresets.json | 22 ++++++++++++ RELEASE.md | 4 +-- 3 files changed, 83 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index ad3f6b9f2a..e32999e191 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -84,6 +84,7 @@ jobs: compiler_package: g++ with_qt6: false with_native_notifications: true + test_x11: true cmake_preset: Debug - os: ubuntu-latest @@ -92,6 +93,7 @@ jobs: compiler_package: g++ with_qt6: true with_native_notifications: false + test_x11: true test_wayland: true coverage: true cmake_preset: Debug @@ -109,6 +111,15 @@ jobs: with_native_notifications: false cmake_preset: Debug + - os: ubuntu-latest + buildname: AppImage + compiler: g++ + compiler_package: g++ + appimage: true + with_qt6: true + with_native_notifications: false + cmake_preset: Release + steps: - name: Checkout source code uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 @@ -150,7 +161,54 @@ jobs: '-DWITH_NATIVE_NOTIFICATIONS=${{matrix.with_native_notifications}}' ] + - name: Get AppImage tools + if: matrix.appimage + run: | + curl \ + --parallel \ + --location \ + --silent \ + --show-error \ + --fail-with-body \ + --remote-name-all \ + https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage \ + https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage \ + https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage + chmod +x linuxdeploy*.AppImage + + - name: Create AppImage + if: matrix.appimage + env: + APP_DIR: >- + ${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}/AppDir + EXTRA_QT_MODULES: >- + svg + EXTRA_PLATFORM_PLUGINS: >- + libqwayland-egl.so;libqwayland-generic.so + run: | + ./linuxdeploy-x86_64.AppImage \ + --plugin qt \ + --output=appimage \ + --appdir="$APP_DIR" \ + --desktop-file="$APP_DIR"/usr/share/applications/com.github.hluk.copyq.desktop \ + --icon-file="$APP_DIR"/usr/share/icons/hicolor/scalable/apps/copyq.svg \ + --executable="$APP_DIR"/usr/bin/copyq + + - name: Upload AppImage + if: matrix.appimage + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 + with: + name: CopyQ-x86_64.AppImage + path: CopyQ-x86_64.AppImage + + - name: Test AppImage + if: matrix.appimage + run: | + ./CopyQ-x86_64.AppImage --version + ./CopyQ-x86_64.AppImage --info + - name: Create gnupg directory for tests + if: matrix.test_x11 run: mkdir -p ~/.gnupg && chmod go-rwx ~/.gnupg - name: Test on Wayland @@ -165,6 +223,7 @@ jobs: - name: Test on X11 working-directory: >- ${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }} + if: matrix.test_x11 run: '${{github.workspace}}/utils/github/test-linux.sh' env: COPYQ_TESTS_EXECUTABLE: >- diff --git a/CMakePresets.json b/CMakePresets.json index 47e1b81a4a..4d60c51550 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -14,6 +14,22 @@ "CMAKE_CXX_COMPILER_LAUNCHER": "ccache" } }, + { + "name": "Release", + "generator": "Ninja", + "binaryDir": "${sourceParentDir}/build/copyq/${presetName}", + "installDir": "/usr", + "environment": { + "DESTDIR": "${sourceParentDir}/build/copyq/${presetName}/AppDir" + }, + "cacheVariables": { + "WITH_TESTS": "FALSE", + "PEDANTIC": "FALSE", + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_C_COMPILER_LAUNCHER": "ccache", + "CMAKE_CXX_COMPILER_LAUNCHER": "ccache" + } + }, { "name": "macOS-10", "generator": "Ninja", @@ -68,6 +84,12 @@ "configuration": "Debug", "targets": "install" }, + { + "name": "Release", + "configurePreset": "Release", + "configuration": "Release", + "targets": "install" + }, { "name": "macOS-10", "configurePreset": "macOS-10", diff --git a/RELEASE.md b/RELEASE.md index 2d3f226eb1..d67cc6d090 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -64,7 +64,7 @@ Download: $COPYQ_SOURCE/utils/download_window_builds.sh 9.1.0 -- Binaries for OS X from [github](https://github.com/hluk/CopyQ/releases) +- Binaries for macOS and AppImage from [github](https://github.com/hluk/CopyQ/releases) - Create source package: $COPYQ_SOURCE/utils/create_source_package.sh 9.1.0 @@ -94,7 +94,7 @@ Upload packages and binaries to: ./utils/fosshub.py 9.1.0 $TOKEN -Update Homebrew package for OS X. +Update Homebrew package for macOS: brew install vitorgalvao/tiny-scripts/cask-repair brew upgrade cask-repair From f88c6630ef617017693aaa1e0806e4cb34d0b3aa Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Thu, 20 Nov 2025 11:36:21 +0100 Subject: [PATCH 2/4] AppImage: Enable native notifications Assisted-by: Claude Code --- .github/workflows/build-linux.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index e32999e191..b8b4d65620 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -65,6 +65,9 @@ env: qtwayland5-dev-tools libkf5notifications-dev + kf6_packages: >- + libkf6notifications-dev + libkf6statusnotifieritem-dev # FIXME: Sending signal to client process does not cause the process # to exit with non-zero code with GitHub Actions. Why? COPYQ_TESTS_SKIP_SIGNAL: '1' @@ -117,7 +120,7 @@ jobs: compiler_package: g++ appimage: true with_qt6: true - with_native_notifications: false + with_native_notifications: true cmake_preset: Release steps: @@ -136,6 +139,16 @@ jobs: run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + - name: Set up KDE Neon repository for KF6 packages + if: matrix.appimage + run: | + # Download and install KDE neon archive keyring + wget -qO - https://archive.neon.kde.org/public.key | sudo gpg --dearmor -o /usr/share/keyrings/neon-archive-keyring.gpg + # Add KDE neon repository + echo "deb [signed-by=/usr/share/keyrings/neon-archive-keyring.gpg] http://archive.neon.kde.org/user noble main" | sudo tee /etc/apt/sources.list.d/neon.list + # Update package list + sudo apt-get update + - name: Install dependencies uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1 with: @@ -144,6 +157,7 @@ jobs: ${{ matrix.compiler_package }} ${{ env.common_packages }} ${{ matrix.with_qt6 && env.qt6_packages || env.qt5_packages }} + ${{ matrix.with_native_notifications && matrix.with_qt6 && env.kf6_packages || '' }} ${{ matrix.coverage && 'lcov' || '' }} ${{ matrix.coverage && 'kwin-wayland kwin-wayland-backend-virtual procps' || '' }} From 6c10d87a554096dd43d195804756126112aabf2e Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Thu, 20 Nov 2025 11:42:19 +0100 Subject: [PATCH 3/4] Fix installing libkf6guiaddons --- .github/workflows/build-linux.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index b8b4d65620..0ff29ffb70 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -40,8 +40,10 @@ env: libqt6svg6-dev libqt6svg6 - libkf6guiaddons-dev libkf6guiaddons + libkf6guiaddons-dev + libkf6notifications-dev + libkf6statusnotifieritem-dev libqt6waylandclient6 qt6-wayland @@ -65,9 +67,6 @@ env: qtwayland5-dev-tools libkf5notifications-dev - kf6_packages: >- - libkf6notifications-dev - libkf6statusnotifieritem-dev # FIXME: Sending signal to client process does not cause the process # to exit with non-zero code with GitHub Actions. Why? COPYQ_TESTS_SKIP_SIGNAL: '1' @@ -86,7 +85,6 @@ jobs: compiler: g++ compiler_package: g++ with_qt6: false - with_native_notifications: true test_x11: true cmake_preset: Debug @@ -95,7 +93,6 @@ jobs: compiler: g++ compiler_package: g++ with_qt6: true - with_native_notifications: false test_x11: true test_wayland: true coverage: true @@ -111,7 +108,6 @@ jobs: compiler: clang++ compiler_package: clang with_qt6: true - with_native_notifications: false cmake_preset: Debug - os: ubuntu-latest @@ -120,7 +116,6 @@ jobs: compiler_package: g++ appimage: true with_qt6: true - with_native_notifications: true cmake_preset: Release steps: @@ -140,12 +135,20 @@ jobs: export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" - name: Set up KDE Neon repository for KF6 packages - if: matrix.appimage + if: matrix.with_qt6 run: | # Download and install KDE neon archive keyring - wget -qO - https://archive.neon.kde.org/public.key | sudo gpg --dearmor -o /usr/share/keyrings/neon-archive-keyring.gpg + curl \ + --location \ + --silent \ + --show-error \ + --fail-with-body \ + https://archive.neon.kde.org/public.key | + sudo gpg --dearmor -o /usr/share/keyrings/neon-archive-keyring.gpg # Add KDE neon repository - echo "deb [signed-by=/usr/share/keyrings/neon-archive-keyring.gpg] http://archive.neon.kde.org/user noble main" | sudo tee /etc/apt/sources.list.d/neon.list + echo "deb [signed-by=/usr/share/keyrings/neon-archive-keyring.gpg] \ + http://archive.neon.kde.org/user noble main" | + sudo tee /etc/apt/sources.list.d/neon.list # Update package list sudo apt-get update @@ -157,7 +160,6 @@ jobs: ${{ matrix.compiler_package }} ${{ env.common_packages }} ${{ matrix.with_qt6 && env.qt6_packages || env.qt5_packages }} - ${{ matrix.with_native_notifications && matrix.with_qt6 && env.kf6_packages || '' }} ${{ matrix.coverage && 'lcov' || '' }} ${{ matrix.coverage && 'kwin-wayland kwin-wayland-backend-virtual procps' || '' }} @@ -172,7 +174,7 @@ jobs: '-DCMAKE_CXX_FLAGS=${{matrix.compiler_flags}}', '-DCMAKE_C_FLAGS=${{matrix.compiler_flags}}', '-DWITH_QT6=${{matrix.with_qt6}}', - '-DWITH_NATIVE_NOTIFICATIONS=${{matrix.with_native_notifications}}' + '-DWITH_NATIVE_NOTIFICATIONS=ON' ] - name: Get AppImage tools From d6f172f7193f85eda9ebfd08a7a78b5b8d35c467 Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Thu, 20 Nov 2025 12:39:27 +0100 Subject: [PATCH 4/4] Fix adding KDE Neon apt repo --- .github/workflows/build-linux.yml | 86 +++++++++++++++++-------------- 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 0ff29ffb70..08d8ae143c 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -40,10 +40,9 @@ env: libqt6svg6-dev libqt6svg6 - libkf6guiaddons libkf6guiaddons-dev libkf6notifications-dev - libkf6statusnotifieritem-dev + kf6-kstatusnotifieritem-dev libqt6waylandclient6 qt6-wayland @@ -80,35 +79,35 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-22.04 - buildname: Qt 5 - compiler: g++ - compiler_package: g++ - with_qt6: false - test_x11: true - cmake_preset: Debug - - - os: ubuntu-latest - buildname: Qt 6 - compiler: g++ - compiler_package: g++ - with_qt6: true - test_x11: true - test_wayland: true - coverage: true - cmake_preset: Debug - compiler_flags: >- - --coverage - -fprofile-arcs - -ftest-coverage - -fprofile-abs-path - - - os: ubuntu-latest - buildname: Qt 6 Clang - compiler: clang++ - compiler_package: clang - with_qt6: true - cmake_preset: Debug + # - os: ubuntu-22.04 + # buildname: Qt 5 + # compiler: g++ + # compiler_package: g++ + # with_qt6: false + # test_x11: true + # cmake_preset: Debug + # + # - os: ubuntu-latest + # buildname: Qt 6 + # compiler: g++ + # compiler_package: g++ + # with_qt6: true + # test_x11: true + # test_wayland: true + # coverage: true + # cmake_preset: Debug + # compiler_flags: >- + # --coverage + # -fprofile-arcs + # -ftest-coverage + # -fprofile-abs-path + # + # - os: ubuntu-latest + # buildname: Qt 6 Clang + # compiler: clang++ + # compiler_package: clang + # with_qt6: true + # cmake_preset: Debug - os: ubuntu-latest buildname: AppImage @@ -146,22 +145,31 @@ jobs: https://archive.neon.kde.org/public.key | sudo gpg --dearmor -o /usr/share/keyrings/neon-archive-keyring.gpg # Add KDE neon repository - echo "deb [signed-by=/usr/share/keyrings/neon-archive-keyring.gpg] \ - http://archive.neon.kde.org/user noble main" | + echo "deb [signed-by=/usr/share/keyrings/neon-archive-keyring.gpg] https://archive.neon.kde.org/stable noble main" | sudo tee /etc/apt/sources.list.d/neon.list # Update package list sudo apt-get update - name: Install dependencies - uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1 - with: - version: 1.0 - packages: >- + env: + PACKAGES: >- ${{ matrix.compiler_package }} ${{ env.common_packages }} ${{ matrix.with_qt6 && env.qt6_packages || env.qt5_packages }} ${{ matrix.coverage && 'lcov' || '' }} ${{ matrix.coverage && 'kwin-wayland kwin-wayland-backend-virtual procps' || '' }} + run: sudo apt install -y $PACKAGES + + # - name: Install dependencies + # uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1 + # with: + # version: 1.0 + # packages: >- + # ${{ matrix.compiler_package }} + # ${{ env.common_packages }} + # ${{ matrix.with_qt6 && env.qt6_packages || env.qt5_packages }} + # ${{ matrix.coverage && 'lcov' || '' }} + # ${{ matrix.coverage && 'kwin-wayland kwin-wayland-backend-virtual procps' || '' }} - name: Build with CMake uses: lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10 @@ -198,9 +206,9 @@ jobs: APP_DIR: >- ${{runner.workspace}}/build/copyq/${{ matrix.cmake_preset }}/AppDir EXTRA_QT_MODULES: >- - svg + svg;tls;kf6 EXTRA_PLATFORM_PLUGINS: >- - libqwayland-egl.so;libqwayland-generic.so + libqwayland.so run: | ./linuxdeploy-x86_64.AppImage \ --plugin qt \