Skip to content

Commit d4d3b9e

Browse files
author
Yuriy Puchkov
committed
Merge branch 'master-flameshotorg' into master_nc_merge_upstream
# Conflicts: # .travis.yml # appveyor.yml # data/graphics.qrc # data/img/app/keyboard.svg # data/img/material/black/delete.png # data/img/material/black/delete.svg # data/img/material/black/filepath.svg # data/img/material/black/shortcut.svg # data/img/material/white/filepath.svg # data/img/material/white/shortcut.svg # data/translations/Internationalization_hu.ts # data/translations/Internationalization_ka.ts # external/Qt-Color-Widgets/src/color_wheel.cpp # external/singleapplication/singleapplication.cpp # flameshot.pro # src/cli/commandlineparser.cpp # src/config/buttonlistview.cpp # src/config/configwindow.cpp # src/config/configwindow.h # src/config/geneneralconf.cpp # src/config/geneneralconf.h # src/config/uicoloreditor.cpp # src/config/uicoloreditor.h # src/core/controller.cpp # src/core/globalshortcutfilter.cpp # src/main.cpp # src/third-party/Qt-Color-Widgets/src/color_utils.cpp # src/tools/abstractactiontool.h # src/tools/abstractpathtool.h # src/tools/arrow/arrowtool.cpp # src/tools/arrow/arrowtool.h # src/tools/blur/blurtool.cpp # src/tools/capturetool.h # src/tools/circle/circletool.cpp # src/tools/circle/circletool.h # src/tools/copy/copytool.cpp # src/tools/copy/copytool.h # src/tools/exit/exittool.cpp # src/tools/exit/exittool.h # src/tools/imgur/imguruploader.cpp # src/tools/launcher/applaunchertool.cpp # src/tools/launcher/applaunchertool.h # src/tools/launcher/applauncherwidget.cpp # src/tools/launcher/openwithprogram.cpp # src/tools/line/linetool.cpp # src/tools/line/linetool.h # src/tools/marker/markertool.cpp # src/tools/marker/markertool.h # src/tools/move/movetool.cpp # src/tools/pencil/penciltool.cpp # src/tools/pencil/penciltool.h # src/tools/pin/pintool.cpp # src/tools/pin/pintool.h # src/tools/pin/pinwidget.cpp # src/tools/pixelate/pixelatetool.h # src/tools/rectangle/rectangletool.cpp # src/tools/rectangle/rectangletool.h # src/tools/redo/redotool.cpp # src/tools/redo/redotool.h # src/tools/save/savetool.cpp # src/tools/save/savetool.h # src/tools/selection/selectiontool.cpp # src/tools/selection/selectiontool.h # src/tools/sizeindicator/sizeindicatortool.cpp # src/tools/sizeindicator/sizeindicatortool.h # src/tools/storage/imgur/imguruploader.h # src/tools/storage/imgur/imguruploadertool.cpp # src/tools/storage/imgur/imguruploadertool.h # src/tools/text/textconfig.cpp # src/tools/text/texttool.cpp # src/tools/text/texttool.h # src/tools/toolfactory.cpp # src/tools/toolfactory.h # src/tools/undo/undotool.cpp # src/tools/undo/undotool.h # src/utils/confighandler.cpp # src/utils/confighandler.h # src/utils/dbusutils.cpp # src/utils/screenshotsaver.cpp # src/utils/screenshotsaver.h # src/widgets/capture/buttonhandler.cpp # src/widgets/capture/buttonhandler.h # src/widgets/capture/capturebutton.cpp # src/widgets/capture/capturebutton.h # src/widgets/capture/capturewidget.cpp # src/widgets/capture/capturewidget.h # src/widgets/capture/colorpicker.cpp # src/widgets/capturelauncher.cpp # src/widgets/infowindow.cpp # src/widgets/infowindow.h # src/widgets/panel/sidepanelwidget.cpp # src/widgets/panel/utilitypanel.cpp # src/widgets/panel/utilitypanel.h # translations/Internationalization_ca.ts # translations/Internationalization_de_DE.ts # translations/Internationalization_es.ts # translations/Internationalization_fr.ts # translations/Internationalization_ja.ts # translations/Internationalization_nl.ts # translations/Internationalization_pl.ts # translations/Internationalization_pt_br.ts # translations/Internationalization_ru.ts # translations/Internationalization_sk.ts # translations/Internationalization_sr.ts # translations/Internationalization_tr.ts # translations/Internationalization_uk.ts # translations/Internationalization_zh_CN.ts # translations/Internationalization_zh_TW.ts
2 parents a1a68ab + dfcc9cb commit d4d3b9e

351 files changed

Lines changed: 23429 additions & 14623 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-tidy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
---
3+
Checks: '*,-fuchsia-*,-google-*,-zircon-*,-abseil-*,-modernize-use-trailing-return-type,-llvm-*'
4+
WarningsAsErrors: '*'
5+
HeaderFilterRegex: ''
6+
FormatStyle: none

.cmake-format.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
additional_commands:
2+
foo:
3+
flags:
4+
- BAR
5+
- BAZ
6+
kwargs:
7+
DEPENDS: '*'
8+
HEADERS: '*'
9+
SOURCES: '*'
10+
bullet_char: '*'
11+
dangle_parens: false
12+
enum_char: .
13+
line_ending: unix
14+
line_width: 120
15+
max_pargs_hwrap: 3
16+
separate_ctrl_name_with_space: false
17+
separate_fn_name_with_space: false
18+
tab_size: 2

.github/workflows/Linux-pack.yml

Lines changed: 413 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/Windows-pack.yml

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
name: Packaging(Windows)
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- 'README.md'
9+
- 'LICENSE'
10+
11+
pull_request:
12+
branches:
13+
- master
14+
paths-ignore:
15+
- 'README.md'
16+
- 'LICENSE'
17+
18+
env:
19+
PRODUCT: flameshot
20+
21+
jobs:
22+
windows-pack:
23+
name: VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }}
24+
runs-on: windows-2019
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
qt_ver: [5.15.1]
29+
qt_target: [desktop]
30+
config:
31+
- {
32+
arch: x86,
33+
generator: "-G'Visual Studio 16 2019' -A Win32",
34+
vcpkg_triplet: x86-windows,
35+
qt_arch: win32_msvc2019,
36+
qt_arch_install: msvc2019,
37+
pak_arch: win32
38+
}
39+
- {
40+
arch: x64,
41+
generator: "-G'Visual Studio 16 2019' -A x64",
42+
vcpkg_triplet: x64-windows,
43+
qt_arch: win64_msvc2019_64,
44+
qt_arch_install: msvc2019_64,
45+
pak_arch: win64
46+
}
47+
type: [portable, installer]
48+
env:
49+
VCINSTALLDIR: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/
50+
Qt5_DIR: ${{ github.workspace }}\build\Qt\${{ matrix.qt_ver }}\${{ matrix.config.qt_arch_install }}\lib\cmake\Qt5\
51+
QTDIR: ${{ github.workspace }}\build\Qt\${{ matrix.qt_ver }}\${{ matrix.config.qt_arch_install }}\
52+
53+
steps:
54+
- name: Checkout Source code
55+
uses: actions/checkout@v2
56+
with:
57+
fetch-depth: 0
58+
ref: master
59+
60+
- name: Set env & Print flameshot version
61+
shell: bash
62+
run: |
63+
last_committed_tag=$(git tag -l --sort=-v:refname | head -1)
64+
git_revno=$(git rev-list $(git describe --tags --abbrev=0)..HEAD --count)
65+
git_hash=$(git rev-parse --short HEAD)
66+
echo "=======FLAMESHOT VERSION========"
67+
echo ${last_committed_tag:1}
68+
echo "Details: ${last_committed_tag}+git${git_revno}.${git_hash}"
69+
echo "================================"
70+
echo ::set-env name=VERSION::$(echo ${last_committed_tag:1})
71+
72+
- name: Cache Qt
73+
id: cache-qt
74+
uses: actions/cache@v1
75+
with:
76+
path: ./build/Qt/${{ matrix.qt_ver }}/${{ matrix.config.qt_arch_install }}
77+
key: ${{ runner.os }}-QtCache/${{ matrix.qt_ver }}/${{ matrix.config.qt_arch }}
78+
79+
- name: Install Qt
80+
uses: jurplel/install-qt-action@v2
81+
with:
82+
version: ${{ matrix.qt_ver }}
83+
target: ${{ matrix.qt_target }}
84+
arch: ${{ matrix.config.qt_arch }}
85+
dir: '${{ github.workspace }}/build/'
86+
modules: 'qtscript'
87+
cached: ${{ steps.cache-qt.outputs.cache-hit }}
88+
89+
- name: Configure
90+
working-directory: build
91+
shell: pwsh
92+
run: |
93+
cmake .. ${{matrix.config.generator}} `
94+
-DCMAKE_BUILD_TYPE=Release `
95+
-DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }}
96+
97+
- name: Compile
98+
working-directory: build
99+
shell: pwsh
100+
run: cmake --build . --config Release
101+
102+
- name: CPack
103+
working-directory: build
104+
shell: pwsh
105+
run: |
106+
If ($env:TYPE -eq "installer")
107+
{
108+
cpack -G WIX -B "$env:GITHUB_WORKSPACE\build\Package"
109+
}
110+
ElseIf($env:TYPE -eq "portable")
111+
{
112+
cpack -G ZIP -B "$env:GITHUB_WORKSPACE\build\Package"
113+
}
114+
env:
115+
TYPE: ${{matrix.type}}
116+
117+
- name: Package Clean
118+
run: rm -r $env:GITHUB_WORKSPACE\build\Package\_CPack_Packages
119+
120+
- name: SHA256Sum of Windows installer(daily build)
121+
if: matrix.type == 'installer'
122+
shell: bash
123+
run: |
124+
sha256sum $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi
125+
sha256sum $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi > $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi.sha256sum
126+
python -m pip install -U -q requests
127+
echo "============Windows installer sha256sum download link============"
128+
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi.sha256sum)
129+
echo "=======no operation for you can see link in the log console====="
130+
131+
- name: SHA256Sum of Windows portable(daily build)
132+
if: matrix.type == 'portable'
133+
shell: bash
134+
run: |
135+
sha256sum $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip
136+
sha256sum $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip > $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip.sha256sum
137+
python -m pip install -U -q requests
138+
echo "===========Windows portable sha256sum download link============"
139+
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip.sha256sum)
140+
echo "=====no operation for you can see link in the log console====="
141+
142+
- name: Upload Windows installer(daily build)
143+
if: matrix.type == 'installer'
144+
shell: bash
145+
run: |
146+
python -m pip install -U -q requests
147+
echo "================Windows installer download link================"
148+
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/Flameshot-${VERSION}-${{ matrix.config.pak_arch }}.msi)
149+
echo "=====no operation for you can see link in the log console====="
150+
151+
- name: Upload Windows portable(daily build)
152+
if: matrix.type == 'portable'
153+
shell: bash
154+
run: |
155+
python -m pip install -U -q requests
156+
echo "=================Windows portable download link================"
157+
echo $(python $GITHUB_WORKSPACE/scripts/upload_services/transferwee.py upload $GITHUB_WORKSPACE/build/Package/flameshot-${VERSION}-${{ matrix.config.pak_arch }}.zip)
158+
echo "=====no operation for you can see link in the log console====="

.github/workflows/build_cmake.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: Building(CMake)
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths-ignore:
7+
- 'README.md'
8+
- 'LICENSE'
9+
pull_request:
10+
branches: [ master ]
11+
paths-ignore:
12+
- 'README.md'
13+
- 'LICENSE'
14+
15+
env:
16+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
17+
BUILD_TYPE: RelWithDebInfo
18+
19+
jobs:
20+
linux-build:
21+
name: ${{ matrix.os}}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
matrix:
25+
os: [ubuntu-20.04]
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
30+
- name: Install Dependencies
31+
run: |
32+
sudo apt-get -y -qq update
33+
sudo apt-get -y --no-install-recommends install \
34+
cmake \
35+
extra-cmake-modules \
36+
build-essential \
37+
qt5-default \
38+
qttools5-dev-tools \
39+
qttools5-dev \
40+
libqt5dbus5 \
41+
libqt5network5 \
42+
libqt5core5a \
43+
libqt5widgets5 \
44+
libqt5gui5 \
45+
libqt5svg5-dev
46+
47+
- name: Create Build Environment
48+
# Some projects don't allow in-source building, so create a separate build directory
49+
# We'll use this as our working directory for all subsequent commands
50+
run: cmake -E make_directory ${{runner.workspace}}/build
51+
52+
- name: Configure CMake
53+
# Use a bash shell so we can use the same syntax for environment variable
54+
# access regardless of the host operating system
55+
shell: bash
56+
working-directory: ${{runner.workspace}}/build
57+
# Note the current convention is to use the -S and -B options here to specify source
58+
# and build directories, but this is only available with CMake 3.13 and higher.
59+
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
60+
#
61+
# We need to source the profile file to make sure conan is in PATH
62+
run: |
63+
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
64+
- name: Build
65+
working-directory: ${{runner.workspace}}/build
66+
shell: bash
67+
# Execute the build. You can specify a specific target with "--target <NAME>"
68+
run: cmake --build . --config $BUILD_TYPE
69+
70+
- name: Test
71+
working-directory: ${{runner.workspace}}/build
72+
shell: bash
73+
# Execute tests defined by the CMake configuration.
74+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
75+
run: ctest -C $BUILD_TYPE
76+
77+
windows-build:
78+
runs-on: ${{ matrix.config.os }}
79+
strategy:
80+
fail-fast: false
81+
matrix:
82+
config:
83+
- {
84+
name: "Windows 2019 MSVC",
85+
artifact: "Windows-MSVC.tar.xz",
86+
os: windows-2019,
87+
cc: "cl", cxx: "cl",
88+
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
89+
}
90+
- {
91+
name: "Windows 2019 MinGW",
92+
artifact: "Windows-MinGW.tar.xz",
93+
os: windows-2019,
94+
cc: "gcc", cxx: "g++"
95+
}
96+
97+
steps:
98+
- uses: actions/checkout@v2
99+
100+
- name: Cache Qt
101+
id: cache-qt
102+
uses: actions/cache@v1
103+
with:
104+
path: ./build/Qt
105+
key: ${{ runner.os }}-QtCache
106+
107+
- name: Install Qt
108+
uses: jurplel/install-qt-action@v2
109+
with:
110+
version: 5.15.1
111+
target: desktop
112+
dir: '${{ github.workspace }}/build/'
113+
114+
- name: Configure
115+
working-directory: build
116+
shell: powershell
117+
run: |
118+
cmake -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE ../
119+
120+
- name: Build
121+
working-directory: build
122+
shell: powershell
123+
run: |
124+
cmake --build . --config $env:BUILD_TYPE

.github/workflows/clang-format.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: test-clang-format
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: DoozyX/clang-format-lint-action@v0.9
12+
with:
13+
source: './src'
14+
#exclude: './third_party ./external'
15+
extensions: 'h,cpp'
16+
clangFormatVersion: 11
17+
style: file

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,13 @@ stage/
5353
.snapcraft/
5454
flameshot*.tar.bz2
5555

56+
.vscode/
57+
build/
58+
data/flatpak/.flatpak-builder
59+
# NVIM
60+
*~
61+
62+
# Jetbrains
63+
.idea/
5664

5765
# End of https://www.gitignore.io/api/snapcraft

.travis/linux_after_success.sh

Lines changed: 0 additions & 31 deletions
This file was deleted.

.travis/linux_before_install.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

.travis/linux_install.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)