diff --git a/.github/workflows/Linux-pack.yml b/.github/workflows/Linux-pack.yml index 033e53eb69..9a0168f7fe 100644 --- a/.github/workflows/Linux-pack.yml +++ b/.github/workflows/Linux-pack.yml @@ -19,7 +19,7 @@ env: # dockerfiles, see https://github.com/flameshot-org/flameshot-dockerfiles # docker images, see https://hub.docker.com/r/flameshotorg/ci-building-images # flameshotorg/ci-building-images or packpack/packpack - DOCKER_REPO: flameshotorg/ci-building-images + DOCKER_REPO: quay.io/flameshot-org/ci-building PACKPACK_REPO: flameshot-org/packpack # available upload services: wetransfer.com, file.io, 0x0.st UPLOAD_SERVICE: wetransfer.com @@ -68,6 +68,24 @@ jobs: symbol: bullseye, arch: armhf } + - { + name: debian-12, + os: debian, + symbol: bookworm, + arch: amd64 + } + - { + name: debian-12, + os: debian, + symbol: bookworm, + arch: arm64 + } + - { + name: debian-12, + os: debian, + symbol: bookworm, + arch: armhf + } - { name: ubuntu-20.04, os: ubuntu, @@ -80,7 +98,13 @@ jobs: symbol: jammy, arch: amd64 } - + - { + name: ubuntu-24.04, + os: ubuntu, + symbol: noble, + arch: amd64 + } + steps: - name: Enable Docker Experimental Features run: | @@ -220,21 +244,21 @@ jobs: matrix: dist: - { - name: fedora-35, + name: fedora-39, os: fedora, - symbol: 35, + symbol: 39, arch: x86_64 } - { - name: fedora-36, + name: fedora-40, os: fedora, - symbol: 36, + symbol: 40, arch: x86_64 } - { - name: opensuse-leap-15.2, + name: opensuse-leap-15.6, os: opensuse-leap, - symbol: 15.2, + symbol: 15.6, arch: x86_64 } steps: @@ -326,7 +350,7 @@ jobs: path: | ${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm ${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm.sha256sum - appimage-pack: + appimage-pack: name: Build appimage on ${{ matrix.config.name }} runs-on: ubuntu-22.04 strategy: diff --git a/.github/workflows/MacOS-pack.yml b/.github/workflows/MacOS-pack.yml index 2c6c8ebbc4..6bafe28ed1 100644 --- a/.github/workflows/MacOS-pack.yml +++ b/.github/workflows/MacOS-pack.yml @@ -28,7 +28,7 @@ jobs: DIR_PKG: build/src HELPERS_SCRIPTS_PATH: ../../packaging/macos # Apple developer identity, example: "Developer ID Application: (code)" - # Note: no signing and notarization will be be proceed if this variable is not set + # Note: no signing and notarization will be proceed if this variable is not set APPLE_DEV_IDENTITY: ${{ secrets.APPLE_DEV_IDENTITY }} # Apple ID user APPLE_DEV_USER: ${{ secrets.APPLE_DEV_USER }} diff --git a/.github/workflows/Windows-pack.yml b/.github/workflows/Windows-pack.yml index 9504d684bb..184d4e12c3 100644 --- a/.github/workflows/Windows-pack.yml +++ b/.github/workflows/Windows-pack.yml @@ -3,7 +3,8 @@ name: Packaging(Windows) on: push: branches: - - master* + - master + - fix* paths-ignore: - 'README.md' - 'LICENSE' @@ -12,6 +13,8 @@ on: paths-ignore: - 'README.md' - 'LICENSE' + workflow_dispatch: + env: PRODUCT: flameshot @@ -81,7 +84,7 @@ jobs: echo "VERSION=$(cat CMakeLists.txt |grep 'set.*(.*FLAMESHOT_VERSION' | sed 's/[^0-9.]*//' |sed 's/)//g')" >> $GITHUB_ENV - name: Restore from cache and run vcpkg - uses: lukka/run-vcpkg@v4 + uses: lukka/run-vcpkg@v11 with: vcpkgArguments: ${{env.VCPKG_PACKAGES}} vcpkgDirectory: '${{ github.workspace }}\vcpkg' @@ -91,13 +94,13 @@ jobs: - name: Cache Qt id: cache-qt - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./build/Qt/${{ matrix.qt_ver }}/${{ matrix.config.qt_arch_install }} key: ${{ runner.os }}-QtCache/${{ matrix.qt_ver }}/${{ matrix.config.qt_arch }} - name: Install Qt - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v3 with: version: ${{ matrix.qt_ver }} target: ${{ matrix.qt_target }} @@ -197,7 +200,7 @@ jobs: echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/portable/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip) echo "=====no operation for you can see link in the log console=====" - name: Artifact Upload - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: Windows-artifact + name: Windows-${{ matrix.config.arch }}-${{ matrix.type }}-artifact path: ${{ github.workspace }}/build/Package/* diff --git a/.gitignore b/.gitignore index 389bcb5c3e..5659461147 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,4 @@ data/flatpak/.flatpak-builder # Miscellaneous !docs/dev/Makefile +.direnv diff --git a/README.md b/README.md index e86e6835af..27f3c765af 100644 --- a/README.md +++ b/README.md @@ -349,11 +349,12 @@ There are packages available in the repository of some Linux distributions: - [Solus](https://dev.getsol.us/source/flameshot/): `eopkg it flameshot` - [Fedora](https://src.fedoraproject.org/rpms/flameshot): `dnf install flameshot` - [NixOS](https://search.nixos.org/packages?query=flameshot): `nix-env -iA nixos.flameshot` +- [ALT](https://packages.altlinux.org/en/sisyphus/srpms/flameshot/): `su - -c "apt-get install flameshot"` - [Snap/Flatpak/AppImage](https://github.com/flameshotapp/packages) - [Docker](https://github.com/ManuelLR/docker-flameshot) - [Windows](https://github.com/majkinetor/au-packages/tree/master/flameshot) -### MacOS +### macOS - [MacPorts](https://www.macports.org): `sudo port selfupdate && sudo port install flameshot` - [Homebrew](https://brew.sh): `brew install --cask flameshot` @@ -458,9 +459,9 @@ pacman -S openssl ca-certificates nix-shell ``` -#### MacOS +#### macOS -First of all you need to install [brew](https://brew.sh) and than install dependencies +First of all you need to install [brew](https://brew.sh) and than install the dependencies ```shell brew install qt5 brew install cmake @@ -474,24 +475,37 @@ After installing all the dependencies, finally run the following commands in the cmake -S . -B build && cmake --build build ``` -NOTE: for macOS you should replace command +NOTE: For macOS you should replace the command ```shell cmake -S . -B build ``` -to +with ```shell cmake -S . -B build -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 ``` -When `cmake --build build` command completed you can launch flameshot from `project_folder/build/src` folder +When the `cmake --build build` command has completed you can launch flameshot from the `project_folder/build/src` folder. ### Install -Simply use `cmake --install build` with privileges. -Note: If you install from source, there is no uninstaller, you will need to manually remove the files. Consider using [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html) to install to a custom location for easy removal. +Note that if you install from source, there _is no_ uninstaller, so consider installing to a custom directory. + +#### To install into a custom directory +```bash +# Best to use an absolute path here +INST_DIR=/opt/flameshot +# You may need to run this with privileges +cmake --install build --prefix "$INST_DIR" +``` + +#### To install to the default install directory +```bash +# You may need to run this with privileges +cmake --install build +``` ### FAQ diff --git a/flameshot.example.ini b/flameshot.example.ini index a33eb071ed..2717479d51 100644 --- a/flameshot.example.ini +++ b/flameshot.example.ini @@ -48,6 +48,9 @@ ;; Whether the tray icon is disabled (bool) ;disabledTrayIcon=false ; +;; Disable Grim Warning notification +;disabledGrimWarning=true +; ;; Automatically close daemon when it's not needed (not available on Windows) ;autoCloseIdleDaemon=false ; diff --git a/shell.nix b/shell.nix index 57aff55578..f7263f66e4 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -{ pkgs ? import {} }: +{ pkgs ? import { } }: pkgs.mkShell { nativeBuildInputs = with pkgs; [ @@ -7,5 +7,5 @@ pkgs.mkShell { qt5.qttools qt5.qtsvg ]; - buildInputs = [ pkgs.qt5.qtbase ]; + buildInputs = with pkgs; [ qt5.qtbase libsForQt5.kguiaddons ]; } diff --git a/src/utils/confighandler.cpp b/src/utils/confighandler.cpp index cb9ae5d7e0..485fb26575 100644 --- a/src/utils/confighandler.cpp +++ b/src/utils/confighandler.cpp @@ -78,6 +78,7 @@ static QMap> OPTION("showSidePanelButton" ,Bool ( true )), OPTION("showDesktopNotification" ,Bool ( true )), OPTION("disabledTrayIcon" ,Bool ( false )), + OPTION("disabledGrimWarning" ,Bool ( false )), OPTION("historyConfirmationToDelete" ,Bool ( true )), #if !defined(DISABLE_UPDATE_CHECKER) OPTION("checkForUpdates" ,Bool ( true )), diff --git a/src/utils/confighandler.h b/src/utils/confighandler.h index aedd732915..f2eb4ad940 100644 --- a/src/utils/confighandler.h +++ b/src/utils/confighandler.h @@ -88,6 +88,7 @@ class ConfigHandler : public QObject bool) CONFIG_GETTER_SETTER(filenamePattern, setFilenamePattern, QString) CONFIG_GETTER_SETTER(disabledTrayIcon, setDisabledTrayIcon, bool) + CONFIG_GETTER_SETTER(disabledGrimWarning, disabledGrimWarning, bool) CONFIG_GETTER_SETTER(drawThickness, setDrawThickness, int) CONFIG_GETTER_SETTER(drawFontSize, setDrawFontSize, int) CONFIG_GETTER_SETTER(keepOpenAppLauncher, setKeepOpenAppLauncher, bool) diff --git a/src/utils/screengrabber.cpp b/src/utils/screengrabber.cpp index 062c4bdeea..9ce3854f43 100644 --- a/src/utils/screengrabber.cpp +++ b/src/utils/screengrabber.cpp @@ -4,6 +4,7 @@ #include "screengrabber.h" #include "abstractlogger.h" #include "src/core/qguiappcurrentscreen.h" +#include "src/utils/confighandler.h" #include "src/utils/filenamehandler.h" #include "src/utils/systemnotification.h" #include @@ -141,10 +142,12 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool& ok) "activate the grim-based general wayland screenshot adapter"); freeDesktopPortal(ok, res); #else - AbstractLogger::warning() - << tr("grim's screenshot component is implemented based on " - "wlroots, it may not be used in GNOME or similar " - "desktop environments"); + if (!ConfigHandler().disabledGrimWarning()) { + AbstractLogger::warning() << tr( + "grim's screenshot component is implemented based on " + "wlroots, it may not be used in GNOME or similar " + "desktop environments"); + } generalGrimScreenshot(ok, res); #endif break;