Merge pull request #56 from namecheap/master_nc

Master nc
This commit is contained in:
Yurii Puchkov
2020-10-15 02:13:08 -07:00
committed by GitHub
483 changed files with 49701 additions and 20581 deletions

6
.clang-format Normal file
View File

@@ -0,0 +1,6 @@
Language: Cpp
BasedOnStyle: Mozilla
IndentWidth: 4
AccessModifierOffset: -4
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None

6
.clang-tidy Normal file
View File

@@ -0,0 +1,6 @@
---
Checks: '*,-fuchsia-*,-google-*,-zircon-*,-abseil-*,-modernize-use-trailing-return-type,-llvm-*'
WarningsAsErrors: '*'
HeaderFilterRegex: ''
FormatStyle: none

18
.cmake-format.yaml Normal file
View File

@@ -0,0 +1,18 @@
additional_commands:
foo:
flags:
- BAR
- BAZ
kwargs:
DEPENDS: '*'
HEADERS: '*'
SOURCES: '*'
bullet_char: '*'
dangle_parens: false
enum_char: .
line_ending: unix
line_width: 120
max_pargs_hwrap: 3
separate_ctrl_name_with_space: false
separate_fn_name_with_space: false
tab_size: 2

525
.github/workflows/Linux-pack.yml vendored Normal file
View File

@@ -0,0 +1,525 @@
name: Packaging(Linux)
on:
push:
branches:
- master*
paths-ignore:
- 'README.md'
- 'LICENSE'
pull_request:
branches:
- master*
paths-ignore:
- 'README.md'
- 'LICENSE'
env:
PRODUCT: flameshot
RELEASE: 1
ARCH: x86_64
# dockerfiles, see https://github.com/flameshot-org/flameshot-docker-images
# docker images, see https://hub.docker.com/r/vitzy/flameshot
# vitzy/flameshot or packpack/packpack
DOCKER_REPO: vitzy/flameshot
# upload services: 0x0.st, file.io, transfer.sh, wetransfer.com
UPLOAD_SERVICE: wetransfer.com
jobs:
deb-pack:
name: ${{ matrix.dist.name }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
dist:
- {
name: debian-10,
os: debian,
symbol: buster
}
- {
name: ubuntu-20.04,
os: ubuntu,
symbol: focal
}
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v2
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
- name: Get packpack tool
uses: actions/checkout@v2
with:
# flameshot-org/packpack or packpack/packpack
repository: flameshot-org/packpack
path: tools
- name: Packaging on ${{ matrix.dist.name }}
run: |
cp -r $GITHUB_WORKSPACE/data/debian $GITHUB_WORKSPACE
bash $GITHUB_WORKSPACE/tools/packpack
mv $GITHUB_WORKSPACE/build/${PRODUCT}_${VERSION}-${RELEASE}_amd64.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb
env:
OS: ${{ matrix.dist.os }}
DIST: ${{ matrix.dist.symbol }}
- name: SHA256Sum of ${{ matrix.dist.name }} package(daily build)
run: |
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb.sha256sum
echo "=============${{ matrix.dist.name }} sha256sum download link============"
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb.sha256sum)
echo "========no operation for you can see link in the log console======="
- name: Upload ${{ matrix.dist.name }} package(daily build)
run: |
echo "================${{ matrix.dist.name }} download link==============="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.amd64.deb)
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
uses: actions/upload-artifact@v2
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.amd64.deb
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.amd64.deb.sha256sum
deb-pack-extra:
name: ubuntu-18.04(extra job to packaging deb)
runs-on: ubuntu-20.04
container:
image: vitzy/flameshot:ubuntu-bionic
steps:
- name: Checkout Source code
if: github.event_name == 'push'
# Because git version < 2.18(ubuntu 18.04), so only actions/checkout@v1 can be used.
# If you use actions/checkout@v2, you will have no .git folder.
uses: actions/checkout@v1
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v1
with:
fetch-depth: 0
ref: refs/pull/${{ github.event.number }}/head
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
- name: Install dependencies
run: |
apt-get -y -qq update
apt-get -y --no-install-recommends install \
qt5-default \
qttools5-dev-tools \
qttools5-dev \
libqt5dbus5 \
libqt5network5 \
libqt5core5a \
libqt5widgets5 \
libqt5gui5 \
libqt5svg5-dev \
python3 \
python3-pip
- name: Prepare cmake(>=3.13.0)
run: |
apt-get -y autoremove cmake
wget https://github.com/Kitware/CMake/releases/download/v3.18.3/cmake-3.18.3-Linux-${ARCH}.tar.gz
tar -xf cmake-3.18.3-Linux-${ARCH}.tar.gz
cd ./cmake-3.18.3-Linux-${ARCH}
cp -r bin /usr/
cp -r share /usr/
cp -r doc /usr/share/
cp -r man /usr/share/
cd ..
rm -rf cmake-3.18.3-Linux-${ARCH} cmake-3.18.3-Linux-${ARCH}.tar.gz
echo "======CMAKE VERSION======"
cmake --version
echo "========================="
- name: Packaging on ubuntu-18.04
run: |
cp -r $GITHUB_WORKSPACE/data/debian $GITHUB_WORKSPACE
mkdir -p $GITHUB_WORKSPACE/build
sed -e "/cmake (>= 3.13~),/d" -i $GITHUB_WORKSPACE/debian/control
dpkg-buildpackage -b
cp $GITHUB_WORKSPACE/../${PRODUCT}_*-${RELEASE}_amd64.deb $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb
- name: SHA256Sum of ubuntu-18.04 package(daily build)
run: |
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb.sha256sum
echo "============ubuntu-18.04 sha256sum download link=============="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb.sha256sum)
echo "=====no operation for you can see link in the log console====="
- name: Upload ubuntu-18.04 package(daily build)
run: |
echo "===================ubuntu-18.04 download link=================="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.ubuntu-18.04.amd64.deb)
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
uses: actions/upload-artifact@v2
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/build/*
rpm-pack:
name: ${{ matrix.dist.name }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
dist:
- {
name: fedora-31,
os: fedora,
symbol: 31
}
- {
name: fedora-32,
os: fedora,
symbol: 32
}
- {
name: opensuse-leap-15.2,
os: opensuse-leap,
symbol: 15.2
}
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v2
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
- name: Get packpack tool
uses: actions/checkout@v2
with:
# flameshot-org/packpack or packpack/packpack
repository: flameshot-org/packpack
path: tools
- name: Packaging on ${{ matrix.dist.name }}
run: |
cp -r $GITHUB_WORKSPACE/data/rpm $GITHUB_WORKSPACE
bash $GITHUB_WORKSPACE/tools/packpack
env:
OS: ${{ matrix.dist.os }}
DIST: ${{ matrix.dist.symbol }}
- name: Package Clean
if: matrix.dist.os == 'fedora'
run: |
rm -f ${{ github.workspace }}/build/${{ env.PRODUCT }}-debuginfo-*.rpm
rm -f ${{ github.workspace }}/build/${{ env.PRODUCT }}-debugsource-*.rpm
rm -f ${{ github.workspace }}/build/${{ env.PRODUCT }}-*.src.rpm
rm -f ${{ github.workspace }}/build/build.log
- name: SHA256Sum of ${{ matrix.dist.name }} package(daily build)
if: matrix.dist.os == 'fedora'
run: |
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc${{ matrix.dist.symbol }}.${ARCH}.rpm.sha256sum
echo "============${{ matrix.dist }} sha256sum download link============"
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm.sha256sum)
echo "=======no operation for you can see link in the log console======="
- name: SHA256Sum of ${{ matrix.dist.name }} package(daily build)
if: matrix.dist.os == 'opensuse-leap'
run: |
mv $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-lp*.${ARCH}.rpm $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm.sha256sum
echo "============${{ matrix.dist }} sha256sum download link==========="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm.sha256sum)
echo "=======no operation for you can see link in the log console======"
- name: Upload ${{ matrix.dist.name }} package(daily build)
if: matrix.dist.os == 'fedora'
run: |
echo "================${{ matrix.dist.name }} download link==============="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.fc*.${ARCH}.rpm)
echo "======no operation for you can see link in the log console====="
- name: Upload ${{ matrix.dist.name }} package(daily build)
if: matrix.dist.os == 'opensuse-leap'
run: |
echo "================${{ matrix.dist.name }} download link==============="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}-lp${{ matrix.dist.symbol }}.${ARCH}.rpm)
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
if: matrix.dist.os == 'fedora'
uses: actions/upload-artifact@v2
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/build/
- name: Artifact Upload
if: matrix.dist.os == 'opensuse-leap'
uses: actions/upload-artifact@v2
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ env.ARCH }}.rpm
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ env.ARCH }}.rpm.sha256sum
appimage-pack:
name: appimage
runs-on: ubuntu-20.04
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v2
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
- name: Install Dependencies
run: |
sudo apt-get -y -qq update
sudo apt-get -y --no-install-recommends install \
cmake \
extra-cmake-modules \
build-essential \
qt5-default \
qttools5-dev-tools \
qttools5-dev \
libqt5dbus5 \
libqt5network5 \
libqt5core5a \
libqt5widgets5 \
libqt5gui5 \
libqt5svg5-dev \
appstream \
hicolor-icon-theme \
fcitx-frontend-qt5 \
openssl \
ca-certificates
- name: Get go-appimage tool
# Will not use linuxdeployqt anymore, because it suopprts currently still-supported mainstream distribution,
# which is glibc 2.23. For more information, please see https://github.com/probonopd/linuxdeployqt/issues/340.
# Will try new tool https://github.com/probonopd/go-appimage written in golang by the inventor of the AppImage format.
run: |
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases -O - \
| grep "appimagetool-.*-${ARCH}.AppImage" | head -n 1 | cut -d '"' -f 2) -O appimagetool
chmod +x appimagetool
- name: Packaging appimage
run: |
APPIMAGE_DST_PATH=$GITHUB_WORKSPACE/${PRODUCT}.AppDir
mkdir -p ${APPIMAGE_DST_PATH}
cd $GITHUB_WORKSPACE
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
make -j$(nproc) DESTDIR=${APPIMAGE_DST_PATH} install
$GITHUB_WORKSPACE/appimagetool -s deploy ${APPIMAGE_DST_PATH}/usr/share/applications/org.flameshot.Flameshot.desktop
mkdir -p ${APPIMAGE_DST_PATH}/usr/plugins/platforminputcontexts
cp \
/usr/lib/${ARCH}-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so \
${APPIMAGE_DST_PATH}/usr/plugins/platforminputcontexts/
cp \
$GITHUB_WORKSPACE/data/img/app/org.flameshot.Flameshot.png \
${APPIMAGE_DST_PATH}/
rm ${APPIMAGE_DST_PATH}/lib/x86_64-linux-gnu/libxcb-glx.so.0
VERSION=${VERSION} $GITHUB_WORKSPACE/appimagetool ${APPIMAGE_DST_PATH}
mv $GITHUB_WORKSPACE/Flameshot-${VERSION}-${ARCH}.AppImage $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage
- name: SHA256Sum of appimage package(daily build)
run: |
sha256sum $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage
sha256sum $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage > $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage.sha256sum
echo "================appimage sha256sum download link==============="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage.sha256sum)
echo "======no operation for you can see link in the log console====="
- name: Upload appimage package for daily build
run: |
echo "====================appimage download link====================="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/Flameshot-${VERSION}.${ARCH}.AppImage)
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
uses: actions/upload-artifact@v2
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/Flameshot-*.${{ env.ARCH }}.AppImage
${{ github.workspace }}/Flameshot-*.${{ env.ARCH }}.AppImage.sha256sum
flatpak-pack:
name: flatpak
runs-on: ubuntu-20.04
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v2
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
- name: Setup flatpak
run: |
sudo apt-get -y -qq update
sudo apt-get install -y flatpak flatpak-builder
- name: Setup Flathub
run: |
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y --noninteractive flathub org.kde.Sdk//5.15 org.kde.Platform//5.15
- name: Packaging flatpak
run: |
BUNDLE="org.flameshot.Flameshot_${VERSION}_${ARCH}.flatpak"
MANIFEST_PATH=$GITHUB_WORKSPACE/data/flatpak/org.flameshot.Flameshot.yml
RUNTIME_REPO="https://flathub.org/repo/flathub.flatpakrepo"
APP_ID="org.flameshot.Flameshot"
BRANCH="master"
flatpak-builder --user --disable-rofiles-fuse --repo=repo --force-clean flatpak_app ${MANIFEST_PATH} --install-deps-from=flathub
flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
mv $GITHUB_WORKSPACE/org.flameshot.Flameshot_${VERSION}_${ARCH}.flatpak $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak
- name: SHA256Sum of flatpak package(daily build)
run: |
sha256sum $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak
sha256sum $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak > $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak.sha256sum
echo "================flatpak sha256sum download link===================="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak.sha256sum)
echo "========no operation for you can see link in the log console======="
- name: Upload flatpak package(daily build)
run: |
echo "=====================flatpak download link====================="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak)
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
uses: actions/upload-artifact@v2
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/org.flameshot.Flameshot-*.${{ env.ARCH }}.flatpak
${{ github.workspace }}/org.flameshot.Flameshot-*.${{ env.ARCH }}.flatpak.sha256sum
snap-pack:
name: snap
runs-on: ubuntu-20.04
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v2
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
- name: Packaging snap
uses: snapcore/action-build@v1
id: snapcraft
with:
path: data
- name: Rename snap name
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/build
cp ${{ steps.snapcraft.outputs.snap }} $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap
- name: SHA256Sum of snap package(daily build)
run: |
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap
sha256sum $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap > $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap.sha256sum
echo "================snap sha256sum download link=================="
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap.sha256sum)
echo "=====no operation for you can see link in the log console====="
- name: Upload snap package(daily build)
run: |
echo "=======================snap download link======================"
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap)
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
uses: actions/upload-artifact@v2
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.amd64.snap
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.amd64.snap.sha256sum

185
.github/workflows/Windows-pack.yml vendored Normal file
View File

@@ -0,0 +1,185 @@
name: Packaging(Windows)
on:
push:
branches:
- master*
paths-ignore:
- 'README.md'
- 'LICENSE'
pull_request:
branches:
- master*
paths-ignore:
- 'README.md'
- 'LICENSE'
env:
PRODUCT: flameshot
jobs:
windows-pack:
name: VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }}
runs-on: windows-2019
env:
VCINSTALLDIR: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/
Qt5_DIR: ${{ github.workspace }}\build\Qt\${{ matrix.qt_ver }}\${{ matrix.config.qt_arch_install }}\lib\cmake\Qt5\
QTDIR: ${{ github.workspace }}\build\Qt\${{ matrix.qt_ver }}\${{ matrix.config.qt_arch_install }}\
# 2020.07
VCPKG_VERSION: 56fffbe49dfb4dd8fae0940f272c5fd2b86be991
VCPKG_PACKAGES: openssl-windows
OPENSSL_ROOT_DIR: ${{ github.workspace }}\vcpkg\installed\${{ matrix.config.vcpkg_triplet }}\
strategy:
fail-fast: false
matrix:
qt_ver: [5.15.1]
qt_target: [desktop]
config:
- {
arch: x86,
generator: "-G'Visual Studio 16 2019' -A Win32",
vcpkg_triplet: x86-windows,
qt_arch: win32_msvc2019,
qt_arch_install: msvc2019,
pak_arch: win32
}
- {
arch: x64,
generator: "-G'Visual Studio 16 2019' -A x64",
vcpkg_triplet: x64-windows,
qt_arch: win64_msvc2019_64,
qt_arch_install: msvc2019_64,
pak_arch: win64
}
type: [portable, installer]
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v2
with:
fetch-depth: 0
# ref: master
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Set env & Print flameshot version
shell: bash
run: |
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
git_hash=$(git rev-parse --short HEAD)
echo "=======FLAMESHOT VERSION========"
echo ${last_committed_tag:1}
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
echo "================================"
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
- name: Restore from cache and run vcpkg
uses: lukka/run-vcpkg@v4
with:
vcpkgArguments: ${{env.VCPKG_PACKAGES}}
vcpkgDirectory: '${{ github.workspace }}\vcpkg'
appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
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
with:
version: ${{ matrix.qt_ver }}
target: ${{ matrix.qt_target }}
arch: ${{ matrix.config.qt_arch }}
dir: '${{ github.workspace }}/build/'
modules: 'qtscript'
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Configure
working-directory: build
shell: pwsh
run: |
cmake .. ${{matrix.config.generator}} `
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
-DENABLE_OPENSSL=ON `
-DCMAKE_BUILD_TYPE=Release `
-DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }}
- name: Compile
working-directory: build
shell: pwsh
run: cmake --build . --config Release
- name: CPack
working-directory: build
shell: pwsh
run: |
If ($env:TYPE -eq "installer")
{
cpack -G WIX -B "$env:GITHUB_WORKSPACE\build\Package"
}
ElseIf($env:TYPE -eq "portable")
{
cpack -G ZIP -B "$env:GITHUB_WORKSPACE\build\Package"
}
env:
TYPE: ${{matrix.type}}
- name: Package Clean
run: rm -r $env:GITHUB_WORKSPACE\build\Package\_CPack_Packages
- name: SHA256Sum of Windows installer(daily build)
if: matrix.type == 'installer'
shell: bash
run: |
sha256sum $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi
sha256sum $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi > $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi.sha256sum
python -m pip install -U -q requests
echo "============Windows installer sha256sum download link============"
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi.sha256sum)
echo "=======no operation for you can see link in the log console====="
- name: SHA256Sum of Windows portable(daily build)
if: matrix.type == 'portable'
shell: bash
run: |
sha256sum $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip
sha256sum $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip > $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip.sha256sum
python -m pip install -U -q requests
echo "===========Windows portable sha256sum download link============"
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip.sha256sum)
echo "=====no operation for you can see link in the log console====="
- name: Upload Windows installer(daily build)
if: matrix.type == 'installer'
shell: bash
run: |
python -m pip install -U -q requests
echo "================Windows installer download link================"
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi)
echo "=====no operation for you can see link in the log console====="
- name: Upload Windows portable(daily build)
if: matrix.type == 'portable'
shell: bash
run: |
python -m pip install -U -q requests
echo "=================Windows portable download link================"
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/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@v2
with:
name: Windows-artifact
path: ${{ github.workspace }}/build/Package/*

132
.github/workflows/build_cmake.yml vendored Normal file
View File

@@ -0,0 +1,132 @@
name: Building(CMake)
on:
push:
branches: [ master, master_nc_merge_upstream_test ]
paths-ignore:
- 'README.md'
- 'LICENSE'
pull_request:
branches: [ master, master_nc_merge_upstream_test ]
paths-ignore:
- 'README.md'
- 'LICENSE'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
jobs:
linux-build:
name: ${{ matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v2
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Dependencies
run: |
sudo apt-get -y -qq update
sudo apt-get -y --no-install-recommends install \
cmake \
extra-cmake-modules \
build-essential \
qt5-default \
qttools5-dev-tools \
qttools5-dev \
libqt5dbus5 \
libqt5network5 \
libqt5core5a \
libqt5widgets5 \
libqt5gui5 \
libqt5svg5-dev
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{runner.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
#
# We need to source the profile file to make sure conan is in PATH
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{runner.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $BUILD_TYPE
windows-build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows 2019 MSVC",
artifact: "Windows-MSVC.tar.xz",
os: windows-2019,
cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
}
- {
name: "Windows 2019 MinGW",
artifact: "Windows-MinGW.tar.xz",
os: windows-2019,
cc: "gcc", cxx: "g++"
}
steps:
- uses: actions/checkout@v2
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ./build/Qt
key: ${{ runner.os }}-QtCache
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: 5.15.1
target: desktop
dir: '${{ github.workspace }}/build/'
- name: Configure
working-directory: build
shell: powershell
run: |
cmake -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE ../
- name: Build
working-directory: build
shell: powershell
run: |
cmake --build . --config $env:BUILD_TYPE

24
.github/workflows/clang-format.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: test-clang-format
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source code
if: github.event_name == 'push'
uses: actions/checkout@v2
- name: Checkout Source code
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: DoozyX/clang-format-lint-action@v0.9
with:
source: './src'
#exclude: './third_party ./external'
extensions: 'h,cpp'
clangFormatVersion: 11
style: file

12
.gitignore vendored
View File

@@ -1,3 +1,7 @@
# common
.idea
# C++ objects and libs
*.slo
@@ -49,5 +53,13 @@ stage/
.snapcraft/
flameshot*.tar.bz2
.vscode/
build/
data/flatpak/.flatpak-builder
# NVIM
*~
# Jetbrains
.idea/
# End of https://www.gitignore.io/api/snapcraft

View File

@@ -1,98 +0,0 @@
dist: xenial
sudo: required
language: cpp
branches:
only:
- master
cache:
directories:
- $HOME/.cache
env:
global:
# Environment variables for packaging
- PRODUCT=flameshot
- VERSION=0.6.0
- RELEASE=1
- ARCH=x86_64
# Dockerfile from https://github.com/flameshotapp/flameshot-docker-images
- DOCKER_REPO=vitzy/flameshot
# Option: wetransfer.com, file.io, 0x0.st, transfer.sh
- UPLOAD_SERVICE=wetransfer.com
# The actual list of distribution is available on
# https://hub.docker.com/r/vitzy/flameshot/tags/
matrix:
include:
- os: linux
# 28
env: OS=fedora DIST=28 EXTEN=rpm
services: docker
- os: linux
# 29
env: OS=fedora DIST=29 EXTEN=rpm
services: docker
- os: linux
# 30
env: OS=fedora DIST=30 EXTEN=rpm
services: docker
- os: linux
# 16.04 LTS
env: OS=ubuntu DIST=xenial EXTEN=deb
services: docker
- os: linux
# 18.04 LTS
env: OS=ubuntu DIST=bionic EXTEN=deb
services: docker
- os: linux
# 19.04
env: OS=ubuntu DIST=disco EXTEN=deb
services: docker
- os: linux
# 8
env: OS=debian DIST=jessie EXTEN=deb
services: docker
- os: linux
# 9
env: OS=debian DIST=stretch EXTEN=deb
services: docker
- os: linux
# No docker environment, just for CI build & test
# ubuntu xenial; default Qt version is 5.6.1
env: OS=ubuntu DIST=xenial EXTEN=other
# - os: osx
# compiler: clang
# osx_image: xcode9.2
before_install:
- export ROOT_PATH="$(pwd)"
- chmod +x .travis/*.sh
- chmod +x .travis/services/*.sh
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then source .travis/linux_before_install.sh; fi
install:
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then source .travis/linux_install.sh; fi
script:
# - git submodule update --init --recursive
# - git describe --long
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then source .travis/linux_script.sh; fi
# - if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then source .travis/osx_script.sh; fi
after_success:
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then source .travis/linux_after_success.sh; fi
- echo "Download URL is $TEMP_DOWNLOAD_URL ."
# deploy:
# # Deploy packages to Github Release
# provider: releases
# api_key: "GITHUB ENCYPTED OAUTH TOKEN"
# file_glob: true
# file: dist/*.{deb,rpm,AppImage,dmg}
# skip_cleanup: true
# on:
# tags: true
# branch: master

View File

@@ -1,31 +0,0 @@
#!/bin/bash --
set -e
DIST_PATH=dist
if [[ "${EXTEN}" == "other" ]]; then
cp "${BUILD_DST_PATH}/flameshot" "${ROOT_PATH}/.travis/services/flameshot_${VERSION}_${ARCH}"
cd "${ROOT_PATH}/.travis/services"
TEMP_DOWNLOAD_URL=$(travis_retry bash \
"${ROOT_PATH}/.travis/services/${UPLOAD_SERVICE}.sh" \
flameshot_"${VERSION}_${ARCH}")
else
case "${OS}" in
"ubuntu"|"debian")
cp "${DIST_PATH}/flameshot_${VERSION}_${DIST}_${ARCH}.${EXTEN}" "${ROOT_PATH}/.travis/services/flameshot_${VERSION}_${DIST}_${ARCH}.${EXTEN}"
cd "${ROOT_PATH}/.travis/services"
TEMP_DOWNLOAD_URL=$(travis_retry bash \
"${ROOT_PATH}/.travis/services/${UPLOAD_SERVICE}.sh" \
"flameshot_${VERSION}_${DIST}_${ARCH}.${EXTEN}")
;;
"fedora")
cp "${DIST_PATH}/flameshot_${VERSION}_fedora${DIST}_${ARCH}.${EXTEN}" "${ROOT_PATH}/.travis/services/flameshot_${VERSION}_fedora${DIST}_${ARCH}.${EXTEN}"
cd "${ROOT_PATH}/.travis/services"
TEMP_DOWNLOAD_URL=$(travis_retry bash \
"${ROOT_PATH}/.travis/services/${UPLOAD_SERVICE}.sh" \
"flameshot_${VERSION}_fedora${DIST}_${ARCH}.${EXTEN}")
;;
esac
fi

View File

@@ -1,7 +0,0 @@
#!/bin/bash --
set -e
if [[ "${EXTEN}" == "other" ]]; then
travis_retry sudo apt update
fi

View File

@@ -1,15 +0,0 @@
#!/bin/bash --
set -e
if [[ "${EXTEN}" == "other" ]]; then
# Compile-time
travis_retry sudo apt install -y gcc g++ build-essential qt5-default qt5-qmake qttools5-dev-tools
# Run-time
travis_retry sudo apt install -y libqt5dbus5 libqt5network5 libqt5core5a libqt5widgets5 libqt5gui5 libqt5svg5-dev
# Optional
travis_retry sudo apt install -y openssl ca-certificates
# Install fcitx-frontend-qt5
travis_retry sudo apt install -y fcitx-frontend-qt5
fi

View File

@@ -1,42 +0,0 @@
#!/bin/bash --
set -e
DIST_PATH=dist
if [[ ! -d "${DIST_PATH}" ]]; then
mkdir "${DIST_PATH}"
fi
if [[ "${EXTEN}" == "other" ]]; then
project_dir="$(pwd)"
BUILD_DST_PATH=build-test
qmake --version
mkdir "${BUILD_DST_PATH}"
qmake -makefile DESTDIR="${BUILD_DST_PATH}" "${project_dir}"/flameshot.pro
# Building flameshot
make -j$(nproc)
# Running flameshot tests
make check -j$(nproc)
ls -alhR
else
travis_retry git clone https://github.com/flameshotapp/packpack.git
travis_retry packpack/packpack
pwd && ls
case "${OS}" in
"ubuntu"|"debian")
# copy deb to dist path for distribution
cp \
build/flameshot_*_*.deb \
"${DIST_PATH}"/flameshot_${VERSION}_${DIST}_${ARCH}.${EXTEN}
;;
"fedora")
cp \
build/flameshot-${VERSION}-${RELEASE}.*.${ARCH}.rpm \
"${DIST_PATH}"/flameshot_${VERSION}_fedora${DIST}_${ARCH}.${EXTEN}
;;
esac
fi

View File

@@ -1,55 +0,0 @@
#!/bin/bash --
set -e
project_dir="$(pwd)"
brew update > /dev/null
brew install qt
QTDIR=/usr/local/opt/qt
PATH="${QTDIR}"/bin:"${PATH}"
LDFLAGS=-L"${QTDIR}"/lib
CPPFLAGS=-I"${QTDIR}"/include
# Build your app
cd "${project_dir}"
mkdir dist
mkdir build
cd build
qmake -version
qmake CONFIG-=debug CONFIG+=release CONFIG+=packaging ../flameshot.pro
make -j$(nproc)
git clone https://github.com/aurelien-rainone/macdeployqtfix.git
pwd
ls
ls /Users/travis/build/ZetaoYang/flameshot
# Package DMG from build/flamshot.app directory
"${QTDIR}"/bin/macdeployqt flameshot.app
python \
"${project_dir}"/build/macdeployqtfix/macdeployqtfix.py \
flameshot.app/Contents/MacOS/flameshot \
"${QTDIR}"
cd "${project_dir}"/build
mkdir -p distrib/Flameshot
cd distrib/Flameshot
mv "${project_dir}"/build/flameshot.app "${project_dir}"/build/distrib/Flameshot/
cp "${project_dir}"/LICENSE LICENSE
cp "${project_dir}"/README.md README.md
echo "${VERSION}" > version
echo "${TRAVIS_COMMIT}" >> version
ln -s /Applications ./Applications
cd ..
hdiutil create -srcfolder ./Flameshot -format UDBZ ./flameshot.dmg
mv flameshot.dmg flameshot_X64_${VERSION}.dmg
mv flameshot_X64_${VERSION}.dmg "${project_dir}"/dist/flameshot_X64_$VERSION.dmg
TEMP_DOWNLOAD_URL=$(curl \
--upload-file \
flameshot_X64_$VERSION.dmg \
"https://transfer.sh/flameshot_X64_$VERSION.dmg")
cd ..

115
CMakeLists.txt Normal file
View File

@@ -0,0 +1,115 @@
cmake_minimum_required(VERSION 3.13)
# cmake_policy(SET CMP0076 OLD)
# This can be read from ${PROJECT_NAME} after project() is called
project(
flameshot
VERSION 0.8.4.1
LANGUAGES CXX)
set(PROJECT_NAME_CAPITALIZED "Flameshot")
# Configuration options
set(DEFAULT_RUN_IN_PLACE FALSE)
if(WIN32)
set(DEFAULT_RUN_IN_PLACE TRUE)
# For Windows RC file.
add_definitions(-DFLAMESHOT_VERSION_MAJOR=${CMAKE_PROJECT_VERSION_MAJOR})
add_definitions(-DFLAMESHOT_VERSION_MINOR=${CMAKE_PROJECT_VERSION_MINOR})
add_definitions(-DFLAMESHOT_VERSION_BUGFIX=${CMAKE_PROJECT_VERSION_PATCH})
add_definitions(-DFLAMESHOT_VERSION_BUILD=1)
add_definitions(-DFLAMESHOT_VERSION_STRING="${PROJECT_VERSION}")
endif()
set(RUN_IN_PLACE ${DEFAULT_RUN_IN_PLACE} CACHE BOOL
"Run directly in source directory structure")
option(GENERATE_TS "Regenerate translation source files" OFF)
include(cmake/StandardProjectSettings.cmake)
add_library(project_options INTERFACE)
target_compile_features(project_options INTERFACE cxx_std_17)
add_library(project_warnings INTERFACE)
# enable cache system
include(cmake/Cache.cmake)
# standard compiler warnings
include(cmake/CompilerWarnings.cmake)
# set_project_warnings(project_warnings)
# sanitizer options if supported by compiler
include(cmake/Sanitizers.cmake)
enable_sanitizers(project_options)
# allow for static analysis options include(cmake/StaticAnalyzers.cmake)
add_subdirectory(src)
# CPack
set(CPACK_PACKAGE_VENDOR "flameshot-org")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Powerful yet simple to use screenshot software.")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_HOMEPAGE_URL "https://flameshot.org")
set(CPACK_PACKAGE_CONTACT "flameshot-org developers <info@flameshot.org>")
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/data/img/app/org.flameshot.Flameshot.svg") # TODO: Can any generator make use of this?
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") # TODO: Where is this used? Do we need a better source?
if(WIN32)
# Include all dynamically linked runtime libaries such as MSVCRxxx.dll
include(InstallRequiredSystemLibraries)
if(RUN_IN_PLACE)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-win64")
else()
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-win32")
endif()
set(CPACK_GENERATOR ZIP)
else()
set(CPACK_GENERATOR WIX ZIP)
set(CPACK_PACKAGE_NAME "${PROJECT_NAME_CAPITALIZED}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME_CAPITALIZED}")
set(CPACK_PACKAGE_EXECUTABLES ${PROJECT_NAME} "${PROJECT_NAME_CAPITALIZED}")
set(CPACK_CREATE_DESKTOP_LINKS ${PROJECT_NAME})
# WIX (Windows .msi installer)
# 48x48 pixels
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_SOURCE_DIR}/data/img/app/flameshot.ico")
# Supported languages can be found at
# http://wixtoolset.org/documentation/manual/v3/wixui/wixui_localization.html
#set(CPACK_WIX_CULTURES "ar-SA,bg-BG,ca-ES,hr-HR,cs-CZ,da-DK,nl-NL,en-US,et-EE,fi-FI,fr-FR,de-DE")
set(CPACK_WIX_UI_BANNER "${CMAKE_SOURCE_DIR}/data/win-installer/Bitmaps/CPACK_WIX_UI_BANNER.BMP")
set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/data/win-installer/Bitmaps/CPACK_WIX_UI_DIALOG.BMP")
set(CPACK_WIX_PROPERTY_ARPHELPLINK "${CPACK_PACKAGE_HOMEPAGE_URL}")
set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT "${CPACK_PACKAGE_HOMEPAGE_URL}")
set(CPACK_WIX_ROOT_FEATURE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
set(CPACK_WIX_LIGHT_EXTRA_FLAGS "-dcl:high") # set high compression
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/data/win-installer/LICENSE/GPL-3.0.txt")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
# The correct way would be to include both x32 and x64 into one installer
# and install the appropriate one.
# CMake does not support that, so there are two separate GUID's
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_WIX_UPGRADE_GUID "26D8062A-66D9-48D9-8924-42090FB9B3F9")
else()
set(CPACK_WIX_UPGRADE_GUID "2C53E1B9-51D9-4429-AAE4-B02221959AA5")
endif()
endif()
elseif(APPLE)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-osx")
set(CPACK_GENERATOR ZIP)
else()
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}-linux")
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
endif()
include(CPack)

168
README.md
View File

@@ -1,8 +1,8 @@
<div align="center">
<p>
<h1>
<a href="https://github.com/lupoDharkael/flameshot">
<img src="img/app/flameshot.svg" alt="Flameshot" />
<a href="https://github.com/flameshot-org/flameshot">
<img src="data/img/app/org.flameshot.Flameshot.svg" alt="Flameshot" />
</a>
<br />
Flameshot
@@ -10,24 +10,28 @@
<h4>Powerful yet simple to use screenshot software.</h4>
</p>
<p>
<a href="https://travis-ci.org/lupoDharkael/flameshot">
<img src="https://img.shields.io/travis/lupoDharkael/flameshot.svg?style=flat-square&label=gnu/linux" alt="GNU/Linux Build Status" />
<a href="https://github.com/flameshot-org/flameshot/actions">
<img src="https://img.shields.io/github/workflow/status/flameshot-org/flameshot/Packaging(Linux)?label=gnu%2Flinux" alt="GNU/Linux Build Status" />
</a>
<a href="https://ci.appveyor.com/project/lupoDharkael/flameshot">
<img src="https://img.shields.io/appveyor/ci/lupoDharkael/flameshot.svg?style=flat-square&label=windows" alt="Windows Build Status" />
<a href="https://github.com/flameshot-org/flameshot/actions">
<img src="https://img.shields.io/github/workflow/status/flameshot-org/flameshot/Packaging(Windows)?label=windows" alt="Windows Build Status" />
</a>
<a href="https://github.com/lupoDharkael/flameshot/releases">
<img src="https://img.shields.io/github/release/lupoDharkael/flameshot.svg?style=flat-square" alt="Latest Stable Release" />
<a href="https://github.com/flameshot-org/flameshot/releases">
<img src="https://img.shields.io/github/release/flameshot-org/flameshot.svg?style=flat-square" alt="Latest Stable Release" />
</a>
<a href="https://github.com/lupoDharkael/flameshot/releases">
<img src="https://img.shields.io/github/downloads/lupoDharkael/flameshot/total.svg?style=flat-square" alt="Total Downloads" />
<a href="https://github.com/flameshot-org/flameshot/releases">
<img src="https://img.shields.io/github/downloads/flameshot-org/flameshot/total.svg?style=flat-square" alt="Total Downloads" />
</a>
<a href="https://github.com/lupoDharkael/flameshot/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/lupoDharkael/flameshot.svg?style=flat-square" alt="License" />
<a href="https://github.com/flameshot-org/flameshot/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/flameshot-org/flameshot.svg?style=flat-square" alt="License" />
</a>
<a href="https://github.com/flameshotapp/flameshotapp.github.io">
<img src="https://img.shields.io/github/release/lupoDharkael/flameshot.svg?style=flat-square&label=docs" alt="Docs" />
<a href="https://flameshot.org">
<img src="https://img.shields.io/github/release/flameshot-org/flameshot.svg?style=flat-square&label=docs" alt="Docs" />
</a>
<br>
<a href="https://snapcraft.io/flameshot">
<img alt="Get it from the Snap Store" src="https://snapcraft.io/static/images/badges/en/snap-store-black.svg" />
</a>
</p>
</div>
@@ -35,7 +39,7 @@
## Preview
![image](img/preview/animatedUsage.gif)
![image](https://github.com/flameshot-org/flameshot-org.github.io/blob/master/_media/animatedUsage.gif)
## Index
@@ -48,6 +52,8 @@
- [On KDE Plasma desktop](#on-kde-plasma-desktop)
- [Considerations](#considerations)
- [Installation](#installation)
- [Prebuilt Packages](#prebuilt-packages)
- [Packages from Repository](#packages-from-repository)
- [Compilation](#compilation)
- [Dependencies](#dependencies)
- [Compile-time](#compile-time)
@@ -58,10 +64,8 @@
- [Arch](#arch)
- [Build](#build)
- [Install](#install)
- [Packaging](#packaging)
- [License](#license)
- [Contribute](#contribute)
- [Donations](#donations)
- [Acknowledgment](#acknowledgment)
## Features
@@ -74,6 +78,11 @@
## Usage
Executing the command `flameshot` without parameters will launch a running
instance of the program in background without taking actions.
If your desktop environment provides tray area, a tray icon will also
appear in the tray for users to perform configuration and management.
Example commands:
- Capture with GUI:
@@ -122,7 +131,7 @@ In case of doubt choose the first or the second command as shortcut in your favo
A systray icon will be in your system's panel while Flameshot is running.
Do a right click on the tray icon and you'll see some menu items to open the configuration window and the information window.
Check out the information window to see all the available shortcuts in the graphical capture mode.
Check out the About window to see all available shortcuts in the graphical capture mode.
### CLI configuration
@@ -196,7 +205,7 @@ Steps for using the configuration:
```shell
cd ~/Desktop
wget https://raw.githubusercontent.com/lupoDharkael/flameshot/master/docs/shortcuts-config/flameshot-shortcuts-kde
wget https://raw.githubusercontent.com/flameshot-org/flameshot/master/docs/shortcuts-config/flameshot-shortcuts-kde
```
3. Go to _System Settings_ → _Shortcuts_ → _Custom Shortcuts_.
4. If there's one, you'll need to disable an entry for Spectacle, the default KDE screenshot utility first because its shortcuts might collide with Flameshot's ones; so, just uncheck the _Spectacle_ entry.
@@ -210,15 +219,33 @@ Steps for using the configuration:
- If you are using Gnome you need to install the [Gnome Shell Extension Appindicator](https://github.com/Ubuntu/gnome-shell-extension-appindicator) extension in order to see the systemtray icon.
- Press <kbd>Enter</kbd> or <kbd>Ctrl</kbd> + <kbd>C</kbd> when you are in a capture mode and you don't have an active selection and the whole desktop will be copied to your clipboard! Pressing <kbd>Ctrl</kbd> + <kbd>S</kbd> will save your capture in a file! Check the [Shortcuts](#keyboard-shortcuts) for more information.
- Flameshot works best with a desktop environment that includes dbus. See this [article](https://wiki.archlinux.org/index.php/Flameshot#Troubleshooting) for tips on using Flameshot in a minimal window manager (dwm, i3, xmonad, etc)
- In order to speed up the first launch of Flameshot (DBus init of the app can be slow), consider starting the application automatically on boot.
- Press <kbd>Enter</kbd> or <kbd>Ctrl</kbd> + <kbd>C</kbd> when you are in a capture mode and you don't have an active selection and the whole desktop will be copied to your clipboard! Pressing <kbd>Ctrl</kbd> + <kbd>S</kbd> will save your capture in a file! Check the [Shortcuts](#shortcuts) for more information.
- Execute the command `flameshot` without parameters to launch a running instance of the program without taking actions.
- Quick tip: If you don't have Flameshot to autostart at boot and you want to set keyboard shortcut, use the following as the command for the keybinding:
```sh
( flameshot &; ) && ( sleep 0.5s && flameshot gui )
```
## Installation
There are packages available for a few distros:
Flameshot can be installed on Linux and Microsoft Windows currently.
There are no macOS port of flameshot now. Please participate in the development
of flameshot and help us make a macOS port.
### Prebuilt packages
Some prebuilt packages are provided on the release page of the GitHub project
repository.
[Click here to visit the release page.](https://github.com/flameshot-org/flameshot/releases).
### Packages from Repository
There are packages available in the repository of
some Linux distributions:
- [Arch](https://www.archlinux.org/packages/community/x86_64/flameshot/): `pacman -S flameshot`
+ Snapshot also available via AUR: [flameshot-git](https://aur.archlinux.org/packages/flameshot-git).
@@ -227,10 +254,10 @@ There are packages available for a few distros:
- [Ubuntu 18.04+](https://launchpad.net/ubuntu/+source/flameshot): `apt install flameshot`
- [openSUSE](https://software.opensuse.org/package/flameshot)
- [Void Linux](https://github.com/void-linux/void-packages/tree/master/srcpkgs/flameshot) (`xbps-install flameshot`)
- [Docker](https://github.com/ManuelLR/docker-flameshot)
- [Solus](https://dev.getsol.us/source/flameshot/): `eopkg it flameshot`
- Fedora: `dnf install flameshot`
- [Snap/Flatpak/AppImage](https://github.com/flameshotapp/packages)
- Besides, generic packages available via [opensuse software repository](https://software.opensuse.org//download.html?project=home%3AVitzy&package=flameshot)
- [Docker](https://github.com/ManuelLR/docker-flameshot)
<details>
<summary>Expand this section to see what distros are using an up to date version of flameshot</summary>
@@ -239,17 +266,60 @@ There are packages available for a few distros:
</a>
</details>
### Tray icon
**Note** that for the Flameshot icon to appear in your tray area, you should have a systray software installed. This is especially true for users who use minimal [window managers](https://wiki.archlinux.org/index.php/window_manager) such as [dwm](https://dwm.suckless.org/). In some [Desktop Environment](https://wiki.archlinux.org/index.php/Desktop_environment) installations (e.g Gnome), the systray might be missing and you can install an application or plugin (e.g [Gnome shell extension](https://extensions.gnome.org/extension/1503/tray-icons/)) to add the systray to your setup. It has been [reported](https://github.com/flameshot-org/flameshot/issues/1009#issuecomment-700781081)) that icon of some softwares, including Flameshot, does not show in [gnome-shell-extension-appindicator](https://github.com/ubuntu/gnome-shell-extension-appindicator).
Alternatively, in case you don't want to have a systray, you can always call Flameshot from the terminal. See [Usage section](#usage).
### S3 bucket configuration
S3 bucket credentials are placed in the file `config.ini` and cannot be configured with UI.
This file is not included into installation and should be placed into the installation directory manually.
On `linux` systems it can be placed at `/etc/flameshot/config.ini`.
You can also add `proxy` server settings. If you don't need a proxy server just remove or comment lines with a proxy settings.
Configuration file example:
```
[General]
HTTP_PROXY_HOST=10.0.0.1
HTTP_PROXY_PORT=3128
; No authentification USER and PASSWORD should be empty
HTTP_PROXY_USER=
HTTP_PROXY_PASSWORD=
HTTP_PROXY_TYPE=0
; Proxy Types (0 is default):
; 0 Proxy is determined based on the application proxy set using setApplicationProxy()
; 1 Socks5 proxying is used
; 3 HTTP transparent proxying is used
; 4 Proxying for HTTP requests only
; 5 Proxying for FTP requests only
[S3]
S3_CREDS_URL=https://api.img.example.com/
S3_X_API_KEY=seckret_key
```
## Compilation
To build the application in your system, you'll need to install the dependencies needed for it and Package names might be different for each distribution, see [Dependencies](#dependencies) below for more information.
To build the application in your system, you'll need to install the dependencies needed for it and package names might be different for each distribution, see [Dependencies](#dependencies) below for more information. You can also install most of the Qt dependencies via [their installer](https://www.qt.io/download-qt-installer). If you were developing Qt apps before, you probably already have them.
This project uses [CMake](https://cmake.org/) build system, so you need to install it in order to build the project (on most Linux distributions it is available in the standard repositories as a package called `cmake`). If your distribution provides too old version of CMake (e.g. Ubuntu 18.04) you can [download it on the official website](https://cmake.org/download/).
Also you can open and build/debug the project in a C++ IDE. For example, in Qt Creator you should be able to simply open `CMakeLists.txt` via `Open File or Project` in the menu after installing CMake into your system. [More information about CMake projects in Qt Creator](https://doc.qt.io/qtcreator/creator-project-cmake.html).
### Dependencies
#### Compile-time
- Qt >= 5.3
- Qt >= 5.9
+ Development tools
- GCC >= 4.9.2
- GCC >= 7.4
- CMake >= 3.13
#### Run-time
@@ -266,10 +336,10 @@ To build the application in your system, you'll need to install the dependencies
```shell
# Compile-time
apt install g++ build-essential qt5-default qt5-qmake qttools5-dev-tools
apt install g++ cmake build-essential qt5-default qttools5-dev-tools libqt5svg5-dev qttools5-dev
# Run-time
apt install libqt5dbus5 libqt5network5 libqt5core5a libqt5widgets5 libqt5gui5 libqt5svg5-dev
apt install libqt5dbus5 libqt5network5 libqt5core5a libqt5widgets5 libqt5gui5 libqt5svg5
# Optional
apt install git openssl ca-certificates
@@ -279,7 +349,7 @@ apt install git openssl ca-certificates
```shell
# Compile-time
dnf install gcc-c++ qt5-devel qt5-qtbase-devel qt5-linguist
dnf install gcc-c++ cmake qt5-devel qt5-qtbase-devel qt5-linguist
# Run-time
dnf install qt5-qtbase qt5-qtsvg-devel
@@ -292,7 +362,7 @@ dnf install git openssl ca-certificates
```shell
# Compile-time
pacman -S base-devel git qt5-base qt5-tools
pacman -S cmake base-devel git qt5-base qt5-tools
# Run-time
pacman -S qt5-svg
@@ -308,30 +378,14 @@ After installing all the dependencies, finally run the following commands in the
```shell
mkdir build
cd build
qmake ../
cmake ../
make
```
### Install
Simply use `make install` with privileges.
## Packaging
Having `git` installed is required if you're building Flameshot from a snapshot to have precise version information.
In order to generate the instructions in the `Makefile` to install the application in `/usr` instead of in `/usr/local` you can pass the `packaging` option to `qmake` (`qmake CONFIG+=packaging`).
If you want to install in a custom directory you can use the `INSTALL_ROOT` variable.
**Example**:
If you want to install Flameshot in `~/myBuilds/test`, you can execute the following to do so:
```shell
qmake CONFIG+=packaging
make INSTALL_ROOT=~/myBuilds/test install
```
Simply use `make install` 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.
## License
- The main code is licensed under [GPLv3](LICENSE)
@@ -346,17 +400,13 @@ Info: If I take code from your project and that implies a relicense to GPLv3, yo
## Contribute
If you want to contribute check the [CONTRIBUTING.md](CONTRIBUTING.md)
If you want to contribute check the [CONTRIBUTING.md](docs/CONTRIBUTING.md)
## Donations
I improve Flameshot in my free time because I want to create something good for everyone to use.
If you want you can donate some bucks with the following options:
- [Paypal](https://www.paypal.me/lupoDharkael)
- bitcoin:1K6oiUKWVjP3x9ZuW9C7NbDfcFkMx3G8ue
## Acknowledgment
I really appreciate those who have shown interest in the early development process:
Thanks to those who have shown interest in the early development process:
- [lupoDharkael](https://github.com/lupoDharkael)
- [Cosmo](https://github.com/philpem)
- [XerTheSquirrel](https://github.com/XerTheSquirrel)
- [The members of Sugus GNU/Linux](https://github.com/SUGUS-GNULinux)

View File

@@ -1,72 +1,19 @@
image: Visual Studio 2015
version: 0.6.{build}.0
# Major_Version_Number.Minor_Version_Number.Build_Number.Revision_Number
branches:
only:
- master
image:
- Visual Studio 2019
clone_folder: c:\projects\source
environment:
COMPILER: msvc
VSVER: 14
matrix:
- QT: C:\Qt\5.9\msvc2015_64
PLATFORM: amd64
- QT: C:\Qt\5.9\msvc2015
PLATFORM: x86
init:
- ps: |
$version = new-object System.Version $env:APPVEYOR_BUILD_VERSION
$packageVersion = "{0}.{1}.{2}" -f $version.Major, $version.Minor, $version.Revision
$env:build_number = $version.Build
$env:flameshot_version = $packageVersion
# scripts that run after cloning repository
install:
- set PATH=%QT%\bin\;C:\Qt\Tools\QtCreator\bin\;C:\Qt\QtIFW3.0.1\bin\;%PATH%
# scripts that run before build
before_build:
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
# After calling vcvarsall.bat, %PLATFORM% will be X64 or x86
- qmake --version
- mkdir build
- cd build
- if "%PLATFORM%" EQU "X64" (qmake -r -spec win32-msvc CONFIG+=x86_64 CONFIG-=debug CONFIG+=release ../flameshot.pro)
- if "%PLATFORM%" EQU "x86" (qmake -r -spec win32-msvc CONFIG+=Win32 CONFIG-=debug CONFIG+=release ../flameshot.pro)
# custom build scripts
Qt5_INSTALL_DIR: 'C:\Qt\5.15.0\msvc2019_64'
PATH: '%Qt5_INSTALL_DIR%\bin;%PATH%'
build_script:
- nmake
- cmd: >-
# scripts that run after build
after_build:
# Clone OpenSSL DLLs
- git clone https://github.com/tamlok/openssl-utils.git openssl-utils.git
- mkdir distrib\flameshot
- windeployqt.exe --dir .\distrib\flameshot %APPVEYOR_BUILD_FOLDER%\build\release\flameshot.exe
- copy "%APPVEYOR_BUILD_FOLDER%\build\release\flameshot.exe" "distrib\flameshot\flameshot.exe"
- copy "%APPVEYOR_BUILD_FOLDER%\README.md" "distrib\flameshot\README.md"
- copy "%APPVEYOR_BUILD_FOLDER%\LICENSE" "distrib\flameshot\LICENSE.txt"
- echo %flameshot_version% > "distrib\flameshot\version.txt"
- echo Build:%build_number% >> "distrib\flameshot\version.txt"
- echo %APPVEYOR_REPO_COMMIT% >> "distrib\flameshot\version.txt"
- copy "distrib\flameshot\flameshot.exe" "distrib\flameshot_win_%PLATFORM%.exe"
- copy "%APPVEYOR_BUILD_FOLDER%\build\translations\Internationalization_*.qm" "distrib\flameshot\translations"
# Delete translations\qt_*.qm
- del /F /Q "distrib\flameshot\translations\qt_*.qm"
# Copy OpenSSL DLLs
- if "%PLATFORM%" EQU "X64" (xcopy "openssl-utils.git\win64\*.dll" "distrib\flameshot")
- if "%PLATFORM%" EQU "x86" (xcopy "openssl-utils.git\win32\*.dll" "distrib\flameshot")
- cd distrib
- 7z a flameshot_%flameshot_version%_win_%PLATFORM%.zip flameshot
- appveyor-retry curl --upload-file ./flameshot_%flameshot_version%_win_%PLATFORM%.zip https://transfer.sh/flameshot_%flameshot_version%_win_%PLATFORM%.zip
mkdir build
cd build
# artifacts:
# - path: build\distrib\flameshot_win_%PLATFORM%_portable_%flameshot_version%.zip
# name: portable
# - path: build\distrib\flameshot_win_%PLATFORM%.exe
# name: exe_only
echo %PATH%
cmake c:\projects\source -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE:STRING=Release
cmake --build . --config "Release"

30
cmake/Cache.cmake Normal file
View File

@@ -0,0 +1,30 @@
option(ENABLE_CACHE "Enable cache if available" ON)
if(NOT ENABLE_CACHE)
return()
endif()
set(CACHE_OPTION
"ccache"
CACHE STRING "Compiler cache to be used")
set(CACHE_OPTION_VALUES "ccache" "sccache")
set_property(CACHE CACHE_OPTION PROPERTY STRINGS ${CACHE_OPTION_VALUES})
list(
FIND
CACHE_OPTION_VALUES
${CACHE_OPTION}
CACHE_OPTION_INDEX)
if(${CACHE_OPTION_INDEX} EQUAL -1)
message(
STATUS
"Using custom compiler cache system: '${CACHE_OPTION}', explicitly supported entries are ${CACHE_OPTION_VALUES}")
endif()
find_program(CACHE_BINARY ${CACHE_OPTION})
if(CACHE_BINARY)
message(STATUS "${CACHE_OPTION} found and enabled")
set(CMAKE_CXX_COMPILER_LAUNCHER ${CACHE_BINARY})
else()
message(WARNING "${CACHE_OPTION} is enabled but was not found. Not using it")
endif()

View File

@@ -0,0 +1,78 @@
# from here:
#
# https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Avai lable.md
function(set_project_warnings project_name)
option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" TRUE)
set(MSVC_WARNINGS
/W4 # Baseline reasonable warnings
/w14242 # 'identifier': conversion from 'type1' to 'type1', possible loss of data
/w14254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
/w14263 # 'function': member function does not override any base class virtual member function
/w14265 # 'classname': class has virtual functions, but destructor is not virtual instances of this class may not
# be destructed correctly
/w14287 # 'operator': unsigned/negative constant mismatch
/we4289 # nonstandard extension used: 'variable': loop control variable declared in the for-loop is used outside
# the for-loop scope
/w14296 # 'operator': expression is always 'boolean_value'
/w14311 # 'variable': pointer truncation from 'type1' to 'type2'
/w14545 # expression before comma evaluates to a function which is missing an argument list
/w14546 # function call before comma missing argument list
/w14547 # 'operator': operator before comma has no effect; expected operator with side-effect
/w14549 # 'operator': operator before comma has no effect; did you intend 'operator'?
/w14555 # expression has no effect; expected expression with side- effect
/w14619 # pragma warning: there is no warning number 'number'
/w14640 # Enable warning on thread un-safe static member initialization
/w14826 # Conversion from 'type1' to 'type_2' is sign-extended. This may cause unexpected runtime behavior.
/w14905 # wide string literal cast to 'LPSTR'
/w14906 # string literal cast to 'LPWSTR'
/w14928 # illegal copy-initialization; more than one user-defined conversion has been implicitly applied
/permissive- # standards conformance mode for MSVC compiler.
)
set(CLANG_WARNINGS
-Wall
-Wextra # reasonable and standard
-Wshadow # warn the user if a variable declaration shadows one from a parent context
-Wnon-virtual-dtor # warn the user if a class with virtual functions has a non-virtual destructor. This helps
# catch hard to track down memory errors
-Wold-style-cast # warn for c-style casts
-Wcast-align # warn for potential performance problem casts
-Wunused # warn on anything being unused
-Woverloaded-virtual # warn if you overload (not override) a virtual function
-Wpedantic # warn if non-standard C++ is used
-Wconversion # warn on type conversions that may lose data
-Wsign-conversion # warn on sign conversions
-Wnull-dereference # warn if a null dereference is detected
-Wdouble-promotion # warn if float is implicit promoted to double
-Wformat=2 # warn on security issues around functions that format output (ie printf)
)
if(WARNINGS_AS_ERRORS)
set(CLANG_WARNINGS ${CLANG_WARNINGS} -Werror)
set(MSVC_WARNINGS ${MSVC_WARNINGS} /WX)
endif()
set(GCC_WARNINGS
${CLANG_WARNINGS}
-Wmisleading-indentation # warn if indentation implies blocks where blocks do not exist
-Wduplicated-cond # warn if if / else chain has duplicated conditions
-Wduplicated-branches # warn if if / else branches have duplicated code
-Wlogical-op # warn about logical operations being used where bitwise were probably wanted
-Wuseless-cast # warn if you perform a cast to the same type
)
if(MSVC)
set(PROJECT_WARNINGS ${MSVC_WARNINGS})
elseif(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
set(PROJECT_WARNINGS ${CLANG_WARNINGS})
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(PROJECT_WARNINGS ${GCC_WARNINGS})
else()
message(AUTHOR_WARNING "No compiler warnings set for '${CMAKE_CXX_COMPILER_ID}' compiler.")
endif()
target_compile_options(${project_name} INTERFACE ${PROJECT_WARNINGS})
endfunction()

66
cmake/Sanitizers.cmake Normal file
View File

@@ -0,0 +1,66 @@
function(enable_sanitizers project_name)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
option(ENABLE_COVERAGE "Enable coverage reporting for gcc/clang" FALSE)
if(ENABLE_COVERAGE)
target_compile_options(${project_name} INTERFACE --coverage -O0 -g)
target_link_libraries(${project_name} INTERFACE --coverage)
endif()
set(SANITIZERS "")
option(ENABLE_SANITIZER_ADDRESS "Enable address sanitizer" FALSE)
if(ENABLE_SANITIZER_ADDRESS)
list(APPEND SANITIZERS "address")
endif()
option(ENABLE_SANITIZER_LEAK "Enable leak sanitizer" FALSE)
if(ENABLE_SANITIZER_LEAK)
list(APPEND SANITIZERS "leak")
endif()
option(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "Enable undefined behavior sanitizer" FALSE)
if(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR)
list(APPEND SANITIZERS "undefined")
endif()
option(ENABLE_SANITIZER_THREAD "Enable thread sanitizer" FALSE)
if(ENABLE_SANITIZER_THREAD)
if("address" IN_LIST SANITIZERS OR "leak" IN_LIST SANITIZERS)
message(WARNING "Thread sanitizer does not work with Address and Leak sanitizer enabled")
else()
list(APPEND SANITIZERS "thread")
endif()
endif()
option(ENABLE_SANITIZER_MEMORY "Enable memory sanitizer" FALSE)
if(ENABLE_SANITIZER_MEMORY AND CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
if("address" IN_LIST SANITIZERS
OR "thread" IN_LIST SANITIZERS
OR "leak" IN_LIST SANITIZERS)
message(WARNING "Memory sanitizer does not work with Address, Thread and Leak sanitizer enabled")
else()
list(APPEND SANITIZERS "memory")
endif()
endif()
list(
JOIN
SANITIZERS
","
LIST_OF_SANITIZERS)
endif()
if(LIST_OF_SANITIZERS)
if(NOT
"${LIST_OF_SANITIZERS}"
STREQUAL
"")
target_compile_options(${project_name} INTERFACE -fsanitize=${LIST_OF_SANITIZERS})
target_link_libraries(${project_name} INTERFACE -fsanitize=${LIST_OF_SANITIZERS})
endif()
endif()
endfunction()

View File

@@ -0,0 +1,34 @@
# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
set(CMAKE_BUILD_TYPE
RelWithDebInfo
CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui, ccmake
set_property(
CACHE CMAKE_BUILD_TYPE
PROPERTY STRINGS
"Debug"
"Release"
"MinSizeRel"
"RelWithDebInfo")
endif()
# Generate compile_commands.json to make it easier to work with clang based tools
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(ENABLE_IPO "Enable Interprocedural Optimization, aka Link Time Optimization (LTO)" OFF)
if(ENABLE_IPO)
include(CheckIPOSupported)
check_ipo_supported(
RESULT
result
OUTPUT
output)
if(result)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
message(SEND_ERROR "IPO is not supported: ${output}")
endif()
endif()

View File

@@ -0,0 +1,37 @@
option(ENABLE_CPPCHECK "Enable static analysis with cppcheck" OFF)
option(ENABLE_CLANG_TIDY "Enable static analysis with clang-tidy" OFF)
option(ENABLE_INCLUDE_WHAT_YOU_USE "Enable static analysis with include-what-you-use" OFF)
if(ENABLE_CPPCHECK)
find_program(CPPCHECK cppcheck)
if(CPPCHECK)
set(CMAKE_CXX_CPPCHECK
${CPPCHECK}
--suppress=missingInclude
--enable=all
--inline-suppr
--inconclusive
-i
${CMAKE_SOURCE_DIR}/imgui/lib)
else()
message(SEND_ERROR "cppcheck requested but executable not found")
endif()
endif()
if(ENABLE_CLANG_TIDY)
find_program(CLANGTIDY clang-tidy)
if(CLANGTIDY)
set(CMAKE_CXX_CLANG_TIDY ${CLANGTIDY} -extra-arg=-Wno-unknown-warning-option)
else()
message(SEND_ERROR "clang-tidy requested but executable not found")
endif()
endif()
if(ENABLE_INCLUDE_WHAT_YOU_USE)
find_program(INCLUDE_WHAT_YOU_USE include-what-you-use)
if(INCLUDE_WHAT_YOU_USE)
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${INCLUDE_WHAT_YOU_USE})
else()
message(SEND_ERROR "include-what-you-use requested but executable not found")
endif()
endif()

View File

@@ -0,0 +1,3 @@
[D-BUS Service]
Name=org.flameshot.Flameshot
Exec=${CMAKE_INSTALL_FULL_BINDIR}/flameshot

View File

@@ -1,6 +1,6 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.dharkael.Flameshot">
<interface name="org.flameshot.Flameshot">
<!--
graphicCapture:
@@ -14,7 +14,7 @@
<method name="graphicCapture">
<arg name="path" type="s" direction="in"/>
<arg name="delay" type="i" direction="in"/>
<arg name="id" type="i" direction="in"/>
<arg name="id" type="u" direction="in"/>
</method>
<!--
@@ -30,7 +30,7 @@
<arg name="path" type="s" direction="in"/>
<arg name="toClipboard" type="b" direction="in"/>
<arg name="delay" type="i" direction="in"/>
<arg name="id" type="i" direction="in"/>
<arg name="id" type="u" direction="in"/>
</method>
<!--
@@ -57,7 +57,7 @@
<arg name="path" type="s" direction="in"/>
<arg name="toClipboard" type="b" direction="in"/>
<arg name="delay" type="i" direction="in"/>
<arg name="id" type="i" direction="in"/>
<arg name="id" type="u" direction="in"/>
</method>
<!--
@@ -99,7 +99,7 @@
Successful capture signal returning the image.
-->
<signal name="captureTaken">
<arg name="id" type="i" direction="out"/>
<arg name="id" type="u" direction="out"/>
<arg name="rawImage" type="ay" direction="out"/>
</signal>
@@ -110,7 +110,7 @@
Whenever the capture fails.
-->
<signal name="captureFailed">
<arg name="id" type="i" direction="out"/>
<arg name="id" type="u" direction="out"/>
</signal>
</interface>
</node>

5
data/debian/changelog Normal file
View File

@@ -0,0 +1,5 @@
flameshot (0.8.4-1) unstable; urgency=medium
* New stable release.
-- Jeremy Borgman <borgman.jeremy@pm.me> Mon, 30 Sep 2020 09:18:29 -0600

1
data/debian/compat Normal file
View File

@@ -0,0 +1 @@
11

View File

@@ -1,24 +1,24 @@
Source: flameshot
Section: graphics
Priority: optional
Maintainer: Juanma Navarro Mañez <juanma1980@gmail.com>
Uploaders:
Boyuan Yang <byang@debian.org>,
Maintainer: Boyuan Yang <byang@debian.org>
Build-Depends:
debhelper (>= 9),
qt5-qmake,
qtbase5-dev,
qttools5-dev-tools,
libqt5svg5-dev,
Standards-Version: 4.3.0
Homepage: https://github.com/lupoDharkael/flameshot
Vcs-Browser: https://github.com/lupoDharkael/flameshot
Vcs-Git: https://github.com/lupoDharkael/flameshot.git
cmake (>= 3.13~),
debhelper (>= 11),
qtbase5-dev (>= 5.9.0~),
qttools5-dev (>= 5.9.0~),
qttools5-dev-tools (>= 5.9.0~),
libqt5svg5-dev (>= 5.9.0~),
Standards-Version: 4.5.0
Homepage: https://github.com/flameshot-org/flameshot
Vcs-Browser: https://github.com/flameshot-org/flameshot
Vcs-Git: https://github.com/flameshot-org/flameshot.git
Package: flameshot
Architecture: any
Depends:
libqt5svg5,
hicolor-icon-theme,
libqt5svg5 (>= 5.9.0~),
${shlibs:Depends},
${misc:Depends},
Suggests:

View File

@@ -1,29 +1,33 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: flameshot
Source: https://github.com/lupoDharkael/flameshot/
Source: https://github.com/flameshot-org/flameshot/
Files: *
Copyright: 2016-2019 lupoDharkael <izhe@hotmail.es>
License: GPL-3+
Comments:
Comment:
The author copied a few lines of code from KSnapshot regiongrabber.cpp
revision 796531 (LGPL).
Files: debian/*
Copyright: 2017 Juanma Navarro Mañez <juanma1980@gmail.com>
2018-2019 Boyuan Yang <byang@debian.org>
2018 Boyuan Yang <byang@debian.org>
License: GPL-3+
Files: img/flameshot.*
Files:
data/img/app/flameshot.*
data/img/hicolor/*
Copyright: 2017 lupoDharkael <izhe@hotmail.es>
License: Free-Art-License-1.3
Files:
docs/appdata/flameshot.appdata.xml
docs/appdata/flameshot.metainfo.xml
Copyright: 2017-2019 lupoDharkael <izhe@hotmail.es>
License: CC0-1.0
Files: img/buttonIconsBlack/* img/buttonIconsWhite/*
Files:
data/img/material/black/*
data/img/material/white/*
Copyright: Google Inc.
License: Apache-2.0
@@ -32,7 +36,7 @@ Copyright: 2017 Alejandro Sirgo Rica
2017 Christian Kaiser <info@ckaiser.com.ar>
2007 Luca Gugelmann <lucag@student.ethz.ch>
License: GPL-3+
Comments:
Comment:
Relicensed under GPL-3+ under flameshot project.
.
Originally based on Lightscreen areadialog.h,
@@ -43,14 +47,14 @@ Comments:
Copyright 2007 Luca Gugelmann <lucag@student.ethz.ch>
released under the GNU LGPL <http://www.gnu.org/licenses/old-licenses/library.txt>
Files: src/third-party/singleapplication/*
Files: external/singleapplication/*
Copyright: 2015 - 2016 Itay Grudev
License: Expat
Files: src/third-party/Qt-Color-Widgets/*
Files: external/Qt-Color-Widgets/*
Copyright: 2013-2017 Mattia Basaglia <mattia.basaglia@gmail.com>
License: LGPL-3+
Comments:
Comment:
As a special exception, this library can be included in any project under the
terms of any of the GNU licenses, distributing the whole project under a
different GNU license, see LICENSE-EXCEPTION for details.
@@ -362,8 +366,8 @@ License: Free-Art-License-1.3
(without any changes).
.
Translation : Jonathan Clarke, Benjamin Jean, Griselda Jung, Fanny
Mourguet, Antoine Pitrou. Thanks to framalang.org
Mourguet, Antoine Pitrou. Thanks to framalang.org
License: GPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@@ -21,4 +21,4 @@ export QT_SELECT := 5
override_dh_auto_configure:
# The existence of an empty .git directory triggers syncqt.
mkdir .git || true
dh_auto_configure -- CONFIG+=packaging CONFIG-=debug CONFIG+=release
dh_auto_configure --

View File

@@ -0,0 +1 @@
3.0 (native)

47
data/flameshot.rc Normal file
View File

@@ -0,0 +1,47 @@
#pragma code_page(65001) // UTF-8
IDI_ICON1 ICON "img\\app\\flameshot.ico"
#include <windows.h>
#define VER_FILEVERSION FLAMESHOT_VERSION_MAJOR,FLAMESHOT_VERSION_MINOR,FLAMESHOT_VERSION_BUGFIX,FLAMESHOT_VERSION_BUILD
#define VER_FILEVERSION_STR FLAMESHOT_VERSION_STRING
#define VER_PRODUCTVERSION FLAMESHOT_VERSION_MAJOR,FLAMESHOT_VERSION_MINOR,FLAMESHOT_VERSION_BUGFIX,FLAMESHOT_VERSION_BUILD
#define VER_PRODUCTVERSION_STR FLAMESHOT_VERSION_STRING
#ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
PRODUCTVERSION VER_PRODUCTVERSION
FILEFLAGSMASK VER_DEBUG
FILEFLAGS VER_DEBUG
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "The flameshot Org."
VALUE "FileDescription", "Flameshot"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "flameshot"
VALUE "LegalCopyright", "Copyright (C) 2017-2020 flameshot.org"
VALUE "OriginalFilename", "flameshot.exe"
VALUE "ProductName", "Flameshot"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04b0 /* U.S. English (Unicode) */
END
END

View File

@@ -0,0 +1,33 @@
app-id: org.flameshot.Flameshot
runtime: org.kde.Platform
runtime-version: '5.15'
sdk: org.kde.Sdk
command: flameshot
finish-args:
# X11 + XShm access
- --share=ipc
- --socket=x11
# Wayland access
- --socket=wayland
- --device=dri
# Connectivity
- --share=network
# QtSingleApplication, allow other instances to see log files
- --env=TMPDIR=/var/tmp
# Allow loading/saving files from anywhere
- --filesystem=host
# Notification access
- --talk-name=org.freedesktop.Notifications
# System Tray Icon
- --talk-name=org.kde.StatusNotifierWatcher
- --own-name=org.kde.*
- --own-name=org.flameshot.Flameshot
modules:
- name: flameshot
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_BUILD_TYPE=Release
sources:
- type: git
url: https://github.com/flameshot-org/flameshot.git
branch: master

View File

@@ -1,7 +1,9 @@
<RCC>
<qresource prefix="/">
<file>img/app/flameshot.svg</file>
<file>img/app/flameshot.png</file>
<file>img/app/org.flameshot.Flameshot.svg</file>
<file>img/app/org.flameshot.Flameshot.png</file>
<file>img/app/keyboard.svg</file>
<file>img/material/black/delete.svg</file>
<file>img/material/black/undo-variant.svg</file>
<file>img/material/black/text.svg</file>
<file>img/material/black/square.svg</file>
@@ -31,7 +33,7 @@
<file>img/material/black/cloud-upload.svg</file>
<file>img/material/black/close.svg</file>
<file>img/material/black/circle-outline.svg</file>
<file>img/material/black/blur.svg</file>
<file>img/material/black/pixelate.svg</file>
<file>img/material/black/arrow-bottom-left.svg</file>
<file>img/material/white/undo-variant.svg</file>
<file>img/material/white/text.svg</file>
@@ -62,7 +64,13 @@
<file>img/material/white/cloud-upload.svg</file>
<file>img/material/white/close.svg</file>
<file>img/material/white/circle-outline.svg</file>
<file>img/material/white/blur.svg</file>
<file>img/material/white/pixelate.svg</file>
<file>img/material/white/arrow-bottom-left.svg</file>
<file>img/material/black/circlecount-outline.svg</file>
<file>img/material/white/circlecount-outline.svg</file>
<file>img/material/black/shortcut.svg</file>
<file>img/material/white/shortcut.svg</file>
<file>img/material/black/filepath.svg</file>
<file>img/material/white/filepath.svg</file>
</qresource>
</RCC>

View File

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

1427
data/img/app/keyboard.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 180 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 223 B

View File

Before

Width:  |  Height:  |  Size: 101 B

After

Width:  |  Height:  |  Size: 101 B

View File

Before

Width:  |  Height:  |  Size: 469 B

After

Width:  |  Height:  |  Size: 469 B

View File

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
viewBox="0 0 24 24"
version="1.1"
id="svg76"
sodipodi:docname="circlecount-outline.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
inkscape:export-filename="/home/jeremy/flameshot/img/material/black/circlecount-outline.svg.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<metadata
id="metadata82">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs80" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1054"
id="namedview78"
showgrid="false"
inkscape:zoom="12.3891"
inkscape:cx="-0.75693185"
inkscape:cy="16.377941"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg76"
showguides="true"
inkscape:guide-bbox="true">
<sodipodi:guide
position="7.5053507,12.014269"
orientation="0,1"
id="guide32"
inkscape:locked="false" />
<sodipodi:guide
position="12.071344,11.129608"
orientation="1,0"
id="guide34"
inkscape:locked="false" />
</sodipodi:namedview>
<path
d="M12,20C7.58,20 4,16.42 4,12C4,7.58 7.58,4 12,4C16.42,4 20,7.58 20,12C20,16.42 16.42,20 12,20M12,2C6.48,2 2,6.48 2,12C2,17.52 6.48,22 12,22C17.52,22 22,17.52 22,12C22,6.48 17.52,2 12,2Z"
id="path74" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:16px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
x="6.6492271"
y="17.579073"
id="text86"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"><tspan
sodipodi:role="line"
id="tspan84"
x="6.6492271"
y="17.579073">1</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 245 B

View File

Before

Width:  |  Height:  |  Size: 159 B

After

Width:  |  Height:  |  Size: 159 B

View File

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 344 B

View File

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 244 B

View File

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 332 B

View File

Before

Width:  |  Height:  |  Size: 313 B

After

Width:  |  Height:  |  Size: 313 B

View File

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 360 B

View File

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 280 B

View File

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 224 B

View File

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 190 B

View File

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 274 B

View File

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

View File

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 266 B

View File

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
<g><path d="M876.9,311.5c-20.8,0-37.7,16.9-37.7,37.7v490c0,41.6-33.8,75.4-75.4,75.4H236.2c-41.6,0-75.4-33.8-75.4-75.4v-490c0-20.8-16.9-37.7-37.7-37.7c-20.8,0-37.7,16.9-37.7,37.7v490c0,83.3,67.5,150.8,150.8,150.8h527.7c83.3,0,150.8-67.5,150.8-150.8v-490C914.6,328.4,897.8,311.5,876.9,311.5z M349.2,763.8V349.2c0-20.8-16.9-37.7-37.7-37.7c-20.8,0-37.7,16.9-37.7,37.7v414.6c0,20.8,16.9,37.7,37.7,37.7C332.3,801.5,349.2,784.7,349.2,763.8z M952.3,160.8H650.8V47.7c0-20.8-16.8-37.7-37.7-37.7H386.9c-20.8,0-37.7,16.9-37.7,37.7v113.1H47.7c-20.8,0-37.7,16.9-37.7,37.7c0,20.8,16.9,37.7,37.7,37.7h904.6c20.8,0,37.7-16.8,37.7-37.7C990,177.7,973.2,160.8,952.3,160.8z M575.4,160.8H424.6V85.4h150.8V160.8z M726.2,763.8V349.2c0-20.8-16.8-37.7-37.7-37.7c-20.8,0-37.7,16.9-37.7,37.7v414.6c0,20.8,16.8,37.7,37.7,37.7C709.3,801.5,726.2,784.7,726.2,763.8z M537.7,763.8V349.2c0-20.8-16.8-37.7-37.7-37.7c-20.8,0-37.7,16.9-37.7,37.7v414.6c0,20.8,16.9,37.7,37.7,37.7C520.8,801.5,537.7,784.7,537.7,763.8z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 282 B

View File

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 242 B

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
<g><g><g><path d="M696.4,10H132.5v980h735V181L696.4,10z M683.7,83.9l109.9,109.9H683.7V83.9z M806.3,928.8H193.7V71.2h428.8V255h183.8V928.8z"/><path d="M500,683.8l-61.3,0V561.3H500v-245H255v245h122.5V745H500v122.5h245v-245H500V683.8z M561.3,683.8h122.5v122.5H561.3V683.8z"/></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></g>
</svg>

After

Width:  |  Height:  |  Size: 871 B

View File

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 332 B

View File

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 327 B

View File

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 321 B

View File

Before

Width:  |  Height:  |  Size: 272 B

After

Width:  |  Height:  |  Size: 272 B

View File

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 140 B

View File

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 194 B

View File

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 146 B

View File

Before

Width:  |  Height:  |  Size: 292 B

After

Width:  |  Height:  |  Size: 292 B

View File

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 207 B

View File

Before

Width:  |  Height:  |  Size: 254 B

After

Width:  |  Height:  |  Size: 254 B

View File

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

View File

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 218 B

View File

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 151 B

View File

Before

Width:  |  Height:  |  Size: 333 B

After

Width:  |  Height:  |  Size: 333 B

View File

Before

Width:  |  Height:  |  Size: 335 B

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="minus.svg"
id="svg4"
version="1.1"
viewBox="0 0 24 24">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
inkscape:current-layer="svg4"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="1920"
inkscape:cy="13.075889"
inkscape:cx="14.554259"
inkscape:zoom="22.388564"
inkscape:pagecheckerboard="false"
showgrid="false"
id="namedview6"
inkscape:window-height="1027"
inkscape:window-width="1920"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff"
inkscape:document-rotation="0" />
<path
style="stroke-width:1.65234;fill:#000000"
sodipodi:nodetypes="ccccc"
id="path2"
fill="#ffffff"
d="m 21.914037,10.34766 v 3.30468 c -7.15882,0 -15.2248669,0 -19.8280741,0 v -3.30468 c 6.609358,0 13.2187161,0 19.8280741,0 z" />
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 339 B

View File

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 179 B

View File

Before

Width:  |  Height:  |  Size: 159 B

After

Width:  |  Height:  |  Size: 159 B

View File

Before

Width:  |  Height:  |  Size: 74 B

After

Width:  |  Height:  |  Size: 74 B

View File

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 270 B

View File

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 175 B

View File

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 249 B

View File

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 197 B

View File

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 218 B

View File

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 360 B

View File

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 166 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Some files were not shown because too many files have changed in this diff Show More