Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from flameshot-org:master #76

Merged
merged 9 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 33 additions & 9 deletions .github/workflows/Linux-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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: |
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/MacOS-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
DIR_PKG: build/src
HELPERS_SCRIPTS_PATH: ../../packaging/macos
# Apple developer identity, example: "Developer ID Application: <user name> (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 }}
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/Windows-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Packaging(Windows)
on:
push:
branches:
- master*
- master
- fix*
paths-ignore:
- 'README.md'
- 'LICENSE'
Expand All @@ -12,6 +13,8 @@ on:
paths-ignore:
- 'README.md'
- 'LICENSE'
workflow_dispatch:


env:
PRODUCT: flameshot
Expand Down Expand Up @@ -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'
Expand All @@ -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 }}
Expand Down Expand Up @@ -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/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,4 @@ data/flatpak/.flatpak-builder

# Miscellaneous
!docs/dev/Makefile
.direnv
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
3 changes: 3 additions & 0 deletions flameshot.example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
;
Expand Down
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> { } }:

pkgs.mkShell {
nativeBuildInputs = with pkgs; [
Expand All @@ -7,5 +7,5 @@ pkgs.mkShell {
qt5.qttools
qt5.qtsvg
];
buildInputs = [ pkgs.qt5.qtbase ];
buildInputs = with pkgs; [ qt5.qtbase libsForQt5.kguiaddons ];
}
1 change: 1 addition & 0 deletions src/utils/confighandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static QMap<class QString, QSharedPointer<ValueHandler>>
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 )),
Expand Down
1 change: 1 addition & 0 deletions src/utils/confighandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 7 additions & 4 deletions src/utils/screengrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <QApplication>
Expand Down Expand Up @@ -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;
Expand Down
Loading