diff --git a/.github/workflows/Linux-pack.yml b/.github/workflows/Linux-pack.yml index 6ba486d9a5..7be3ac6473 100644 --- a/.github/workflows/Linux-pack.yml +++ b/.github/workflows/Linux-pack.yml @@ -197,7 +197,7 @@ jobs: if: matrix.dist.os == 'fedora' run: | mkdir $GITHUB_WORKSPACE/rpm - cp $GITHUB_WORKSPACE/packaging/rpm/fedora/flameshot.spec $GITHUB_WORKSPACE/rpm + cp $GITHUB_WORKSPACE/packaging/rpm/flameshot.spec $GITHUB_WORKSPACE/rpm bash $GITHUB_WORKSPACE/tools/packpack env: OS: ${{ matrix.dist.os }} @@ -208,7 +208,7 @@ jobs: if: matrix.dist.os == 'opensuse-leap' run: | mkdir $GITHUB_WORKSPACE/rpm - cp $GITHUB_WORKSPACE/packaging/rpm/opensuse/flameshot.spec $GITHUB_WORKSPACE/rpm + cp $GITHUB_WORKSPACE/packaging/rpm/flameshot.spec $GITHUB_WORKSPACE/rpm bash $GITHUB_WORKSPACE/tools/packpack env: OS: ${{ matrix.dist.os }} diff --git a/README.md b/README.md index 3863f708fe..87696311f1 100644 --- a/README.md +++ b/README.md @@ -356,13 +356,15 @@ There are packages available in the repository of some Linux distributions: - [Debian 10+](https://tracker.debian.org/pkg/flameshot): `apt install flameshot` + Package for Debian 9 ("Stretch") also [available via stretch-backports](https://backports.debian.org/). - [Ubuntu](https://launchpad.net/ubuntu/+source/flameshot): `apt install flameshot` + + A [PPA supporting Ubuntu 22.04 and newer](https://launchpad.net/~quentiumyt/+archive/ubuntu/flameshot) is provided by +[Quentin Lienhardt](https://github.com/QuentiumYT) that offers an up-to-date version of `flameshot`. - [openSUSE](https://software.opensuse.org/package/flameshot): `zypper install flameshot` - [Void Linux](https://github.com/void-linux/void-packages/tree/master/srcpkgs/flameshot): `xbps-install flameshot` - [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) +- [Snap/Flatpak/AppImage](https://github.com/flameshot-org/packages) - [Docker](https://github.com/ManuelLR/docker-flameshot) - [Windows](https://github.com/majkinetor/au-packages/tree/master/flameshot) @@ -557,7 +559,7 @@ cmake --install "$BUILD_DIR" ## License -- The main code is licensed under [GPLv3](LICENSE) +- The main code is licensed under [GPLv3+](LICENSE) - The logo of Flameshot is licensed under [Free Art License v1.3](data/img/app/flameshotLogoLicense.txt) - The button icons are licensed under Apache License 2.0. See: https://github.com/google/material-design-icons - The code at capture/capturewidget.cpp is based on https://github.com/ckaiser/Lightscreen/blob/master/dialogs/areadialog.cpp (GPLv2) @@ -565,7 +567,7 @@ cmake --install "$BUILD_DIR" - I copied a few lines of code from KSnapshot regiongrabber.cpp revision `796531` (LGPL) - Qt-Color-Widgets taken and modified from https://github.com/mbasaglia/Qt-Color-Widgets (see their license and exceptions in the project) (LGPL/GPL) -Info: If I take code from your project and that implies a relicense to GPLv3, you can reuse my changes with the original previous license of your project applied. +Info: If I take code from your project and that implies a relicense to GPLv3+, you can reuse my changes with the original previous license of your project applied. ## Privacy Policy diff --git a/data/man/man1/flameshot.1 b/data/man/man1/flameshot.1 index 90ac3a643e..7bc0c6cacf 100644 --- a/data/man/man1/flameshot.1 +++ b/data/man/man1/flameshot.1 @@ -337,7 +337,7 @@ The following URL gives you a more complete list of contributors: .SH "LICENSE" .nh .PP -• The main code is licensed under GPLv3 +• The main code is licensed under GPLv3+ .br • The logo of Flameshot is licensed under Free Art License v1.3 .br diff --git a/packaging/rpm/fedora/flameshot.spec b/packaging/rpm/fedora/flameshot.spec deleted file mode 100644 index 8dc06e6eb1..0000000000 --- a/packaging/rpm/fedora/flameshot.spec +++ /dev/null @@ -1,166 +0,0 @@ -# -# spec file for package flameshot on fedora, rhel -# -Name: flameshot -Version: 13.1.0 -Release: 2%{?dist} -License: GPLv3+ and ASL 2.0 and GPLv2 and LGPLv3 and Free Art -Summary: Powerful yet simple to use screenshot software -URL: https://github.com/flameshot-org/flameshot -Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz -Vendor: Flameshot - -BuildRequires: cmake >= 3.22 -BuildRequires: gcc-c++ >= 11 -BuildRequires: fdupes -BuildRequires: libappstream-glib -BuildRequires: ninja-build -BuildRequires: desktop-file-utils - -BuildRequires: cmake(Qt6Core) >= 6.2.4 -BuildRequires: cmake(KF6GuiAddons) >= 6.7.0 -BuildRequires: cmake(Qt6DBus) >= 6.2.4 -BuildRequires: cmake(Qt6Gui) >= 6.2.4 -BuildRequires: cmake(Qt6LinguistTools) >= 6.2.4 -BuildRequires: cmake(Qt6Network) >= 6.2.4 -BuildRequires: cmake(Qt6Svg) >= 6.2.4 -BuildRequires: cmake(Qt6Widgets) >= 6.2.4 - -Requires: hicolor-icon-theme -Requires: qt6-qtbase >= 6.2.4 -Requires: qt6-qttools >= 6.2.4 -Requires: qt6-qtsvg >= 6.2.4 - -Recommends: qt6-qtimageformats -Recommends: xdg-desktop-portal%{?_isa} -Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa}) -Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa}) -Recommends: (xdg-desktop-portal-wlr%{?_isa} if wlroots%{?_isa}) - -%description -Powerful and simple to use screenshot software with built-in -editor with advanced features. - -Features: - - * Customizable appearance. - * Easy to use. - * In-app screenshot edition. - * DBus interface. - -%prep -%autosetup -p1 - -%build -%cmake -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DUSE_WAYLAND_CLIPBOARD:BOOL=ON \ - -DBUILD_SHARED_LIBS:BOOL=OFF -%cmake_build - -%install -%cmake_install -rm -rf %{buildroot}%{_includedir}/QtColorWidgets -rm -rf %{buildroot}%{_libdir}/cmake/QtColorWidgets -rm -f %{buildroot}%{_libdir}/libQtColorWidgets.* -rm -f %{buildroot}%{_libdir}/pkgconfig/QtColorWidgets.pc -rm -rf %{buildroot}%{_includedir}/kdsingleapplication-qt6 -rm -rf %{buildroot}%{_libdir}/cmake/KDSingleApplication-qt6 -rm -f %{buildroot}%{_libdir}/libkdsingleapplication-qt6.* -# https://fedoraproject.org/wiki/PackagingDrafts/find_lang -%find_lang Internationalization --with-qt -%fdupes %{buildroot}%{_datadir}/icons - -%check -appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml -desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop - -%files -f Internationalization.lang -%{_datadir}/%{name}/translations/Internationalization_grc.qm -%doc README.md -%license LICENSE -%dir %{_datadir}/%{name} -%dir %{_datadir}/%{name}/translations -%dir %{_datadir}/bash-completion/completions -%dir %{_datadir}/zsh/site-functions -%{_bindir}/%{name} -%{_datadir}/applications/org.flameshot.Flameshot.desktop -%{_metainfodir}/org.flameshot.Flameshot.metainfo.xml -%{_datadir}/bash-completion/completions/%{name} -%{_datadir}/zsh/site-functions/_%{name} -%{_datadir}/fish/vendor_completions.d/%{name}.fish -%{_datadir}/dbus-1/interfaces/org.flameshot.Flameshot.xml -%{_datadir}/dbus-1/services/org.flameshot.Flameshot.service -%{_datadir}/icons/hicolor/*/apps/*.png -%{_datadir}/icons/hicolor/scalable/apps/*.svg -%{_mandir}/man1/%{name}.1* - -%changelog -* Thu Mar 02 2026 Jeremy Borgman - 14.0.rc1 -- Beta for 14 release - -* Sat Oct 28 2025 Jeremy Borgman - 13.3.0 -- Updated for v13.3.0 release - -* Sat Oct 24 2025 Jeremy Borgman - 13.2.0 -- Updated for v13.2.0 release - -* Sat Aug 16 2025 Elliott Tallis - 13.1.0-2 -- Minor spec file tweaks - -* Sun Aug 13 2025 Jeremy Borgman - 13.1.0 -- Update for v13.1.0 release - -* Sun Aug 06 2025 Jeremy Borgman - 13.0.1 -- Update for v13.0.1 release - -* Sun Aug 03 2025 Jeremy Borgman - 13.0.0 -- Update for v13 release - -* Sun Jul 17 2025 Jeremy Borgman - 13.0.rc2 -- Beta for 13 release. - -* Sun Jul 12 2025 Jeremy Borgman - 13.0.rc1 -- Beta for 13 release. - -* Sun Jul 03 2022 Jeremy Borgman - 12.1.0-1 -- Update for 12.1 release. - -* Wed Jun 21 2022 Jeremy Borgman - 12.0.0-1 -- Update for 12.0 release. - -* Fri Jan 14 2022 Jeremy Borgman - 11.0.0-1 -- Update for 11.0 release. - -* Sun Aug 29 2021 Zetao Yang - 0.10.1-2 -- Minor SPEC fixes. - -* Sun Jul 25 2021 Jeremy Borgman - 0.10.1-1 -- Updated for flameshot 0.10.1 - -* Mon May 17 2021 Jeremy Borgman - 0.10.0-1 -- Updated for flameshot 0.10.0 - -* Sat Feb 27 2021 Jeremy Borgman - 0.9.0-1 -- Updated for flameshot 0.9.0 - -* Wed Oct 14 2020 Jeremy Borgman - 0.8.5-1 -- Updated for flameshot 0.8.5 - -* Sat Oct 10 2020 Jeremy Borgman - 0.8.4-1 -- Updated for flameshot 0.8.4 - -* Sat Sep 19 2020 Jeremy Borgman - 0.8.3-1 -- Updated for flameshot 0.8.3 - -* Mon Sep 07 2020 Zetao Yang - 0.8.0-1 -- Updated for flameshot 0.8.0 -- More details, please see https://flameshot.org/changelog/#v080 - -* Sat Aug 18 2018 Zetao Yang - 0.6.0-1 -- Updated for flameshot 0.6.0 -- More details, please see https://flameshot.org/changelog/#v060 - -* Tue Jan 09 2018 Zetao Yang - 0.5.0-1 -- Initial package for flameshot 0.5.0 -- More details, please see https://flameshot.org/changelog/#v050 diff --git a/packaging/rpm/opensuse/flameshot.spec b/packaging/rpm/flameshot.spec similarity index 72% rename from packaging/rpm/opensuse/flameshot.spec rename to packaging/rpm/flameshot.spec index 251ed10fbf..5b704b45a9 100644 --- a/packaging/rpm/opensuse/flameshot.spec +++ b/packaging/rpm/flameshot.spec @@ -1,21 +1,28 @@ -# -# spec file for package flameshot on opensuse leap 15.x -# Name: flameshot -Version: 13.1.0 -Release: 2 -License: GPLv3+ and ASL 2.0 and GPLv2 and LGPLv3 and Free Art +Version: 13.3.0 +Release: 1%{?dist} Summary: Powerful yet simple to use screenshot software + +License: GPL-3.0-or-later URL: https://github.com/flameshot-org/flameshot Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Vendor: Flameshot -BuildRequires: cmake >= 3.22 -BuildRequires: gcc-c++ >= 11 -BuildRequires: fdupes +BuildRequires: git +BuildRequires: cmake +BuildRequires: desktop-file-utils +BuildRequires: jdupes + +%if 0%{?suse_version} +BuildRequires: gcc15-c++ +BuildRequires: ninja BuildRequires: update-desktop-files BuildRequires: appstream-glib -BuildRequires: desktop-file-utils +%else +BuildRequires: gcc-c++ +BuildRequires: ninja-build +BuildRequires: libappstream-glib +%endif BuildRequires: cmake(Qt6Core) >= 6.2.4 BuildRequires: cmake(Qt6DBus) >= 6.2.4 @@ -25,12 +32,27 @@ BuildRequires: cmake(Qt6Network) >= 6.2.4 BuildRequires: cmake(Qt6Svg) >= 6.2.4 BuildRequires: cmake(Qt6Widgets) >= 6.2.4 +%if 0%{?fedora} || 0%{?suse_version} >= 1550 || (0%{?rhel} >= 10 && (0%{?centos} || 0%{?epel})) +%global wayland_clipboard ON +BuildRequires: kf6-kguiaddons-devel >= 6.7.0 +%else +%global wayland_clipboard OFF +%endif + Requires: hicolor-icon-theme -Requires: qt6-base >= 6.2.4 -Requires: qt6-tools >= 6.2.4 -Requires: qt6-svg >= 6.2.4 +%if 0%{?suse_version} +Requires: qt6-svg +%else +Requires: qt6-svg%{?_isa} +%endif + +%if 0%{?suse_version} Recommends: qt6-imageformats +%else +Recommends: qt6-qtimageformats%{?_isa} +%endif + Recommends: xdg-desktop-portal%{?_isa} Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa}) Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa}) @@ -51,12 +73,34 @@ Features: %autosetup -p1 %build -%cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=OFF +%if 0%{?suse_version} +export CXX=/usr/bin/g++-15 + +cmake -G Ninja -S . -B build \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_WAYLAND_CLIPBOARD=%{wayland_clipboard} \ + -DBUILD_SHARED_LIBS=OFF + +cmake --build build -j $(nproc) +%else +%cmake -G Ninja \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_WAYLAND_CLIPBOARD=%{wayland_clipboard} \ + -DBUILD_SHARED_LIBS=OFF %cmake_build +%endif %install +%if 0%{?suse_version} +DESTDIR=%{buildroot} cmake --install build +%suse_update_desktop_file -r org.flameshot.Flameshot Utility X-SuSE-DesktopUtility +%else %cmake_install +%endif + rm -rf %{buildroot}%{_includedir}/QtColorWidgets rm -rf %{buildroot}%{_libdir}/cmake/QtColorWidgets rm -f %{buildroot}%{_libdir}/libQtColorWidgets.* @@ -64,13 +108,15 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/QtColorWidgets.pc rm -rf %{buildroot}%{_includedir}/kdsingleapplication-qt6 rm -rf %{buildroot}%{_libdir}/cmake/KDSingleApplication-qt6 rm -f %{buildroot}%{_libdir}/libkdsingleapplication-qt6.* -# https://fedoraproject.org/wiki/PackagingDrafts/find_lang + %find_lang Internationalization --with-qt -%suse_update_desktop_file -r org.flameshot.Flameshot Utility X-SuSE-DesktopUtility -%fdupes %{buildroot}%{_datadir}/icons + +jdupes %{buildroot}%{_datadir}/icons %check -appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml +%if ! (0%{?rhel} <= 9) +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml || true +%endif desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %files -f Internationalization.lang @@ -94,22 +140,22 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/%{name}.1* %changelog -* Thu Mar 02 2026 Jeremy Borgman - 14.0.rc1 +* Mon Mar 02 2026 Jeremy Borgman - 14.0.rc1 - Beta for 14 release -* Sat Oct 28 2025 Jeremy Borgman - 13.3.0 +* Tue Oct 28 2025 Jeremy Borgman - 13.3.0 - Updated for v13.3.0 release -* Sat Oct 24 2025 Jeremy Borgman - 13.2.0 +* Fri Oct 24 2025 Jeremy Borgman - 13.2.0 - Updated for v13.2.0 release * Sat Aug 16 2025 Elliott Tallis - 13.1.0-2 - Minor spec file tweaks -* Sun Aug 15 2025 Jeremy Borgman - 13.1.0 +* Fri Aug 15 2025 Jeremy Borgman - 13.1.0 - Update for v13.1.0 release -* Sun Aug 06 2025 Jeremy Borgman - 13.0.1 +* Wed Aug 06 2025 Jeremy Borgman - 13.0.1 - Update for v13.0.1 release * Sun Aug 03 2025 Jeremy Borgman - 13.0.0 @@ -118,7 +164,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop * Sun Jul 27 2025 Jeremy Borgman - 13.0.rc2 - Beta for 13 release. -* Sun Jul 12 2025 Jeremy Borgman - 13.0.rc1 +* Sat Jul 12 2025 Jeremy Borgman - 13.0.rc1 - Beta for 13 release. * Sun Jul 03 2022 Jeremy Borgman - 12.1.0-1 diff --git a/src/main.cpp b/src/main.cpp index d8c177ae0e..c5da3fc625 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -573,13 +573,12 @@ int main(int argc, char* argv[]) bool pin = parser.isSet(pinOption); bool edit = parser.isSet(editOption); - CaptureRequest req(edit ? CaptureRequest::GRAPHICAL_MODE - : CaptureRequest::SCREEN_MODE, - delay); - - // For edit mode, set the selected monitor - if (edit && screenNumber >= 0) { - req.setSelectedMonitor(screenNumber); + CaptureRequest req(CaptureRequest::SCREEN_MODE, delay, screenNumber); + if (edit) { + req = CaptureRequest(CaptureRequest::GRAPHICAL_MODE, delay); + if (screenNumber >= 0) { + req.setSelectedMonitor(screenNumber); + } } if (!region.isEmpty()) {